@cimulate/copilot-widget 1.8.2 → 1.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cimulate-copilot-widget.css +1 -1
- package/dist/cimulate-copilot-widget.d.ts +31 -1
- package/dist/cimulate-copilot-widget.es.js +4869 -4867
- package/dist/cimulate-copilot-widget.umd.js +29 -29
- package/dist/copilot.css +1 -1
- package/dist/copilot.es.js +4870 -4868
- package/dist/copilot.umd.js +29 -29
- package/dist/messaging.css +1 -1
- package/dist/messaging.d.ts +47 -2
- package/dist/messaging.es.js +7212 -7100
- package/dist/messaging.umd.js +33 -33
- package/package.json +2 -2
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
(function(je,ze){typeof exports=="object"&&typeof module!="undefined"?module.exports=ze():typeof define=="function"&&define.amd?define(ze):(je=typeof globalThis!="undefined"?globalThis:je||self,je["cimulate-copilot-widget"]=ze())})(this,(function(){"use strict";var f7=Object.defineProperty,h7=Object.defineProperties;var p7=Object.getOwnPropertyDescriptors;var vd=Object.getOwnPropertySymbols;var R2=Object.prototype.hasOwnProperty,L2=Object.prototype.propertyIsEnumerable;var Zs=(je,ze)=>(ze=Symbol[je])?ze:Symbol.for("Symbol."+je),m7=je=>{throw TypeError(je)},ea=Math.pow,g0=(je,ze,Je)=>ze in je?f7(je,ze,{enumerable:!0,configurable:!0,writable:!0,value:Je}):je[ze]=Je,F=(je,ze)=>{for(var Je in ze||(ze={}))R2.call(ze,Je)&&g0(je,Je,ze[Je]);if(vd)for(var Je of vd(ze))L2.call(ze,Je)&&g0(je,Je,ze[Je]);return je},me=(je,ze)=>h7(je,p7(ze));var ln=(je,ze)=>{var Je={};for(var st in je)R2.call(je,st)&&ze.indexOf(st)<0&&(Je[st]=je[st]);if(je!=null&&vd)for(var st of vd(je))ze.indexOf(st)<0&&L2.call(je,st)&&(Je[st]=je[st]);return Je};var Se=(je,ze,Je)=>g0(je,typeof ze!="symbol"?ze+"":ze,Je);var tt=(je,ze,Je)=>new Promise((st,Bt)=>{var Le=Ot=>{try{rn(Je.next(Ot))}catch(bn){Bt(bn)}},Vt=Ot=>{try{rn(Je.throw(Ot))}catch(bn){Bt(bn)}},rn=Ot=>Ot.done?st(Ot.value):Promise.resolve(Ot.value).then(Le,Vt);rn((Je=Je.apply(je,ze)).next())}),Jr=function(je,ze){this[0]=je,this[1]=ze},kd=(je,ze,Je)=>{var st=(Vt,rn,Ot,bn)=>{try{var ta=Je[Vt](rn),Hu=(rn=ta.value)instanceof Jr,zu=ta.done;Promise.resolve(Hu?rn[0]:rn).then(Nr=>Hu?st(Vt==="return"?Vt:"next",rn[1]?{done:Nr.done,value:Nr.value}:Nr,Ot,bn):Ot({value:Nr,done:zu})).catch(Nr=>st("throw",Nr,Ot,bn))}catch(Nr){bn(Nr)}},Bt=Vt=>Le[Vt]=rn=>new Promise((Ot,bn)=>st(Vt,rn,Ot,bn)),Le={};return Je=Je.apply(je,ze),Le[Zs("asyncIterator")]=()=>Le,Bt("next"),Bt("throw"),Bt("return"),Le},E0=je=>{var ze=je[Zs("asyncIterator")],Je=!1,st,Bt={};return ze==null?(ze=je[Zs("iterator")](),st=Le=>Bt[Le]=Vt=>ze[Le](Vt)):(ze=ze.call(je),st=Le=>Bt[Le]=Vt=>{if(Je){if(Je=!1,Le==="throw")throw Vt;return Vt}return Je=!0,{done:!1,value:new Jr(new Promise(rn=>{var Ot=ze[Le](Vt);Ot instanceof Object||m7("Object expected"),rn(Ot)}),1)}}),Bt[Zs("iterator")]=()=>Bt,st("next"),"throw"in ze?st("throw"):Bt.throw=Le=>{throw Le},"return"in ze&&st("return"),Bt},D2=(je,ze,Je)=>(ze=je[Zs("asyncIterator")])?ze.call(je):(je=je[Zs("iterator")](),ze={},Je=(st,Bt)=>(Bt=je[st])&&(ze[st]=Le=>new Promise((Vt,rn,Ot)=>(Le=Bt.call(je,Le),Ot=Le.done,Promise.resolve(Le.value).then(bn=>Vt({value:bn,done:Ot}),rn)))),Je("next"),Je("return"),ze);var je=document.createElement("style");je.textContent=`.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-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-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-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}.cim-widget-search-input{width:100%;height:100%;min-height:2rem;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:170px;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-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color: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:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;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.cim-chat-component{border:1px solid var(--cim-widget-border-color)}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:calc(100% - 1rem)}&.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:.5rem 1rem;margin-bottom:.5rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0}@media(576px<=width<=768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100%!important;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:.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:.5rem 1rem;margin-bottom:1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;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)}.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-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);max-width:85%}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(je);function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Je={exports:{}},st={},Bt={exports:{}},Le={};var Vt;function rn(){if(Vt)return Le;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"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function A(M,te,O){this.props=M,this.context=te,this.refs=S,this.updater=O||y}A.prototype.isReactComponent={},A.prototype.setState=function(M,te){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,te,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function v(){}v.prototype=A.prototype;function P(M,te,O){this.props=M,this.context=te,this.refs=S,this.updater=O||y}var C=P.prototype=new v;C.constructor=P,_(C,A.prototype),C.isPureReactComponent=!0;var B=Array.isArray,q=Object.prototype.hasOwnProperty,D={current:null},Q={key:!0,ref:!0,__self:!0,__source:!0};function re(M,te,O){var _e,Oe={},Ce=null,$e=null;if(te!=null)for(_e in te.ref!==void 0&&($e=te.ref),te.key!==void 0&&(Ce=""+te.key),te)q.call(te,_e)&&!Q.hasOwnProperty(_e)&&(Oe[_e]=te[_e]);var we=arguments.length-2;if(we===1)Oe.children=O;else if(1<we){for(var We=Array(we),ht=0;ht<we;ht++)We[ht]=arguments[ht+2];Oe.children=We}if(M&&M.defaultProps)for(_e in we=M.defaultProps,we)Oe[_e]===void 0&&(Oe[_e]=we[_e]);return{$$typeof:e,type:M,key:Ce,ref:$e,props:Oe,_owner:D.current}}function Te(M,te){return{$$typeof:e,type:M.type,key:te,ref:M.ref,props:M.props,_owner:M._owner}}function $(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ee(M){var te={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(O){return te[O]})}var ce=/\/+/g;function he(M,te){return typeof M=="object"&&M!==null&&M.key!=null?ee(""+M.key):te.toString(36)}function le(M,te,O,_e,Oe){var Ce=typeof M;(Ce==="undefined"||Ce==="boolean")&&(M=null);var $e=!1;if(M===null)$e=!0;else switch(Ce){case"string":case"number":$e=!0;break;case"object":switch(M.$$typeof){case e:case t:$e=!0}}if($e)return $e=M,Oe=Oe($e),M=_e===""?"."+he($e,0):_e,B(Oe)?(O="",M!=null&&(O=M.replace(ce,"$&/")+"/"),le(Oe,te,O,"",function(ht){return ht})):Oe!=null&&($(Oe)&&(Oe=Te(Oe,O+(!Oe.key||$e&&$e.key===Oe.key?"":(""+Oe.key).replace(ce,"$&/")+"/")+M)),te.push(Oe)),1;if($e=0,_e=_e===""?".":_e+":",B(M))for(var we=0;we<M.length;we++){Ce=M[we];var We=_e+he(Ce,we);$e+=le(Ce,te,O,We,Oe)}else if(We=b(M),typeof We=="function")for(M=We.call(M),we=0;!(Ce=M.next()).done;)Ce=Ce.value,We=_e+he(Ce,we++),$e+=le(Ce,te,O,We,Oe);else if(Ce==="object")throw te=String(M),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.");return $e}function be(M,te,O){if(M==null)return M;var _e=[],Oe=0;return le(M,_e,"","",function(Ce){return te.call(O,Ce,Oe++)}),_e}function Me(M){if(M._status===-1){var te=M._result;te=te(),te.then(function(O){(M._status===0||M._status===-1)&&(M._status=1,M._result=O)},function(O){(M._status===0||M._status===-1)&&(M._status=2,M._result=O)}),M._status===-1&&(M._status=0,M._result=te)}if(M._status===1)return M._result.default;throw M._result}var de={current:null},K={transition:null},ie={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:K,ReactCurrentOwner:D};function k(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:be,forEach:function(M,te,O){be(M,function(){te.apply(this,arguments)},O)},count:function(M){var te=0;return be(M,function(){te++}),te},toArray:function(M){return be(M,function(te){return te})||[]},only:function(M){if(!$(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Le.Component=A,Le.Fragment=n,Le.Profiler=o,Le.PureComponent=P,Le.StrictMode=r,Le.Suspense=d,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Le.act=k,Le.cloneElement=function(M,te,O){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var _e=_({},M.props),Oe=M.key,Ce=M.ref,$e=M._owner;if(te!=null){if(te.ref!==void 0&&(Ce=te.ref,$e=D.current),te.key!==void 0&&(Oe=""+te.key),M.type&&M.type.defaultProps)var we=M.type.defaultProps;for(We in te)q.call(te,We)&&!Q.hasOwnProperty(We)&&(_e[We]=te[We]===void 0&&we!==void 0?we[We]:te[We])}var We=arguments.length-2;if(We===1)_e.children=O;else if(1<We){we=Array(We);for(var ht=0;ht<We;ht++)we[ht]=arguments[ht+2];_e.children=we}return{$$typeof:e,type:M.type,key:Oe,ref:Ce,props:_e,_owner:$e}},Le.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:a,_context:M},M.Consumer=M},Le.createElement=re,Le.createFactory=function(M){var te=re.bind(null,M);return te.type=M,te},Le.createRef=function(){return{current:null}},Le.forwardRef=function(M){return{$$typeof:c,render:M}},Le.isValidElement=$,Le.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:Me}},Le.memo=function(M,te){return{$$typeof:f,type:M,compare:te===void 0?null:te}},Le.startTransition=function(M){var te=K.transition;K.transition={};try{M()}finally{K.transition=te}},Le.unstable_act=k,Le.useCallback=function(M,te){return de.current.useCallback(M,te)},Le.useContext=function(M){return de.current.useContext(M)},Le.useDebugValue=function(){},Le.useDeferredValue=function(M){return de.current.useDeferredValue(M)},Le.useEffect=function(M,te){return de.current.useEffect(M,te)},Le.useId=function(){return de.current.useId()},Le.useImperativeHandle=function(M,te,O){return de.current.useImperativeHandle(M,te,O)},Le.useInsertionEffect=function(M,te){return de.current.useInsertionEffect(M,te)},Le.useLayoutEffect=function(M,te){return de.current.useLayoutEffect(M,te)},Le.useMemo=function(M,te){return de.current.useMemo(M,te)},Le.useReducer=function(M,te,O){return de.current.useReducer(M,te,O)},Le.useRef=function(M){return de.current.useRef(M)},Le.useState=function(M){return de.current.useState(M)},Le.useSyncExternalStore=function(M,te,O){return de.current.useSyncExternalStore(M,te,O)},Le.useTransition=function(){return de.current.useTransition()},Le.version="18.3.1",Le}var Ot;function bn(){return Ot||(Ot=1,Bt.exports=rn()),Bt.exports}var ta;function Hu(){if(ta)return st;ta=1;var e=bn(),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,g={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(g[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)g[p]===void 0&&(g[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:g,_owner:o.current}}return st.Fragment=n,st.jsx=u,st.jsxs=u,st}var zu;function Nr(){return zu||(zu=1,Je.exports=Hu()),Je.exports}var w=Nr();const Pr=Object.create(null);Pr.open="0",Pr.close="1",Pr.ping="2",Pr.pong="3",Pr.message="4",Pr.upgrade="5",Pr.noop="6";const ju=Object.create(null);Object.keys(Pr).forEach(e=>{ju[Pr[e]]=e});const Nd={type:"error",data:"parser error"},y0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",T0=typeof ArrayBuffer=="function",b0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Pd=({type:e,data:t},n,r)=>y0&&t instanceof Blob?n?r(t):_0(t,r):T0&&(t instanceof ArrayBuffer||b0(t))?n?r(t):_0(new Blob([t]),r):r(Pr[e]+(t||"")),_0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function S0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Od;function U2(e,t){if(y0&&e.data instanceof Blob)return e.data.arrayBuffer().then(S0).then(t);if(T0&&(e.data instanceof ArrayBuffer||b0(e.data)))return t(S0(e.data));Pd(e,!1,n=>{Od||(Od=new TextEncoder),t(Od.encode(n))})}const x0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",na=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<x0.length;e++)na[x0.charCodeAt(e)]=e;const H2=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=na[e.charCodeAt(r)],u=na[e.charCodeAt(r+1)],c=na[e.charCodeAt(r+2)],d=na[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},z2=typeof ArrayBuffer=="function",Id=(e,t)=>{if(typeof e!="string")return{type:"message",data:w0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:j2(e.substring(1),t)}:ju[n]?e.length>1?{type:ju[n],data:e.substring(1)}:{type:ju[n]}:Nd},j2=(e,t)=>{if(z2){const n=H2(e);return w0(n,t)}else return{base64:!0,data:e}},w0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,C0="",$2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Pd(a,!1,c=>{r[u]=c,++o===n&&t(r.join(C0))})})},V2=(e,t)=>{const n=e.split(C0),r=[];for(let o=0;o<n.length;o++){const a=Id(n[o],t);if(r.push(a),a.type==="error")break}return r};function q2(){return new TransformStream({transform(e,t){U2(e,n=>{const r=n.length;let 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 Rd;function $u(e){return e.reduce((t,n)=>t+n.length,0)}function Vu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Y2(e,t){Rd||(Rd=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($u(n)<1)break;const d=Vu(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($u(n)<2)break;const d=Vu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if($u(n)<8)break;const d=Vu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(Nd);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if($u(n)<o)break;const d=Vu(n,o);c.enqueue(Id(a?d:Rd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(Nd);break}}}})}const A0=4;function Ut(e){if(e)return G2(e)}function G2(e){for(var t in Ut.prototype)e[t]=Ut.prototype[t];return e}Ut.prototype.on=Ut.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ut.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ut.prototype.off=Ut.prototype.removeListener=Ut.prototype.removeAllListeners=Ut.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},Ut.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},Ut.prototype.emitReserved=Ut.prototype.emit,Ut.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ut.prototype.hasListeners=function(e){return!!this.listeners(e).length};const qu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Kn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),W2="arraybuffer";function g7(){}function v0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const X2=Kn.setTimeout,K2=Kn.clearTimeout;function Yu(e,t){t.useNativeTimers?(e.setTimeoutFn=X2.bind(Kn),e.clearTimeoutFn=K2.bind(Kn)):(e.setTimeoutFn=Kn.setTimeout.bind(Kn),e.clearTimeoutFn=Kn.clearTimeout.bind(Kn))}const Q2=1.33;function J2(e){return typeof e=="string"?Z2(e):Math.ceil((e.byteLength||e.size)*Q2)}function Z2(e){let t=0,n=0;for(let r=0,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 k0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function ew(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function tw(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class nw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Ld extends Ut{constructor(t){super(),this.writable=!1,Yu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new nw(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Id(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=ew(t);return n.length?"?"+n:""}}class rw extends Ld{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};V2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,$2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=k0()),!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 iw=N0;function ow(){}class sw extends rw{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(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 Or extends Ut{constructor(t,n,r){super(),this.createRequest=t,Yu(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=v0(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=Or.requestsCount++,Or.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=ow,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Or.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(Or.requestsCount=0,Or.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",P0);else if(typeof addEventListener=="function"){const e="onpagehide"in Kn?"pagehide":"unload";addEventListener(e,P0,!1)}}function P0(){for(let e in Or.requests)Or.requests.hasOwnProperty(e)&&Or.requests[e].abort()}const aw=(function(){const e=O0({xdomain:!1});return e&&e.responseType!==null})();class uw extends sw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=aw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Or(O0,this.uri(),t)}}function O0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||iw))return new XMLHttpRequest}catch(n){}if(!t)try{return new Kn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const I0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class lw extends Ld{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=I0?{}:v0(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;Pd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&qu(()=>{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]=k0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Dd=Kn.WebSocket||Kn.MozWebSocket;class cw extends lw{createSocket(t,n,r){return I0?new Dd(t,n,r):n?new Dd(t,n):new Dd(t)}doWrite(t,n){this.ws.send(n)}}class dw extends Ld{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Y2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=q2();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&&qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const fw={websocket:cw,webtransport:dw,polling:uw},hw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function 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=hw.exec(e||""),a={},u=14;for(;u--;)a[pw[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=mw(a,a.path),a.queryKey=gw(a,a.query),a}function mw(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function gw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Fd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Gu=[];Fd&&addEventListener("offline",()=>{Gu.forEach(e=>e())},!1);class yi extends Ut{constructor(t,n){if(super(),this.binaryType=W2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=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);Yu(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=tw(this.opts.query)),Fd&&(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"})},Gu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=A0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=J2(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,qu(()=>{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(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Fd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Gu.indexOf(this._offlineEventListener);r!==-1&&Gu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=A0;class Ew extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;yi.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=g=>{const b=new Error("probe error: "+g);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function f(g){n&&g.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",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 yw=class extends Ew{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=>fw[o]).filter(o=>!!o)),super(t,r)}};function Tw(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=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 bw=typeof ArrayBuffer=="function",_w=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,R0=Object.prototype.toString,Sw=typeof Blob=="function"||typeof Blob!="undefined"&&R0.call(Blob)==="[object BlobConstructor]",xw=typeof File=="function"||typeof File!="undefined"&&R0.call(File)==="[object FileConstructor]";function Bd(e){return bw&&(e instanceof ArrayBuffer||_w(e))||Sw&&e instanceof Blob||xw&&e instanceof File}function Wu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wu(e[n]))return!0;return!1}if(Bd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wu(e[n]))return!0;return!1}function ww(e){const t=[],n=e.data,r=e;return r.data=Ud(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ud(e,t){if(!e)return e;if(Bd(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]=Ud(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]=Ud(e[r],t));return n}return e}function Cw(e,t){return e.data=Hd(e.data,t),delete e.attachments,e}function Hd(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]=Hd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Hd(e[n],t));return e}const Aw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var nt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(nt||(nt={}));class vw{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&Wu(t)?this.encodeAsBinary({type:t.type===nt.EVENT?nt.BINARY_EVENT:nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===nt.BINARY_EVENT||t.type===nt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=ww(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class zd extends Ut{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===nt.BINARY_EVENT;r||n.type===nt.BINARY_ACK?(n.type=r?nt.EVENT:nt.ACK,this.reconstructor=new kw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Bd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nt.BINARY_EVENT||r.type===nt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Nw(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(zd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case nt.CONNECT:return L0(n);case nt.DISCONNECT:return n===void 0;case nt.CONNECT_ERROR:return typeof n=="string"||L0(n);case nt.EVENT:case nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Aw.indexOf(n[0])===-1);case nt.ACK:case nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kw{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Cw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Nw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function L0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Pw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zd,Encoder:vw,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function fr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Ow=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class D0 extends Ut{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[fr(t,"open",this.onopen.bind(this)),fr(t,"packet",this.onpacket.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(Ow.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:nt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,g=n.pop();this._registerAckCallback(p,g),u.id=p}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>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:nt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nt.EVENT:case nt.BINARY_EVENT:this.onevent(t);break;case nt.ACK:case nt.BINARY_ACK:this.onack(t);break;case nt.DISCONNECT:this.ondisconnect();break;case nt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:nt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.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:nt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Fo(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}Fo.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},Fo.prototype.reset=function(){this.attempts=0},Fo.prototype.setMin=function(e){this.ms=e},Fo.prototype.setMax=function(e){this.max=e},Fo.prototype.setJitter=function(e){this.jitter=e};class jd extends Ut{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,Yu(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 Fo({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||Pw;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 yw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=fr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=fr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{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(fr(t,"ping",this.onping.bind(this)),fr(t,"data",this.ondata.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(t,"close",this.onclose.bind(this)),fr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){qu(()=>{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 D0(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 ra={};function Xu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Tw(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ra[o]&&a in ra[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new jd(r,t):(ra[o]||(ra[o]=new jd(r,t)),d=ra[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Xu,{Manager:jd,Socket:D0,io:Xu,connect:Xu});var Iw=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===Rw})(t)})(e)},Rw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ia(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Bo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Lw(e,t,n){return e.concat(t).map((function(r){return ia(r,n)}))}function M0(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 F0(e,t){try{return t in e}catch(n){return!1}}function Dw(e,t,n){var r={};return n.isMergeableObject(e)&&M0(e).forEach((function(o){r[o]=ia(e[o],n)})),M0(t).forEach((function(o){(function(a,u){return F0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(F0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return Bo;var c=u.customMerge(a);return typeof c=="function"?c:Bo})(o,n)(e[o],t[o],n):r[o]=ia(t[o],n))})),r}function Bo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Lw,n.isMergeableObject=n.isMergeableObject||Iw,n.cloneUnlessOtherwiseSpecified=ia;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Dw(e,t,n):ia(t,n)}Bo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Bo(n,r,t)}),{})};var Mw=Bo;let Fw=class{constructor(t){Object.assign(this,t)}};function _n(e){if(e)return(function(t){for(var n in _n.prototype)t[n]=_n.prototype[n];return t})(e)}_n.prototype.on=_n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},_n.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},_n.prototype.off=_n.prototype.removeListener=_n.prototype.removeAllListeners=_n.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},_n.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},_n.prototype.emitReserved=_n.prototype.emit,_n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},_n.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Bw=typeof ArrayBuffer=="function",B0=Object.prototype.toString,Uw=typeof Blob=="function"||typeof Blob!="undefined"&&B0.call(Blob)==="[object BlobConstructor]",Hw=typeof File=="function"||typeof File!="undefined"&&B0.call(File)==="[object FileConstructor]";function $d(e){return Bw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Uw&&e instanceof Blob||Hw&&e instanceof File}function Ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ku(e[n]))return!0;return!1}if($d(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ku(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ku(e[n]))return!0;return!1}function zw(e){const t=[],n=e.data,r=e;return r.data=Vd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Vd(e,t){if(!e)return e;if($d(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]=Vd(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]=Vd(e[r],t));return n}return e}function jw(e,t){return e.data=qd(e.data,t),delete e.attachments,e}function qd(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]=qd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=qd(e[n],t));return e}const $w=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var kt;(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"})(kt||(kt={}));class Vw{constructor(t){this.replacer=t}encode(t){return t.type!==kt.EVENT&&t.type!==kt.ACK||!Ku(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===kt.EVENT?kt.BINARY_EVENT:kt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==kt.BINARY_EVENT&&t.type!==kt.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=zw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Yd extends _n{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===kt.BINARY_EVENT;r||n.type===kt.BINARY_ACK?(n.type=r?kt.EVENT:kt.ACK,this.reconstructor=new qw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!$d(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(kt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===kt.BINARY_EVENT||r.type===kt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Yw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const 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(!Yd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case kt.CONNECT:return U0(n);case kt.DISCONNECT:return n===void 0;case kt.CONNECT_ERROR:return typeof n=="string"||U0(n);case kt.EVENT:case kt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&$w.indexOf(n[0])===-1);case kt.ACK:case kt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class qw{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=jw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Yw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function U0(e){return Object.prototype.toString.call(e)==="[object Object]"}const H0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],z0=(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)},j0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Gw=z0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),H0),$0=z0(j0,j0,H0),Ww={Encoder:class extends Vw{encode(e){var t,n;return super.encode(me(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Gw(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends Yd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?$0(r):r)):n instanceof Object?$0(n):n)):t))}}},Xw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Kw{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace: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+)['"]/),g=p==null?void 0:p[1];g&&["InvalidApiKey","InvalidToken","BadRequest"].includes(g)?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=[Xw,a,{parser:Ww,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Xu(u,Mw.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*ea(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 tt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return tt(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return tt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return tt(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return tt(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 tt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return tt(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return tt(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return tt(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return tt(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return tt(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 tt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return kd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Jr(u({emit:g=>{c.push(g),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Jr(new Promise((g=>{f=g})));for(;c.length>0;)yield c.shift()}finally{yield new Jr(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),()=>tt(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new Fw(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var H=bn();const Qi=ze(H);var V0=Symbol.for("immer-nothing"),q0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Qn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Uo=Object.getPrototypeOf;function Ho(e){return!!e&&!!e[at]}function Zr(e){var t;return e?Y0(e)||Array.isArray(e)||!!e[q0]||!!((t=e.constructor)!=null&&t[q0])||Ju(e)||Zu(e):!1}var Qw=Object.prototype.constructor.toString();function Y0(e){if(!e||typeof e!="object")return!1;const t=Uo(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Qw}function oa(e,t){Qu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Qu(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:Ju(e)?2:Zu(e)?3:0}function Gd(e,t){return Qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function G0(e,t,n){const r=Qu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Jw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ju(e){return e instanceof Map}function Zu(e){return e instanceof Set}function Xt(e){return e.copy_||e.base_}function Wd(e,t){if(Ju(e))return new Map(e);if(Zu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Y0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[at];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(Uo(e),r)}else{const r=Uo(e);if(r!==null&&n)return F({},e);const o=Object.create(r);return Object.assign(o,e)}}function Xd(e,t=!1){return el(e)||Ho(e)||!Zr(e)||(Qu(e)>1&&(e.set=e.add=e.clear=e.delete=Zw),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Xd(r,!0))),e}function Zw(){Qn(2)}function el(e){return Object.isFrozen(e)}var Kd={};function Ji(e){const t=Kd[e];return t||Qn(0,e),t}function eC(e,t){Kd[e]||(Kd[e]=t)}var sa;function tl(){return sa}function tC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function W0(e,t){t&&(Ji("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qd(e){Jd(e),e.drafts_.forEach(nC),e.drafts_=null}function Jd(e){e===sa&&(sa=e.parent_)}function X0(e){return sa=tC(sa,e)}function nC(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function K0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Qd(t),Qn(4)),Zr(e)&&(e=nl(t,e),t.parent_||rl(t,e)),t.patches_&&Ji("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=nl(t,n,[]),Qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==V0?e:void 0}function nl(e,t,n){if(el(t))return t;const r=t[at];if(!r)return oa(t,(o,a)=>Q0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return rl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),oa(a,(c,d)=>Q0(e,r,o,c,d,n,u)),rl(e,o,!1),n&&e.patches_&&Ji("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Q0(e,t,n,r,o,a,u){if(Ho(o)){const c=a&&t&&t.type_!==3&&!Gd(t.assigned_,r)?a.concat(r):void 0,d=nl(e,o,c);if(G0(n,r,d),Ho(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Zr(o)&&!el(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;nl(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&rl(e,o)}}function rl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xd(t,n)}function rC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:tl(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Zd;n&&(o=[r],a=aa);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Zd={get(e,t){if(t===at)return e;const n=Xt(e);if(!Gd(n,t))return iC(e,n,t);const r=n[t];return e.finalized_||!Zr(r)?r:r===ef(e.base_,t)?(tf(e),e.copy_[t]=ua(r,e)):r},has(e,t){return t in Xt(e)},ownKeys(e){return Reflect.ownKeys(Xt(e))},set(e,t,n){const r=J0(Xt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=ef(Xt(e),t),a=o==null?void 0:o[at];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Jw(n,o)&&(n!==void 0||Gd(e.base_,t)))return!0;tf(e),ei(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 ef(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,tf(e),ei(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Xt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Qn(11)},getPrototypeOf(e){return Uo(e.base_)},setPrototypeOf(){Qn(12)}},aa={};oa(Zd,(e,t)=>{aa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),aa.deleteProperty=function(e,t){return aa.set.call(this,e,t,void 0)},aa.set=function(e,t,n){return Zd.set.call(this,e[0],t,n,e[0])};function ef(e,t){const n=e[at];return(n?Xt(n):e)[t]}function iC(e,t,n){var o;const r=J0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function J0(e,t){if(!(t in e))return;let n=Uo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Uo(n)}}function ei(e){e.modified_||(e.modified_=!0,e.parent_&&ei(e.parent_))}function tf(e){e.copy_||(e.copy_=Wd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var oC=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"&&Qn(6),r!==void 0&&typeof r!="function"&&Qn(7);let o;if(Zr(t)){const a=X0(this),u=ua(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Qd(a):Jd(a)}return W0(a,r),K0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===V0&&(o=void 0),this.autoFreeze_&&Xd(o,!0),r){const a=[],u=[];Ji("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Qn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Zr(e)||Qn(8),Ho(e)&&(e=sC(e));const t=X0(this),n=ua(e,void 0);return n[at].isManual_=!0,Jd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&Qn(9);const{scope_:r}=n;return W0(r,t),K0(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=Ji("Patches").applyPatches_;return Ho(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ua(e,t){const n=Ju(e)?Ji("MapSet").proxyMap_(e,t):Zu(e)?Ji("MapSet").proxySet_(e,t):rC(e,t);return(t?t.scope_:tl()).drafts_.push(n),n}function sC(e){return Ho(e)||Qn(10,e),Z0(e)}function Z0(e){if(!Zr(e)||el(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Wd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Wd(e,!0);return oa(n,(r,o)=>{G0(n,r,Z0(o))}),t&&(t.finalized_=!1),n}function aC(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:tl(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Xt(this[at]).size}has(d){return Xt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Xt(p).has(d)||Xt(p).get(d)!==f)&&(n(p),ei(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),n(f),ei(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[at];u(d),Xt(d).size&&(n(d),ei(d),d.assigned_=new Map,oa(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Xt(p).forEach((g,b,y)=>{d.call(f,this.get(b),b,this)})}get(d){const f=this[at];u(f);const p=Xt(f).get(d);if(f.finalized_||!Zr(p)||p!==f.base_.get(d))return p;const g=ua(p,f);return n(f),f.copy_.set(d,g),g}keys(){return Xt(this[at]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[at]={type_:3,parent_:f,scope_:f?f.scope_:tl(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Xt(this[at]).size}has(d){const f=this[at];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[at];return u(f),this.has(d)||(a(f),ei(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),ei(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Xt(d).size&&(a(d),ei(d),d.copy_.clear())}values(){const d=this[at];return u(d),a(d),d.copy_.values()}entries(){const d=this[at];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let g=p.next();for(;!g.done;)d.call(f,g.value,g.value,this),g=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=ua(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Qn(3,JSON.stringify(Xt(c)))}eC("MapSet",{proxyMap_:t,proxySet_:o})}var Un=new oC,uC=Un.produce;Un.produceWithPatches.bind(Un),Un.setAutoFreeze.bind(Un),Un.setUseStrictShallowCopy.bind(Un),Un.applyPatches.bind(Un),Un.createDraft.bind(Un),Un.finishDraft.bind(Un);function eg(e,t,n){var r=H.useMemo(function(){return uC(e)},[e]);return H.useReducer(r,t,n)}const tg={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"},pt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},Zi={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},lC=e=>{switch(!0){case e==="copilot_search":return"search";case e==="copilot_browse":return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return null}},zo="cimulate",nf=`${zo}:pdp-update`,rf=`${zo}:browse-update`,of=`${zo}:search-update`,sf=`${zo}:ui-state-update`,af=`${zo}:prompts-state-update`,uf=`${zo}:session-state`,Ir=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},tg),cC={"browse-context":Ir.CONTEXT_UPDATED,categoryId:Ir.CATEGORY_ID_CHANGED,categoryName:Ir.CATEGORY_NAME_CHANGED,page:Ir.PAGE_CHANGED,pageSize:Ir.PAGE_SIZE_CHANGED,includeFacets:Ir.FACET_FILTERS_CHANGED,facetFilters:Ir.FACET_FILTERS_CHANGED,rangeFilters:Ir.RANGE_FILTERS_CHANGED,catalogSegment:Ir.CATALOG_SEGMENT_CHANGED,pricebooks:Ir.PRICEBOOKS_CHANGED},ti=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},tg),dC={"search-context":ti.SEARCH_CONTEXT_UPDATED,query:ti.QUERY_CHANGED,page:ti.PAGE_CHANGED,pageSize:ti.PAGE_SIZE_CHANGED,includeFacets:ti.FACET_FILTERS_CHANGED,facetFilters:ti.FACET_FILTERS_CHANGED,rangeFilters:ti.RANGE_FILTERS_CHANGED,catalogSegment:ti.CATALOG_SEGMENT_CHANGED,pricebooks:ti.PRICEBOOKS_CHANGED},j="cim-widget",jo=`--${j}`,eo={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},fC=(e=eo)=>({[`${jo}-primary-color`]:e.primaryColor||eo.primaryColor,[`${jo}-secondary-color`]:e.secondaryColor||eo.secondaryColor,[`${jo}-font-color`]:e.fontColor||eo.fontColor,[`${jo}-font-family`]:e.fontFamily||eo.fontFamily,[`${jo}-background-color`]:e.backgroundColor||eo.backgroundColor,[`${jo}-border-color`]:e.borderColor||eo.borderColor}),Ti={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},ng=H.createContext(null),rg=H.createContext(null);function ig(e,t){return function(){return e.apply(t,arguments)}}const{toString:hC}=Object.prototype,{getPrototypeOf:il}=Object,{iterator:ol,toStringTag:og}=Symbol,sl=(e=>t=>{const n=hC.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),hr=e=>(e=e.toLowerCase(),t=>sl(t)===e),al=e=>t=>typeof t===e,{isArray:$o}=Array,Vo=al("undefined");function la(e){return e!==null&&!Vo(e)&&e.constructor!==null&&!Vo(e.constructor)&&vn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const sg=hr("ArrayBuffer");function pC(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&sg(e.buffer),t}const mC=al("string"),vn=al("function"),ag=al("number"),ca=e=>e!==null&&typeof e=="object",gC=e=>e===!0||e===!1,ul=e=>{if(sl(e)!=="object")return!1;const t=il(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(og in e)&&!(ol in e)},EC=e=>{if(!ca(e)||la(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},yC=hr("Date"),TC=hr("File"),bC=e=>!!(e&&typeof e.uri!="undefined"),_C=e=>e&&typeof e.getParts!="undefined",SC=hr("Blob"),xC=hr("FileList"),wC=e=>ca(e)&&vn(e.pipe);function CC(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const ug=CC(),lg=typeof ug.FormData!="undefined"?ug.FormData:void 0,AC=e=>{if(!e)return!1;if(lg&&e instanceof lg)return!0;const t=il(e);if(!t||t===Object.prototype||!vn(e.append))return!1;const n=sl(e);return n==="formdata"||n==="object"&&vn(e.toString)&&e.toString()==="[object FormData]"},vC=hr("URLSearchParams"),[kC,NC,PC,OC]=["ReadableStream","Request","Response","Headers"].map(hr),IC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function da(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),$o(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(la(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 cg(e,t){if(la(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 to=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,dg=e=>!Vo(e)&&e!==to;function lf(...e){const{caseless:t,skipUndefined:n}=dg(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&cg(r,u)||u,d=cf(r,c)?r[c]:void 0;ul(d)&&ul(a)?r[c]=lf(d,a):ul(a)?r[c]=lf({},a):$o(a)?r[c]=a.slice():(!n||!Vo(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&da(e[a],o);return r}const RC=(e,t,n,{allOwnKeys:r}={})=>(da(t,(o,a)=>{n&&vn(o)?Object.defineProperty(e,a,{__proto__:null,value:ig(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),LC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),DC=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},MC=(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&&il(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},FC=(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},BC=e=>{if(!e)return null;if($o(e))return e;let t=e.length;if(!ag(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},UC=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&il(Uint8Array)),HC=(e,t)=>{const r=(e&&e[ol]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},zC=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},jC=hr("HTMLFormElement"),$C=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),cf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),VC=hr("RegExp"),fg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};da(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},qC=e=>{fg(e,(t,n)=>{if(vn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(vn(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+"'")})}})},YC=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return $o(e)?r(e):r(String(e).split(t)),n},GC=()=>{},WC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function XC(e){return!!(e&&vn(e.append)&&e[og]==="FormData"&&e[ol])}const KC=e=>{const t=new WeakSet,n=r=>{if(ca(r)){if(t.has(r))return;if(la(r))return r;if(!("toJSON"in r)){t.add(r);const o=$o(r)?[]:{};return da(r,(a,u)=>{const c=n(a);!Vo(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},QC=hr("AsyncFunction"),JC=e=>e&&(ca(e)||vn(e))&&vn(e.then)&&vn(e.catch),hg=((e,t)=>e?setImmediate:t?((n,r)=>(to.addEventListener("message",({source:o,data:a})=>{o===to&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),to.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",vn(to.postMessage)),ZC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(to):typeof process!="undefined"&&process.nextTick||hg,V={isArray:$o,isArrayBuffer:sg,isBuffer:la,isFormData:AC,isArrayBufferView:pC,isString:mC,isNumber:ag,isBoolean:gC,isObject:ca,isPlainObject:ul,isEmptyObject:EC,isReadableStream:kC,isRequest:NC,isResponse:PC,isHeaders:OC,isUndefined:Vo,isDate:yC,isFile:TC,isReactNativeBlob:bC,isReactNative:_C,isBlob:SC,isRegExp:VC,isFunction:vn,isStream:wC,isURLSearchParams:vC,isTypedArray:UC,isFileList:xC,forEach:da,merge:lf,extend:RC,trim:IC,stripBOM:LC,inherits:DC,toFlatObject:MC,kindOf:sl,kindOfTest:hr,endsWith:FC,toArray:BC,forEachEntry:HC,matchAll:zC,isHTMLForm:jC,hasOwnProperty:cf,hasOwnProp:cf,reduceDescriptors:fg,freezeMethods:qC,toObjectSet:YC,toCamelCase:$C,noop:GC,toFiniteNumber:WC,findKey:cg,global:to,isContextDefined:dg,isSpecCompliantForm:XC,toJSONObject:KC,isAsyncFn:QC,isThenable:JC,setImmediate:hg,asap:ZC,isIterable:e=>e!=null&&vn(e[ol])},eA=V.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"]),tA=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[mg]=this[mg]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=fa(u);r[c]||(cA(o,u),r[c]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}};Sn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(Sn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(Sn);const dA="[REDACTED ****]";function fA(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function hA(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||V.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Sn&&(a=a.toJSON()),r.push(a);let u;if(V.isArray(a))u=[],a.forEach((c,d)=>{const f=o(c);V.isUndefined(f)||(u[d]=f)});else{if(!V.isPlainObject(a)&&fA(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?dA:o(d);V.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return o(e)}let Ne=class M2 extends Error{static from(t,n,r,o,a,u){const c=new M2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&V.hasOwnProp(t,"redact")?t.redact:void 0,r=V.isArray(n)&&n.length>0?hA(t,n):V.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const pA=null;function hf(e){return V.isPlainObject(e)||V.isArray(e)}function gg(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function pf(e,t,n){return e?e.concat(t).map(function(o,a){return o=gg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function mA(e){return V.isArray(e)&&!e.some(hf)}const gA=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function cl(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,v){return!V.isUndefined(v[A])});const r=n.metaTokens,o=n.visitor||g,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,f=c&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(V.isDate(S))return S.toISOString();if(V.isBoolean(S))return S.toString();if(!f&&V.isBlob(S))throw new Ne("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(S)||V.isTypedArray(S)?f&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,A,v){let P=S;if(V.isReactNative(t)&&V.isReactNativeBlob(S))return t.append(pf(v,A,a),p(S)),!1;if(S&&!v&&typeof S=="object"){if(V.endsWith(A,"{}"))A=r?A:A.slice(0,-2),S=JSON.stringify(S);else if(V.isArray(S)&&mA(S)||(V.isFileList(S)||V.endsWith(A,"[]"))&&(P=V.toArray(S)))return A=gg(A),P.forEach(function(B,q){!(V.isUndefined(B)||B===null)&&t.append(u===!0?pf([A],q,a):u===null?A:A+"[]",p(B))}),!1}return hf(S)?!0:(t.append(pf(v,A,a),p(S)),!1)}const b=[],y=Object.assign(gA,{defaultVisitor:g,convertValue:p,isVisitable:hf});function _(S,A,v=0){if(!V.isUndefined(S)){if(v>d)throw new Ne("Object is too deeply nested ("+v+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED);if(b.indexOf(S)!==-1)throw Error("Circular reference detected in "+A.join("."));b.push(S),V.forEach(S,function(C,B){(!(V.isUndefined(C)||C===null)&&o.call(t,C,V.isString(B)?B.trim():B,A,y))===!0&&_(C,A?A.concat(B):[B],v+1)}),b.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Eg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function mf(e,t){this._pairs=[],e&&cl(e,this,t)}const yg=mf.prototype;yg.append=function(t,n){this._pairs.push([t,n])},yg.toString=function(t){const n=t?function(r){return t.call(this,r,Eg)}:Eg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function EA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Tg(e,t,n){if(!t)return e;const r=n&&n.encode||EA,o=V.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=V.isURLSearchParams(t)?t.toString():new mf(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class bg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const gf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},yA={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:mf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ef=typeof window!="undefined"&&typeof document!="undefined",yf=typeof navigator=="object"&&navigator||void 0,TA=Ef&&(!yf||["ReactNative","NativeScript","NS"].indexOf(yf.product)<0),bA=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_A=Ef&&window.location.href||"http://localhost",cn=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ef,hasStandardBrowserEnv:TA,hasStandardBrowserWebWorkerEnv:bA,navigator:yf,origin:_A},Symbol.toStringTag,{value:"Module"}))),yA);function SA(e,t){return cl(e,new cn.classes.URLSearchParams,F({visitor:function(n,r,o,a){return cn.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function xA(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function wA(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 _g(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&&V.isArray(o)?o.length:u,d?(V.hasOwnProp(o,u)?o[u]=V.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!V.hasOwnProp(o,u)||!V.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&V.isArray(o[u])&&(o[u]=wA(o[u])),!c)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,o)=>{t(xA(r),o,n,0)}),n}return null}const qo=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function CA(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ha={transitional:gf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return o?JSON.stringify(_g(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=qo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return SA(t,d).toString();if((c=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=qo(this,"env"),p=f&&f.FormData;return cl(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),CA(t)):t}],transformResponse:[function(t){const n=qo(this,"transitional")||ha.transitional,r=n&&n.forcedJSONParsing,o=qo(this,"responseType"),a=o==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,qo(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,qo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:cn.classes.FormData,Blob:cn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],e=>{ha.headers[e]={}});function Tf(e,t){const n=this||ha,r=t||n,o=Sn.from(r.headers);let a=r.data;return V.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Sg(e){return!!(e&&e.__CANCEL__)}let pa=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function xg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function AA(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function vA(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 g=a,b=0;for(;g!==o;)b+=n[g++],g=g%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(b*1e3/y):void 0}}function kA(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(),g=p-n;g>=r?u(f,p):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-g)))},()=>o&&u(o)]}const dl=(e,t,n=3)=>{let r=0;const o=vA(50,250);return kA(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=o(f);r=Math.max(r,d);const g={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(g)},n)},wg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Cg=e=>(...t)=>V.asap(()=>e(...t)),NA=cn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,cn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(cn.origin),cn.navigator&&/(msie|trident)/i.test(cn.navigator.userAgent)):()=>!0,PA=cn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&c.push(`path=${r}`),V.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),V.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function OA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function IA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ag(e,t,n){let r=!OA(t);return e&&(r||n===!1)?IA(e,t):t}const vg=e=>e instanceof Sn?F({},e):e;function no(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,p,g,b){return V.isPlainObject(f)&&V.isPlainObject(p)?V.merge.call({caseless:b},f,p):V.isPlainObject(p)?V.merge({},p):V.isArray(p)?p.slice():p}function o(f,p,g,b){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f,g,b)}else return r(f,p,g,b)}function a(f,p){if(!V.isUndefined(p))return r(void 0,p)}function u(f,p){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,g){if(V.hasOwnProp(t,g))return r(f,p);if(V.hasOwnProp(e,g))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,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(f,p,g)=>o(vg(f),vg(p),g,!0)};return V.forEach(Object.keys(F(F({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=V.hasOwnProp(d,p)?d[p]:o,b=V.hasOwnProp(e,p)?e[p]:void 0,y=V.hasOwnProp(t,p)?t[p]:void 0,_=g(b,y,p);V.isUndefined(_)&&g!==c||(n[p]=_)}),n}const RA=["content-type","content-length"];function LA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{RA.includes(r.toLowerCase())&&e.set(r,o)})}const DA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),kg=e=>{const t=no({},e),n=b=>V.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),g=n("url");if(t.headers=c=Sn.from(c),t.url=Tg(Ag(f,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?DA(d.password):""))),V.isFormData(r)&&(cn.hasStandardBrowserEnv||cn.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):V.isFunction(r.getHeaders)&&LA(c,r.getHeaders(),n("formDataHeaderPolicy"))),cn.hasStandardBrowserEnv&&(V.isFunction(o)&&(o=o(t)),o===!0||o==null&&NA(t.url))){const y=a&&u&&PA.read(u);y&&c.set(a,y)}return t},MA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=kg(e);let a=o.data;const u=Sn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,g,b,y,_;function S(){y&&y(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(o.method.toUpperCase(),o.url,!0),A.timeout=o.timeout;function v(){if(!A)return;const C=Sn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),q={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:C,config:e,request:A};xg(function(Q){n(Q),S()},function(Q){r(Q),S()},q),A=null}"onloadend"in A?A.onloadend=v:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(v)},A.onabort=function(){A&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,A)),S(),A=null)},A.onerror=function(B){const q=B&&B.message?B.message:"Network Error",D=new Ne(q,Ne.ERR_NETWORK,e,A);D.event=B||null,r(D),S(),A=null},A.ontimeout=function(){let B=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const q=o.transitional||gf;o.timeoutErrorMessage&&(B=o.timeoutErrorMessage),r(new Ne(B,q.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,A)),S(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&V.forEach(pg(u),function(B,q){A.setRequestHeader(q,B)}),V.isUndefined(o.withCredentials)||(A.withCredentials=!!o.withCredentials),c&&c!=="json"&&(A.responseType=o.responseType),f&&([b,_]=dl(f,!0),A.addEventListener("progress",b)),d&&A.upload&&([g,y]=dl(d),A.upload.addEventListener("progress",g),A.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=C=>{A&&(r(!C||C.type?new pa(null,e,A):C),A.abort(),S(),A=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const P=AA(o.url);if(P&&!cn.protocols.includes(P)){r(new Ne("Unsupported protocol "+P+":",Ne.ERR_BAD_REQUEST,e));return}A.send(a||null)})},FA=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Ne?f:new pa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>V.asap(u),c},BA=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},UA=function(e,t){return kd(this,null,function*(){try{for(var n=D2(HA(e)),r,o,a;r=!(o=yield new Jr(n.next())).done;r=!1){const u=o.value;yield*E0(BA(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Jr(o.call(n)))}finally{if(a)throw a[0]}}})},HA=function(e){return kd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*E0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Jr(t.read());if(n)break;yield r}}finally{yield new Jr(t.cancel())}})},Ng=(e,t,n,r)=>{const o=UA(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return tt(this,null,function*(){try{const{done:p,value:g}=yield o.next();if(p){c(),f.close();return}let b=g.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(g))}catch(p){throw c(p),p}})},cancel(f){return c(f),o.return()}},{highWaterMark:2})};function zA(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const _=r.charCodeAt(y+1),S=r.charCodeAt(y+2);(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)&&(u-=2,y+=2)}let d=0,f=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const bf="1.16.1",Pg=64*1024,{isFunction:fl}=V,Og=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},jA=e=>{const t=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,c=o?fl(o):typeof fetch=="function",d=fl(a),f=fl(u);if(!c)return!1;const p=c&&fl(n),g=c&&(typeof r=="function"?(v=>P=>v.encode(P))(new r):v=>tt(null,null,function*(){return new Uint8Array(yield new a(v).arrayBuffer())})),b=d&&p&&Og(()=>{let v=!1;const P=new a(cn.origin,{body:new n,method:"POST",get duplex(){return v=!0,"half"}}),C=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),v&&!C}),y=f&&p&&Og(()=>V.isReadableStream(new u("").body)),_={stream:y&&(v=>v.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!_[v]&&(_[v]=(P,C)=>{let B=P&&P[v];if(B)return B.call(P);throw new Ne(`Response type '${v}' is not supported`,Ne.ERR_NOT_SUPPORT,C)})});const S=v=>tt(null,null,function*(){if(v==null)return 0;if(V.isBlob(v))return v.size;if(V.isSpecCompliantForm(v))return(yield new a(cn.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(V.isArrayBufferView(v)||V.isArrayBuffer(v))return v.byteLength;if(V.isURLSearchParams(v)&&(v=v+""),V.isString(v))return(yield g(v)).byteLength}),A=(v,P)=>tt(null,null,function*(){const C=V.toFiniteNumber(v.getContentLength());return C==null?S(P):C});return v=>tt(null,null,function*(){let{url:P,method:C,data:B,signal:q,cancelToken:D,timeout:Q,onDownloadProgress:re,onUploadProgress:Te,responseType:$,headers:ee,withCredentials:ce="same-origin",fetchOptions:he,maxContentLength:le,maxBodyLength:be}=kg(v);const Me=V.isNumber(le)&&le>-1,de=V.isNumber(be)&&be>-1;let K=o||fetch;$=$?($+"").toLowerCase():"text";let ie=FA([q,D&&D.toAbortSignal()],Q),k=null;const M=ie&&ie.unsubscribe&&(()=>{ie.unsubscribe()});let te;try{if(Me&&typeof P=="string"&&P.startsWith("data:")&&zA(P)>le)throw new Ne("maxContentLength size of "+le+" exceeded",Ne.ERR_BAD_RESPONSE,v,k);if(de&&C!=="get"&&C!=="head"){const we=yield A(ee,B);if(typeof we=="number"&&isFinite(we)&&we>be)throw new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,v,k)}if(Te&&b&&C!=="get"&&C!=="head"&&(te=yield A(ee,B))!==0){let we=new a(P,{method:"POST",body:B,duplex:"half"}),We;if(V.isFormData(B)&&(We=we.headers.get("content-type"))&&ee.setContentType(We),we.body){const[ht,on]=wg(te,dl(Cg(Te)));B=Ng(we.body,Pg,ht,on)}}V.isString(ce)||(ce=ce?"include":"omit");const O=d&&"credentials"in a.prototype;if(V.isFormData(B)){const we=ee.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&ee.delete("content-type")}ee.set("User-Agent","axios/"+bf,!1);const _e=me(F({},he),{signal:ie,method:C.toUpperCase(),headers:pg(ee.normalize()),body:B,duplex:"half",credentials:O?ce:void 0});k=d&&new a(P,_e);let Oe=yield d?K(k,he):K(P,_e);if(Me){const we=V.toFiniteNumber(Oe.headers.get("content-length"));if(we!=null&&we>le)throw new Ne("maxContentLength size of "+le+" exceeded",Ne.ERR_BAD_RESPONSE,v,k)}const Ce=y&&($==="stream"||$==="response");if(y&&Oe.body&&(re||Me||Ce&&M)){const we={};["status","statusText","headers"].forEach(Rn=>{we[Rn]=Oe[Rn]});const We=V.toFiniteNumber(Oe.headers.get("content-length")),[ht,on]=re&&wg(We,dl(Cg(re),!0))||[];let qr=0;const _r=Rn=>{if(Me&&(qr=Rn,qr>le))throw new Ne("maxContentLength size of "+le+" exceeded",Ne.ERR_BAD_RESPONSE,v,k);ht&&ht(Rn)};Oe=new u(Ng(Oe.body,Pg,_r,()=>{on&&on(),M&&M()}),we)}$=$||"text";let $e=yield _[V.findKey(_,$)||"text"](Oe,v);if(Me&&!y&&!Ce){let we;if($e!=null&&(typeof $e.byteLength=="number"?we=$e.byteLength:typeof $e.size=="number"?we=$e.size:typeof $e=="string"&&(we=typeof r=="function"?new r().encode($e).byteLength:$e.length)),typeof we=="number"&&we>le)throw new Ne("maxContentLength size of "+le+" exceeded",Ne.ERR_BAD_RESPONSE,v,k)}return!Ce&&M&&M(),yield new Promise((we,We)=>{xg(we,We,{data:$e,headers:Sn.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:v,request:k})})}catch(O){if(M&&M(),ie&&ie.aborted&&ie.reason instanceof Ne){const _e=ie.reason;throw _e.config=v,k&&(_e.request=k),O!==_e&&(_e.cause=O),_e}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Ne("Network Error",Ne.ERR_NETWORK,v,k,O&&O.response),{cause:O.cause||O}):Ne.from(O,O&&O.code,v,k,O&&O.response)}})},$A=new Map,Ig=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=$A;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:jA(t)),p=f;return f};Ig();const _f={http:pA,xhr:MA,fetch:{get:Ig}};V.forEach(_f,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Rg=e=>`- ${e}`,VA=e=>V.isFunction(e)||e===null||e===!1;function qA(e,t){e=V.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,!VA(r)&&(o=_f[(c=String(r)).toLowerCase()],o===void 0))throw new Ne(`Unknown adapter '${c}'`);if(o&&(V.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 :
|
|
1
|
+
(function(je,ze){typeof exports=="object"&&typeof module!="undefined"?module.exports=ze():typeof define=="function"&&define.amd?define(ze):(je=typeof globalThis!="undefined"?globalThis:je||self,je["cimulate-copilot-widget"]=ze())})(this,(function(){"use strict";var h7=Object.defineProperty,p7=Object.defineProperties;var m7=Object.getOwnPropertyDescriptors;var vd=Object.getOwnPropertySymbols;var L2=Object.prototype.hasOwnProperty,D2=Object.prototype.propertyIsEnumerable;var Zs=(je,ze)=>(ze=Symbol[je])?ze:Symbol.for("Symbol."+je),g7=je=>{throw TypeError(je)},ea=Math.pow,g0=(je,ze,Je)=>ze in je?h7(je,ze,{enumerable:!0,configurable:!0,writable:!0,value:Je}):je[ze]=Je,F=(je,ze)=>{for(var Je in ze||(ze={}))L2.call(ze,Je)&&g0(je,Je,ze[Je]);if(vd)for(var Je of vd(ze))D2.call(ze,Je)&&g0(je,Je,ze[Je]);return je},me=(je,ze)=>p7(je,m7(ze));var ln=(je,ze)=>{var Je={};for(var st in je)L2.call(je,st)&&ze.indexOf(st)<0&&(Je[st]=je[st]);if(je!=null&&vd)for(var st of vd(je))ze.indexOf(st)<0&&D2.call(je,st)&&(Je[st]=je[st]);return Je};var Se=(je,ze,Je)=>g0(je,typeof ze!="symbol"?ze+"":ze,Je);var tt=(je,ze,Je)=>new Promise((st,Ft)=>{var De=Ot=>{try{rn(Je.next(Ot))}catch(bn){Ft(bn)}},Vt=Ot=>{try{rn(Je.throw(Ot))}catch(bn){Ft(bn)}},rn=Ot=>Ot.done?st(Ot.value):Promise.resolve(Ot.value).then(De,Vt);rn((Je=Je.apply(je,ze)).next())}),Jr=function(je,ze){this[0]=je,this[1]=ze},kd=(je,ze,Je)=>{var st=(Vt,rn,Ot,bn)=>{try{var ta=Je[Vt](rn),Hu=(rn=ta.value)instanceof Jr,zu=ta.done;Promise.resolve(Hu?rn[0]:rn).then(Nr=>Hu?st(Vt==="return"?Vt:"next",rn[1]?{done:Nr.done,value:Nr.value}:Nr,Ot,bn):Ot({value:Nr,done:zu})).catch(Nr=>st("throw",Nr,Ot,bn))}catch(Nr){bn(Nr)}},Ft=Vt=>De[Vt]=rn=>new Promise((Ot,bn)=>st(Vt,rn,Ot,bn)),De={};return Je=Je.apply(je,ze),De[Zs("asyncIterator")]=()=>De,Ft("next"),Ft("throw"),Ft("return"),De},E0=je=>{var ze=je[Zs("asyncIterator")],Je=!1,st,Ft={};return ze==null?(ze=je[Zs("iterator")](),st=De=>Ft[De]=Vt=>ze[De](Vt)):(ze=ze.call(je),st=De=>Ft[De]=Vt=>{if(Je){if(Je=!1,De==="throw")throw Vt;return Vt}return Je=!0,{done:!1,value:new Jr(new Promise(rn=>{var Ot=ze[De](Vt);Ot instanceof Object||g7("Object expected"),rn(Ot)}),1)}}),Ft[Zs("iterator")]=()=>Ft,st("next"),"throw"in ze?st("throw"):Ft.throw=De=>{throw De},"return"in ze&&st("return"),Ft},M2=(je,ze,Je)=>(ze=je[Zs("asyncIterator")])?ze.call(je):(je=je[Zs("iterator")](),ze={},Je=(st,Ft)=>(Ft=je[st])&&(ze[st]=De=>new Promise((Vt,rn,Ot)=>(De=Ft.call(je,De),Ot=De.done,Promise.resolve(De.value).then(bn=>Vt({value:bn,done:Ot}),rn)))),Je("next"),Je("return"),ze);var je=document.createElement("style");je.textContent=`.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:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.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-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}.cim-widget-search-input{width:100%;min-height:2rem;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex;flex-direction:column}.cim-widget-user-search.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius)}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:calc(100% - 1rem)}&.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:.5rem 1rem;margin-bottom:.5rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0}@media(576px<=width<=768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100%!important;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;margin-bottom:1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;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)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;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-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);max-width:85%}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(je);function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Je={exports:{}},st={},Ft={exports:{}},De={};var Vt;function rn(){if(Vt)return De;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"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function b(B){return B===null||typeof B!="object"?null:(B=g&&B[g]||B["@@iterator"],typeof B=="function"?B:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function v(B,te,O){this.props=B,this.context=te,this.refs=S,this.updater=O||y}v.prototype.isReactComponent={},v.prototype.setState=function(B,te){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,te,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function C(){}C.prototype=v.prototype;function P(B,te,O){this.props=B,this.context=te,this.refs=S,this.updater=O||y}var A=P.prototype=new C;A.constructor=P,_(A,v.prototype),A.isPureReactComponent=!0;var M=Array.isArray,V=Object.prototype.hasOwnProperty,D={current:null},K={key:!0,ref:!0,__self:!0,__source:!0};function re(B,te,O){var _e,Ie={},Ae=null,$e=null;if(te!=null)for(_e in te.ref!==void 0&&($e=te.ref),te.key!==void 0&&(Ae=""+te.key),te)V.call(te,_e)&&!K.hasOwnProperty(_e)&&(Ie[_e]=te[_e]);var we=arguments.length-2;if(we===1)Ie.children=O;else if(1<we){for(var We=Array(we),ht=0;ht<we;ht++)We[ht]=arguments[ht+2];Ie.children=We}if(B&&B.defaultProps)for(_e in we=B.defaultProps,we)Ie[_e]===void 0&&(Ie[_e]=we[_e]);return{$$typeof:e,type:B,key:Ae,ref:$e,props:Ie,_owner:D.current}}function Te(B,te){return{$$typeof:e,type:B.type,key:te,ref:B.ref,props:B.props,_owner:B._owner}}function $(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function Z(B){var te={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(O){return te[O]})}var ce=/\/+/g;function he(B,te){return typeof B=="object"&&B!==null&&B.key!=null?Z(""+B.key):te.toString(36)}function ue(B,te,O,_e,Ie){var Ae=typeof B;(Ae==="undefined"||Ae==="boolean")&&(B=null);var $e=!1;if(B===null)$e=!0;else switch(Ae){case"string":case"number":$e=!0;break;case"object":switch(B.$$typeof){case e:case t:$e=!0}}if($e)return $e=B,Ie=Ie($e),B=_e===""?"."+he($e,0):_e,M(Ie)?(O="",B!=null&&(O=B.replace(ce,"$&/")+"/"),ue(Ie,te,O,"",function(ht){return ht})):Ie!=null&&($(Ie)&&(Ie=Te(Ie,O+(!Ie.key||$e&&$e.key===Ie.key?"":(""+Ie.key).replace(ce,"$&/")+"/")+B)),te.push(Ie)),1;if($e=0,_e=_e===""?".":_e+":",M(B))for(var we=0;we<B.length;we++){Ae=B[we];var We=_e+he(Ae,we);$e+=ue(Ae,te,O,We,Ie)}else if(We=b(B),typeof We=="function")for(B=We.call(B),we=0;!(Ae=B.next()).done;)Ae=Ae.value,We=_e+he(Ae,we++),$e+=ue(Ae,te,O,We,Ie);else if(Ae==="object")throw te=String(B),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.");return $e}function be(B,te,O){if(B==null)return B;var _e=[],Ie=0;return ue(B,_e,"","",function(Ae){return te.call(O,Ae,Ie++)}),_e}function Oe(B){if(B._status===-1){var te=B._result;te=te(),te.then(function(O){(B._status===0||B._status===-1)&&(B._status=1,B._result=O)},function(O){(B._status===0||B._status===-1)&&(B._status=2,B._result=O)}),B._status===-1&&(B._status=0,B._result=te)}if(B._status===1)return B._result.default;throw B._result}var de={current:null},Q={transition:null},ie={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:Q,ReactCurrentOwner:D};function k(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:be,forEach:function(B,te,O){be(B,function(){te.apply(this,arguments)},O)},count:function(B){var te=0;return be(B,function(){te++}),te},toArray:function(B){return be(B,function(te){return te})||[]},only:function(B){if(!$(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},De.Component=v,De.Fragment=n,De.Profiler=o,De.PureComponent=P,De.StrictMode=r,De.Suspense=d,De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,De.act=k,De.cloneElement=function(B,te,O){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var _e=_({},B.props),Ie=B.key,Ae=B.ref,$e=B._owner;if(te!=null){if(te.ref!==void 0&&(Ae=te.ref,$e=D.current),te.key!==void 0&&(Ie=""+te.key),B.type&&B.type.defaultProps)var we=B.type.defaultProps;for(We in te)V.call(te,We)&&!K.hasOwnProperty(We)&&(_e[We]=te[We]===void 0&&we!==void 0?we[We]:te[We])}var We=arguments.length-2;if(We===1)_e.children=O;else if(1<We){we=Array(We);for(var ht=0;ht<We;ht++)we[ht]=arguments[ht+2];_e.children=we}return{$$typeof:e,type:B.type,key:Ie,ref:Ae,props:_e,_owner:$e}},De.createContext=function(B){return B={$$typeof:u,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:a,_context:B},B.Consumer=B},De.createElement=re,De.createFactory=function(B){var te=re.bind(null,B);return te.type=B,te},De.createRef=function(){return{current:null}},De.forwardRef=function(B){return{$$typeof:c,render:B}},De.isValidElement=$,De.lazy=function(B){return{$$typeof:p,_payload:{_status:-1,_result:B},_init:Oe}},De.memo=function(B,te){return{$$typeof:f,type:B,compare:te===void 0?null:te}},De.startTransition=function(B){var te=Q.transition;Q.transition={};try{B()}finally{Q.transition=te}},De.unstable_act=k,De.useCallback=function(B,te){return de.current.useCallback(B,te)},De.useContext=function(B){return de.current.useContext(B)},De.useDebugValue=function(){},De.useDeferredValue=function(B){return de.current.useDeferredValue(B)},De.useEffect=function(B,te){return de.current.useEffect(B,te)},De.useId=function(){return de.current.useId()},De.useImperativeHandle=function(B,te,O){return de.current.useImperativeHandle(B,te,O)},De.useInsertionEffect=function(B,te){return de.current.useInsertionEffect(B,te)},De.useLayoutEffect=function(B,te){return de.current.useLayoutEffect(B,te)},De.useMemo=function(B,te){return de.current.useMemo(B,te)},De.useReducer=function(B,te,O){return de.current.useReducer(B,te,O)},De.useRef=function(B){return de.current.useRef(B)},De.useState=function(B){return de.current.useState(B)},De.useSyncExternalStore=function(B,te,O){return de.current.useSyncExternalStore(B,te,O)},De.useTransition=function(){return de.current.useTransition()},De.version="18.3.1",De}var Ot;function bn(){return Ot||(Ot=1,Ft.exports=rn()),Ft.exports}var ta;function Hu(){if(ta)return st;ta=1;var e=bn(),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,g={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(g[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)g[p]===void 0&&(g[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:g,_owner:o.current}}return st.Fragment=n,st.jsx=u,st.jsxs=u,st}var zu;function Nr(){return zu||(zu=1,Je.exports=Hu()),Je.exports}var w=Nr();const Pr=Object.create(null);Pr.open="0",Pr.close="1",Pr.ping="2",Pr.pong="3",Pr.message="4",Pr.upgrade="5",Pr.noop="6";const ju=Object.create(null);Object.keys(Pr).forEach(e=>{ju[Pr[e]]=e});const Nd={type:"error",data:"parser error"},y0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",T0=typeof ArrayBuffer=="function",b0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Pd=({type:e,data:t},n,r)=>y0&&t instanceof Blob?n?r(t):_0(t,r):T0&&(t instanceof ArrayBuffer||b0(t))?n?r(t):_0(new Blob([t]),r):r(Pr[e]+(t||"")),_0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function S0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Od;function H2(e,t){if(y0&&e.data instanceof Blob)return e.data.arrayBuffer().then(S0).then(t);if(T0&&(e.data instanceof ArrayBuffer||b0(e.data)))return t(S0(e.data));Pd(e,!1,n=>{Od||(Od=new TextEncoder),t(Od.encode(n))})}const x0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",na=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<x0.length;e++)na[x0.charCodeAt(e)]=e;const z2=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=na[e.charCodeAt(r)],u=na[e.charCodeAt(r+1)],c=na[e.charCodeAt(r+2)],d=na[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},j2=typeof ArrayBuffer=="function",Id=(e,t)=>{if(typeof e!="string")return{type:"message",data:w0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:$2(e.substring(1),t)}:ju[n]?e.length>1?{type:ju[n],data:e.substring(1)}:{type:ju[n]}:Nd},$2=(e,t)=>{if(j2){const n=z2(e);return w0(n,t)}else return{base64:!0,data:e}},w0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,A0="",V2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Pd(a,!1,c=>{r[u]=c,++o===n&&t(r.join(A0))})})},q2=(e,t)=>{const n=e.split(A0),r=[];for(let o=0;o<n.length;o++){const a=Id(n[o],t);if(r.push(a),a.type==="error")break}return r};function Y2(){return new TransformStream({transform(e,t){H2(e,n=>{const r=n.length;let 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 Rd;function $u(e){return e.reduce((t,n)=>t+n.length,0)}function Vu(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 G2(e,t){Rd||(Rd=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($u(n)<1)break;const d=Vu(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($u(n)<2)break;const d=Vu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if($u(n)<8)break;const d=Vu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(Nd);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if($u(n)<o)break;const d=Vu(n,o);c.enqueue(Id(a?d:Rd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(Nd);break}}}})}const C0=4;function Bt(e){if(e)return W2(e)}function W2(e){for(var t in Bt.prototype)e[t]=Bt.prototype[t];return e}Bt.prototype.on=Bt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Bt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Bt.prototype.off=Bt.prototype.removeListener=Bt.prototype.removeAllListeners=Bt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,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},Bt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Bt.prototype.emitReserved=Bt.prototype.emit,Bt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Bt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const qu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Kn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),X2="arraybuffer";function E7(){}function v0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const K2=Kn.setTimeout,Q2=Kn.clearTimeout;function Yu(e,t){t.useNativeTimers?(e.setTimeoutFn=K2.bind(Kn),e.clearTimeoutFn=Q2.bind(Kn)):(e.setTimeoutFn=Kn.setTimeout.bind(Kn),e.clearTimeoutFn=Kn.clearTimeout.bind(Kn))}const J2=1.33;function Z2(e){return typeof e=="string"?ew(e):Math.ceil((e.byteLength||e.size)*J2)}function ew(e){let t=0,n=0;for(let r=0,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 k0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function tw(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function nw(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class rw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Ld extends Bt{constructor(t){super(),this.writable=!1,Yu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new rw(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Id(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=tw(t);return n.length?"?"+n:""}}class iw extends Ld{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};q2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,V2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=k0()),!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 ow=N0;function sw(){}class aw extends iw{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(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 Or extends Bt{constructor(t,n,r){super(),this.createRequest=t,Yu(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=v0(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=Or.requestsCount++,Or.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=sw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Or.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(Or.requestsCount=0,Or.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",P0);else if(typeof addEventListener=="function"){const e="onpagehide"in Kn?"pagehide":"unload";addEventListener(e,P0,!1)}}function P0(){for(let e in Or.requests)Or.requests.hasOwnProperty(e)&&Or.requests[e].abort()}const uw=(function(){const e=O0({xdomain:!1});return e&&e.responseType!==null})();class lw extends aw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=uw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Or(O0,this.uri(),t)}}function O0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||ow))return new XMLHttpRequest}catch(n){}if(!t)try{return new Kn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const I0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class cw extends Ld{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=I0?{}:v0(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;Pd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&qu(()=>{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]=k0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Dd=Kn.WebSocket||Kn.MozWebSocket;class dw extends cw{createSocket(t,n,r){return I0?new Dd(t,n,r):n?new Dd(t,n):new Dd(t)}doWrite(t,n){this.ws.send(n)}}class fw extends Ld{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=G2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Y2();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&&qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const hw={websocket:dw,webtransport:fw,polling:lw},pw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function 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=pw.exec(e||""),a={},u=14;for(;u--;)a[mw[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=gw(a,a.path),a.queryKey=Ew(a,a.query),a}function gw(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Ew(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Fd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Gu=[];Fd&&addEventListener("offline",()=>{Gu.forEach(e=>e())},!1);class yi extends Bt{constructor(t,n){if(super(),this.binaryType=X2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=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);Yu(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=nw(this.opts.query)),Fd&&(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"})},Gu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=C0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=Z2(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,qu(()=>{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(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Fd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Gu.indexOf(this._offlineEventListener);r!==-1&&Gu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=C0;class yw extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;yi.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=g=>{const b=new Error("probe error: "+g);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function f(g){n&&g.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",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 Tw=class extends yw{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=>hw[o]).filter(o=>!!o)),super(t,r)}};function bw(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=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 _w=typeof ArrayBuffer=="function",Sw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,R0=Object.prototype.toString,xw=typeof Blob=="function"||typeof Blob!="undefined"&&R0.call(Blob)==="[object BlobConstructor]",ww=typeof File=="function"||typeof File!="undefined"&&R0.call(File)==="[object FileConstructor]";function Bd(e){return _w&&(e instanceof ArrayBuffer||Sw(e))||xw&&e instanceof Blob||ww&&e instanceof File}function Wu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wu(e[n]))return!0;return!1}if(Bd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wu(e[n]))return!0;return!1}function Aw(e){const t=[],n=e.data,r=e;return r.data=Ud(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ud(e,t){if(!e)return e;if(Bd(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]=Ud(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]=Ud(e[r],t));return n}return e}function Cw(e,t){return e.data=Hd(e.data,t),delete e.attachments,e}function Hd(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]=Hd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Hd(e[n],t));return e}const vw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var nt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(nt||(nt={}));class kw{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&Wu(t)?this.encodeAsBinary({type:t.type===nt.EVENT?nt.BINARY_EVENT:nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===nt.BINARY_EVENT||t.type===nt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Aw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class zd extends Bt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===nt.BINARY_EVENT;r||n.type===nt.BINARY_ACK?(n.type=r?nt.EVENT:nt.ACK,this.reconstructor=new Nw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Bd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nt.BINARY_EVENT||r.type===nt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Pw(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(zd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case nt.CONNECT:return L0(n);case nt.DISCONNECT:return n===void 0;case nt.CONNECT_ERROR:return typeof n=="string"||L0(n);case nt.EVENT:case nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&vw.indexOf(n[0])===-1);case nt.ACK:case nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Nw{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Cw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Pw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function L0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Ow=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zd,Encoder:kw,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function fr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Iw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class D0 extends Bt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[fr(t,"open",this.onopen.bind(this)),fr(t,"packet",this.onpacket.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(Iw.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:nt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,g=n.pop();this._registerAckCallback(p,g),u.id=p}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>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:nt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nt.EVENT:case nt.BINARY_EVENT:this.onevent(t);break;case nt.ACK:case nt.BINARY_ACK:this.onack(t);break;case nt.DISCONNECT:this.ondisconnect();break;case nt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:nt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.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:nt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Bo(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}Bo.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},Bo.prototype.reset=function(){this.attempts=0},Bo.prototype.setMin=function(e){this.ms=e},Bo.prototype.setMax=function(e){this.max=e},Bo.prototype.setJitter=function(e){this.jitter=e};class jd extends Bt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Yu(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 Bo({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||Ow;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 Tw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=fr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=fr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{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(fr(t,"ping",this.onping.bind(this)),fr(t,"data",this.ondata.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(t,"close",this.onclose.bind(this)),fr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){qu(()=>{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 D0(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 ra={};function Xu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=bw(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ra[o]&&a in ra[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new jd(r,t):(ra[o]||(ra[o]=new jd(r,t)),d=ra[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Xu,{Manager:jd,Socket:D0,io:Xu,connect:Xu});var Rw=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===Lw})(t)})(e)},Lw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ia(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Uo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Dw(e,t,n){return e.concat(t).map((function(r){return ia(r,n)}))}function M0(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 F0(e,t){try{return t in e}catch(n){return!1}}function Mw(e,t,n){var r={};return n.isMergeableObject(e)&&M0(e).forEach((function(o){r[o]=ia(e[o],n)})),M0(t).forEach((function(o){(function(a,u){return F0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(F0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return Uo;var c=u.customMerge(a);return typeof c=="function"?c:Uo})(o,n)(e[o],t[o],n):r[o]=ia(t[o],n))})),r}function Uo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Dw,n.isMergeableObject=n.isMergeableObject||Rw,n.cloneUnlessOtherwiseSpecified=ia;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Mw(e,t,n):ia(t,n)}Uo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Uo(n,r,t)}),{})};var Fw=Uo;let Bw=class{constructor(t){Object.assign(this,t)}};function _n(e){if(e)return(function(t){for(var n in _n.prototype)t[n]=_n.prototype[n];return t})(e)}_n.prototype.on=_n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},_n.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},_n.prototype.off=_n.prototype.removeListener=_n.prototype.removeAllListeners=_n.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},_n.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},_n.prototype.emitReserved=_n.prototype.emit,_n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},_n.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Uw=typeof ArrayBuffer=="function",B0=Object.prototype.toString,Hw=typeof Blob=="function"||typeof Blob!="undefined"&&B0.call(Blob)==="[object BlobConstructor]",zw=typeof File=="function"||typeof File!="undefined"&&B0.call(File)==="[object FileConstructor]";function $d(e){return Uw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Hw&&e instanceof Blob||zw&&e instanceof File}function Ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ku(e[n]))return!0;return!1}if($d(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ku(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ku(e[n]))return!0;return!1}function jw(e){const t=[],n=e.data,r=e;return r.data=Vd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Vd(e,t){if(!e)return e;if($d(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]=Vd(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]=Vd(e[r],t));return n}return e}function $w(e,t){return e.data=qd(e.data,t),delete e.attachments,e}function qd(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]=qd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=qd(e[n],t));return e}const Vw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var kt;(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"})(kt||(kt={}));class qw{constructor(t){this.replacer=t}encode(t){return t.type!==kt.EVENT&&t.type!==kt.ACK||!Ku(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===kt.EVENT?kt.BINARY_EVENT:kt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==kt.BINARY_EVENT&&t.type!==kt.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=jw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Yd extends _n{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===kt.BINARY_EVENT;r||n.type===kt.BINARY_ACK?(n.type=r?kt.EVENT:kt.ACK,this.reconstructor=new Yw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!$d(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(kt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===kt.BINARY_EVENT||r.type===kt.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(!Gw(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(!Yd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case kt.CONNECT:return U0(n);case kt.DISCONNECT:return n===void 0;case kt.CONNECT_ERROR:return typeof n=="string"||U0(n);case kt.EVENT:case kt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Vw.indexOf(n[0])===-1);case kt.ACK:case kt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Yw{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=$w(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Gw=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 H0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],z0=(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)},j0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Ww=z0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),H0),$0=z0(j0,j0,H0),Xw={Encoder:class extends qw{encode(e){var t,n;return super.encode(me(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Ww(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 Yd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?$0(r):r)):n instanceof Object?$0(n):n)):t))}}},Kw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Qw{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace: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+)['"]/),g=p==null?void 0:p[1];g&&["InvalidApiKey","InvalidToken","BadRequest"].includes(g)?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=[Kw,a,{parser:Xw,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Xu(u,Fw.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*ea(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 tt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return tt(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return tt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return tt(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return tt(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 tt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return tt(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return tt(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return tt(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return tt(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return tt(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 tt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return kd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Jr(u({emit:g=>{c.push(g),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Jr(new Promise((g=>{f=g})));for(;c.length>0;)yield c.shift()}finally{yield new Jr(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),()=>tt(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new Bw(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var U=bn();const Zi=ze(U);var V0=Symbol.for("immer-nothing"),q0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Qn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ho=Object.getPrototypeOf;function zo(e){return!!e&&!!e[at]}function Zr(e){var t;return e?Y0(e)||Array.isArray(e)||!!e[q0]||!!((t=e.constructor)!=null&&t[q0])||Ju(e)||Zu(e):!1}var Jw=Object.prototype.constructor.toString();function Y0(e){if(!e||typeof e!="object")return!1;const t=Ho(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Jw}function oa(e,t){Qu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Qu(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:Ju(e)?2:Zu(e)?3:0}function Gd(e,t){return Qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function G0(e,t,n){const r=Qu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Zw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ju(e){return e instanceof Map}function Zu(e){return e instanceof Set}function Xt(e){return e.copy_||e.base_}function Wd(e,t){if(Ju(e))return new Map(e);if(Zu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Y0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[at];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(Ho(e),r)}else{const r=Ho(e);if(r!==null&&n)return F({},e);const o=Object.create(r);return Object.assign(o,e)}}function Xd(e,t=!1){return el(e)||zo(e)||!Zr(e)||(Qu(e)>1&&(e.set=e.add=e.clear=e.delete=eA),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Xd(r,!0))),e}function eA(){Qn(2)}function el(e){return Object.isFrozen(e)}var Kd={};function eo(e){const t=Kd[e];return t||Qn(0,e),t}function tA(e,t){Kd[e]||(Kd[e]=t)}var sa;function tl(){return sa}function nA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function W0(e,t){t&&(eo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qd(e){Jd(e),e.drafts_.forEach(rA),e.drafts_=null}function Jd(e){e===sa&&(sa=e.parent_)}function X0(e){return sa=nA(sa,e)}function rA(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function K0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Qd(t),Qn(4)),Zr(e)&&(e=nl(t,e),t.parent_||rl(t,e)),t.patches_&&eo("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=nl(t,n,[]),Qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==V0?e:void 0}function nl(e,t,n){if(el(t))return t;const r=t[at];if(!r)return oa(t,(o,a)=>Q0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return rl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),oa(a,(c,d)=>Q0(e,r,o,c,d,n,u)),rl(e,o,!1),n&&e.patches_&&eo("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Q0(e,t,n,r,o,a,u){if(zo(o)){const c=a&&t&&t.type_!==3&&!Gd(t.assigned_,r)?a.concat(r):void 0,d=nl(e,o,c);if(G0(n,r,d),zo(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Zr(o)&&!el(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;nl(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&rl(e,o)}}function rl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xd(t,n)}function iA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:tl(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Zd;n&&(o=[r],a=aa);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Zd={get(e,t){if(t===at)return e;const n=Xt(e);if(!Gd(n,t))return oA(e,n,t);const r=n[t];return e.finalized_||!Zr(r)?r:r===ef(e.base_,t)?(tf(e),e.copy_[t]=ua(r,e)):r},has(e,t){return t in Xt(e)},ownKeys(e){return Reflect.ownKeys(Xt(e))},set(e,t,n){const r=J0(Xt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=ef(Xt(e),t),a=o==null?void 0:o[at];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Zw(n,o)&&(n!==void 0||Gd(e.base_,t)))return!0;tf(e),ei(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 ef(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,tf(e),ei(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Xt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Qn(11)},getPrototypeOf(e){return Ho(e.base_)},setPrototypeOf(){Qn(12)}},aa={};oa(Zd,(e,t)=>{aa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),aa.deleteProperty=function(e,t){return aa.set.call(this,e,t,void 0)},aa.set=function(e,t,n){return Zd.set.call(this,e[0],t,n,e[0])};function ef(e,t){const n=e[at];return(n?Xt(n):e)[t]}function oA(e,t,n){var o;const r=J0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function J0(e,t){if(!(t in e))return;let n=Ho(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ho(n)}}function ei(e){e.modified_||(e.modified_=!0,e.parent_&&ei(e.parent_))}function tf(e){e.copy_||(e.copy_=Wd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&Qn(6),r!==void 0&&typeof r!="function"&&Qn(7);let o;if(Zr(t)){const a=X0(this),u=ua(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Qd(a):Jd(a)}return W0(a,r),K0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===V0&&(o=void 0),this.autoFreeze_&&Xd(o,!0),r){const a=[],u=[];eo("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Qn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Zr(e)||Qn(8),zo(e)&&(e=aA(e));const t=X0(this),n=ua(e,void 0);return n[at].isManual_=!0,Jd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&Qn(9);const{scope_:r}=n;return W0(r,t),K0(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=eo("Patches").applyPatches_;return zo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ua(e,t){const n=Ju(e)?eo("MapSet").proxyMap_(e,t):Zu(e)?eo("MapSet").proxySet_(e,t):iA(e,t);return(t?t.scope_:tl()).drafts_.push(n),n}function aA(e){return zo(e)||Qn(10,e),Z0(e)}function Z0(e){if(!Zr(e)||el(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Wd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Wd(e,!0);return oa(n,(r,o)=>{G0(n,r,Z0(o))}),t&&(t.finalized_=!1),n}function uA(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:tl(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Xt(this[at]).size}has(d){return Xt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Xt(p).has(d)||Xt(p).get(d)!==f)&&(n(p),ei(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),n(f),ei(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[at];u(d),Xt(d).size&&(n(d),ei(d),d.assigned_=new Map,oa(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Xt(p).forEach((g,b,y)=>{d.call(f,this.get(b),b,this)})}get(d){const f=this[at];u(f);const p=Xt(f).get(d);if(f.finalized_||!Zr(p)||p!==f.base_.get(d))return p;const g=ua(p,f);return n(f),f.copy_.set(d,g),g}keys(){return Xt(this[at]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[at]={type_:3,parent_:f,scope_:f?f.scope_:tl(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Xt(this[at]).size}has(d){const f=this[at];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[at];return u(f),this.has(d)||(a(f),ei(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),ei(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Xt(d).size&&(a(d),ei(d),d.copy_.clear())}values(){const d=this[at];return u(d),a(d),d.copy_.values()}entries(){const d=this[at];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let g=p.next();for(;!g.done;)d.call(f,g.value,g.value,this),g=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=ua(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Qn(3,JSON.stringify(Xt(c)))}tA("MapSet",{proxyMap_:t,proxySet_:o})}var Un=new sA,lA=Un.produce;Un.produceWithPatches.bind(Un),Un.setAutoFreeze.bind(Un),Un.setUseStrictShallowCopy.bind(Un),Un.applyPatches.bind(Un),Un.createDraft.bind(Un),Un.finishDraft.bind(Un);function eg(e,t,n){var r=U.useMemo(function(){return lA(e)},[e]);return U.useReducer(r,t,n)}const tg={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"},pt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},to={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},cA=e=>{switch(!0){case e==="copilot_search":return"search";case e==="copilot_browse":return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return null}},jo="cimulate",nf=`${jo}:pdp-update`,rf=`${jo}:browse-update`,of=`${jo}:search-update`,sf=`${jo}:ui-state-update`,af=`${jo}:prompts-state-update`,uf=`${jo}:session-state`,Ir=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},tg),dA={"browse-context":Ir.CONTEXT_UPDATED,categoryId:Ir.CATEGORY_ID_CHANGED,categoryName:Ir.CATEGORY_NAME_CHANGED,page:Ir.PAGE_CHANGED,pageSize:Ir.PAGE_SIZE_CHANGED,includeFacets:Ir.FACET_FILTERS_CHANGED,facetFilters:Ir.FACET_FILTERS_CHANGED,rangeFilters:Ir.RANGE_FILTERS_CHANGED,catalogSegment:Ir.CATALOG_SEGMENT_CHANGED,pricebooks:Ir.PRICEBOOKS_CHANGED},ti=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},tg),fA={"search-context":ti.SEARCH_CONTEXT_UPDATED,query:ti.QUERY_CHANGED,page:ti.PAGE_CHANGED,pageSize:ti.PAGE_SIZE_CHANGED,includeFacets:ti.FACET_FILTERS_CHANGED,facetFilters:ti.FACET_FILTERS_CHANGED,rangeFilters:ti.RANGE_FILTERS_CHANGED,catalogSegment:ti.CATALOG_SEGMENT_CHANGED,pricebooks:ti.PRICEBOOKS_CHANGED},j="cim-widget",Ti=`--${j}`,bi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},hA=(e=bi)=>({[`${Ti}-primary-color`]:e.primaryColor||bi.primaryColor,[`${Ti}-secondary-color`]:e.secondaryColor||bi.secondaryColor,[`${Ti}-font-color`]:e.fontColor||bi.fontColor,[`${Ti}-font-family`]:e.fontFamily||bi.fontFamily,[`${Ti}-background-color`]:e.backgroundColor||bi.backgroundColor,[`${Ti}-border-color`]:e.borderColor||bi.borderColor,[`${Ti}-border-radius`]:e.borderRadius||bi.borderRadius}),_i={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},ng=U.createContext(null),rg=U.createContext(null);function ig(e,t){return function(){return e.apply(t,arguments)}}const{toString:pA}=Object.prototype,{getPrototypeOf:il}=Object,{iterator:ol,toStringTag:og}=Symbol,sl=(e=>t=>{const n=pA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),hr=e=>(e=e.toLowerCase(),t=>sl(t)===e),al=e=>t=>typeof t===e,{isArray:$o}=Array,Vo=al("undefined");function la(e){return e!==null&&!Vo(e)&&e.constructor!==null&&!Vo(e.constructor)&&vn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const sg=hr("ArrayBuffer");function mA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&sg(e.buffer),t}const gA=al("string"),vn=al("function"),ag=al("number"),ca=e=>e!==null&&typeof e=="object",EA=e=>e===!0||e===!1,ul=e=>{if(sl(e)!=="object")return!1;const t=il(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(og in e)&&!(ol in e)},yA=e=>{if(!ca(e)||la(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},TA=hr("Date"),bA=hr("File"),_A=e=>!!(e&&typeof e.uri!="undefined"),SA=e=>e&&typeof e.getParts!="undefined",xA=hr("Blob"),wA=hr("FileList"),AA=e=>ca(e)&&vn(e.pipe);function CA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const ug=CA(),lg=typeof ug.FormData!="undefined"?ug.FormData:void 0,vA=e=>{if(!e)return!1;if(lg&&e instanceof lg)return!0;const t=il(e);if(!t||t===Object.prototype||!vn(e.append))return!1;const n=sl(e);return n==="formdata"||n==="object"&&vn(e.toString)&&e.toString()==="[object FormData]"},kA=hr("URLSearchParams"),[NA,PA,OA,IA]=["ReadableStream","Request","Response","Headers"].map(hr),RA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function da(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),$o(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(la(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 cg(e,t){if(la(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 no=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,dg=e=>!Vo(e)&&e!==no;function lf(...e){const{caseless:t,skipUndefined:n}=dg(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&cg(r,u)||u,d=cf(r,c)?r[c]:void 0;ul(d)&&ul(a)?r[c]=lf(d,a):ul(a)?r[c]=lf({},a):$o(a)?r[c]=a.slice():(!n||!Vo(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&da(e[a],o);return r}const LA=(e,t,n,{allOwnKeys:r}={})=>(da(t,(o,a)=>{n&&vn(o)?Object.defineProperty(e,a,{__proto__:null,value:ig(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),DA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),MA=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},FA=(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&&il(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},BA=(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},UA=e=>{if(!e)return null;if($o(e))return e;let t=e.length;if(!ag(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},HA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&il(Uint8Array)),zA=(e,t)=>{const r=(e&&e[ol]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},jA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},$A=hr("HTMLFormElement"),VA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),cf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qA=hr("RegExp"),fg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};da(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},YA=e=>{fg(e,(t,n)=>{if(vn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(vn(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+"'")})}})},GA=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return $o(e)?r(e):r(String(e).split(t)),n},WA=()=>{},XA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function KA(e){return!!(e&&vn(e.append)&&e[og]==="FormData"&&e[ol])}const QA=e=>{const t=new WeakSet,n=r=>{if(ca(r)){if(t.has(r))return;if(la(r))return r;if(!("toJSON"in r)){t.add(r);const o=$o(r)?[]:{};return da(r,(a,u)=>{const c=n(a);!Vo(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},JA=hr("AsyncFunction"),ZA=e=>e&&(ca(e)||vn(e))&&vn(e.then)&&vn(e.catch),hg=((e,t)=>e?setImmediate:t?((n,r)=>(no.addEventListener("message",({source:o,data:a})=>{o===no&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),no.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",vn(no.postMessage)),eC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(no):typeof process!="undefined"&&process.nextTick||hg,q={isArray:$o,isArrayBuffer:sg,isBuffer:la,isFormData:vA,isArrayBufferView:mA,isString:gA,isNumber:ag,isBoolean:EA,isObject:ca,isPlainObject:ul,isEmptyObject:yA,isReadableStream:NA,isRequest:PA,isResponse:OA,isHeaders:IA,isUndefined:Vo,isDate:TA,isFile:bA,isReactNativeBlob:_A,isReactNative:SA,isBlob:xA,isRegExp:qA,isFunction:vn,isStream:AA,isURLSearchParams:kA,isTypedArray:HA,isFileList:wA,forEach:da,merge:lf,extend:LA,trim:RA,stripBOM:DA,inherits:MA,toFlatObject:FA,kindOf:sl,kindOfTest:hr,endsWith:BA,toArray:UA,forEachEntry:zA,matchAll:jA,isHTMLForm:$A,hasOwnProperty:cf,hasOwnProp:cf,reduceDescriptors:fg,freezeMethods:YA,toObjectSet:GA,toCamelCase:VA,noop:WA,toFiniteNumber:XA,findKey:cg,global:no,isContextDefined:dg,isSpecCompliantForm:KA,toJSONObject:QA,isAsyncFn:JA,isThenable:ZA,setImmediate:hg,asap:eC,isIterable:e=>e!=null&&vn(e[ol])},tC=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"]),nC=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};function rC(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const iC=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),oC=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function df(e,t){return q.isArray(e)?e.map(n=>df(n,t)):rC(String(e).replace(t,""))}const sC=e=>df(e,iC),aC=e=>df(e,oC);function pg(e){const t=Object.create(null);return q.forEach(e.toJSON(),(n,r)=>{t[r]=aC(n)}),t}const mg=Symbol("internals");function fa(e){return e&&String(e).trim().toLowerCase()}function ll(e){return e===!1||e==null?e:q.isArray(e)?e.map(ll):sC(String(e))}function uC(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 lC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ff(e,t,n,r,o){if(q.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function cC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function dC(e,t){const n=q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let Sn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,f){const p=fa(d);if(!p)throw new Error("header name must be a non-empty string");const g=q.findKey(o,p);(!g||o[g]===void 0||f===!0||f===void 0&&o[g]!==!1)&&(o[g||d]=ll(c))}const u=(c,d)=>q.forEach(c,(f,p)=>a(f,p,d));if(q.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(q.isString(t)&&(t=t.trim())&&!lC(t))u(nC(t),n);else if(q.isObject(t)&&q.isIterable(t)){let c={},d,f;for(const p of t){if(!q.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?q.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=fa(t),t){const r=q.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return uC(o);if(q.isFunction(n))return n.call(this,o,r);if(q.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=fa(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ff(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=fa(u),u){const c=q.findKey(r,u);c&&(!n||ff(r,r[c],c,n))&&(delete r[c],o=!0)}}return q.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||ff(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return q.forEach(this,(o,a)=>{const u=q.findKey(r,a);if(u){n[u]=ll(o),delete n[a];return}const c=t?cC(a):String(a).trim();c!==a&&delete n[a],n[c]=ll(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return q.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&q.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[mg]=this[mg]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=fa(u);r[c]||(dC(o,u),r[c]=!0)}return q.isArray(t)?t.forEach(a):a(t),this}};Sn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(Sn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),q.freezeMethods(Sn);const fC="[REDACTED ****]";function hC(e){if(q.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(q.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function pC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||q.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Sn&&(a=a.toJSON()),r.push(a);let u;if(q.isArray(a))u=[],a.forEach((c,d)=>{const f=o(c);q.isUndefined(f)||(u[d]=f)});else{if(!q.isPlainObject(a)&&hC(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?fC:o(d);q.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return o(e)}let Ne=class F2 extends Error{static from(t,n,r,o,a,u){const c=new F2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&q.hasOwnProp(t,"redact")?t.redact:void 0,r=q.isArray(n)&&n.length>0?pC(t,n):q.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const mC=null;function hf(e){return q.isPlainObject(e)||q.isArray(e)}function gg(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function pf(e,t,n){return e?e.concat(t).map(function(o,a){return o=gg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function gC(e){return q.isArray(e)&&!e.some(hf)}const EC=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function cl(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(v,C){return!q.isUndefined(C[v])});const r=n.metaTokens,o=n.visitor||g,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,f=c&&q.isSpecCompliantForm(t);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(q.isDate(S))return S.toISOString();if(q.isBoolean(S))return S.toString();if(!f&&q.isBlob(S))throw new Ne("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(S)||q.isTypedArray(S)?f&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,v,C){let P=S;if(q.isReactNative(t)&&q.isReactNativeBlob(S))return t.append(pf(C,v,a),p(S)),!1;if(S&&!C&&typeof S=="object"){if(q.endsWith(v,"{}"))v=r?v:v.slice(0,-2),S=JSON.stringify(S);else if(q.isArray(S)&&gC(S)||(q.isFileList(S)||q.endsWith(v,"[]"))&&(P=q.toArray(S)))return v=gg(v),P.forEach(function(M,V){!(q.isUndefined(M)||M===null)&&t.append(u===!0?pf([v],V,a):u===null?v:v+"[]",p(M))}),!1}return hf(S)?!0:(t.append(pf(C,v,a),p(S)),!1)}const b=[],y=Object.assign(EC,{defaultVisitor:g,convertValue:p,isVisitable:hf});function _(S,v,C=0){if(!q.isUndefined(S)){if(C>d)throw new Ne("Object is too deeply nested ("+C+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED);if(b.indexOf(S)!==-1)throw Error("Circular reference detected in "+v.join("."));b.push(S),q.forEach(S,function(A,M){(!(q.isUndefined(A)||A===null)&&o.call(t,A,q.isString(M)?M.trim():M,v,y))===!0&&_(A,v?v.concat(M):[M],C+1)}),b.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Eg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function mf(e,t){this._pairs=[],e&&cl(e,this,t)}const yg=mf.prototype;yg.append=function(t,n){this._pairs.push([t,n])},yg.toString=function(t){const n=t?function(r){return t.call(this,r,Eg)}:Eg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function yC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Tg(e,t,n){if(!t)return e;const r=n&&n.encode||yC,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 mf(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class bg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const gf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},TC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:mf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ef=typeof window!="undefined"&&typeof document!="undefined",yf=typeof navigator=="object"&&navigator||void 0,bC=Ef&&(!yf||["ReactNative","NativeScript","NS"].indexOf(yf.product)<0),_C=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",SC=Ef&&window.location.href||"http://localhost",cn=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ef,hasStandardBrowserEnv:bC,hasStandardBrowserWebWorkerEnv:_C,navigator:yf,origin:SC},Symbol.toStringTag,{value:"Module"}))),TC);function xC(e,t){return cl(e,new cn.classes.URLSearchParams,F({visitor:function(n,r,o,a){return cn.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function wC(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function AC(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 _g(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]=q.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!q.hasOwnProp(o,u)||!q.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&q.isArray(o[u])&&(o[u]=AC(o[u])),!c)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,o)=>{t(wC(r),o,n,0)}),n}return null}const qo=(e,t)=>e!=null&&q.hasOwnProp(e,t)?e[t]:void 0;function CC(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 ha={transitional:gf,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(_g(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){const d=qo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return xC(t,d).toString();if((c=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=qo(this,"env"),p=f&&f.FormData;return cl(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),CC(t)):t}],transformResponse:[function(t){const n=qo(this,"transitional")||ha.transitional,r=n&&n.forcedJSONParsing,o=qo(this,"responseType"),a=o==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,qo(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,qo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:cn.classes.FormData,Blob:cn.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","query"],e=>{ha.headers[e]={}});function Tf(e,t){const n=this||ha,r=t||n,o=Sn.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 Sg(e){return!!(e&&e.__CANCEL__)}let pa=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function xg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function vC(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function kC(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 g=a,b=0;for(;g!==o;)b+=n[g++],g=g%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(b*1e3/y):void 0}}function NC(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(),g=p-n;g>=r?u(f,p):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-g)))},()=>o&&u(o)]}const dl=(e,t,n=3)=>{let r=0;const o=kC(50,250);return NC(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=o(f);r=Math.max(r,d);const g={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(g)},n)},wg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ag=e=>(...t)=>q.asap(()=>e(...t)),PC=cn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,cn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(cn.origin),cn.navigator&&/(msie|trident)/i.test(cn.navigator.userAgent)):()=>!0,OC=cn.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.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function IC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function RC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Cg(e,t,n){let r=!IC(t);return e&&(r||n===!1)?RC(e,t):t}const vg=e=>e instanceof Sn?F({},e):e;function ro(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,p,g,b){return q.isPlainObject(f)&&q.isPlainObject(p)?q.merge.call({caseless:b},f,p):q.isPlainObject(p)?q.merge({},p):q.isArray(p)?p.slice():p}function o(f,p,g,b){if(q.isUndefined(p)){if(!q.isUndefined(f))return r(void 0,f,g,b)}else return r(f,p,g,b)}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,g){if(q.hasOwnProp(t,g))return r(f,p);if(q.hasOwnProp(e,g))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,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(f,p,g)=>o(vg(f),vg(p),g,!0)};return q.forEach(Object.keys(F(F({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=q.hasOwnProp(d,p)?d[p]:o,b=q.hasOwnProp(e,p)?e[p]:void 0,y=q.hasOwnProp(t,p)?t[p]:void 0,_=g(b,y,p);q.isUndefined(_)&&g!==c||(n[p]=_)}),n}const LC=["content-type","content-length"];function DC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{LC.includes(r.toLowerCase())&&e.set(r,o)})}const MC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),kg=e=>{const t=ro({},e),n=b=>q.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),g=n("url");if(t.headers=c=Sn.from(c),t.url=Tg(Cg(f,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?MC(d.password):""))),q.isFormData(r)&&(cn.hasStandardBrowserEnv||cn.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):q.isFunction(r.getHeaders)&&DC(c,r.getHeaders(),n("formDataHeaderPolicy"))),cn.hasStandardBrowserEnv&&(q.isFunction(o)&&(o=o(t)),o===!0||o==null&&PC(t.url))){const y=a&&u&&OC.read(u);y&&c.set(a,y)}return t},FC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=kg(e);let a=o.data;const u=Sn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,g,b,y,_;function S(){y&&y(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function C(){if(!v)return;const A=Sn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),V={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:A,config:e,request:v};xg(function(K){n(K),S()},function(K){r(K),S()},V),v=null}"onloadend"in v?v.onloadend=C:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(C)},v.onabort=function(){v&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,v)),S(),v=null)},v.onerror=function(M){const V=M&&M.message?M.message:"Network Error",D=new Ne(V,Ne.ERR_NETWORK,e,v);D.event=M||null,r(D),S(),v=null},v.ontimeout=function(){let M=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const V=o.transitional||gf;o.timeoutErrorMessage&&(M=o.timeoutErrorMessage),r(new Ne(M,V.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,v)),S(),v=null},a===void 0&&u.setContentType(null),"setRequestHeader"in v&&q.forEach(pg(u),function(M,V){v.setRequestHeader(V,M)}),q.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),c&&c!=="json"&&(v.responseType=o.responseType),f&&([b,_]=dl(f,!0),v.addEventListener("progress",b)),d&&v.upload&&([g,y]=dl(d),v.upload.addEventListener("progress",g),v.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=A=>{v&&(r(!A||A.type?new pa(null,e,v):A),v.abort(),S(),v=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const P=vC(o.url);if(P&&!cn.protocols.includes(P)){r(new Ne("Unsupported protocol "+P+":",Ne.ERR_BAD_REQUEST,e));return}v.send(a||null)})},BC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Ne?f:new pa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>q.asap(u),c},UC=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 kd(this,null,function*(){try{for(var n=M2(zC(e)),r,o,a;r=!(o=yield new Jr(n.next())).done;r=!1){const u=o.value;yield*E0(UC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Jr(o.call(n)))}finally{if(a)throw a[0]}}})},zC=function(e){return kd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*E0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Jr(t.read());if(n)break;yield r}}finally{yield new Jr(t.cancel())}})},Ng=(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 tt(this,null,function*(){try{const{done:p,value:g}=yield o.next();if(p){c(),f.close();return}let b=g.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(g))}catch(p){throw c(p),p}})},cancel(f){return c(f),o.return()}},{highWaterMark:2})};function jC(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const _=r.charCodeAt(y+1),S=r.charCodeAt(y+2);(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)&&(u-=2,y+=2)}let d=0,f=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const bf="1.16.1",Pg=64*1024,{isFunction:fl}=q,Og=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},$C=e=>{const t=q.global!==void 0&&q.global!==null?q.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=q.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,c=o?fl(o):typeof fetch=="function",d=fl(a),f=fl(u);if(!c)return!1;const p=c&&fl(n),g=c&&(typeof r=="function"?(C=>P=>C.encode(P))(new r):C=>tt(null,null,function*(){return new Uint8Array(yield new a(C).arrayBuffer())})),b=d&&p&&Og(()=>{let C=!1;const P=new a(cn.origin,{body:new n,method:"POST",get duplex(){return C=!0,"half"}}),A=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),C&&!A}),y=f&&p&&Og(()=>q.isReadableStream(new u("").body)),_={stream:y&&(C=>C.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!_[C]&&(_[C]=(P,A)=>{let M=P&&P[C];if(M)return M.call(P);throw new Ne(`Response type '${C}' is not supported`,Ne.ERR_NOT_SUPPORT,A)})});const S=C=>tt(null,null,function*(){if(C==null)return 0;if(q.isBlob(C))return C.size;if(q.isSpecCompliantForm(C))return(yield new a(cn.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(q.isArrayBufferView(C)||q.isArrayBuffer(C))return C.byteLength;if(q.isURLSearchParams(C)&&(C=C+""),q.isString(C))return(yield g(C)).byteLength}),v=(C,P)=>tt(null,null,function*(){const A=q.toFiniteNumber(C.getContentLength());return A==null?S(P):A});return C=>tt(null,null,function*(){let{url:P,method:A,data:M,signal:V,cancelToken:D,timeout:K,onDownloadProgress:re,onUploadProgress:Te,responseType:$,headers:Z,withCredentials:ce="same-origin",fetchOptions:he,maxContentLength:ue,maxBodyLength:be}=kg(C);const Oe=q.isNumber(ue)&&ue>-1,de=q.isNumber(be)&&be>-1;let Q=o||fetch;$=$?($+"").toLowerCase():"text";let ie=BC([V,D&&D.toAbortSignal()],K),k=null;const B=ie&&ie.unsubscribe&&(()=>{ie.unsubscribe()});let te;try{if(Oe&&typeof P=="string"&&P.startsWith("data:")&&jC(P)>ue)throw new Ne("maxContentLength size of "+ue+" exceeded",Ne.ERR_BAD_RESPONSE,C,k);if(de&&A!=="get"&&A!=="head"){const we=yield v(Z,M);if(typeof we=="number"&&isFinite(we)&&we>be)throw new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,C,k)}if(Te&&b&&A!=="get"&&A!=="head"&&(te=yield v(Z,M))!==0){let we=new a(P,{method:"POST",body:M,duplex:"half"}),We;if(q.isFormData(M)&&(We=we.headers.get("content-type"))&&Z.setContentType(We),we.body){const[ht,on]=wg(te,dl(Ag(Te)));M=Ng(we.body,Pg,ht,on)}}q.isString(ce)||(ce=ce?"include":"omit");const O=d&&"credentials"in a.prototype;if(q.isFormData(M)){const we=Z.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&Z.delete("content-type")}Z.set("User-Agent","axios/"+bf,!1);const _e=me(F({},he),{signal:ie,method:A.toUpperCase(),headers:pg(Z.normalize()),body:M,duplex:"half",credentials:O?ce:void 0});k=d&&new a(P,_e);let Ie=yield d?Q(k,he):Q(P,_e);if(Oe){const we=q.toFiniteNumber(Ie.headers.get("content-length"));if(we!=null&&we>ue)throw new Ne("maxContentLength size of "+ue+" exceeded",Ne.ERR_BAD_RESPONSE,C,k)}const Ae=y&&($==="stream"||$==="response");if(y&&Ie.body&&(re||Oe||Ae&&B)){const we={};["status","statusText","headers"].forEach(Rn=>{we[Rn]=Ie[Rn]});const We=q.toFiniteNumber(Ie.headers.get("content-length")),[ht,on]=re&&wg(We,dl(Ag(re),!0))||[];let qr=0;const _r=Rn=>{if(Oe&&(qr=Rn,qr>ue))throw new Ne("maxContentLength size of "+ue+" exceeded",Ne.ERR_BAD_RESPONSE,C,k);ht&&ht(Rn)};Ie=new u(Ng(Ie.body,Pg,_r,()=>{on&&on(),B&&B()}),we)}$=$||"text";let $e=yield _[q.findKey(_,$)||"text"](Ie,C);if(Oe&&!y&&!Ae){let we;if($e!=null&&(typeof $e.byteLength=="number"?we=$e.byteLength:typeof $e.size=="number"?we=$e.size:typeof $e=="string"&&(we=typeof r=="function"?new r().encode($e).byteLength:$e.length)),typeof we=="number"&&we>ue)throw new Ne("maxContentLength size of "+ue+" exceeded",Ne.ERR_BAD_RESPONSE,C,k)}return!Ae&&B&&B(),yield new Promise((we,We)=>{xg(we,We,{data:$e,headers:Sn.from(Ie.headers),status:Ie.status,statusText:Ie.statusText,config:C,request:k})})}catch(O){if(B&&B(),ie&&ie.aborted&&ie.reason instanceof Ne){const _e=ie.reason;throw _e.config=C,k&&(_e.request=k),O!==_e&&(_e.cause=O),_e}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Ne("Network Error",Ne.ERR_NETWORK,C,k,O&&O.response),{cause:O.cause||O}):Ne.from(O,O&&O.code,C,k,O&&O.response)}})},VC=new Map,Ig=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=VC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:$C(t)),p=f;return f};Ig();const _f={http:mC,xhr:FC,fetch:{get:Ig}};q.forEach(_f,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Rg=e=>`- ${e}`,qC=e=>q.isFunction(e)||e===null||e===!1;function YC(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,!qC(r)&&(o=_f[(c=String(r)).toLowerCase()],o===void 0))throw new Ne(`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
5
|
`+u.map(Rg).join(`
|
|
6
|
-
`):" "+Rg(u[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const Lg={getAdapter:
|
|
6
|
+
`):" "+Rg(u[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const Lg={getAdapter:YC,adapters:_f};function Sf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pa(null,e)}function Dg(e){return Sf(e),e.headers=Sn.from(e.headers),e.data=Tf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lg.getAdapter(e.adapter||ha.adapter,e)(e).then(function(r){Sf(e),e.response=r;try{r.data=Tf.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Sn.from(r.headers),r},function(r){if(!Sg(r)&&(Sf(e),r&&r.response)){e.response=r.response;try{r.response.data=Tf.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Sn.from(r.response.headers)}return Promise.reject(r)})}const hl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Mg={};hl.transitional=function(t,n,r){function o(a,u){return"[Axios v"+bf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ne(o(u," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!Mg[u]&&(Mg[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}},hl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function GC(e,t,n){if(typeof e!="object")throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new Ne("option "+a+" must be "+d,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const pl={assertOptions:GC,validators:hl},Jn=pl.validators;let io=class{constructor(t){this.defaults=t||{},this.interceptors={request:new bg,response:new bg}}request(t,n){return tt(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(`
|
|
7
7
|
`);return u===-1?"":o.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
|
|
8
8
|
`),c=u===-1?-1:a.indexOf(`
|
|
9
9
|
`,u+1),d=c===-1?"":a.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
|
|
10
|
-
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=no(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&pl.assertOptions(r,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean),legacyInterceptorReqResOrdering:Jn.transitional(Jn.boolean)},!1),o!=null&&(V.isFunction(o)?n.paramsSerializer={serialize:o}:pl.assertOptions(o,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),pl.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&V.merge(a.common,a[n.method]);a&&V.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=Sn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const A=n.transitional||gf;A&&A.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(S.fulfilled,S.rejected)});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let p,g=0,b;if(!d){const _=[Dg.bind(this),void 0];for(_.unshift(...c),_.push(...f),b=_.length,p=Promise.resolve(n);g<b;)p=p.then(_[g++],_[g++]);return p}b=c.length;let y=n;for(;g<b;){const _=c[g++],S=c[g++];try{y=_(y)}catch(A){S.call(this,A);break}}try{p=Dg.call(this,y)}catch(_){return Promise.reject(_)}for(g=0,b=f.length;g<b;)p=p.then(f[g++],f[g++]);return p}getUri(t){t=no(this.defaults,t);const n=Ag(t.baseURL,t.url,t.allowAbsoluteUrls);return Tg(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){ro.prototype[t]=function(n,r){return this.request(no(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(no(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}ro.prototype[t]=n(),t!=="query"&&(ro.prototype[t+"Form"]=n(!0))});let GA=class F2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(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 pa(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new F2(function(o){t=o}),cancel:t}}};function WA(e){return function(n){return e.apply(null,n)}}function XA(e){return V.isObject(e)&&e.isAxiosError===!0}const xf={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(xf).forEach(([e,t])=>{xf[t]=e});function Fg(e){const t=new ro(e),n=ig(ro.prototype.request,t);return V.extend(n,ro.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Fg(no(e,o))},n}const Rt=Fg(ha);Rt.Axios=ro,Rt.CanceledError=pa,Rt.CancelToken=GA,Rt.isCancel=Sg,Rt.VERSION=bf,Rt.toFormData=cl,Rt.AxiosError=Ne,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=WA,Rt.isAxiosError=XA,Rt.mergeConfig=no,Rt.AxiosHeaders=Sn,Rt.formToJSON=e=>_g(V.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Lg.getAdapter,Rt.HttpStatusCode=xf,Rt.default=Rt;const{Axios:x7,AxiosError:w7,CanceledError:C7,isCancel:A7,CancelToken:v7,VERSION:k7,all:N7,Cancel:P7,isAxiosError:O7,spread:I7,toFormData:R7,AxiosHeaders:L7,HttpStatusCode:D7,formToJSON:M7,getAdapter:F7,mergeConfig:B7,create:U7}=Rt;class KA{constructor(t,n,r,o=!1){Se(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Se(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Se(this,"CIMULATE_SEARCH_API_PATH","api/v1");Se(this,"baseApiUrl");Se(this,"headers",{});Se(this,"fetchConfig",()=>tt(this,null,function*(){try{const t=yield Rt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Se(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class QA{constructor(t,n,r,o=!1){Se(this,"apiService");Se(this,"config",null);Se(this,"getConfig",()=>tt(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}}));Se(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Se(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Se(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Se(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Se(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Se(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Se(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Se(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Se(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Se(this,"getProductField",t=>this.config?this.config[t]:"");Se(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new KA(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 Yo=(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 JA{constructor(t=!1){Se(this,"isDevelopment");Se(this,"_log",(t,n,...r)=>{Yo(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 Bg=H.createContext(null),ZA=({mode:e,logoUrl:t,headerText:n="Your Search Assistant",globalClassName:r="",entryMessage:o,openLinksInNewTab:a=!1,disclaimerText:u,disclaimerMarkdown:c,clientContext:d,searchPlaceholder:f,searchButtonLabel:p,searchConfig:g,componentConfig:b,conversationHistory:y,resetConversationMessage:_="",apiKey:S,apiToken:A,baseUrl:v,theme:P,isDevelopment:C,__features:B,children:q})=>{const D=H.useMemo(()=>e==="messaging"?{config:null}:new QA(v,S,A,C),[e,v,S,A,C]),Q=H.useMemo(()=>new JA(C),[C]);H.useEffect(()=>{e!=="messaging"&&(!D||D.config||D.getConfig())},[D,e]);const re=H.useMemo(()=>fC(P),[P]),Te=H.useMemo(()=>{const ee=(g==null?void 0:g.placeholder)||f,ce=(g==null?void 0:g.buttonLabel)||p;let he="icon";return g!=null&&g.buttonType?he=g.buttonType:p&&(he="text"),me(F({},g||{}),{placeholder:ee,buttonLabel:ce,buttonType:he})},[g,f,p]),$=H.useMemo(()=>({configModule:D,logoUrl:t,headerText:n,entryMessage:o,globalClassName:r,openLinksInNewTab:a,disclaimerText:u,disclaimerMarkdown:c,clientContext:d,themeVariables:re,logger:Q,searchConfig:Te,enableMinimize:!!(b!=null&&b.enableMinimize),resetConversationMessage:_,conversationHistory:{sinceHours:typeof(y==null?void 0:y.sinceHours)=="number"?y.sinceHours:1,limit:y==null?void 0:y.limit},features:B}),[D,t,n,o,r,d,u,c,a,Te,b,_,Q,re,y,B]);return w.jsx(Bg.Provider,{value:$,children:q})},mt=()=>{const e=H.useContext(Bg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class ev{constructor(){Se(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Se(this,"connectedProxy");Se(this,"modeProxy");Se(this,"entryTypeProxy");Se(this,"statusProxy");Se(this,"dialogProxy");Se(this,"modalProxy",{isFullscreen:!1});Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return rv(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const Ze=new ev,io=()=>Ze.connected,ma=()=>Ze.isOpen,tv=e=>{window.addEventListener(sf,e)},nv=e=>{window.removeEventListener(sf,e)},rv=(e,t)=>{const n=new CustomEvent(sf,{detail:{property:e,value:t}});window.dispatchEvent(n)},iv=e=>{Ze.connectedProxy.connected=e},ga=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);Ze.entryTypeProxy.entryType=e},bi=e=>{const t=Ze.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Ze.statusProxy.isOpen=n,n&&(Ze.statusProxy.isMinimized=!1)},ml=e=>{const t=Ze.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Ze.statusProxy.isMinimized=n,n&&(Ze.statusProxy.isOpen=!1)},wf=e=>{Ze.modalProxy.isFullscreen=e},gl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Ze.statusProxy.type=e,e==="dialog"||e==="chat"?Ze.modeProxy.mode="embedded":Ze.modeProxy.mode="standalone"},Cf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);Ze.dialogProxy.position=e},ov=e=>{const t=Ze.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Ze.dialogProxy.isFullHeight=n},sv=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=mt(),o=H.useCallback(C=>{n({type:pt.SET_COPILOT,payload:C})},[n]),a=H.useCallback(C=>{iv(C),n({type:pt.SET_CONNECTED,payload:C})},[n]),u=H.useCallback(()=>{n({type:pt.RESET_COPILOT,payload:{}})},[n]),c=H.useCallback(()=>{n({type:pt.RESET_STATE,payload:{}})},[n]),d=H.useCallback(C=>{r==null||r.log(`${C.name} event received`,C),n({type:pt.ADD_MESSAGE,payload:C}),C.bypassHandlers||e==null||e(C)},[e,r,n]),f=H.useCallback(C=>{n({type:pt.ADD_LOADING_MESSAGE,payload:C})},[n]),p=H.useCallback(C=>{n({type:pt.REMOVE_LOADING_MESSAGE,payload:C})},[n]),g=H.useCallback(C=>{d(C),f(C.id)},[d,f]),b=H.useCallback(C=>{n({type:pt.SET_ACTIVE_CONVERSATION_ID,payload:C})},[n]),y=H.useCallback(C=>{n({type:pt.ADD_CONVERSATION_ID,payload:C})},[n]),_=H.useCallback(C=>{n({type:pt.SET_CONVERSATION_IDS,payload:C})},[n]),S=H.useCallback(C=>{n({type:pt.SET_IMAGE_FILE,payload:C})},[n]),A=H.useCallback(C=>{n({type:pt.SET_ASK_CIM_PROMPTS,payload:C})},[n]),v=H.useCallback(C=>{n({type:pt.SET_CONVERSATION_HISTORY_LOADED,payload:C})},[n]),P=H.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:g,setActiveConversationId:b,addConversationId:y,setConversationIds:_,setImageFile:S,setAskCimPrompts:A,setConversationHistoryLoaded:v}),[o,a,u,c,d,f,p,g,b,y,_,S,A,v]);return w.jsx(rg.Provider,{value:P,children:t})};aC();const av=(e,t)=>{const{type:n,payload:r}=t;if(n===pt.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 pt.RESET_STATE:e.messages=Zi.messages,e.groupedMessages=Zi.groupedMessages,e.loadingMessages=Zi.loadingMessages,e.imageFile=Zi.imageFile,e.askCimPrompts=Zi.askCimPrompts,e.conversationHistoryLoaded=Zi.conversationHistoryLoaded;break;case pt.RESET_COPILOT:e.copilot=null;break;case pt.SET_COPILOT:e.copilot=r;break;case pt.SET_CONNECTED:e.connected=r;break;case pt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case pt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case pt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case pt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case pt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case pt.SET_IMAGE_FILE:e.imageFile=r;break;case pt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case pt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},uv=({onCopilotEvent:e,children:t})=>{const[n,r]=eg(av,Zi);return w.jsx(ng.Provider,{value:n,children:w.jsx(sv,{onCopilotEvent:e,dispatch:r,children:t})})};function lv(){var e=H.useRef(!0);return e.current?(e.current=!1,!0):e.current}function cv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function dv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Af=typeof window!="undefined",Ea=function(e){H.useEffect(e,[])},fv=function(e){var t=H.useRef(e);t.current=e,Ea(function(){return function(){return t.current()}})},hv=function(e){var t=H.useRef(0),n=H.useState(e),r=n[0],o=n[1],a=H.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return fv(function(){cancelAnimationFrame(t.current)}),[r,a]},pv=function(e,t){return e===t};function mv(e,t){t===void 0&&(t=pv);var n=H.useRef(),r=H.useRef(e),o=lv();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var gv=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=hv({width:Af?window.innerWidth:r,height:Af?window.innerHeight:a}),d=c[0],f=c[1];return H.useEffect(function(){if(Af){var p=function(){var g=window.innerWidth,b=window.innerHeight;f({width:g,height:b}),u&&u(g,b)};return cv(window,"resize",p),function(){dv(window,"resize",p)}}},[]),d};class Ev{constructor(){Se(this,"items",[]);Se(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Se(this,"remove",()=>this.items.shift());Se(this,"first",()=>this.items.length>0?this.items[0]:null);Se(this,"clear",()=>{this.items.length=0});Se(this,"processQueue",t=>{new Array(dn.size).fill(1).forEach(()=>{const r=dn.first();r&&(t(r),dn.remove())})})}get size(){return this.items.length}}const dn=new Ev,Ug=e=>{window.addEventListener(of,e)},Hg=e=>{window.removeEventListener(of,e)},yv=(e,t,n)=>{const r=new CustomEvent(of,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},zg=e=>{window.addEventListener(rf,e)},jg=e=>{window.removeEventListener(rf,e)},Tv=(e,t,n)=>{const r=new CustomEvent(rf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},$g=e=>{window.addEventListener(nf,e)},Vg=e=>{window.removeEventListener(nf,e)},qg=(e,t,n)=>{const r=new CustomEvent(nf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},bv=e=>{window.addEventListener(uf,e)},_v=e=>{window.removeEventListener(uf,e)},El=(e,t,n)=>{const r=new CustomEvent(uf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Sv{constructor(){Se(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"categoryIdProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const o=cC[n];return Tv(o,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(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 Sv,Yg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Gg=(e,t,n)=>{var u,c;const r=F({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},Wg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Xg=({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},Kg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Qg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},xv=e=>{if(!io()||!ma()){io()&&dn.clear(),dn.add({context:"browse",payload:me(F({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},Jg=e=>{Yg(e,ut)},wv=(e,t)=>{Gg(e,t,ut)},Zg=e=>{Wg(e,ut)},Cv=({field:e,value:t})=>{Xg({field:e,value:t},ut)},Av=e=>{Kg(e,ut)},e1=e=>{Qg(e,ut)},t1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=io(),n=ma();if(!t||!n){t&&dn.clear(),dn.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&Jg(e.facetFilters||{}),"rangeFilters"in e&&Zg(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&e1(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},vv=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:t1,updateBrowseCategoryId:xv,updateCatalogSegment:Av,updateFacetFilter:wv,updateFacetFilters:Jg,updatePricebooks:e1,updateRangeFilter:Cv,updateRangeFilters:Zg},Symbol.toStringTag,{value:"Module"}));class kv{constructor(){Se(this,"initialParams",{productId:"",productName:"",pdpLink:""});Se(this,"proxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>(qg(n,r),Reflect.set(t,n,r)));Se(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 pr=new kv,n1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=io(),n=ma();if(!t||!n){t&&dn.clear(),dn.add({context:"pdp",payload:F({},e)});return}pr.updateProxy(e),qg("pdp-context",e)},Nv=e=>{pr.proxy.productId=e,io()||dn.add({context:"pdp",payload:F({},pr.state)})},Pv=e=>{pr.proxy.pdpLink=e},gt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},r1={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null};class Ov{constructor(){Se(this,"initialState",r1);Se(this,"promptsStateProxy");Se(this,"promptsParamsProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return ya(n,r),Reflect.set(t,n,r)});Se(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Se(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Se(this,"updatePromptsParamsProxy",t=>new Proxy(F({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const Ht=new Ov,Iv=e=>{window.addEventListener(af,e)},Rv=e=>{window.removeEventListener(af,e)},ya=(e,t)=>{const n=new CustomEvent(af,{detail:{property:e,value:t}});window.dispatchEvent(n)},i1=e=>{const t=Ht.isOpen,n=typeof e=="boolean"?e:!t;Ht.promptsStateProxy.isOpen=n},o1=e=>{const t=Ht.isInline,n=typeof e=="boolean"?e:!t;Ht.promptsStateProxy.isInline=n},Lv=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ya("params",e),Ht.promptsStateProxy.entryType="ask_cim"},Dv=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ya("params",e),Ht.promptsStateProxy.entryType="search"},Mv=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ya("params",e),Ht.promptsStateProxy.entryType="browse"},Fv=e=>{Ht.promptsParamsProxy=Ht.updatePromptsParamsProxy(e),ya("params",e),Ht.promptsStateProxy.entryType="pdp"},Bv=({elementId:e,entryType:t,params:n,isInline:r})=>{Ht.promptsStateProxy.elementId=e,t&&(Ht.promptsStateProxy.entryType=t),typeof r=="boolean"&&o1(r),n&&Ht.updatePromptsParamsProxy(n),Ht.isOpen||i1(!0)},Uv=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{El("getConversationMessages",{payload:e,callback:t},Ti.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{El("getSessionInformation",{callback:e},Ti.GET_SESSION_INFORMATION)},loadConversation:e=>{El("loadConversation",e,Ti.LOAD_CONVERSATION)},resetConversation:()=>{El("resetConversation",!0,Ti.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Hv{constructor(){Se(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"queryProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const o=dC[n];return yv(o,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(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 _t=new Hv,zv=e=>{const t=ma(),n=io();if(!n||!t){n&&dn.clear(),dn.add({context:"search",payload:me(F({},_t.state),{query:e})});return}_t.queryProxy.query=e},s1=e=>{Yg(e,_t)},jv=(e,t)=>{Gg(e,t,_t)},a1=e=>{Wg(e,_t)},$v=({field:e,value:t})=>{Xg({field:e,value:t},_t)},Vv=e=>{Kg(e,_t)},u1=e=>{Qg(e,_t)},l1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ma(),n=io();if(!n||!t){n&&dn.clear(),dn.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&s1(e.facetFilters||{}),"rangeFilters"in e&&a1(e.rangeFilters||[]),"catalogSegment"in e&&(_t.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&u1(e.pricebooks||[]),_t.queryProxy.query=e.query},qv=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:l1,updateCatalogSegment:Vv,updateFacetFilter:jv,updateFacetFilters:s1,updatePricebooks:u1,updateRangeFilter:$v,updateRangeFilters:a1,updateSearchQuery:zv},Symbol.toStringTag,{value:"Module"})),Yv={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},c1=H.createContext(Yv),Gv=({children:e})=>{const[t,n]=H.useState(ut.categoryId),[r,o]=H.useState(ut.categoryIdProxy.categoryName||""),[a,u]=H.useState(ut.facetFilters||{}),[c,d]=H.useState(ut.rangeFilters||[]),[f,p]=H.useState(ut.catalogSegment||null),[g,b]=H.useState(ut.pricebooks||null);H.useEffect(()=>{const _=({detail:S})=>{(S==null?void 0:S.property)==="categoryId"&&n(S.value),(S==null?void 0:S.property)==="categoryName"&&o(S.value),(S==null?void 0:S.property)==="facetFilters"&&u(S.value),(S==null?void 0:S.property)==="rangeFilters"&&d(S.value),(S==null?void 0:S.property)==="catalogSegment"&&p(S.value),(S==null?void 0:S.property)==="pricebooks"&&b(S.value)};return zg(_),()=>{jg(_)}},[]);const y=H.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:g}),[t,r,a,c,f,g]);return w.jsx(c1.Provider,{value:y,children:e})},Wv=()=>{const e=H.useContext(c1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Xv={searchQuery:_t.query,facetFilters:_t.facetFilters,rangeFilters:_t.rangeFilters,catalogSegment:_t.catalogSegment,pricebooks:_t.pricebooks},d1=H.createContext(Xv),Kv=({children:e})=>{const[t,n]=H.useState(_t.query),[r,o]=H.useState(_t.facetFilters),[a,u]=H.useState(_t.rangeFilters),[c,d]=H.useState(_t.catalogSegment),[f,p]=H.useState(_t.pricebooks);H.useEffect(()=>{const b=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&o(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return Ug(b),()=>{Hg(b)}},[]);const g=H.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return w.jsx(d1.Provider,{value:g,children:e})},Qv=()=>{const e=H.useContext(d1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},Jv={productId:pr.productId,pdpLink:pr.pdpLink},f1=H.createContext(Jv),Zv=({children:e})=>{const[t,n]=H.useState(pr.productId),[r,o]=H.useState(pr.pdpLink);H.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 $g(u),()=>{Vg(u)}},[]);const a=H.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(f1.Provider,{value:a,children:e})},ek=()=>{const e=H.useContext(f1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},h1=H.createContext({mode:Ze.modeProxy.mode,entryType:Ze.entryType,status:Ze.statusProxy,dialogPosition:Ze.dialogProxy.position,isDialogFullHeight:Ze.dialogProxy.isFullHeight,dialogWidth:Ze.dialogProxy.width,isModalFullscreen:Ze.modalProxy.isFullscreen,previousComponentType:Ze.statusProxy.type}),tk=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=H.useState(e!=null?e:Ze.entryTypeProxy.entryType),[u,c]=H.useState(Ze.modeProxy.mode),[d,f]=H.useState({type:n||Ze.statusProxy.type,isOpen:Ze.statusProxy.isOpen,isMinimized:Ze.statusProxy.isMinimized}),[p,g]=H.useState(Ze.dialogProxy.position),[b,y]=H.useState(Ze.dialogProxy.isFullHeight),[_,S]=H.useState(Ze.dialogProxy.width),[A,v]=H.useState(Ze.modalProxy.isFullscreen),P=mv(d.type);H.useEffect(()=>{const B=q=>{const{property:D,value:Q}=q.detail||{};if(!(!D||Q===void 0)){if(D==="mode"){c(Q);return}if(D==="entryType"){a(Q);return}if(D==="isMinimized"){f(re=>me(F({},re),{isMinimized:Q}));return}if(D==="isOpen"){f(re=>me(F({},re),{isOpen:Q}));return}if(D==="type"){f(re=>me(F({},re),{type:Q}));return}if(D==="position"){g(Q);return}if(D==="isFullHeight"){y(Q);return}if(D==="width"){S(Q);return}if(D==="isFullscreen"){v(Q);return}}};return tv(B),()=>{nv(B)}},[]),Ea(()=>{e&&ga(e)}),Ea(()=>{const B=n||(t==null?void 0:t.type);B&&gl(B),t&&"isOpen"in t&&bi(!!t.isOpen),t&&"isMinimized"in t&&ml(!!t.isMinimized)}),Ea(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:B}=t.options;B&&Cf(B),"dialogFullHeight"in t.options&&ov(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&S(t.options.dialogWidth),"isModalFullscreen"in t.options&&wf(!!t.options.isModalFullscreen)});const C=H.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:P||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:_,isModalFullscreen:A}),[u,o,d,P,p,b,_,A]);return w.jsx(h1.Provider,{value:C,children:r})},mr=()=>{const e=H.useContext(h1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},p1=H.createContext(null),m1=H.createContext(null),g1=()=>{const e=H.useContext(m1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},_i=()=>{const e=H.useContext(p1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Go=()=>{const e=H.useContext(rg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Zn=()=>{const e=H.useContext(ng);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},nk=({copilot:e})=>{const{logger:t,conversationHistory:n}=mt(),{isInline:r}=_i(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=Go(),{activeConversationId:u}=Zn(),c=H.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=H.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,g=>{t==null||t.log("Retrieved conversation messages: ",g),p==null||p(g)})},[e,t]);return H.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),g={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(g.limit=n.limit),d(g,b=>{const y=[];[...b.reverse()||[]].forEach(S=>{var v;const A=b.find(P=>P.id===S.eventSourceId);(v=A==null?void 0:A.name)!=null&&v.endsWith("_suggestions")||(S.bypassHandlers=!0,y.unshift(S))}),y.forEach(S=>{o(S)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:c,getConversationMessages:d}},E1=H.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),rk=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:d,clientContext:f}=mt(),Pi=Qv(),{searchQuery:p}=Pi,g=ln(Pi,["searchQuery"]),li=Wv(),{categoryId:b}=li,y=ln(li,["categoryId"]),{productId:_,pdpLink:S}=ek(),{setCopilot:A,setConnected:v,resetCopilot:P,resetCopilotState:C,addCopilotEvent:B,removeLoadingMessage:q,handleCopilotRequestAck:D,setActiveConversationId:Q,setConversationIds:re,setAskCimPrompts:Te}=Go(),{connected:$,copilot:ee,messages:ce,groupedMessages:he,loadingMessages:le,askCimPrompts:be}=Zn(),{status:Me,entryType:de}=mr(),{isInline:K}=_i(),{getConversationMessages:ie,getSessionInformation:k}=nk({copilot:ee}),M=H.useMemo(()=>le.size>0,[le]),te=H.useCallback(ve=>le.has(ve),[le]),O=H.useCallback(({query:ve,facetFilters:Fe,rangeFilters:De,catalogSegment:Qe,pricebooks:dt,userPrompt:lt,imageFile:wn})=>{if(!ee){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const At={searchParams:{query:ve}};lt&&(At.userPrompt=lt),wn&&(At.attachments={image:wn}),Fe&&Object.keys(Fe).length>0&&(At.searchParams.facetFilters=Fe),De&&De.length>0&&(At.searchParams.rangeFilters=De),Qe&&(At.searchParams.catalogSegment=Qe),dt&&(At.searchParams.pricebooks=dt),f&&(At.clientContext=f),ga("search"),ee.search(At,ne=>{const oe=F({},ne);D(oe)})},[d,D,ee,f]),_e=H.useCallback(({categoryId:ve,categoryName:Fe,facetFilters:De,rangeFilters:Qe,catalogSegment:dt,pricebooks:lt,userPrompt:wn,imageFile:At})=>{if(!ee){d==null||d.error("Copilot is not initialized");return}const ne=De&&Object.keys(De).length>0;if(ve===""&&!ne){d==null||d.error("Browse event must include facetFilters when categoryId is empty");return}const oe={browseParams:{categoryId:ve||""}};wn&&(oe.userPrompt=wn),At&&(oe.attachments={image:At}),ne&&(oe.browseParams.facetFilters=De),Qe&&Qe.length>0&&(oe.browseParams.rangeFilters=Qe),dt&&(oe.browseParams.catalogSegment=dt),Array.isArray(lt)&<.length>0&&(oe.browseParams.pricebooks=lt),(f||Fe)&&(oe.clientContext={},f&&(oe.clientContext=F({},f)),Fe&&(oe.clientContext.cimLabel=Fe)),ga("browse"),ee.browse(oe,Ie=>{var ir;const Ve=F({},Ie),Xe=((ir=Ve.request)==null?void 0:ir.clientContext)||{},Tt=(Xe==null?void 0:Xe.cimLabel)||Fe;Tt&&Ve.request&&(Ve.request.label=Tt),D(Ve)})},[d,D,ee,f]),Oe=H.useCallback(({productId:ve,productName:Fe,pdpLink:De,userPrompt:Qe,imageFile:dt})=>{if(!ee){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const lt={productId:ve};Qe&&(lt.userPrompt=Qe),De&&(lt.pdpLink=De),dt&&(lt.attachments={image:dt}),(f||Fe)&&(lt.clientContext={},f&&(lt.clientContext=F({},f)),Fe&&(lt.clientContext.cimLabel=Fe)),ga("pdp"),ee.productView(lt,wn=>{var Ie;const At=F({},wn),ne=((Ie=At.request)==null?void 0:Ie.clientContext)||{},oe=(ne==null?void 0:ne.cimLabel)||Fe;oe&&At.request&&(At.request.label=oe),D(At)})},[d,ee,D,f]),Ce=H.useCallback(({userPrompt:ve,imageFile:Fe})=>{if(!ee){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const De={userPrompt:ve};Fe&&(De.attachments={image:Fe}),f&&(De.clientContext=f),ee.askCim(De,Qe=>{const dt=F({},Qe);D(dt)})},[d,ee,D,f]),$e=H.useCallback(ve=>{B(ve),a==null||a(ve)},[B,a]),we=H.useCallback(ve=>{B(ve),u==null||u(ve)},[B,u]),We=H.useCallback(ve=>{o==null||o(ve),v(!0)},[o,v]);H.useEffect(()=>{!ee||!$||!Me.isOpen||dn.size>0&&dn.processQueue(ve=>{if(ve.context==="search"){const Fe=F({},ve.payload);l1(Fe)}if(ve.context==="browse"){const Fe=F({},ve.payload);t1(Fe)}if(ve.context==="pdp"){const Fe=F({},ve.payload);n1(Fe)}})},[Me.isOpen,ee,$]);const ht=H.useCallback(ve=>{const Fe=De=>{const Qe=me(F({},De),{id:De.inquiryLinkId||De.id});B(Qe)};ve.on("connect_ack",We),ve.on("partial_inquiry",Fe),ve.on("display_products",B),ve.on("progress",B),ve.on("refined_search",$e),ve.on("refined_browse",we),ve.on("done",De=>{q(De.eventSourceId)}),ve.on("error",De=>{B(De),q(De.eventSourceId)}),ve.onDisconnect(De=>{const Qe=["io server disconnect","transport error","server shutting down"];if(d==null||d.log("Connection disconnected with reason: ",De),!Qe.includes(De)){v(!1);return}d==null||d.log("De-registering event listeners");const dt=new Date().toISOString();B({name:"error",message:"Connection was lost. Please try again.",createdAt:dt,id:`error-${dt}`,sessionId:"session"}),ve.off()})},[d,v,q,$e,we,B,We]);H.useEffect(()=>{if(!ee)return;const ve=Fe=>{if(!K){if(!Fe.message&&Fe.eventSourceId&&Fe.eventSourceId===be.requestId){Te({requestId:Fe.eventSourceId,message:Fe});return}B(Fe)}};return ee.on("follow_up",ve),()=>{ee.off("follow_up",ve)}},[ee,ce,be.requestId,K,B,Te]),H.useEffect(()=>{if(!ee)return;const ve=Fe=>{if(K)return;const De=me(F({},Fe),{id:Fe.inquiryLinkId||Fe.id});B(De)};return ee.on("inquiry",ve),()=>{ee.off("inquiry",ve)}},[ee,K,B]),Ea(()=>{let ve;n?ve=n:ve=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Fe={baseUrl:ve};e?Fe.apiKey=e:t&&(Fe.apiToken=t);const De=new Kw(Fe);return A(De),ht(De),De.connect(),De.requestSessionInformation(Qe=>{d==null||d.log("Session Information: ",Qe);const{activeConversationId:dt,conversationIds:lt}=Qe.data||{};dt&&Q(dt),lt!=null&<.length&&re(lt)}),()=>{De.disconnect(),De.off(),P()}});const on=H.useCallback(ve=>{if(!ee)return;const Fe={eventId:ve,reason:"User cancelled the request"};ee.cancelRequest(Fe,De=>{B(De),q(ve)})},[B,q,ee]),qr=H.useCallback(()=>{ee&&ee.conversationReset({},ve=>{C(),B(ve),ee.requestSessionInformation(Fe=>{d==null||d.log("Session Information: ",Fe);const{activeConversationId:De,conversationIds:Qe}=Fe.data||{};De&&Q(De),Qe!=null&&Qe.length&&re(Qe)})})},[ee,d,B,C,Q,re]),_r=H.useCallback((ve,Fe)=>{if(!ve)return;const De={userPrompt:ve};switch(Fe&&(De.imageFile=Fe),de){case"ask_cim":Ce(De);return;case"search":p?O(F(F({query:p},g),De)):Ce(De);return;case"browse":_e(F(F({categoryId:b},y),De));return;case"pdp":_?Oe(F({productId:_,pdpLink:S||""},De)):Ce(De);return}},[de,p,g,O,Ce,b,y,_e,Oe,_,S]),Rn=H.useCallback((ve,Fe)=>{var wn,At,ne;const Qe=ve.params.userPrompt||"";if(!Qe)return;const dt=ce.find(oe=>oe.id===Fe);if(!dt)return;const lt=dt.name.replace("_suggestions","");if(lt==="ask_cim"){Ce({userPrompt:Qe});return}if(lt==="copilot_search"){const oe=((wn=dt.request)==null?void 0:wn.searchParams)||{},Ve=oe.query===p;O(me(F({query:oe.query||p},Ve?g:{}),{userPrompt:Qe}));return}if(lt==="copilot_browse"){const oe=dt.request,Ie=oe.browseParams||{},Xe=Ie.categoryId===b,Tt=((At=oe.clientContext)==null?void 0:At.cimLabel)||"";_e(me(F({categoryId:Ie.categoryId||b||""},Xe?y:{}),{categoryName:Tt,userPrompt:Qe}));return}if(lt==="product_view"){const oe=dt.request||{},Ie=oe.productId,Ve=Ie===_,Xe=((ne=oe.clientContext)==null?void 0:ne.cimLabel)||"";let Tt="";Ve?Tt=S||"":Tt=oe.pdpLink||"",Oe({productId:Ie||_,pdpLink:Tt,productName:Xe,userPrompt:Qe})}},[ce,p,g,O,Ce,b,y,_e,Oe,_,S]),So=H.useMemo(()=>({copilot:ee,messages:ce,groupedMessages:he,isLoading:M,isResponseLoading:te,handleAskCim:Ce,handleSearch:O,handleBrowse:_e,handlePdp:Oe,handleUserInput:_r,handleSuggestion:Rn,handleCancel:on,resetConversation:qr,getSessionInformation:k,getConversationMessages:ie}),[ee,ce,he,M,te,Ce,O,_e,Oe,_r,Rn,on,qr,k,ie]);return w.jsx(E1.Provider,{value:So,children:c})},y1=()=>{const{copilot:e}=Zn(),{addCopilotEvent:t}=Go();return{getCopilotSuggestions:H.useCallback((r,o,a)=>{if(!e||!o||!r)return;const u=c=>{t(c),a(c)};switch(o){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Rr=()=>{const e=H.useContext(E1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},ik=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Zn(),{entryType:o}=mr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Go(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:g,getSessionInformation:b,getConversationMessages:y}=Rr(),{getCopilotSuggestions:_}=y1();H.useEffect(()=>{!e||!o||!t||!r||n.requestId||o==="ask_cim"&&_({},o,P=>{c({requestId:P.id,message:null})})},[e,t,n.requestId,o,r,_,c]);const S=H.useCallback(({query:P})=>{if(!e||!P)return;const{facetFilters:C}=_t.facetFiltersProxy,{rangeFilters:B}=_t.rangeFiltersProxy,{catalogSegment:q}=_t.catalogSegmentProxy,{pricebooks:D}=_t.pricebooksProxy,Q={query:P};Q.facetFilters=C||{},Q.rangeFilters=B||[],Q.catalogSegment=q||"",Q.pricebooks=D||[],d(F({},Q))},[e,d]),A=H.useCallback(({categoryId:P})=>{if(!e)return;const C=ut.categoryIdProxy.categoryName,{facetFilters:B}=ut.facetFiltersProxy,{rangeFilters:q}=ut.rangeFiltersProxy,{catalogSegment:D}=ut.catalogSegmentProxy,{pricebooks:Q}=ut.pricebooksProxy,re={categoryId:P};re.categoryName=C||"",re.facetFilters=B||{},re.rangeFilters=q||[],re.catalogSegment=D||"",re.pricebooks=Q||[],f(F({},re))},[e,f]),v=H.useCallback(({productId:P})=>{if(!e||!P)return;const C={productId:P,pdpLink:pr.pdpLink,productName:pr.proxy.productName||""};p(C)},[e,p]);return H.useEffect(()=>{const P=({detail:C})=>{(C==null?void 0:C.property)==="query"&&S({query:C.value})};return Ug(P),()=>{Hg(P)}},[S]),H.useEffect(()=>{const P=({detail:C})=>{if((C==null?void 0:C.property)==="pdp-context"){const B=C.value;v({productId:B.productId});return}(C==null?void 0:C.property)==="productId"&&v({productId:C.value})};return $g(P),()=>{Vg(P)}},[v]),H.useEffect(()=>{const P=({detail:C})=>{(C==null?void 0:C.property)==="categoryId"&&A({categoryId:C.value})};return zg(P),()=>{jg(P)}},[A]),H.useEffect(()=>{const P=({detail:C})=>{if((C==null?void 0:C.event)==Ti.RESET_CONVERSATION&&g(),(C==null?void 0:C.event)==Ti.GET_SESSION_INFORMATION){const B=C.value.callback;b(B)}if((C==null?void 0:C.event)==Ti.GET_CONVERSATION_MESSAGES){const{payload:B,callback:q}=C.value;if(!B.conversationId||typeof q!="function")return;y(B,q)}if((C==null?void 0:C.event)==Ti.LOAD_CONVERSATION){const B=C.value;if(!B.conversationId)return;y(B,D=>{a(),D.forEach(Q=>{u(Q)})})}};return bv(P),()=>{_v(P)}},[g,b,y,a,u]),null},ok=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>w.jsxs(rk,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:[w.jsx(ik,{}),c]}),sk=({children:e,dispatch:t})=>{const n=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),o=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),g=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),b=H.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=H.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:g,setIsResponseLoading:b}),[n,r,o,a,u,c,d,f,p,g,b]);return w.jsx(m1.Provider,{value:y,children:e})},ak=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},uk=({promptsConfig:e,children:t})=>{const[n,r]=eg(ak,F(F({},r1),e||{}));return w.jsx(p1.Provider,{value:n,children:w.jsx(sk,{dispatch:r,children:t})})},T1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:o,headerText:a,theme:u,openLinksInNewTab:c,globalClassName:d,isDevelopment:f=!1,componentType:p,componentConfig:g,entryType:b,entryMessage:y,disclaimerText:_,disclaimerMarkdown:S,clientContext:A,searchPlaceholder:v,searchButtonLabel:P,searchConfig:C,promptsConfig:B,resetConversationMessage:q,conversationHistory:D,onConnect:Q,onCopilotEvent:re,onRefinedSearch:Te,onRefinedBrowse:$,__features:ee,children:ce})=>w.jsx(ZA,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:o,headerText:a,entryMessage:y,theme:u,globalClassName:d,openLinksInNewTab:c,searchPlaceholder:v,searchButtonLabel:P,searchConfig:C,componentConfig:g,clientContext:A,disclaimerMarkdown:S,disclaimerText:_,resetConversationMessage:q,conversationHistory:D,isDevelopment:f,__features:ee,children:w.jsx(tk,{entryType:b,componentConfig:g,componentType:p,children:w.jsx(uv,{onCopilotEvent:re,children:w.jsx(Zv,{children:w.jsx(Gv,{children:w.jsx(Kv,{children:w.jsx(uk,{promptsConfig:B,children:w.jsx(ok,{apiKey:t,apiToken:n,baseUrl:r,isDevelopment:f,entryType:b,onConnect:Q,onRefinedSearch:Te,onRefinedBrowse:$,onCopilotEvent:re,children:ce})})})})})})})});var vf={exports:{}},kn={},kf={exports:{}},Nf={};var b1;function lk(){return b1||(b1=1,(function(e){function t(K,ie){var k=K.length;K.push(ie);e:for(;0<k;){var M=k-1>>>1,te=K[M];if(0<o(te,ie))K[M]=ie,K[k]=te,k=M;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var ie=K[0],k=K.pop();if(k!==ie){K[0]=k;e:for(var M=0,te=K.length,O=te>>>1;M<O;){var _e=2*(M+1)-1,Oe=K[_e],Ce=_e+1,$e=K[Ce];if(0>o(Oe,k))Ce<te&&0>o($e,Oe)?(K[M]=$e,K[Ce]=k,M=Ce):(K[M]=Oe,K[_e]=k,M=_e);else if(Ce<te&&0>o($e,k))K[M]=$e,K[Ce]=k,M=Ce;else break e}}return ie}function o(K,ie){var k=K.sortIndex-ie.sortIndex;return k!==0?k:K.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,g=null,b=3,y=!1,_=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(K){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=K)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function B(K){if(S=!1,C(K),!_)if(n(d)!==null)_=!0,Me(q);else{var ie=n(f);ie!==null&&de(B,ie.startTime-K)}}function q(K,ie){_=!1,S&&(S=!1,v(re),re=-1),y=!0;var k=b;try{for(C(ie),g=n(d);g!==null&&(!(g.expirationTime>ie)||K&&!ee());){var M=g.callback;if(typeof M=="function"){g.callback=null,b=g.priorityLevel;var te=M(g.expirationTime<=ie);ie=e.unstable_now(),typeof te=="function"?g.callback=te:g===n(d)&&r(d),C(ie)}else r(d);g=n(d)}if(g!==null)var O=!0;else{var _e=n(f);_e!==null&&de(B,_e.startTime-ie),O=!1}return O}finally{g=null,b=k,y=!1}}var D=!1,Q=null,re=-1,Te=5,$=-1;function ee(){return!(e.unstable_now()-$<Te)}function ce(){if(Q!==null){var K=e.unstable_now();$=K;var ie=!0;try{ie=Q(!0,K)}finally{ie?he():(D=!1,Q=null)}}else D=!1}var he;if(typeof P=="function")he=function(){P(ce)};else if(typeof MessageChannel!="undefined"){var le=new MessageChannel,be=le.port2;le.port1.onmessage=ce,he=function(){be.postMessage(null)}}else he=function(){A(ce,0)};function Me(K){Q=K,D||(D=!0,he())}function de(K,ie){re=A(function(){K(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,Me(q))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(K){switch(b){case 1:case 2:case 3:var ie=3;break;default:ie=b}var k=b;b=ie;try{return K()}finally{b=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,ie){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var k=b;b=K;try{return ie()}finally{b=k}},e.unstable_scheduleCallback=function(K,ie,k){var M=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?M+k:M):k=M,K){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=k+te,K={id:p++,callback:ie,priorityLevel:K,startTime:k,expirationTime:te,sortIndex:-1},k>M?(K.sortIndex=k,t(f,K),n(d)===null&&K===n(f)&&(S?(v(re),re=-1):S=!0,de(B,k-M))):(K.sortIndex=te,t(d,K),_||y||(_=!0,Me(q))),K},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(K){var ie=b;return function(){var k=b;b=ie;try{return K.apply(this,arguments)}finally{b=k}}}})(Nf)),Nf}var _1;function ck(){return _1||(_1=1,kf.exports=lk()),kf.exports}var S1;function dk(){if(S1)return kn;S1=1;var e=bn(),t=ck();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={},g={};function b(i){return d.call(g,i)?!0:d.call(p,i)?!1:f.test(i)?g[i]=!0:(p[i]=!0,!1)}function y(i,s,l,h){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,s,l,h){if(s===null||typeof s=="undefined"||y(i,s,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(i,s,l,h,E,T,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=T,this.removeEmptyString=x}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];A[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new S(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function P(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(v,P);A[s]=new S(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(v,P);A[s]=new S(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(v,P);A[s]=new S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,s,l,h){var E=A.hasOwnProperty(s)?A[s]:null;(E!==null?E.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,E,h)&&(l=null),h||E===null?b(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(s=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(s):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,s,l):i.setAttribute(s,l))))}var B=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),D=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),ee=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),Me=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),K=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=K&&i[K]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,M;function te(i){if(M===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);M=s&&s[1]||""}return`
|
|
11
|
-
`+
|
|
10
|
+
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ro(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&pl.assertOptions(r,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean),legacyInterceptorReqResOrdering:Jn.transitional(Jn.boolean)},!1),o!=null&&(q.isFunction(o)?n.paramsSerializer={serialize:o}:pl.assertOptions(o,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),pl.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.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","query","common"],_=>{delete a[_]}),n.headers=Sn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const v=n.transitional||gf;v&&v.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(S.fulfilled,S.rejected)});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let p,g=0,b;if(!d){const _=[Dg.bind(this),void 0];for(_.unshift(...c),_.push(...f),b=_.length,p=Promise.resolve(n);g<b;)p=p.then(_[g++],_[g++]);return p}b=c.length;let y=n;for(;g<b;){const _=c[g++],S=c[g++];try{y=_(y)}catch(v){S.call(this,v);break}}try{p=Dg.call(this,y)}catch(_){return Promise.reject(_)}for(g=0,b=f.length;g<b;)p=p.then(f[g++],f[g++]);return p}getUri(t){t=ro(this.defaults,t);const n=Cg(t.baseURL,t.url,t.allowAbsoluteUrls);return Tg(n,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){io.prototype[t]=function(n,r){return this.request(ro(r||{},{method:t,url:n,data:(r||{}).data}))}}),q.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(ro(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}io.prototype[t]=n(),t!=="query"&&(io.prototype[t+"Form"]=n(!0))});let WC=class B2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(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 pa(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new B2(function(o){t=o}),cancel:t}}};function XC(e){return function(n){return e.apply(null,n)}}function KC(e){return q.isObject(e)&&e.isAxiosError===!0}const xf={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(xf).forEach(([e,t])=>{xf[t]=e});function Fg(e){const t=new io(e),n=ig(io.prototype.request,t);return q.extend(n,io.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Fg(ro(e,o))},n}const Rt=Fg(ha);Rt.Axios=io,Rt.CanceledError=pa,Rt.CancelToken=WC,Rt.isCancel=Sg,Rt.VERSION=bf,Rt.toFormData=cl,Rt.AxiosError=Ne,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=XC,Rt.isAxiosError=KC,Rt.mergeConfig=ro,Rt.AxiosHeaders=Sn,Rt.formToJSON=e=>_g(q.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Lg.getAdapter,Rt.HttpStatusCode=xf,Rt.default=Rt;const{Axios:w7,AxiosError:A7,CanceledError:C7,isCancel:v7,CancelToken:k7,VERSION:N7,all:P7,Cancel:O7,isAxiosError:I7,spread:R7,toFormData:L7,AxiosHeaders:D7,HttpStatusCode:M7,formToJSON:F7,getAdapter:B7,mergeConfig:U7,create:H7}=Rt;class QC{constructor(t,n,r,o=!1){Se(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Se(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Se(this,"CIMULATE_SEARCH_API_PATH","api/v1");Se(this,"baseApiUrl");Se(this,"headers",{});Se(this,"fetchConfig",()=>tt(this,null,function*(){try{const t=yield Rt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Se(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class JC{constructor(t,n,r,o=!1){Se(this,"apiService");Se(this,"config",null);Se(this,"getConfig",()=>tt(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}}));Se(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Se(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Se(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Se(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Se(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Se(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Se(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Se(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Se(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Se(this,"getProductField",t=>this.config?this.config[t]:"");Se(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new QC(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 Yo=(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 ZC{constructor(t=!1){Se(this,"isDevelopment");Se(this,"_log",(t,n,...r)=>{Yo(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 ev={copilot:"Your Search Assistant",messaging:"Commerce Client"},Bg=U.createContext(null),tv=({mode:e,logoUrl:t,headerText:n="Your Search Assistant",headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,searchPlaceholder:p,searchButtonLabel:g,searchConfig:b,componentConfig:y,conversationHistory:_,resetConversationMessage:S="",apiKey:v,apiToken:C,baseUrl:P,theme:A,isDevelopment:M,__features:V,children:D})=>{const K=e==="messaging",re=U.useMemo(()=>K?{config:null}:new JC(P,v,C,M),[K,P,v,C,M]),Te=U.useMemo(()=>new ZC(M),[M]);U.useEffect(()=>{K||!re||re.config||re.getConfig()},[re,K]);const $=U.useMemo(()=>hA(A),[A]),Z=U.useMemo(()=>{const ue=(b==null?void 0:b.placeholder)||p,be=(b==null?void 0:b.buttonLabel)||g;let Oe="icon";return b!=null&&b.buttonType?Oe=b.buttonType:g&&(Oe="text"),me(F({},b||{}),{placeholder:ue,buttonLabel:be,buttonType:Oe})},[b,p,g]),ce=U.useMemo(()=>me(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:n||ev[e!=null?e:"copilot"]}),[r,t,n,e]),he=U.useMemo(()=>({configModule:re,headerConfig:ce,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,themeVariables:$,logger:Te,searchConfig:Z,enableMinimize:!!(y!=null&&y.enableMinimize),resetConversationMessage:S,conversationHistory:{sinceHours:typeof(_==null?void 0:_.sinceHours)=="number"?_.sinceHours:1,limit:_==null?void 0:_.limit},features:V}),[re,ce,a,o,f,c,d,u,Z,y,S,Te,$,_,V]);return w.jsx(Bg.Provider,{value:he,children:D})},mt=()=>{const e=U.useContext(Bg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class nv{constructor(){Se(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Se(this,"connectedProxy");Se(this,"modeProxy");Se(this,"entryTypeProxy");Se(this,"statusProxy");Se(this,"dialogProxy");Se(this,"modalProxy",{isFullscreen:!1});Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return ov(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const Ze=new nv,oo=()=>Ze.connected,ma=()=>Ze.isOpen,rv=e=>{window.addEventListener(sf,e)},iv=e=>{window.removeEventListener(sf,e)},ov=(e,t)=>{const n=new CustomEvent(sf,{detail:{property:e,value:t}});window.dispatchEvent(n)},sv=e=>{Ze.connectedProxy.connected=e},ga=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);Ze.entryTypeProxy.entryType=e},Si=e=>{const t=Ze.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Ze.statusProxy.isOpen=n,n&&(Ze.statusProxy.isMinimized=!1)},ml=e=>{const t=Ze.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Ze.statusProxy.isMinimized=n,n&&(Ze.statusProxy.isOpen=!1)},wf=e=>{Ze.modalProxy.isFullscreen=e},gl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Ze.statusProxy.type=e,e==="dialog"||e==="chat"?Ze.modeProxy.mode="embedded":Ze.modeProxy.mode="standalone"},Af=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(", ")}.`);Ze.dialogProxy.position=e},av=e=>{const t=Ze.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Ze.dialogProxy.isFullHeight=n},uv=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=mt(),o=U.useCallback(A=>{n({type:pt.SET_COPILOT,payload:A})},[n]),a=U.useCallback(A=>{sv(A),n({type:pt.SET_CONNECTED,payload:A})},[n]),u=U.useCallback(()=>{n({type:pt.RESET_COPILOT,payload:{}})},[n]),c=U.useCallback(()=>{n({type:pt.RESET_STATE,payload:{}})},[n]),d=U.useCallback(A=>{r==null||r.log(`${A.name} event received`,A),n({type:pt.ADD_MESSAGE,payload:A}),A.bypassHandlers||e==null||e(A)},[e,r,n]),f=U.useCallback(A=>{n({type:pt.ADD_LOADING_MESSAGE,payload:A})},[n]),p=U.useCallback(A=>{n({type:pt.REMOVE_LOADING_MESSAGE,payload:A})},[n]),g=U.useCallback(A=>{d(A),f(A.id)},[d,f]),b=U.useCallback(A=>{n({type:pt.SET_ACTIVE_CONVERSATION_ID,payload:A})},[n]),y=U.useCallback(A=>{n({type:pt.ADD_CONVERSATION_ID,payload:A})},[n]),_=U.useCallback(A=>{n({type:pt.SET_CONVERSATION_IDS,payload:A})},[n]),S=U.useCallback(A=>{n({type:pt.SET_IMAGE_FILE,payload:A})},[n]),v=U.useCallback(A=>{n({type:pt.SET_ASK_CIM_PROMPTS,payload:A})},[n]),C=U.useCallback(A=>{n({type:pt.SET_CONVERSATION_HISTORY_LOADED,payload:A})},[n]),P=U.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:g,setActiveConversationId:b,addConversationId:y,setConversationIds:_,setImageFile:S,setAskCimPrompts:v,setConversationHistoryLoaded:C}),[o,a,u,c,d,f,p,g,b,y,_,S,v,C]);return w.jsx(rg.Provider,{value:P,children:t})};uA();const lv=(e,t)=>{const{type:n,payload:r}=t;if(n===pt.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 pt.RESET_STATE:e.messages=to.messages,e.groupedMessages=to.groupedMessages,e.loadingMessages=to.loadingMessages,e.imageFile=to.imageFile,e.askCimPrompts=to.askCimPrompts,e.conversationHistoryLoaded=to.conversationHistoryLoaded;break;case pt.RESET_COPILOT:e.copilot=null;break;case pt.SET_COPILOT:e.copilot=r;break;case pt.SET_CONNECTED:e.connected=r;break;case pt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case pt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case pt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case pt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case pt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case pt.SET_IMAGE_FILE:e.imageFile=r;break;case pt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case pt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},cv=({onCopilotEvent:e,children:t})=>{const[n,r]=eg(lv,to);return w.jsx(ng.Provider,{value:n,children:w.jsx(uv,{onCopilotEvent:e,dispatch:r,children:t})})};function dv(){var e=U.useRef(!0);return e.current?(e.current=!1,!0):e.current}function fv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function hv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Cf=typeof window!="undefined",Ea=function(e){U.useEffect(e,[])},pv=function(e){var t=U.useRef(e);t.current=e,Ea(function(){return function(){return t.current()}})},mv=function(e){var t=U.useRef(0),n=U.useState(e),r=n[0],o=n[1],a=U.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return pv(function(){cancelAnimationFrame(t.current)}),[r,a]},gv=function(e,t){return e===t};function Ev(e,t){t===void 0&&(t=gv);var n=U.useRef(),r=U.useRef(e),o=dv();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var yv=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=mv({width:Cf?window.innerWidth:r,height:Cf?window.innerHeight:a}),d=c[0],f=c[1];return U.useEffect(function(){if(Cf){var p=function(){var g=window.innerWidth,b=window.innerHeight;f({width:g,height:b}),u&&u(g,b)};return fv(window,"resize",p),function(){hv(window,"resize",p)}}},[]),d};class Tv{constructor(){Se(this,"items",[]);Se(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Se(this,"remove",()=>this.items.shift());Se(this,"first",()=>this.items.length>0?this.items[0]:null);Se(this,"clear",()=>{this.items.length=0});Se(this,"processQueue",t=>{new Array(dn.size).fill(1).forEach(()=>{const r=dn.first();r&&(t(r),dn.remove())})})}get size(){return this.items.length}}const dn=new Tv,Ug=e=>{window.addEventListener(of,e)},Hg=e=>{window.removeEventListener(of,e)},bv=(e,t,n)=>{const r=new CustomEvent(of,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},zg=e=>{window.addEventListener(rf,e)},jg=e=>{window.removeEventListener(rf,e)},_v=(e,t,n)=>{const r=new CustomEvent(rf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},$g=e=>{window.addEventListener(nf,e)},Vg=e=>{window.removeEventListener(nf,e)},qg=(e,t,n)=>{const r=new CustomEvent(nf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},Sv=e=>{window.addEventListener(uf,e)},xv=e=>{window.removeEventListener(uf,e)},El=(e,t,n)=>{const r=new CustomEvent(uf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class wv{constructor(){Se(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"categoryIdProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const o=dA[n];return _v(o,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(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 wv,Yg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Gg=(e,t,n)=>{var u,c;const r=F({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},Wg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Xg=({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},Kg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Qg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},Av=e=>{if(!oo()||!ma()){oo()&&dn.clear(),dn.add({context:"browse",payload:me(F({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},Jg=e=>{Yg(e,ut)},Cv=(e,t)=>{Gg(e,t,ut)},Zg=e=>{Wg(e,ut)},vv=({field:e,value:t})=>{Xg({field:e,value:t},ut)},kv=e=>{Kg(e,ut)},e1=e=>{Qg(e,ut)},t1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=oo(),n=ma();if(!t||!n){t&&dn.clear(),dn.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&Jg(e.facetFilters||{}),"rangeFilters"in e&&Zg(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&e1(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},Nv=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:t1,updateBrowseCategoryId:Av,updateCatalogSegment:kv,updateFacetFilter:Cv,updateFacetFilters:Jg,updatePricebooks:e1,updateRangeFilter:vv,updateRangeFilters:Zg},Symbol.toStringTag,{value:"Module"}));class Pv{constructor(){Se(this,"initialParams",{productId:"",productName:"",pdpLink:""});Se(this,"proxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>(qg(n,r),Reflect.set(t,n,r)));Se(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 pr=new Pv,n1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=oo(),n=ma();if(!t||!n){t&&dn.clear(),dn.add({context:"pdp",payload:F({},e)});return}pr.updateProxy(e),qg("pdp-context",e)},Ov=e=>{pr.proxy.productId=e,oo()||dn.add({context:"pdp",payload:F({},pr.state)})},Iv=e=>{pr.proxy.pdpLink=e},gt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},r1={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null};class Rv{constructor(){Se(this,"initialState",r1);Se(this,"promptsStateProxy");Se(this,"promptsParamsProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return ya(n,r),Reflect.set(t,n,r)});Se(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Se(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Se(this,"updatePromptsParamsProxy",t=>new Proxy(F({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const Ut=new Rv,Lv=e=>{window.addEventListener(af,e)},Dv=e=>{window.removeEventListener(af,e)},ya=(e,t)=>{const n=new CustomEvent(af,{detail:{property:e,value:t}});window.dispatchEvent(n)},i1=e=>{const t=Ut.isOpen,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isOpen=n},o1=e=>{const t=Ut.isInline,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isInline=n},Mv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ya("params",e),Ut.promptsStateProxy.entryType="ask_cim"},Fv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ya("params",e),Ut.promptsStateProxy.entryType="search"},Bv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ya("params",e),Ut.promptsStateProxy.entryType="browse"},Uv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ya("params",e),Ut.promptsStateProxy.entryType="pdp"},Hv=({elementId:e,entryType:t,params:n,isInline:r})=>{Ut.promptsStateProxy.elementId=e,t&&(Ut.promptsStateProxy.entryType=t),typeof r=="boolean"&&o1(r),n&&Ut.updatePromptsParamsProxy(n),Ut.isOpen||i1(!0)},zv=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{El("getConversationMessages",{payload:e,callback:t},_i.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{El("getSessionInformation",{callback:e},_i.GET_SESSION_INFORMATION)},loadConversation:e=>{El("loadConversation",e,_i.LOAD_CONVERSATION)},resetConversation:()=>{El("resetConversation",!0,_i.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class jv{constructor(){Se(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"queryProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const o=fA[n];return bv(o,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(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 _t=new jv,$v=e=>{const t=ma(),n=oo();if(!n||!t){n&&dn.clear(),dn.add({context:"search",payload:me(F({},_t.state),{query:e})});return}_t.queryProxy.query=e},s1=e=>{Yg(e,_t)},Vv=(e,t)=>{Gg(e,t,_t)},a1=e=>{Wg(e,_t)},qv=({field:e,value:t})=>{Xg({field:e,value:t},_t)},Yv=e=>{Kg(e,_t)},u1=e=>{Qg(e,_t)},l1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ma(),n=oo();if(!n||!t){n&&dn.clear(),dn.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&s1(e.facetFilters||{}),"rangeFilters"in e&&a1(e.rangeFilters||[]),"catalogSegment"in e&&(_t.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&u1(e.pricebooks||[]),_t.queryProxy.query=e.query},Gv=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:l1,updateCatalogSegment:Yv,updateFacetFilter:Vv,updateFacetFilters:s1,updatePricebooks:u1,updateRangeFilter:qv,updateRangeFilters:a1,updateSearchQuery:$v},Symbol.toStringTag,{value:"Module"})),Wv={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},c1=U.createContext(Wv),Xv=({children:e})=>{const[t,n]=U.useState(ut.categoryId),[r,o]=U.useState(ut.categoryIdProxy.categoryName||""),[a,u]=U.useState(ut.facetFilters||{}),[c,d]=U.useState(ut.rangeFilters||[]),[f,p]=U.useState(ut.catalogSegment||null),[g,b]=U.useState(ut.pricebooks||null);U.useEffect(()=>{const _=({detail:S})=>{(S==null?void 0:S.property)==="categoryId"&&n(S.value),(S==null?void 0:S.property)==="categoryName"&&o(S.value),(S==null?void 0:S.property)==="facetFilters"&&u(S.value),(S==null?void 0:S.property)==="rangeFilters"&&d(S.value),(S==null?void 0:S.property)==="catalogSegment"&&p(S.value),(S==null?void 0:S.property)==="pricebooks"&&b(S.value)};return zg(_),()=>{jg(_)}},[]);const y=U.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:g}),[t,r,a,c,f,g]);return w.jsx(c1.Provider,{value:y,children:e})},Kv=()=>{const e=U.useContext(c1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Qv={searchQuery:_t.query,facetFilters:_t.facetFilters,rangeFilters:_t.rangeFilters,catalogSegment:_t.catalogSegment,pricebooks:_t.pricebooks},d1=U.createContext(Qv),Jv=({children:e})=>{const[t,n]=U.useState(_t.query),[r,o]=U.useState(_t.facetFilters),[a,u]=U.useState(_t.rangeFilters),[c,d]=U.useState(_t.catalogSegment),[f,p]=U.useState(_t.pricebooks);U.useEffect(()=>{const b=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&o(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return Ug(b),()=>{Hg(b)}},[]);const g=U.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return w.jsx(d1.Provider,{value:g,children:e})},Zv=()=>{const e=U.useContext(d1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},ek={productId:pr.productId,pdpLink:pr.pdpLink},f1=U.createContext(ek),tk=({children:e})=>{const[t,n]=U.useState(pr.productId),[r,o]=U.useState(pr.pdpLink);U.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 $g(u),()=>{Vg(u)}},[]);const a=U.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(f1.Provider,{value:a,children:e})},nk=()=>{const e=U.useContext(f1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},h1=U.createContext({mode:Ze.modeProxy.mode,entryType:Ze.entryType,status:Ze.statusProxy,dialogPosition:Ze.dialogProxy.position,isDialogFullHeight:Ze.dialogProxy.isFullHeight,dialogWidth:Ze.dialogProxy.width,isModalFullscreen:Ze.modalProxy.isFullscreen,previousComponentType:Ze.statusProxy.type}),rk=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=U.useState(e!=null?e:Ze.entryTypeProxy.entryType),[u,c]=U.useState(Ze.modeProxy.mode),[d,f]=U.useState({type:n||Ze.statusProxy.type,isOpen:Ze.statusProxy.isOpen,isMinimized:Ze.statusProxy.isMinimized}),[p,g]=U.useState(Ze.dialogProxy.position),[b,y]=U.useState(Ze.dialogProxy.isFullHeight),[_,S]=U.useState(Ze.dialogProxy.width),[v,C]=U.useState(Ze.modalProxy.isFullscreen),P=Ev(d.type);U.useEffect(()=>{const M=V=>{const{property:D,value:K}=V.detail||{};if(!(!D||K===void 0)){if(D==="mode"){c(K);return}if(D==="entryType"){a(K);return}if(D==="isMinimized"){f(re=>me(F({},re),{isMinimized:K}));return}if(D==="isOpen"){f(re=>me(F({},re),{isOpen:K}));return}if(D==="type"){f(re=>me(F({},re),{type:K}));return}if(D==="position"){g(K);return}if(D==="isFullHeight"){y(K);return}if(D==="width"){S(K);return}if(D==="isFullscreen"){C(K);return}}};return rv(M),()=>{iv(M)}},[]),Ea(()=>{e&&ga(e)}),Ea(()=>{const M=n||(t==null?void 0:t.type);M&&gl(M),t&&"isOpen"in t&&Si(!!t.isOpen),t&&"isMinimized"in t&&ml(!!t.isMinimized)}),Ea(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:M}=t.options;M&&Af(M),"dialogFullHeight"in t.options&&av(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&S(t.options.dialogWidth),"isModalFullscreen"in t.options&&wf(!!t.options.isModalFullscreen)});const A=U.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:P||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:_,isModalFullscreen:v}),[u,o,d,P,p,b,_,v]);return w.jsx(h1.Provider,{value:A,children:r})},mr=()=>{const e=U.useContext(h1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},p1=U.createContext(null),m1=U.createContext(null),g1=()=>{const e=U.useContext(m1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},xi=()=>{const e=U.useContext(p1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Go=()=>{const e=U.useContext(rg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Zn=()=>{const e=U.useContext(ng);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},ik=({copilot:e})=>{const{logger:t,conversationHistory:n}=mt(),{isInline:r}=xi(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=Go(),{activeConversationId:u}=Zn(),c=U.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=U.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,g=>{t==null||t.log("Retrieved conversation messages: ",g),p==null||p(g)})},[e,t]);return U.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),g={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(g.limit=n.limit),d(g,b=>{const y=[];[...b.reverse()||[]].forEach(S=>{var C;const v=b.find(P=>P.id===S.eventSourceId);(C=v==null?void 0:v.name)!=null&&C.endsWith("_suggestions")||(S.bypassHandlers=!0,y.unshift(S))}),y.forEach(S=>{o(S)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:c,getConversationMessages:d}},E1=U.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),ok=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:d,clientContext:f}=mt(),Ii=Zv(),{searchQuery:p}=Ii,g=ln(Ii,["searchQuery"]),li=Kv(),{categoryId:b}=li,y=ln(li,["categoryId"]),{productId:_,pdpLink:S}=nk(),{setCopilot:v,setConnected:C,resetCopilot:P,resetCopilotState:A,addCopilotEvent:M,removeLoadingMessage:V,handleCopilotRequestAck:D,setActiveConversationId:K,setConversationIds:re,setAskCimPrompts:Te}=Go(),{connected:$,copilot:Z,messages:ce,groupedMessages:he,loadingMessages:ue,askCimPrompts:be}=Zn(),{status:Oe,entryType:de}=mr(),{isInline:Q}=xi(),{getConversationMessages:ie,getSessionInformation:k}=ik({copilot:Z}),B=U.useMemo(()=>ue.size>0,[ue]),te=U.useCallback(ve=>ue.has(ve),[ue]),O=U.useCallback(({query:ve,facetFilters:Fe,rangeFilters:Me,catalogSegment:Qe,pricebooks:dt,userPrompt:lt,imageFile:wn})=>{if(!Z){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const Ct={searchParams:{query:ve}};lt&&(Ct.userPrompt=lt),wn&&(Ct.attachments={image:wn}),Fe&&Object.keys(Fe).length>0&&(Ct.searchParams.facetFilters=Fe),Me&&Me.length>0&&(Ct.searchParams.rangeFilters=Me),Qe&&(Ct.searchParams.catalogSegment=Qe),dt&&(Ct.searchParams.pricebooks=dt),f&&(Ct.clientContext=f),ga("search"),Z.search(Ct,ne=>{const oe=F({},ne);D(oe)})},[d,D,Z,f]),_e=U.useCallback(({categoryId:ve,categoryName:Fe,facetFilters:Me,rangeFilters:Qe,catalogSegment:dt,pricebooks:lt,userPrompt:wn,imageFile:Ct})=>{if(!Z){d==null||d.error("Copilot is not initialized");return}const ne=Me&&Object.keys(Me).length>0;if(ve===""&&!ne){d==null||d.error("Browse event must include facetFilters when categoryId is empty");return}const oe={browseParams:{categoryId:ve||""}};wn&&(oe.userPrompt=wn),Ct&&(oe.attachments={image:Ct}),ne&&(oe.browseParams.facetFilters=Me),Qe&&Qe.length>0&&(oe.browseParams.rangeFilters=Qe),dt&&(oe.browseParams.catalogSegment=dt),Array.isArray(lt)&<.length>0&&(oe.browseParams.pricebooks=lt),(f||Fe)&&(oe.clientContext={},f&&(oe.clientContext=F({},f)),Fe&&(oe.clientContext.cimLabel=Fe)),ga("browse"),Z.browse(oe,Re=>{var ir;const Ve=F({},Re),Xe=((ir=Ve.request)==null?void 0:ir.clientContext)||{},Tt=(Xe==null?void 0:Xe.cimLabel)||Fe;Tt&&Ve.request&&(Ve.request.label=Tt),D(Ve)})},[d,D,Z,f]),Ie=U.useCallback(({productId:ve,productName:Fe,pdpLink:Me,userPrompt:Qe,imageFile:dt})=>{if(!Z){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const lt={productId:ve};Qe&&(lt.userPrompt=Qe),Me&&(lt.pdpLink=Me),dt&&(lt.attachments={image:dt}),(f||Fe)&&(lt.clientContext={},f&&(lt.clientContext=F({},f)),Fe&&(lt.clientContext.cimLabel=Fe)),ga("pdp"),Z.productView(lt,wn=>{var Re;const Ct=F({},wn),ne=((Re=Ct.request)==null?void 0:Re.clientContext)||{},oe=(ne==null?void 0:ne.cimLabel)||Fe;oe&&Ct.request&&(Ct.request.label=oe),D(Ct)})},[d,Z,D,f]),Ae=U.useCallback(({userPrompt:ve,imageFile:Fe})=>{if(!Z){d==null||d.error("Copilot is not initialized");return}if(!ve)return;const Me={userPrompt:ve};Fe&&(Me.attachments={image:Fe}),f&&(Me.clientContext=f),Z.askCim(Me,Qe=>{const dt=F({},Qe);D(dt)})},[d,Z,D,f]),$e=U.useCallback(ve=>{M(ve),a==null||a(ve)},[M,a]),we=U.useCallback(ve=>{M(ve),u==null||u(ve)},[M,u]),We=U.useCallback(ve=>{o==null||o(ve),C(!0)},[o,C]);U.useEffect(()=>{!Z||!$||!Oe.isOpen||dn.size>0&&dn.processQueue(ve=>{if(ve.context==="search"){const Fe=F({},ve.payload);l1(Fe)}if(ve.context==="browse"){const Fe=F({},ve.payload);t1(Fe)}if(ve.context==="pdp"){const Fe=F({},ve.payload);n1(Fe)}})},[Oe.isOpen,Z,$]);const ht=U.useCallback(ve=>{const Fe=Me=>{const Qe=me(F({},Me),{id:Me.inquiryLinkId||Me.id});M(Qe)};ve.on("connect_ack",We),ve.on("partial_inquiry",Fe),ve.on("display_products",M),ve.on("progress",M),ve.on("refined_search",$e),ve.on("refined_browse",we),ve.on("done",Me=>{V(Me.eventSourceId)}),ve.on("error",Me=>{M(Me),V(Me.eventSourceId)}),ve.onDisconnect(Me=>{const Qe=["io server disconnect","transport error","server shutting down"];if(d==null||d.log("Connection disconnected with reason: ",Me),!Qe.includes(Me)){C(!1);return}d==null||d.log("De-registering event listeners");const dt=new Date().toISOString();M({name:"error",message:"Connection was lost. Please try again.",createdAt:dt,id:`error-${dt}`,sessionId:"session"}),ve.off()})},[d,C,V,$e,we,M,We]);U.useEffect(()=>{if(!Z)return;const ve=Fe=>{if(!Q){if(!Fe.message&&Fe.eventSourceId&&Fe.eventSourceId===be.requestId){Te({requestId:Fe.eventSourceId,message:Fe});return}M(Fe)}};return Z.on("follow_up",ve),()=>{Z.off("follow_up",ve)}},[Z,ce,be.requestId,Q,M,Te]),U.useEffect(()=>{if(!Z)return;const ve=Fe=>{if(Q)return;const Me=me(F({},Fe),{id:Fe.inquiryLinkId||Fe.id});M(Me)};return Z.on("inquiry",ve),()=>{Z.off("inquiry",ve)}},[Z,Q,M]),Ea(()=>{let ve;n?ve=n:ve=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Fe={baseUrl:ve};e?Fe.apiKey=e:t&&(Fe.apiToken=t);const Me=new Qw(Fe);return v(Me),ht(Me),Me.connect(),Me.requestSessionInformation(Qe=>{d==null||d.log("Session Information: ",Qe);const{activeConversationId:dt,conversationIds:lt}=Qe.data||{};dt&&K(dt),lt!=null&<.length&&re(lt)}),()=>{Me.disconnect(),Me.off(),P()}});const on=U.useCallback(ve=>{if(!Z)return;const Fe={eventId:ve,reason:"User cancelled the request"};Z.cancelRequest(Fe,Me=>{M(Me),V(ve)})},[M,V,Z]),qr=U.useCallback(()=>{Z&&Z.conversationReset({},ve=>{A(),M(ve),Z.requestSessionInformation(Fe=>{d==null||d.log("Session Information: ",Fe);const{activeConversationId:Me,conversationIds:Qe}=Fe.data||{};Me&&K(Me),Qe!=null&&Qe.length&&re(Qe)})})},[Z,d,M,A,K,re]),_r=U.useCallback((ve,Fe)=>{if(!ve)return;const Me={userPrompt:ve};switch(Fe&&(Me.imageFile=Fe),de){case"ask_cim":Ae(Me);return;case"search":p?O(F(F({query:p},g),Me)):Ae(Me);return;case"browse":_e(F(F({categoryId:b},y),Me));return;case"pdp":_?Ie(F({productId:_,pdpLink:S||""},Me)):Ae(Me);return}},[de,p,g,O,Ae,b,y,_e,Ie,_,S]),Rn=U.useCallback((ve,Fe)=>{var wn,Ct,ne;const Qe=ve.params.userPrompt||"";if(!Qe)return;const dt=ce.find(oe=>oe.id===Fe);if(!dt)return;const lt=dt.name.replace("_suggestions","");if(lt==="ask_cim"){Ae({userPrompt:Qe});return}if(lt==="copilot_search"){const oe=((wn=dt.request)==null?void 0:wn.searchParams)||{},Ve=oe.query===p;O(me(F({query:oe.query||p},Ve?g:{}),{userPrompt:Qe}));return}if(lt==="copilot_browse"){const oe=dt.request,Re=oe.browseParams||{},Xe=Re.categoryId===b,Tt=((Ct=oe.clientContext)==null?void 0:Ct.cimLabel)||"";_e(me(F({categoryId:Re.categoryId||b||""},Xe?y:{}),{categoryName:Tt,userPrompt:Qe}));return}if(lt==="product_view"){const oe=dt.request||{},Re=oe.productId,Ve=Re===_,Xe=((ne=oe.clientContext)==null?void 0:ne.cimLabel)||"";let Tt="";Ve?Tt=S||"":Tt=oe.pdpLink||"",Ie({productId:Re||_,pdpLink:Tt,productName:Xe,userPrompt:Qe})}},[ce,p,g,O,Ae,b,y,_e,Ie,_,S]),xo=U.useMemo(()=>({copilot:Z,messages:ce,groupedMessages:he,isLoading:B,isResponseLoading:te,handleAskCim:Ae,handleSearch:O,handleBrowse:_e,handlePdp:Ie,handleUserInput:_r,handleSuggestion:Rn,handleCancel:on,resetConversation:qr,getSessionInformation:k,getConversationMessages:ie}),[Z,ce,he,B,te,Ae,O,_e,Ie,_r,Rn,on,qr,k,ie]);return w.jsx(E1.Provider,{value:xo,children:c})},y1=()=>{const{copilot:e}=Zn(),{addCopilotEvent:t}=Go();return{getCopilotSuggestions:U.useCallback((r,o,a)=>{if(!e||!o||!r)return;const u=c=>{t(c),a(c)};switch(o){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Rr=()=>{const e=U.useContext(E1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},sk=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Zn(),{entryType:o}=mr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Go(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:g,getSessionInformation:b,getConversationMessages:y}=Rr(),{getCopilotSuggestions:_}=y1();U.useEffect(()=>{!e||!o||!t||!r||n.requestId||o==="ask_cim"&&_({},o,P=>{c({requestId:P.id,message:null})})},[e,t,n.requestId,o,r,_,c]);const S=U.useCallback(({query:P})=>{if(!e||!P)return;const{facetFilters:A}=_t.facetFiltersProxy,{rangeFilters:M}=_t.rangeFiltersProxy,{catalogSegment:V}=_t.catalogSegmentProxy,{pricebooks:D}=_t.pricebooksProxy,K={query:P};K.facetFilters=A||{},K.rangeFilters=M||[],K.catalogSegment=V||"",K.pricebooks=D||[],d(F({},K))},[e,d]),v=U.useCallback(({categoryId:P})=>{if(!e)return;const A=ut.categoryIdProxy.categoryName,{facetFilters:M}=ut.facetFiltersProxy,{rangeFilters:V}=ut.rangeFiltersProxy,{catalogSegment:D}=ut.catalogSegmentProxy,{pricebooks:K}=ut.pricebooksProxy,re={categoryId:P};re.categoryName=A||"",re.facetFilters=M||{},re.rangeFilters=V||[],re.catalogSegment=D||"",re.pricebooks=K||[],f(F({},re))},[e,f]),C=U.useCallback(({productId:P})=>{if(!e||!P)return;const A={productId:P,pdpLink:pr.pdpLink,productName:pr.proxy.productName||""};p(A)},[e,p]);return U.useEffect(()=>{const P=({detail:A})=>{(A==null?void 0:A.property)==="query"&&S({query:A.value})};return Ug(P),()=>{Hg(P)}},[S]),U.useEffect(()=>{const P=({detail:A})=>{if((A==null?void 0:A.property)==="pdp-context"){const M=A.value;C({productId:M.productId});return}(A==null?void 0:A.property)==="productId"&&C({productId:A.value})};return $g(P),()=>{Vg(P)}},[C]),U.useEffect(()=>{const P=({detail:A})=>{(A==null?void 0:A.property)==="categoryId"&&v({categoryId:A.value})};return zg(P),()=>{jg(P)}},[v]),U.useEffect(()=>{const P=({detail:A})=>{if((A==null?void 0:A.event)==_i.RESET_CONVERSATION&&g(),(A==null?void 0:A.event)==_i.GET_SESSION_INFORMATION){const M=A.value.callback;b(M)}if((A==null?void 0:A.event)==_i.GET_CONVERSATION_MESSAGES){const{payload:M,callback:V}=A.value;if(!M.conversationId||typeof V!="function")return;y(M,V)}if((A==null?void 0:A.event)==_i.LOAD_CONVERSATION){const M=A.value;if(!M.conversationId)return;y(M,D=>{a(),D.forEach(K=>{u(K)})})}};return Sv(P),()=>{xv(P)}},[g,b,y,a,u]),null},ak=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>w.jsxs(ok,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:[w.jsx(sk,{}),c]}),uk=({children:e,dispatch:t})=>{const n=U.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=U.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),o=U.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=U.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=U.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=U.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=U.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=U.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=U.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),g=U.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),b=U.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=U.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:g,setIsResponseLoading:b}),[n,r,o,a,u,c,d,f,p,g,b]);return w.jsx(m1.Provider,{value:y,children:e})},lk=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},ck=({promptsConfig:e,children:t})=>{const[n,r]=eg(lk,F(F({},r1),e||{}));return w.jsx(p1.Provider,{value:n,children:w.jsx(uk,{dispatch:r,children:t})})},T1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:o,headerText:a,headerConfig:u,theme:c,openLinksInNewTab:d,globalClassName:f,isDevelopment:p=!1,componentType:g,componentConfig:b,entryType:y,entryMessage:_,disclaimerText:S,disclaimerMarkdown:v,clientContext:C,searchPlaceholder:P,searchButtonLabel:A,searchConfig:M,promptsConfig:V,resetConversationMessage:D,conversationHistory:K,onConnect:re,onCopilotEvent:Te,onRefinedSearch:$,onRefinedBrowse:Z,__features:ce,children:he})=>w.jsx(tv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:o,headerText:a,headerConfig:u,entryMessage:_,theme:c,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:P,searchButtonLabel:A,searchConfig:M,componentConfig:b,clientContext:C,disclaimerMarkdown:v,disclaimerText:S,resetConversationMessage:D,conversationHistory:K,isDevelopment:p,__features:ce,children:w.jsx(rk,{entryType:y,componentConfig:b,componentType:g,children:w.jsx(cv,{onCopilotEvent:Te,children:w.jsx(tk,{children:w.jsx(Xv,{children:w.jsx(Jv,{children:w.jsx(ck,{promptsConfig:V,children:w.jsx(ak,{apiKey:t,apiToken:n,baseUrl:r,isDevelopment:p,entryType:y,onConnect:re,onRefinedSearch:$,onRefinedBrowse:Z,onCopilotEvent:Te,children:he})})})})})})})});var vf={exports:{}},kn={},kf={exports:{}},Nf={};var b1;function dk(){return b1||(b1=1,(function(e){function t(Q,ie){var k=Q.length;Q.push(ie);e:for(;0<k;){var B=k-1>>>1,te=Q[B];if(0<o(te,ie))Q[B]=ie,Q[k]=te,k=B;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ie=Q[0],k=Q.pop();if(k!==ie){Q[0]=k;e:for(var B=0,te=Q.length,O=te>>>1;B<O;){var _e=2*(B+1)-1,Ie=Q[_e],Ae=_e+1,$e=Q[Ae];if(0>o(Ie,k))Ae<te&&0>o($e,Ie)?(Q[B]=$e,Q[Ae]=k,B=Ae):(Q[B]=Ie,Q[_e]=k,B=_e);else if(Ae<te&&0>o($e,k))Q[B]=$e,Q[Ae]=k,B=Ae;else break e}}return ie}function o(Q,ie){var k=Q.sortIndex-ie.sortIndex;return k!==0?k:Q.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,g=null,b=3,y=!1,_=!1,S=!1,v=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(Q){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=Q)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function M(Q){if(S=!1,A(Q),!_)if(n(d)!==null)_=!0,Oe(V);else{var ie=n(f);ie!==null&&de(M,ie.startTime-Q)}}function V(Q,ie){_=!1,S&&(S=!1,C(re),re=-1),y=!0;var k=b;try{for(A(ie),g=n(d);g!==null&&(!(g.expirationTime>ie)||Q&&!Z());){var B=g.callback;if(typeof B=="function"){g.callback=null,b=g.priorityLevel;var te=B(g.expirationTime<=ie);ie=e.unstable_now(),typeof te=="function"?g.callback=te:g===n(d)&&r(d),A(ie)}else r(d);g=n(d)}if(g!==null)var O=!0;else{var _e=n(f);_e!==null&&de(M,_e.startTime-ie),O=!1}return O}finally{g=null,b=k,y=!1}}var D=!1,K=null,re=-1,Te=5,$=-1;function Z(){return!(e.unstable_now()-$<Te)}function ce(){if(K!==null){var Q=e.unstable_now();$=Q;var ie=!0;try{ie=K(!0,Q)}finally{ie?he():(D=!1,K=null)}}else D=!1}var he;if(typeof P=="function")he=function(){P(ce)};else if(typeof MessageChannel!="undefined"){var ue=new MessageChannel,be=ue.port2;ue.port1.onmessage=ce,he=function(){be.postMessage(null)}}else he=function(){v(ce,0)};function Oe(Q){K=Q,D||(D=!0,he())}function de(Q,ie){re=v(function(){Q(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,Oe(V))},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"):Te=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(b){case 1:case 2:case 3:var ie=3;break;default:ie=b}var k=b;b=ie;try{return Q()}finally{b=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,ie){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var k=b;b=Q;try{return ie()}finally{b=k}},e.unstable_scheduleCallback=function(Q,ie,k){var B=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?B+k:B):k=B,Q){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=k+te,Q={id:p++,callback:ie,priorityLevel:Q,startTime:k,expirationTime:te,sortIndex:-1},k>B?(Q.sortIndex=k,t(f,Q),n(d)===null&&Q===n(f)&&(S?(C(re),re=-1):S=!0,de(M,k-B))):(Q.sortIndex=te,t(d,Q),_||y||(_=!0,Oe(V))),Q},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(Q){var ie=b;return function(){var k=b;b=ie;try{return Q.apply(this,arguments)}finally{b=k}}}})(Nf)),Nf}var _1;function fk(){return _1||(_1=1,kf.exports=dk()),kf.exports}var S1;function hk(){if(S1)return kn;S1=1;var e=bn(),t=fk();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function b(i){return d.call(g,i)?!0:d.call(p,i)?!1:f.test(i)?g[i]=!0:(p[i]=!0,!1)}function y(i,s,l,h){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,s,l,h){if(s===null||typeof s=="undefined"||y(i,s,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(i,s,l,h,E,T,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=T,this.removeEmptyString=x}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];v[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new S(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){v[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function P(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(C,P);v[s]=new S(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(C,P);v[s]=new S(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(C,P);v[s]=new S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function A(i,s,l,h){var E=v.hasOwnProperty(s)?v[s]:null;(E!==null?E.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,E,h)&&(l=null),h||E===null?b(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(s=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(s):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,s,l):i.setAttribute(s,l))))}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,V=Symbol.for("react.element"),D=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),Z=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),Oe=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),Q=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,B;function te(i){if(B===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);B=s&&s[1]||""}return`
|
|
11
|
+
`+B+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(J){var h=J}Reflect.construct(i,[],s)}else{try{s.call()}catch(J){h=J}i.call(s.prototype)}else{try{throw Error()}catch(J){h=J}i()}}catch(J){if(J&&h&&typeof J.stack=="string"){for(var E=J.stack.split(`
|
|
12
12
|
`),T=h.stack.split(`
|
|
13
|
-
`),x=E.length-1,R=T.length-1;1<=x&&0<=R&&E[x]!==T[R];)R--;for(;1<=x&&0<=R;x--,R--)if(E[x]!==T[R]){if(x!==1||R!==1)do if(x--,R--,0>R||E[x]!==T[R]){var
|
|
14
|
-
`+E[x].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=x&&0<=R);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?te(i):""}function Oe(i){switch(i.tag){case 5:return te(i.type);case 16:return te("Lazy");case 13:return te("Suspense");case 19:return te("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 Ce(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case Q:return"Fragment";case D:return"Portal";case Te:return"Profiler";case re:return"StrictMode";case he:return"Suspense";case le:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ee:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case ce:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case be:return s=i.displayName||null,s!==null?s:Ce(i.type)||"Memo";case Me:s=i._payload,i=i._init;try{return Ce(i(s))}catch(l){}}return null}function $e(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 Ce(s);case 8:return s===re?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function we(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function We(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ht(i){var s=We(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,T=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,T.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 on(i){i._valueTracker||(i._valueTracker=ht(i))}function qr(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return i&&(h=We(i)?i.checked?"true":"false":i.value),i=h,i!==l?(s.setValue(i),!0):!1}function _r(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function Rn(i,s){var l=s.checked;return k({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function So(i,s){var l=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;l=we(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 Pi(i,s){s=s.checked,s!=null&&C(i,"checked",s,!1)}function li(i,s){Pi(i,s);var l=we(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")?Fe(i,s.type,l):s.hasOwnProperty("defaultValue")&&Fe(i,s.type,we(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function ve(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 Fe(i,s,l){(s!=="number"||_r(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var De=Array.isArray;function Qe(i,s,l,h){if(i=i.options,s){s={};for(var E=0;E<l.length;E++)s["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=s.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+we(l),s=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function dt(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function lt(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(De(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:we(l)}}function wn(i,s){var l=we(s.value),h=we(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 At(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ne(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"?ne(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ie,Ve=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(s,l,h,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ie=Ie||document.createElement("div"),Ie.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ie.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Xe(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Tt={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},ir=["Webkit","ms","Moz","O"];Object.keys(Tt).forEach(function(i){ir.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Tt[s]=Tt[i]})});function or(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Tt.hasOwnProperty(i)&&Tt[i]?(""+s).trim():s+"px"}function Oi(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=or(l,s[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var xo=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function sn(i,s){if(s){if(xo[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 Yr(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 qn=null;function Op(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ip=null,Ns=null,Ps=null;function K_(i){if(i=Cu(i)){if(typeof Ip!="function")throw Error(n(280));var s=i.stateNode;s&&(s=jc(s),Ip(i.stateNode,i.type,s))}}function Q_(i){Ns?Ps?Ps.push(i):Ps=[i]:Ns=i}function J_(){if(Ns){var i=Ns,s=Ps;if(Ps=Ns=null,K_(i),s)for(i=0;i<s.length;i++)K_(s[i])}}function Z_(i,s){return i(s)}function eS(){}var Rp=!1;function tS(i,s,l){if(Rp)return i(s,l);Rp=!0;try{return Z_(i,s,l)}finally{Rp=!1,(Ns!==null||Ps!==null)&&(eS(),J_())}}function iu(i,s){var l=i.stateNode;if(l===null)return null;var h=jc(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 Lp=!1;if(c)try{var ou={};Object.defineProperty(ou,"passive",{get:function(){Lp=!0}}),window.addEventListener("test",ou,ou),window.removeEventListener("test",ou,ou)}catch(i){Lp=!1}function yB(i,s,l,h,E,T,x,R,U){var J=Array.prototype.slice.call(arguments,3);try{s.apply(l,J)}catch(ue){this.onError(ue)}}var su=!1,bc=null,_c=!1,Dp=null,TB={onError:function(i){su=!0,bc=i}};function bB(i,s,l,h,E,T,x,R,U){su=!1,bc=null,yB.apply(TB,arguments)}function _B(i,s,l,h,E,T,x,R,U){if(bB.apply(this,arguments),su){if(su){var J=bc;su=!1,bc=null}else throw Error(n(198));_c||(_c=!0,Dp=J)}}function wo(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 nS(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 rS(i){if(wo(i)!==i)throw Error(n(188))}function SB(i){var s=i.alternate;if(!s){if(s=wo(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,h=s;;){var E=l.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===l)return rS(E),i;if(T===h)return rS(E),s;T=T.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=T;else{for(var x=!1,R=E.child;R;){if(R===l){x=!0,l=E,h=T;break}if(R===h){x=!0,h=E,l=T;break}R=R.sibling}if(!x){for(R=T.child;R;){if(R===l){x=!0,l=T,h=E;break}if(R===h){x=!0,h=T,l=E;break}R=R.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function iS(i){return i=SB(i),i!==null?oS(i):null}function oS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=oS(i);if(s!==null)return s;i=i.sibling}return null}var sS=t.unstable_scheduleCallback,aS=t.unstable_cancelCallback,xB=t.unstable_shouldYield,wB=t.unstable_requestPaint,Mt=t.unstable_now,CB=t.unstable_getCurrentPriorityLevel,Mp=t.unstable_ImmediatePriority,uS=t.unstable_UserBlockingPriority,Sc=t.unstable_NormalPriority,AB=t.unstable_LowPriority,lS=t.unstable_IdlePriority,xc=null,Gr=null;function vB(i){if(Gr&&typeof Gr.onCommitFiberRoot=="function")try{Gr.onCommitFiberRoot(xc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Sr=Math.clz32?Math.clz32:PB,kB=Math.log,NB=Math.LN2;function PB(i){return i>>>=0,i===0?32:31-(kB(i)/NB|0)|0}var wc=64,Cc=4194304;function au(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Ac(i,s){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,x=l&268435455;if(x!==0){var R=x&~E;R!==0?h=au(R):(T&=x,T!==0&&(h=au(T)))}else x=l&~E,x!==0?h=au(x):T!==0&&(h=au(T));if(h===0)return 0;if(s!==0&&s!==h&&(s&E)===0&&(E=h&-h,T=s&-s,E>=T||E===16&&(T&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-Sr(s),E=1<<l,h|=i[l],s&=~E;return h}function OB(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 IB(i,s){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var x=31-Sr(T),R=1<<x,U=E[x];U===-1?((R&l)===0||(R&h)!==0)&&(E[x]=OB(R,s)):U<=s&&(i.expiredLanes|=R),T&=~R}}function Fp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function cS(){var i=wc;return wc<<=1,(wc&4194240)===0&&(wc=64),i}function Bp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function uu(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Sr(s),i[s]=l}function RB(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Sr(l),T=1<<E;s[E]=0,h[E]=-1,i[E]=-1,l&=~T}}function Up(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var h=31-Sr(l),E=1<<h;E&s|i[h]&s&&(i[h]|=s),l&=~E}}var ct=0;function dS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var fS,Hp,hS,pS,mS,zp=!1,vc=[],Ii=null,Ri=null,Li=null,lu=new Map,cu=new Map,Di=[],LB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function gS(i,s){switch(i){case"focusin":case"focusout":Ii=null;break;case"dragenter":case"dragleave":Ri=null;break;case"mouseover":case"mouseout":Li=null;break;case"pointerover":case"pointerout":lu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":cu.delete(s.pointerId)}}function du(i,s,l,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},s!==null&&(s=Cu(s),s!==null&&Hp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function DB(i,s,l,h,E){switch(s){case"focusin":return Ii=du(Ii,i,s,l,h,E),!0;case"dragenter":return Ri=du(Ri,i,s,l,h,E),!0;case"mouseover":return Li=du(Li,i,s,l,h,E),!0;case"pointerover":var T=E.pointerId;return lu.set(T,du(lu.get(T)||null,i,s,l,h,E)),!0;case"gotpointercapture":return T=E.pointerId,cu.set(T,du(cu.get(T)||null,i,s,l,h,E)),!0}return!1}function ES(i){var s=Co(i.target);if(s!==null){var l=wo(s);if(l!==null){if(s=l.tag,s===13){if(s=nS(l),s!==null){i.blockedOn=s,mS(i.priority,function(){hS(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 kc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=$p(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);qn=h,l.target.dispatchEvent(h),qn=null}else return s=Cu(l),s!==null&&Hp(s),i.blockedOn=l,!1;s.shift()}return!0}function yS(i,s,l){kc(i)&&l.delete(s)}function MB(){zp=!1,Ii!==null&&kc(Ii)&&(Ii=null),Ri!==null&&kc(Ri)&&(Ri=null),Li!==null&&kc(Li)&&(Li=null),lu.forEach(yS),cu.forEach(yS)}function fu(i,s){i.blockedOn===s&&(i.blockedOn=null,zp||(zp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,MB)))}function hu(i){function s(E){return fu(E,i)}if(0<vc.length){fu(vc[0],i);for(var l=1;l<vc.length;l++){var h=vc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Ii!==null&&fu(Ii,i),Ri!==null&&fu(Ri,i),Li!==null&&fu(Li,i),lu.forEach(s),cu.forEach(s),l=0;l<Di.length;l++)h=Di[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Di.length&&(l=Di[0],l.blockedOn===null);)ES(l),l.blockedOn===null&&Di.shift()}var Os=B.ReactCurrentBatchConfig,Nc=!0;function FB(i,s,l,h){var E=ct,T=Os.transition;Os.transition=null;try{ct=1,jp(i,s,l,h)}finally{ct=E,Os.transition=T}}function BB(i,s,l,h){var E=ct,T=Os.transition;Os.transition=null;try{ct=4,jp(i,s,l,h)}finally{ct=E,Os.transition=T}}function jp(i,s,l,h){if(Nc){var E=$p(i,s,l,h);if(E===null)sm(i,s,h,Pc,l),gS(i,h);else if(DB(E,i,s,l,h))h.stopPropagation();else if(gS(i,h),s&4&&-1<LB.indexOf(i)){for(;E!==null;){var T=Cu(E);if(T!==null&&fS(T),T=$p(i,s,l,h),T===null&&sm(i,s,h,Pc,l),T===E)break;E=T}E!==null&&h.stopPropagation()}else sm(i,s,h,null,l)}}var Pc=null;function $p(i,s,l,h){if(Pc=null,i=Op(h),i=Co(i),i!==null)if(s=wo(i),s===null)i=null;else if(l=s.tag,l===13){if(i=nS(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 Pc=i,null}function TS(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(CB()){case Mp:return 1;case uS:return 4;case Sc:case AB:return 16;case lS:return 536870912;default:return 16}default:return 16}}var Mi=null,Vp=null,Oc=null;function bS(){if(Oc)return Oc;var i,s=Vp,l=s.length,h,E="value"in Mi?Mi.value:Mi.textContent,T=E.length;for(i=0;i<l&&s[i]===E[i];i++);var x=l-i;for(h=1;h<=x&&s[l-h]===E[T-h];h++);return Oc=E.slice(i,1<h?1-h:void 0)}function Ic(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 Rc(){return!0}function _S(){return!1}function Yn(i){function s(l,h,E,T,x){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=x,this.currentTarget=null;for(var R in i)i.hasOwnProperty(R)&&(l=i[R],this[R]=l?l(T):T[R]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Rc:_S,this.isPropagationStopped=_S,this}return k(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Rc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Rc)},persist:function(){},isPersistent:Rc}),s}var Is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qp=Yn(Is),pu=k({},Is,{view:0,detail:0}),UB=Yn(pu),Yp,Gp,mu,Lc=k({},pu,{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!==mu&&(mu&&i.type==="mousemove"?(Yp=i.screenX-mu.screenX,Gp=i.screenY-mu.screenY):Gp=Yp=0,mu=i),Yp)},movementY:function(i){return"movementY"in i?i.movementY:Gp}}),SS=Yn(Lc),HB=k({},Lc,{dataTransfer:0}),zB=Yn(HB),jB=k({},pu,{relatedTarget:0}),Wp=Yn(jB),$B=k({},Is,{animationName:0,elapsedTime:0,pseudoElement:0}),VB=Yn($B),qB=k({},Is,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),YB=Yn(qB),GB=k({},Is,{data:0}),xS=Yn(GB),WB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},XB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},KB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function QB(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=KB[i])?!!s[i]:!1}function Xp(){return QB}var JB=k({},pu,{key:function(i){if(i.key){var s=WB[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Ic(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?XB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xp,charCode:function(i){return i.type==="keypress"?Ic(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ic(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),ZB=Yn(JB),e9=k({},Lc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wS=Yn(e9),t9=k({},pu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xp}),n9=Yn(t9),r9=k({},Is,{propertyName:0,elapsedTime:0,pseudoElement:0}),i9=Yn(r9),o9=k({},Lc,{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}),s9=Yn(o9),a9=[9,13,27,32],Kp=c&&"CompositionEvent"in window,gu=null;c&&"documentMode"in document&&(gu=document.documentMode);var u9=c&&"TextEvent"in window&&!gu,CS=c&&(!Kp||gu&&8<gu&&11>=gu),AS=" ",vS=!1;function kS(i,s){switch(i){case"keyup":return a9.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function NS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Rs=!1;function l9(i,s){switch(i){case"compositionend":return NS(s);case"keypress":return s.which!==32?null:(vS=!0,AS);case"textInput":return i=s.data,i===AS&&vS?null:i;default:return null}}function c9(i,s){if(Rs)return i==="compositionend"||!Kp&&kS(i,s)?(i=bS(),Oc=Vp=Mi=null,Rs=!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 CS&&s.locale!=="ko"?null:s.data;default:return null}}var d9={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function PS(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!d9[i.type]:s==="textarea"}function OS(i,s,l,h){Q_(h),s=Uc(s,"onChange"),0<s.length&&(l=new qp("onChange","change",null,l,h),i.push({event:l,listeners:s}))}var Eu=null,yu=null;function f9(i){XS(i,0)}function Dc(i){var s=Bs(i);if(qr(s))return i}function h9(i,s){if(i==="change")return s}var IS=!1;if(c){var Qp;if(c){var Jp="oninput"in document;if(!Jp){var RS=document.createElement("div");RS.setAttribute("oninput","return;"),Jp=typeof RS.oninput=="function"}Qp=Jp}else Qp=!1;IS=Qp&&(!document.documentMode||9<document.documentMode)}function LS(){Eu&&(Eu.detachEvent("onpropertychange",DS),yu=Eu=null)}function DS(i){if(i.propertyName==="value"&&Dc(yu)){var s=[];OS(s,yu,i,Op(i)),tS(f9,s)}}function p9(i,s,l){i==="focusin"?(LS(),Eu=s,yu=l,Eu.attachEvent("onpropertychange",DS)):i==="focusout"&&LS()}function m9(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Dc(yu)}function g9(i,s){if(i==="click")return Dc(s)}function E9(i,s){if(i==="input"||i==="change")return Dc(s)}function y9(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var xr=typeof Object.is=="function"?Object.is:y9;function Tu(i,s){if(xr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(s,E)||!xr(i[E],s[E]))return!1}return!0}function MS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function FS(i,s){var l=MS(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=MS(l)}}function BS(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?BS(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function US(){for(var i=window,s=_r();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=_r(i.document)}return s}function Zp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function T9(i){var s=US(),l=i.focusedElem,h=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&BS(l.ownerDocument.documentElement,l)){if(h!==null&&Zp(l)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=FS(l,T);var x=FS(l,h);E&&x&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),T>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 b9=c&&"documentMode"in document&&11>=document.documentMode,Ls=null,em=null,bu=null,tm=!1;function HS(i,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;tm||Ls==null||Ls!==_r(h)||(h=Ls,"selectionStart"in h&&Zp(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}),bu&&Tu(bu,h)||(bu=h,h=Uc(em,"onSelect"),0<h.length&&(s=new qp("onSelect","select",null,s,l),i.push({event:s,listeners:h}),s.target=Ls)))}function Mc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var Ds={animationend:Mc("Animation","AnimationEnd"),animationiteration:Mc("Animation","AnimationIteration"),animationstart:Mc("Animation","AnimationStart"),transitionend:Mc("Transition","TransitionEnd")},nm={},zS={};c&&(zS=document.createElement("div").style,"AnimationEvent"in window||(delete Ds.animationend.animation,delete Ds.animationiteration.animation,delete Ds.animationstart.animation),"TransitionEvent"in window||delete Ds.transitionend.transition);function Fc(i){if(nm[i])return nm[i];if(!Ds[i])return i;var s=Ds[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in zS)return nm[i]=s[l];return i}var jS=Fc("animationend"),$S=Fc("animationiteration"),VS=Fc("animationstart"),qS=Fc("transitionend"),YS=new Map,GS="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Fi(i,s){YS.set(i,s),a(s,[i])}for(var rm=0;rm<GS.length;rm++){var im=GS[rm],_9=im.toLowerCase(),S9=im[0].toUpperCase()+im.slice(1);Fi(_9,"on"+S9)}Fi(jS,"onAnimationEnd"),Fi($S,"onAnimationIteration"),Fi(VS,"onAnimationStart"),Fi("dblclick","onDoubleClick"),Fi("focusin","onFocus"),Fi("focusout","onBlur"),Fi(qS,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _u="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),x9=new Set("cancel close invalid load scroll toggle".split(" ").concat(_u));function WS(i,s,l){var h=i.type||"unknown-event";i.currentTarget=l,_B(h,s,void 0,i),i.currentTarget=null}function XS(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var T=void 0;if(s)for(var x=h.length-1;0<=x;x--){var R=h[x],U=R.instance,J=R.currentTarget;if(R=R.listener,U!==T&&E.isPropagationStopped())break e;WS(E,R,J),T=U}else for(x=0;x<h.length;x++){if(R=h[x],U=R.instance,J=R.currentTarget,R=R.listener,U!==T&&E.isPropagationStopped())break e;WS(E,R,J),T=U}}}if(_c)throw i=Dp,_c=!1,Dp=null,i}function St(i,s){var l=s[fm];l===void 0&&(l=s[fm]=new Set);var h=i+"__bubble";l.has(h)||(KS(s,i,2,!1),l.add(h))}function om(i,s,l){var h=0;s&&(h|=4),KS(l,i,h,s)}var Bc="_reactListening"+Math.random().toString(36).slice(2);function Su(i){if(!i[Bc]){i[Bc]=!0,r.forEach(function(l){l!=="selectionchange"&&(x9.has(l)||om(l,!1,i),om(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Bc]||(s[Bc]=!0,om("selectionchange",!1,s))}}function KS(i,s,l,h){switch(TS(s)){case 1:var E=FB;break;case 4:E=BB;break;default:E=jp}l=E.bind(null,s,l,i),E=void 0,!Lp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(s,l,{capture:!0,passive:E}):i.addEventListener(s,l,!0):E!==void 0?i.addEventListener(s,l,{passive:E}):i.addEventListener(s,l,!1)}function sm(i,s,l,h,E){var T=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 R=h.stateNode.containerInfo;if(R===E||R.nodeType===8&&R.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var U=x.tag;if((U===3||U===4)&&(U=x.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;x=x.return}for(;R!==null;){if(x=Co(R),x===null)return;if(U=x.tag,U===5||U===6){h=T=x;continue e}R=R.parentNode}}h=h.return}tS(function(){var J=T,ue=Op(l),pe=[];e:{var se=YS.get(i);if(se!==void 0){var xe=qp,ke=i;switch(i){case"keypress":if(Ic(l)===0)break e;case"keydown":case"keyup":xe=ZB;break;case"focusin":ke="focus",xe=Wp;break;case"focusout":ke="blur",xe=Wp;break;case"beforeblur":case"afterblur":xe=Wp;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=SS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=zB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=n9;break;case jS:case $S:case VS:xe=VB;break;case qS:xe=i9;break;case"scroll":xe=UB;break;case"wheel":xe=s9;break;case"copy":case"cut":case"paste":xe=YB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=wS}var Pe=(s&4)!==0,Ft=!Pe&&i==="scroll",Y=Pe?se!==null?se+"Capture":null:se;Pe=[];for(var z=J,X;z!==null;){X=z;var ye=X.stateNode;if(X.tag===5&&ye!==null&&(X=ye,Y!==null&&(ye=iu(z,Y),ye!=null&&Pe.push(xu(z,ye,X)))),Ft)break;z=z.return}0<Pe.length&&(se=new xe(se,ke,null,l,ue),pe.push({event:se,listeners:Pe}))}}if((s&7)===0){e:{if(se=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",se&&l!==qn&&(ke=l.relatedTarget||l.fromElement)&&(Co(ke)||ke[ci]))break e;if((xe||se)&&(se=ue.window===ue?ue:(se=ue.ownerDocument)?se.defaultView||se.parentWindow:window,xe?(ke=l.relatedTarget||l.toElement,xe=J,ke=ke?Co(ke):null,ke!==null&&(Ft=wo(ke),ke!==Ft||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(xe=null,ke=J),xe!==ke)){if(Pe=SS,ye="onMouseLeave",Y="onMouseEnter",z="mouse",(i==="pointerout"||i==="pointerover")&&(Pe=wS,ye="onPointerLeave",Y="onPointerEnter",z="pointer"),Ft=xe==null?se:Bs(xe),X=ke==null?se:Bs(ke),se=new Pe(ye,z+"leave",xe,l,ue),se.target=Ft,se.relatedTarget=X,ye=null,Co(ue)===J&&(Pe=new Pe(Y,z+"enter",ke,l,ue),Pe.target=X,Pe.relatedTarget=Ft,ye=Pe),Ft=ye,xe&&ke)t:{for(Pe=xe,Y=ke,z=0,X=Pe;X;X=Ms(X))z++;for(X=0,ye=Y;ye;ye=Ms(ye))X++;for(;0<z-X;)Pe=Ms(Pe),z--;for(;0<X-z;)Y=Ms(Y),X--;for(;z--;){if(Pe===Y||Y!==null&&Pe===Y.alternate)break t;Pe=Ms(Pe),Y=Ms(Y)}Pe=null}else Pe=null;xe!==null&&QS(pe,se,xe,Pe,!1),ke!==null&&Ft!==null&&QS(pe,Ft,ke,Pe,!0)}}e:{if(se=J?Bs(J):window,xe=se.nodeName&&se.nodeName.toLowerCase(),xe==="select"||xe==="input"&&se.type==="file")var Re=h9;else if(PS(se))if(IS)Re=E9;else{Re=m9;var Ue=p9}else(xe=se.nodeName)&&xe.toLowerCase()==="input"&&(se.type==="checkbox"||se.type==="radio")&&(Re=g9);if(Re&&(Re=Re(i,J))){OS(pe,Re,l,ue);break e}Ue&&Ue(i,se,J),i==="focusout"&&(Ue=se._wrapperState)&&Ue.controlled&&se.type==="number"&&Fe(se,"number",se.value)}switch(Ue=J?Bs(J):window,i){case"focusin":(PS(Ue)||Ue.contentEditable==="true")&&(Ls=Ue,em=J,bu=null);break;case"focusout":bu=em=Ls=null;break;case"mousedown":tm=!0;break;case"contextmenu":case"mouseup":case"dragend":tm=!1,HS(pe,l,ue);break;case"selectionchange":if(b9)break;case"keydown":case"keyup":HS(pe,l,ue)}var He;if(Kp)e:{switch(i){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else Rs?kS(i,l)&&(qe="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(qe="onCompositionStart");qe&&(CS&&l.locale!=="ko"&&(Rs||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Rs&&(He=bS()):(Mi=ue,Vp="value"in Mi?Mi.value:Mi.textContent,Rs=!0)),Ue=Uc(J,qe),0<Ue.length&&(qe=new xS(qe,i,null,l,ue),pe.push({event:qe,listeners:Ue}),He?qe.data=He:(He=NS(l),He!==null&&(qe.data=He)))),(He=u9?l9(i,l):c9(i,l))&&(J=Uc(J,"onBeforeInput"),0<J.length&&(ue=new xS("onBeforeInput","beforeinput",null,l,ue),pe.push({event:ue,listeners:J}),ue.data=He))}XS(pe,s)})}function xu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Uc(i,s){for(var l=s+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=iu(i,l),T!=null&&h.unshift(xu(i,T,E)),T=iu(i,s),T!=null&&h.push(xu(i,T,E))),i=i.return}return h}function Ms(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function QS(i,s,l,h,E){for(var T=s._reactName,x=[];l!==null&&l!==h;){var R=l,U=R.alternate,J=R.stateNode;if(U!==null&&U===h)break;R.tag===5&&J!==null&&(R=J,E?(U=iu(l,T),U!=null&&x.unshift(xu(l,U,R))):E||(U=iu(l,T),U!=null&&x.push(xu(l,U,R)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var w9=/\r\n?/g,C9=/\u0000|\uFFFD/g;function JS(i){return(typeof i=="string"?i:""+i).replace(w9,`
|
|
15
|
-
`).replace(C9,"")}function Hc(i,s,l){if(s=JS(s),JS(i)!==s&&l)throw Error(n(425))}function zc(){}var am=null,um=null;function lm(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 cm=typeof setTimeout=="function"?setTimeout:void 0,A9=typeof clearTimeout=="function"?clearTimeout:void 0,ZS=typeof Promise=="function"?Promise:void 0,v9=typeof queueMicrotask=="function"?queueMicrotask:typeof ZS!="undefined"?function(i){return ZS.resolve(null).then(i).catch(k9)}:cm;function k9(i){setTimeout(function(){throw i})}function dm(i,s){var l=s,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),hu(s);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);hu(s)}function Bi(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 ex(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 Fs=Math.random().toString(36).slice(2),Wr="__reactFiber$"+Fs,wu="__reactProps$"+Fs,ci="__reactContainer$"+Fs,fm="__reactEvents$"+Fs,N9="__reactListeners$"+Fs,P9="__reactHandles$"+Fs;function Co(i){var s=i[Wr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[ci]||l[Wr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=ex(i);i!==null;){if(l=i[Wr])return l;i=ex(i)}return s}i=l,l=i.parentNode}return null}function Cu(i){return i=i[Wr]||i[ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Bs(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function jc(i){return i[wu]||null}var hm=[],Us=-1;function Ui(i){return{current:i}}function xt(i){0>Us||(i.current=hm[Us],hm[Us]=null,Us--)}function bt(i,s){Us++,hm[Us]=i.current,i.current=s}var Hi={},gn=Ui(Hi),Ln=Ui(!1),Ao=Hi;function Hs(i,s){var l=i.type.contextTypes;if(!l)return Hi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in l)E[T]=s[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function Dn(i){return i=i.childContextTypes,i!=null}function $c(){xt(Ln),xt(gn)}function tx(i,s,l){if(gn.current!==Hi)throw Error(n(168));bt(gn,s),bt(Ln,l)}function nx(i,s,l){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in s))throw Error(n(108,$e(i)||"Unknown",E));return k({},l,h)}function Vc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Hi,Ao=gn.current,bt(gn,i),bt(Ln,Ln.current),!0}function rx(i,s,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=nx(i,s,Ao),h.__reactInternalMemoizedMergedChildContext=i,xt(Ln),xt(gn),bt(gn,i)):xt(Ln),bt(Ln,l)}var di=null,qc=!1,pm=!1;function ix(i){di===null?di=[i]:di.push(i)}function O9(i){qc=!0,ix(i)}function zi(){if(!pm&&di!==null){pm=!0;var i=0,s=ct;try{var l=di;for(ct=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}di=null,qc=!1}catch(E){throw di!==null&&(di=di.slice(i+1)),sS(Mp,zi),E}finally{ct=s,pm=!1}}return null}var zs=[],js=0,Yc=null,Gc=0,sr=[],ar=0,vo=null,fi=1,hi="";function ko(i,s){zs[js++]=Gc,zs[js++]=Yc,Yc=i,Gc=s}function ox(i,s,l){sr[ar++]=fi,sr[ar++]=hi,sr[ar++]=vo,vo=i;var h=fi;i=hi;var E=32-Sr(h)-1;h&=~(1<<E),l+=1;var T=32-Sr(s)+E;if(30<T){var x=E-E%5;T=(h&(1<<x)-1).toString(32),h>>=x,E-=x,fi=1<<32-Sr(s)+E|l<<E|h,hi=T+i}else fi=1<<T|l<<E|h,hi=i}function mm(i){i.return!==null&&(ko(i,1),ox(i,1,0))}function gm(i){for(;i===Yc;)Yc=zs[--js],zs[js]=null,Gc=zs[--js],zs[js]=null;for(;i===vo;)vo=sr[--ar],sr[ar]=null,hi=sr[--ar],sr[ar]=null,fi=sr[--ar],sr[ar]=null}var Gn=null,Wn=null,vt=!1,wr=null;function sx(i,s){var l=dr(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 ax(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,Gn=i,Wn=Bi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Gn=i,Wn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=vo!==null?{id:fi,overflow:hi}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=dr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Gn=i,Wn=null,!0):!1;default:return!1}}function Em(i){return(i.mode&1)!==0&&(i.flags&128)===0}function ym(i){if(vt){var s=Wn;if(s){var l=s;if(!ax(i,s)){if(Em(i))throw Error(n(418));s=Bi(l.nextSibling);var h=Gn;s&&ax(i,s)?sx(h,l):(i.flags=i.flags&-4097|2,vt=!1,Gn=i)}}else{if(Em(i))throw Error(n(418));i.flags=i.flags&-4097|2,vt=!1,Gn=i}}}function ux(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Gn=i}function Wc(i){if(i!==Gn)return!1;if(!vt)return ux(i),vt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!lm(i.type,i.memoizedProps)),s&&(s=Wn)){if(Em(i))throw lx(),Error(n(418));for(;s;)sx(i,s),s=Bi(s.nextSibling)}if(ux(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){Wn=Bi(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Wn=null}}else Wn=Gn?Bi(i.stateNode.nextSibling):null;return!0}function lx(){for(var i=Wn;i;)i=Bi(i.nextSibling)}function $s(){Wn=Gn=null,vt=!1}function Tm(i){wr===null?wr=[i]:wr.push(i)}var I9=B.ReactCurrentBatchConfig;function Au(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,T=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===T?s.ref:(s=function(x){var R=E.refs;x===null?delete R[T]:R[T]=x},s._stringRef=T,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Xc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function cx(i){var s=i._init;return s(i._payload)}function dx(i){function s(Y,z){if(i){var X=Y.deletions;X===null?(Y.deletions=[z],Y.flags|=16):X.push(z)}}function l(Y,z){if(!i)return null;for(;z!==null;)s(Y,z),z=z.sibling;return null}function h(Y,z){for(Y=new Map;z!==null;)z.key!==null?Y.set(z.key,z):Y.set(z.index,z),z=z.sibling;return Y}function E(Y,z){return Y=Xi(Y,z),Y.index=0,Y.sibling=null,Y}function T(Y,z,X){return Y.index=X,i?(X=Y.alternate,X!==null?(X=X.index,X<z?(Y.flags|=2,z):X):(Y.flags|=2,z)):(Y.flags|=1048576,z)}function x(Y){return i&&Y.alternate===null&&(Y.flags|=2),Y}function R(Y,z,X,ye){return z===null||z.tag!==6?(z=c0(X,Y.mode,ye),z.return=Y,z):(z=E(z,X),z.return=Y,z)}function U(Y,z,X,ye){var Re=X.type;return Re===Q?ue(Y,z,X.props.children,ye,X.key):z!==null&&(z.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===Me&&cx(Re)===z.type)?(ye=E(z,X.props),ye.ref=Au(Y,z,X),ye.return=Y,ye):(ye=Td(X.type,X.key,X.props,null,Y.mode,ye),ye.ref=Au(Y,z,X),ye.return=Y,ye)}function J(Y,z,X,ye){return z===null||z.tag!==4||z.stateNode.containerInfo!==X.containerInfo||z.stateNode.implementation!==X.implementation?(z=d0(X,Y.mode,ye),z.return=Y,z):(z=E(z,X.children||[]),z.return=Y,z)}function ue(Y,z,X,ye,Re){return z===null||z.tag!==7?(z=Mo(X,Y.mode,ye,Re),z.return=Y,z):(z=E(z,X),z.return=Y,z)}function pe(Y,z,X){if(typeof z=="string"&&z!==""||typeof z=="number")return z=c0(""+z,Y.mode,X),z.return=Y,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case q:return X=Td(z.type,z.key,z.props,null,Y.mode,X),X.ref=Au(Y,null,z),X.return=Y,X;case D:return z=d0(z,Y.mode,X),z.return=Y,z;case Me:var ye=z._init;return pe(Y,ye(z._payload),X)}if(De(z)||ie(z))return z=Mo(z,Y.mode,X,null),z.return=Y,z;Xc(Y,z)}return null}function se(Y,z,X,ye){var Re=z!==null?z.key:null;if(typeof X=="string"&&X!==""||typeof X=="number")return Re!==null?null:R(Y,z,""+X,ye);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case q:return X.key===Re?U(Y,z,X,ye):null;case D:return X.key===Re?J(Y,z,X,ye):null;case Me:return Re=X._init,se(Y,z,Re(X._payload),ye)}if(De(X)||ie(X))return Re!==null?null:ue(Y,z,X,ye,null);Xc(Y,X)}return null}function xe(Y,z,X,ye,Re){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return Y=Y.get(X)||null,R(z,Y,""+ye,Re);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case q:return Y=Y.get(ye.key===null?X:ye.key)||null,U(z,Y,ye,Re);case D:return Y=Y.get(ye.key===null?X:ye.key)||null,J(z,Y,ye,Re);case Me:var Ue=ye._init;return xe(Y,z,X,Ue(ye._payload),Re)}if(De(ye)||ie(ye))return Y=Y.get(X)||null,ue(z,Y,ye,Re,null);Xc(z,ye)}return null}function ke(Y,z,X,ye){for(var Re=null,Ue=null,He=z,qe=z=0,nn=null;He!==null&&qe<X.length;qe++){He.index>qe?(nn=He,He=null):nn=He.sibling;var ot=se(Y,He,X[qe],ye);if(ot===null){He===null&&(He=nn);break}i&&He&&ot.alternate===null&&s(Y,He),z=T(ot,z,qe),Ue===null?Re=ot:Ue.sibling=ot,Ue=ot,He=nn}if(qe===X.length)return l(Y,He),vt&&ko(Y,qe),Re;if(He===null){for(;qe<X.length;qe++)He=pe(Y,X[qe],ye),He!==null&&(z=T(He,z,qe),Ue===null?Re=He:Ue.sibling=He,Ue=He);return vt&&ko(Y,qe),Re}for(He=h(Y,He);qe<X.length;qe++)nn=xe(He,Y,qe,X[qe],ye),nn!==null&&(i&&nn.alternate!==null&&He.delete(nn.key===null?qe:nn.key),z=T(nn,z,qe),Ue===null?Re=nn:Ue.sibling=nn,Ue=nn);return i&&He.forEach(function(Ki){return s(Y,Ki)}),vt&&ko(Y,qe),Re}function Pe(Y,z,X,ye){var Re=ie(X);if(typeof Re!="function")throw Error(n(150));if(X=Re.call(X),X==null)throw Error(n(151));for(var Ue=Re=null,He=z,qe=z=0,nn=null,ot=X.next();He!==null&&!ot.done;qe++,ot=X.next()){He.index>qe?(nn=He,He=null):nn=He.sibling;var Ki=se(Y,He,ot.value,ye);if(Ki===null){He===null&&(He=nn);break}i&&He&&Ki.alternate===null&&s(Y,He),z=T(Ki,z,qe),Ue===null?Re=Ki:Ue.sibling=Ki,Ue=Ki,He=nn}if(ot.done)return l(Y,He),vt&&ko(Y,qe),Re;if(He===null){for(;!ot.done;qe++,ot=X.next())ot=pe(Y,ot.value,ye),ot!==null&&(z=T(ot,z,qe),Ue===null?Re=ot:Ue.sibling=ot,Ue=ot);return vt&&ko(Y,qe),Re}for(He=h(Y,He);!ot.done;qe++,ot=X.next())ot=xe(He,Y,qe,ot.value,ye),ot!==null&&(i&&ot.alternate!==null&&He.delete(ot.key===null?qe:ot.key),z=T(ot,z,qe),Ue===null?Re=ot:Ue.sibling=ot,Ue=ot);return i&&He.forEach(function(d7){return s(Y,d7)}),vt&&ko(Y,qe),Re}function Ft(Y,z,X,ye){if(typeof X=="object"&&X!==null&&X.type===Q&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case q:e:{for(var Re=X.key,Ue=z;Ue!==null;){if(Ue.key===Re){if(Re=X.type,Re===Q){if(Ue.tag===7){l(Y,Ue.sibling),z=E(Ue,X.props.children),z.return=Y,Y=z;break e}}else if(Ue.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===Me&&cx(Re)===Ue.type){l(Y,Ue.sibling),z=E(Ue,X.props),z.ref=Au(Y,Ue,X),z.return=Y,Y=z;break e}l(Y,Ue);break}else s(Y,Ue);Ue=Ue.sibling}X.type===Q?(z=Mo(X.props.children,Y.mode,ye,X.key),z.return=Y,Y=z):(ye=Td(X.type,X.key,X.props,null,Y.mode,ye),ye.ref=Au(Y,z,X),ye.return=Y,Y=ye)}return x(Y);case D:e:{for(Ue=X.key;z!==null;){if(z.key===Ue)if(z.tag===4&&z.stateNode.containerInfo===X.containerInfo&&z.stateNode.implementation===X.implementation){l(Y,z.sibling),z=E(z,X.children||[]),z.return=Y,Y=z;break e}else{l(Y,z);break}else s(Y,z);z=z.sibling}z=d0(X,Y.mode,ye),z.return=Y,Y=z}return x(Y);case Me:return Ue=X._init,Ft(Y,z,Ue(X._payload),ye)}if(De(X))return ke(Y,z,X,ye);if(ie(X))return Pe(Y,z,X,ye);Xc(Y,X)}return typeof X=="string"&&X!==""||typeof X=="number"?(X=""+X,z!==null&&z.tag===6?(l(Y,z.sibling),z=E(z,X),z.return=Y,Y=z):(l(Y,z),z=c0(X,Y.mode,ye),z.return=Y,Y=z),x(Y)):l(Y,z)}return Ft}var Vs=dx(!0),fx=dx(!1),Kc=Ui(null),Qc=null,qs=null,bm=null;function _m(){bm=qs=Qc=null}function Sm(i){var s=Kc.current;xt(Kc),i._currentValue=s}function xm(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 Ys(i,s){Qc=i,bm=qs=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(Mn=!0),i.firstContext=null)}function ur(i){var s=i._currentValue;if(bm!==i)if(i={context:i,memoizedValue:s,next:null},qs===null){if(Qc===null)throw Error(n(308));qs=i,Qc.dependencies={lanes:0,firstContext:i}}else qs=qs.next=i;return s}var No=null;function wm(i){No===null?No=[i]:No.push(i)}function hx(i,s,l,h){var E=s.interleaved;return E===null?(l.next=l,wm(s)):(l.next=E.next,E.next=l),s.interleaved=l,pi(i,h)}function pi(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 ji=!1;function Cm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function px(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 mi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function $i(i,s,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),h.pending=s,pi(i,l)}return E=h.interleaved,E===null?(s.next=s,wm(h)):(s.next=E.next,E.next=s),h.interleaved=s,pi(i,l)}function Jc(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,Up(i,l)}}function mx(i,s){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,T=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};T===null?E=T=x:T=T.next=x,l=l.next}while(l!==null);T===null?E=T=s:T=T.next=s}else E=T=s;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,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 Zc(i,s,l,h){var E=i.updateQueue;ji=!1;var T=E.firstBaseUpdate,x=E.lastBaseUpdate,R=E.shared.pending;if(R!==null){E.shared.pending=null;var U=R,J=U.next;U.next=null,x===null?T=J:x.next=J,x=U;var ue=i.alternate;ue!==null&&(ue=ue.updateQueue,R=ue.lastBaseUpdate,R!==x&&(R===null?ue.firstBaseUpdate=J:R.next=J,ue.lastBaseUpdate=U))}if(T!==null){var pe=E.baseState;x=0,ue=J=U=null,R=T;do{var se=R.lane,xe=R.eventTime;if((h&se)===se){ue!==null&&(ue=ue.next={eventTime:xe,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var ke=i,Pe=R;switch(se=s,xe=l,Pe.tag){case 1:if(ke=Pe.payload,typeof ke=="function"){pe=ke.call(xe,pe,se);break e}pe=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Pe.payload,se=typeof ke=="function"?ke.call(xe,pe,se):ke,se==null)break e;pe=k({},pe,se);break e;case 2:ji=!0}}R.callback!==null&&R.lane!==0&&(i.flags|=64,se=E.effects,se===null?E.effects=[R]:se.push(R))}else xe={eventTime:xe,lane:se,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ue===null?(J=ue=xe,U=pe):ue=ue.next=xe,x|=se;if(R=R.next,R===null){if(R=E.shared.pending,R===null)break;se=R,R=se.next,se.next=null,E.lastBaseUpdate=se,E.shared.pending=null}}while(!0);if(ue===null&&(U=pe),E.baseState=U,E.firstBaseUpdate=J,E.lastBaseUpdate=ue,s=E.shared.interleaved,s!==null){E=s;do x|=E.lane,E=E.next;while(E!==s)}else T===null&&(E.shared.lanes=0);Io|=x,i.lanes=x,i.memoizedState=pe}}function gx(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var vu={},Xr=Ui(vu),ku=Ui(vu),Nu=Ui(vu);function Po(i){if(i===vu)throw Error(n(174));return i}function Am(i,s){switch(bt(Nu,s),bt(ku,i),bt(Xr,vu),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)}xt(Xr),bt(Xr,s)}function Gs(){xt(Xr),xt(ku),xt(Nu)}function Ex(i){Po(Nu.current);var s=Po(Xr.current),l=oe(s,i.type);s!==l&&(bt(ku,i),bt(Xr,l))}function vm(i){ku.current===i&&(xt(Xr),xt(ku))}var Nt=Ui(0);function ed(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 km=[];function Nm(){for(var i=0;i<km.length;i++)km[i]._workInProgressVersionPrimary=null;km.length=0}var td=B.ReactCurrentDispatcher,Pm=B.ReactCurrentBatchConfig,Oo=0,Pt=null,Gt=null,en=null,nd=!1,Pu=!1,Ou=0,R9=0;function En(){throw Error(n(321))}function Om(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!xr(i[l],s[l]))return!1;return!0}function Im(i,s,l,h,E,T){if(Oo=T,Pt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,td.current=i===null||i.memoizedState===null?F9:B9,i=l(h,E),Pu){T=0;do{if(Pu=!1,Ou=0,25<=T)throw Error(n(301));T+=1,en=Gt=null,s.updateQueue=null,td.current=U9,i=l(h,E)}while(Pu)}if(td.current=od,s=Gt!==null&&Gt.next!==null,Oo=0,en=Gt=Pt=null,nd=!1,s)throw Error(n(300));return i}function Rm(){var i=Ou!==0;return Ou=0,i}function Kr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Pt.memoizedState=en=i:en=en.next=i,en}function lr(){if(Gt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=Gt.next;var s=en===null?Pt.memoizedState:en.next;if(s!==null)en=s,Gt=i;else{if(i===null)throw Error(n(310));Gt=i,i={memoizedState:Gt.memoizedState,baseState:Gt.baseState,baseQueue:Gt.baseQueue,queue:Gt.queue,next:null},en===null?Pt.memoizedState=en=i:en=en.next=i}return en}function Iu(i,s){return typeof s=="function"?s(i):s}function Lm(i){var s=lr(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Gt,E=h.baseQueue,T=l.pending;if(T!==null){if(E!==null){var x=E.next;E.next=T.next,T.next=x}h.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,h=h.baseState;var R=x=null,U=null,J=T;do{var ue=J.lane;if((Oo&ue)===ue)U!==null&&(U=U.next={lane:0,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),h=J.hasEagerState?J.eagerState:i(h,J.action);else{var pe={lane:ue,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null};U===null?(R=U=pe,x=h):U=U.next=pe,Pt.lanes|=ue,Io|=ue}J=J.next}while(J!==null&&J!==T);U===null?x=h:U.next=R,xr(h,s.memoizedState)||(Mn=!0),s.memoizedState=h,s.baseState=x,s.baseQueue=U,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do T=E.lane,Pt.lanes|=T,Io|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Dm(i){var s=lr(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,T=s.memoizedState;if(E!==null){l.pending=null;var x=E=E.next;do T=i(T,x.action),x=x.next;while(x!==E);xr(T,s.memoizedState)||(Mn=!0),s.memoizedState=T,s.baseQueue===null&&(s.baseState=T),l.lastRenderedState=T}return[T,h]}function yx(){}function Tx(i,s){var l=Pt,h=lr(),E=s(),T=!xr(h.memoizedState,E);if(T&&(h.memoizedState=E,Mn=!0),h=h.queue,Mm(Sx.bind(null,l,h,i),[i]),h.getSnapshot!==s||T||en!==null&&en.memoizedState.tag&1){if(l.flags|=2048,Ru(9,_x.bind(null,l,h,E,s),void 0,null),tn===null)throw Error(n(349));(Oo&30)!==0||bx(l,s,E)}return E}function bx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Pt.updateQueue,s===null?(s={lastEffect:null,stores:null},Pt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function _x(i,s,l,h){s.value=l,s.getSnapshot=h,xx(s)&&wx(i)}function Sx(i,s,l){return l(function(){xx(s)&&wx(i)})}function xx(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!xr(i,l)}catch(h){return!0}}function wx(i){var s=pi(i,1);s!==null&&kr(s,i,1,-1)}function Cx(i){var s=Kr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Iu,lastRenderedState:i},s.queue=i,i=i.dispatch=M9.bind(null,Pt,i),[s.memoizedState,i]}function Ru(i,s,l,h){return i={tag:i,create:s,destroy:l,deps:h,next:null},s=Pt.updateQueue,s===null?(s={lastEffect:null,stores:null},Pt.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 Ax(){return lr().memoizedState}function rd(i,s,l,h){var E=Kr();Pt.flags|=i,E.memoizedState=Ru(1|s,l,void 0,h===void 0?null:h)}function id(i,s,l,h){var E=lr();h=h===void 0?null:h;var T=void 0;if(Gt!==null){var x=Gt.memoizedState;if(T=x.destroy,h!==null&&Om(h,x.deps)){E.memoizedState=Ru(s,l,T,h);return}}Pt.flags|=i,E.memoizedState=Ru(1|s,l,T,h)}function vx(i,s){return rd(8390656,8,i,s)}function Mm(i,s){return id(2048,8,i,s)}function kx(i,s){return id(4,2,i,s)}function Nx(i,s){return id(4,4,i,s)}function Px(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 Ox(i,s,l){return l=l!=null?l.concat([i]):null,id(4,4,Px.bind(null,s,i),l)}function Fm(){}function Ix(i,s){var l=lr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Om(s,h[1])?h[0]:(l.memoizedState=[i,s],i)}function Rx(i,s){var l=lr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Om(s,h[1])?h[0]:(i=i(),l.memoizedState=[i,s],i)}function Lx(i,s,l){return(Oo&21)===0?(i.baseState&&(i.baseState=!1,Mn=!0),i.memoizedState=l):(xr(l,s)||(l=cS(),Pt.lanes|=l,Io|=l,i.baseState=!0),s)}function L9(i,s){var l=ct;ct=l!==0&&4>l?l:4,i(!0);var h=Pm.transition;Pm.transition={};try{i(!1),s()}finally{ct=l,Pm.transition=h}}function Dx(){return lr().memoizedState}function D9(i,s,l){var h=Gi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Mx(i))Fx(s,l);else if(l=hx(i,s,l,h),l!==null){var E=An();kr(l,i,h,E),Bx(l,s,h)}}function M9(i,s,l){var h=Gi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Mx(i))Fx(s,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=s.lastRenderedReducer,T!==null))try{var x=s.lastRenderedState,R=T(x,l);if(E.hasEagerState=!0,E.eagerState=R,xr(R,x)){var U=s.interleaved;U===null?(E.next=E,wm(s)):(E.next=U.next,U.next=E),s.interleaved=E;return}}catch(J){}l=hx(i,s,E,h),l!==null&&(E=An(),kr(l,i,h,E),Bx(l,s,h))}}function Mx(i){var s=i.alternate;return i===Pt||s!==null&&s===Pt}function Fx(i,s){Pu=nd=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function Bx(i,s,l){if((l&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,Up(i,l)}}var od={readContext:ur,useCallback:En,useContext:En,useEffect:En,useImperativeHandle:En,useInsertionEffect:En,useLayoutEffect:En,useMemo:En,useReducer:En,useRef:En,useState:En,useDebugValue:En,useDeferredValue:En,useTransition:En,useMutableSource:En,useSyncExternalStore:En,useId:En,unstable_isNewReconciler:!1},F9={readContext:ur,useCallback:function(i,s){return Kr().memoizedState=[i,s===void 0?null:s],i},useContext:ur,useEffect:vx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,rd(4194308,4,Px.bind(null,s,i),l)},useLayoutEffect:function(i,s){return rd(4194308,4,i,s)},useInsertionEffect:function(i,s){return rd(4,2,i,s)},useMemo:function(i,s){var l=Kr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var h=Kr();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=D9.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var s=Kr();return i={current:i},s.memoizedState=i},useState:Cx,useDebugValue:Fm,useDeferredValue:function(i){return Kr().memoizedState=i},useTransition:function(){var i=Cx(!1),s=i[0];return i=L9.bind(null,i[1]),Kr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var h=Pt,E=Kr();if(vt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),tn===null)throw Error(n(349));(Oo&30)!==0||bx(h,s,l)}E.memoizedState=l;var T={value:l,getSnapshot:s};return E.queue=T,vx(Sx.bind(null,h,T,i),[i]),h.flags|=2048,Ru(9,_x.bind(null,h,T,l,s),void 0,null),l},useId:function(){var i=Kr(),s=tn.identifierPrefix;if(vt){var l=hi,h=fi;l=(h&~(1<<32-Sr(h)-1)).toString(32)+l,s=":"+s+"R"+l,l=Ou++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=R9++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},B9={readContext:ur,useCallback:Ix,useContext:ur,useEffect:Mm,useImperativeHandle:Ox,useInsertionEffect:kx,useLayoutEffect:Nx,useMemo:Rx,useReducer:Lm,useRef:Ax,useState:function(){return Lm(Iu)},useDebugValue:Fm,useDeferredValue:function(i){var s=lr();return Lx(s,Gt.memoizedState,i)},useTransition:function(){var i=Lm(Iu)[0],s=lr().memoizedState;return[i,s]},useMutableSource:yx,useSyncExternalStore:Tx,useId:Dx,unstable_isNewReconciler:!1},U9={readContext:ur,useCallback:Ix,useContext:ur,useEffect:Mm,useImperativeHandle:Ox,useInsertionEffect:kx,useLayoutEffect:Nx,useMemo:Rx,useReducer:Dm,useRef:Ax,useState:function(){return Dm(Iu)},useDebugValue:Fm,useDeferredValue:function(i){var s=lr();return Gt===null?s.memoizedState=i:Lx(s,Gt.memoizedState,i)},useTransition:function(){var i=Dm(Iu)[0],s=lr().memoizedState;return[i,s]},useMutableSource:yx,useSyncExternalStore:Tx,useId:Dx,unstable_isNewReconciler:!1};function Cr(i,s){if(i&&i.defaultProps){s=k({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function Bm(i,s,l,h){s=i.memoizedState,l=l(h,s),l=l==null?s:k({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var sd={isMounted:function(i){return(i=i._reactInternals)?wo(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var h=An(),E=Gi(i),T=mi(h,E);T.payload=s,l!=null&&(T.callback=l),s=$i(i,T,E),s!==null&&(kr(s,i,E,h),Jc(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var h=An(),E=Gi(i),T=mi(h,E);T.tag=1,T.payload=s,l!=null&&(T.callback=l),s=$i(i,T,E),s!==null&&(kr(s,i,E,h),Jc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=An(),h=Gi(i),E=mi(l,h);E.tag=2,s!=null&&(E.callback=s),s=$i(i,E,h),s!==null&&(kr(s,i,h,l),Jc(s,i,h))}};function Ux(i,s,l,h,E,T,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,x):s.prototype&&s.prototype.isPureReactComponent?!Tu(l,h)||!Tu(E,T):!0}function Hx(i,s,l){var h=!1,E=Hi,T=s.contextType;return typeof T=="object"&&T!==null?T=ur(T):(E=Dn(s)?Ao:gn.current,h=s.contextTypes,T=(h=h!=null)?Hs(i,E):Hi),s=new s(l,T),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=sd,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),s}function zx(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&&sd.enqueueReplaceState(s,s.state,null)}function Um(i,s,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Cm(i);var T=s.contextType;typeof T=="object"&&T!==null?E.context=ur(T):(T=Dn(s)?Ao:gn.current,E.context=Hs(i,T)),E.state=i.memoizedState,T=s.getDerivedStateFromProps,typeof T=="function"&&(Bm(i,s,T,l),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&sd.enqueueReplaceState(E,E.state,null),Zc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Ws(i,s){try{var l="",h=s;do l+=Oe(h),h=h.return;while(h);var E=l}catch(T){E=`
|
|
13
|
+
`),x=E.length-1,R=T.length-1;1<=x&&0<=R&&E[x]!==T[R];)R--;for(;1<=x&&0<=R;x--,R--)if(E[x]!==T[R]){if(x!==1||R!==1)do if(x--,R--,0>R||E[x]!==T[R]){var H=`
|
|
14
|
+
`+E[x].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=x&&0<=R);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?te(i):""}function Ie(i){switch(i.tag){case 5:return te(i.type);case 16:return te("Lazy");case 13:return te("Suspense");case 19:return te("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 Ae(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 K:return"Fragment";case D:return"Portal";case Te:return"Profiler";case re:return"StrictMode";case he:return"Suspense";case ue:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case Z:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case ce:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case be:return s=i.displayName||null,s!==null?s:Ae(i.type)||"Memo";case Oe:s=i._payload,i=i._init;try{return Ae(i(s))}catch(l){}}return null}function $e(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 Ae(s);case 8:return s===re?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function we(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function We(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ht(i){var s=We(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,T=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,T.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 on(i){i._valueTracker||(i._valueTracker=ht(i))}function qr(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return i&&(h=We(i)?i.checked?"true":"false":i.value),i=h,i!==l?(s.setValue(i),!0):!1}function _r(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function Rn(i,s){var l=s.checked;return k({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function xo(i,s){var l=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;l=we(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 Ii(i,s){s=s.checked,s!=null&&A(i,"checked",s,!1)}function li(i,s){Ii(i,s);var l=we(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")?Fe(i,s.type,l):s.hasOwnProperty("defaultValue")&&Fe(i,s.type,we(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function ve(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 Fe(i,s,l){(s!=="number"||_r(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Me=Array.isArray;function Qe(i,s,l,h){if(i=i.options,s){s={};for(var E=0;E<l.length;E++)s["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=s.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+we(l),s=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function dt(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function lt(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(Me(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:we(l)}}function wn(i,s){var l=we(s.value),h=we(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 ne(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"?ne(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Re,Ve=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(s,l,h,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(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 Xe(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Tt={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},ir=["Webkit","ms","Moz","O"];Object.keys(Tt).forEach(function(i){ir.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Tt[s]=Tt[i]})});function or(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Tt.hasOwnProperty(i)&&Tt[i]?(""+s).trim():s+"px"}function Ri(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=or(l,s[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var wo=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function sn(i,s){if(s){if(wo[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 Yr(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 qn=null;function Op(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ip=null,Ns=null,Ps=null;function Q_(i){if(i=Au(i)){if(typeof Ip!="function")throw Error(n(280));var s=i.stateNode;s&&(s=jc(s),Ip(i.stateNode,i.type,s))}}function J_(i){Ns?Ps?Ps.push(i):Ps=[i]:Ns=i}function Z_(){if(Ns){var i=Ns,s=Ps;if(Ps=Ns=null,Q_(i),s)for(i=0;i<s.length;i++)Q_(s[i])}}function eS(i,s){return i(s)}function tS(){}var Rp=!1;function nS(i,s,l){if(Rp)return i(s,l);Rp=!0;try{return eS(i,s,l)}finally{Rp=!1,(Ns!==null||Ps!==null)&&(tS(),Z_())}}function iu(i,s){var l=i.stateNode;if(l===null)return null;var h=jc(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 Lp=!1;if(c)try{var ou={};Object.defineProperty(ou,"passive",{get:function(){Lp=!0}}),window.addEventListener("test",ou,ou),window.removeEventListener("test",ou,ou)}catch(i){Lp=!1}function TB(i,s,l,h,E,T,x,R,H){var J=Array.prototype.slice.call(arguments,3);try{s.apply(l,J)}catch(le){this.onError(le)}}var su=!1,bc=null,_c=!1,Dp=null,bB={onError:function(i){su=!0,bc=i}};function _B(i,s,l,h,E,T,x,R,H){su=!1,bc=null,TB.apply(bB,arguments)}function SB(i,s,l,h,E,T,x,R,H){if(_B.apply(this,arguments),su){if(su){var J=bc;su=!1,bc=null}else throw Error(n(198));_c||(_c=!0,Dp=J)}}function Ao(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 rS(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 iS(i){if(Ao(i)!==i)throw Error(n(188))}function xB(i){var s=i.alternate;if(!s){if(s=Ao(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,h=s;;){var E=l.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===l)return iS(E),i;if(T===h)return iS(E),s;T=T.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=T;else{for(var x=!1,R=E.child;R;){if(R===l){x=!0,l=E,h=T;break}if(R===h){x=!0,h=E,l=T;break}R=R.sibling}if(!x){for(R=T.child;R;){if(R===l){x=!0,l=T,h=E;break}if(R===h){x=!0,h=T,l=E;break}R=R.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function oS(i){return i=xB(i),i!==null?sS(i):null}function sS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=sS(i);if(s!==null)return s;i=i.sibling}return null}var aS=t.unstable_scheduleCallback,uS=t.unstable_cancelCallback,wB=t.unstable_shouldYield,AB=t.unstable_requestPaint,Dt=t.unstable_now,CB=t.unstable_getCurrentPriorityLevel,Mp=t.unstable_ImmediatePriority,lS=t.unstable_UserBlockingPriority,Sc=t.unstable_NormalPriority,vB=t.unstable_LowPriority,cS=t.unstable_IdlePriority,xc=null,Gr=null;function kB(i){if(Gr&&typeof Gr.onCommitFiberRoot=="function")try{Gr.onCommitFiberRoot(xc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Sr=Math.clz32?Math.clz32:OB,NB=Math.log,PB=Math.LN2;function OB(i){return i>>>=0,i===0?32:31-(NB(i)/PB|0)|0}var wc=64,Ac=4194304;function au(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Cc(i,s){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,x=l&268435455;if(x!==0){var R=x&~E;R!==0?h=au(R):(T&=x,T!==0&&(h=au(T)))}else x=l&~E,x!==0?h=au(x):T!==0&&(h=au(T));if(h===0)return 0;if(s!==0&&s!==h&&(s&E)===0&&(E=h&-h,T=s&-s,E>=T||E===16&&(T&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-Sr(s),E=1<<l,h|=i[l],s&=~E;return h}function IB(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 RB(i,s){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var x=31-Sr(T),R=1<<x,H=E[x];H===-1?((R&l)===0||(R&h)!==0)&&(E[x]=IB(R,s)):H<=s&&(i.expiredLanes|=R),T&=~R}}function Fp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function dS(){var i=wc;return wc<<=1,(wc&4194240)===0&&(wc=64),i}function Bp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function uu(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Sr(s),i[s]=l}function LB(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Sr(l),T=1<<E;s[E]=0,h[E]=-1,i[E]=-1,l&=~T}}function Up(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var h=31-Sr(l),E=1<<h;E&s|i[h]&s&&(i[h]|=s),l&=~E}}var ct=0;function fS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var hS,Hp,pS,mS,gS,zp=!1,vc=[],Li=null,Di=null,Mi=null,lu=new Map,cu=new Map,Fi=[],DB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ES(i,s){switch(i){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":lu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":cu.delete(s.pointerId)}}function du(i,s,l,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},s!==null&&(s=Au(s),s!==null&&Hp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function MB(i,s,l,h,E){switch(s){case"focusin":return Li=du(Li,i,s,l,h,E),!0;case"dragenter":return Di=du(Di,i,s,l,h,E),!0;case"mouseover":return Mi=du(Mi,i,s,l,h,E),!0;case"pointerover":var T=E.pointerId;return lu.set(T,du(lu.get(T)||null,i,s,l,h,E)),!0;case"gotpointercapture":return T=E.pointerId,cu.set(T,du(cu.get(T)||null,i,s,l,h,E)),!0}return!1}function yS(i){var s=Co(i.target);if(s!==null){var l=Ao(s);if(l!==null){if(s=l.tag,s===13){if(s=rS(l),s!==null){i.blockedOn=s,gS(i.priority,function(){pS(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function kc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=$p(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);qn=h,l.target.dispatchEvent(h),qn=null}else return s=Au(l),s!==null&&Hp(s),i.blockedOn=l,!1;s.shift()}return!0}function TS(i,s,l){kc(i)&&l.delete(s)}function FB(){zp=!1,Li!==null&&kc(Li)&&(Li=null),Di!==null&&kc(Di)&&(Di=null),Mi!==null&&kc(Mi)&&(Mi=null),lu.forEach(TS),cu.forEach(TS)}function fu(i,s){i.blockedOn===s&&(i.blockedOn=null,zp||(zp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,FB)))}function hu(i){function s(E){return fu(E,i)}if(0<vc.length){fu(vc[0],i);for(var l=1;l<vc.length;l++){var h=vc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Li!==null&&fu(Li,i),Di!==null&&fu(Di,i),Mi!==null&&fu(Mi,i),lu.forEach(s),cu.forEach(s),l=0;l<Fi.length;l++)h=Fi[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Fi.length&&(l=Fi[0],l.blockedOn===null);)yS(l),l.blockedOn===null&&Fi.shift()}var Os=M.ReactCurrentBatchConfig,Nc=!0;function BB(i,s,l,h){var E=ct,T=Os.transition;Os.transition=null;try{ct=1,jp(i,s,l,h)}finally{ct=E,Os.transition=T}}function UB(i,s,l,h){var E=ct,T=Os.transition;Os.transition=null;try{ct=4,jp(i,s,l,h)}finally{ct=E,Os.transition=T}}function jp(i,s,l,h){if(Nc){var E=$p(i,s,l,h);if(E===null)sm(i,s,h,Pc,l),ES(i,h);else if(MB(E,i,s,l,h))h.stopPropagation();else if(ES(i,h),s&4&&-1<DB.indexOf(i)){for(;E!==null;){var T=Au(E);if(T!==null&&hS(T),T=$p(i,s,l,h),T===null&&sm(i,s,h,Pc,l),T===E)break;E=T}E!==null&&h.stopPropagation()}else sm(i,s,h,null,l)}}var Pc=null;function $p(i,s,l,h){if(Pc=null,i=Op(h),i=Co(i),i!==null)if(s=Ao(i),s===null)i=null;else if(l=s.tag,l===13){if(i=rS(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 Pc=i,null}function bS(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(CB()){case Mp:return 1;case lS:return 4;case Sc:case vB:return 16;case cS:return 536870912;default:return 16}default:return 16}}var Bi=null,Vp=null,Oc=null;function _S(){if(Oc)return Oc;var i,s=Vp,l=s.length,h,E="value"in Bi?Bi.value:Bi.textContent,T=E.length;for(i=0;i<l&&s[i]===E[i];i++);var x=l-i;for(h=1;h<=x&&s[l-h]===E[T-h];h++);return Oc=E.slice(i,1<h?1-h:void 0)}function Ic(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 Rc(){return!0}function SS(){return!1}function Yn(i){function s(l,h,E,T,x){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=x,this.currentTarget=null;for(var R in i)i.hasOwnProperty(R)&&(l=i[R],this[R]=l?l(T):T[R]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Rc:SS,this.isPropagationStopped=SS,this}return k(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Rc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Rc)},persist:function(){},isPersistent:Rc}),s}var Is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qp=Yn(Is),pu=k({},Is,{view:0,detail:0}),HB=Yn(pu),Yp,Gp,mu,Lc=k({},pu,{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!==mu&&(mu&&i.type==="mousemove"?(Yp=i.screenX-mu.screenX,Gp=i.screenY-mu.screenY):Gp=Yp=0,mu=i),Yp)},movementY:function(i){return"movementY"in i?i.movementY:Gp}}),xS=Yn(Lc),zB=k({},Lc,{dataTransfer:0}),jB=Yn(zB),$B=k({},pu,{relatedTarget:0}),Wp=Yn($B),VB=k({},Is,{animationName:0,elapsedTime:0,pseudoElement:0}),qB=Yn(VB),YB=k({},Is,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),GB=Yn(YB),WB=k({},Is,{data:0}),wS=Yn(WB),XB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},KB={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"},QB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function JB(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=QB[i])?!!s[i]:!1}function Xp(){return JB}var ZB=k({},pu,{key:function(i){if(i.key){var s=XB[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Ic(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?KB[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"?Ic(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ic(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),e9=Yn(ZB),t9=k({},Lc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),AS=Yn(t9),n9=k({},pu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xp}),r9=Yn(n9),i9=k({},Is,{propertyName:0,elapsedTime:0,pseudoElement:0}),o9=Yn(i9),s9=k({},Lc,{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}),a9=Yn(s9),u9=[9,13,27,32],Kp=c&&"CompositionEvent"in window,gu=null;c&&"documentMode"in document&&(gu=document.documentMode);var l9=c&&"TextEvent"in window&&!gu,CS=c&&(!Kp||gu&&8<gu&&11>=gu),vS=" ",kS=!1;function NS(i,s){switch(i){case"keyup":return u9.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Rs=!1;function c9(i,s){switch(i){case"compositionend":return PS(s);case"keypress":return s.which!==32?null:(kS=!0,vS);case"textInput":return i=s.data,i===vS&&kS?null:i;default:return null}}function d9(i,s){if(Rs)return i==="compositionend"||!Kp&&NS(i,s)?(i=_S(),Oc=Vp=Bi=null,Rs=!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 CS&&s.locale!=="ko"?null:s.data;default:return null}}var f9={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function OS(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!f9[i.type]:s==="textarea"}function IS(i,s,l,h){J_(h),s=Uc(s,"onChange"),0<s.length&&(l=new qp("onChange","change",null,l,h),i.push({event:l,listeners:s}))}var Eu=null,yu=null;function h9(i){KS(i,0)}function Dc(i){var s=Bs(i);if(qr(s))return i}function p9(i,s){if(i==="change")return s}var RS=!1;if(c){var Qp;if(c){var Jp="oninput"in document;if(!Jp){var LS=document.createElement("div");LS.setAttribute("oninput","return;"),Jp=typeof LS.oninput=="function"}Qp=Jp}else Qp=!1;RS=Qp&&(!document.documentMode||9<document.documentMode)}function DS(){Eu&&(Eu.detachEvent("onpropertychange",MS),yu=Eu=null)}function MS(i){if(i.propertyName==="value"&&Dc(yu)){var s=[];IS(s,yu,i,Op(i)),nS(h9,s)}}function m9(i,s,l){i==="focusin"?(DS(),Eu=s,yu=l,Eu.attachEvent("onpropertychange",MS)):i==="focusout"&&DS()}function g9(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Dc(yu)}function E9(i,s){if(i==="click")return Dc(s)}function y9(i,s){if(i==="input"||i==="change")return Dc(s)}function T9(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var xr=typeof Object.is=="function"?Object.is:T9;function Tu(i,s){if(xr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(s,E)||!xr(i[E],s[E]))return!1}return!0}function FS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function BS(i,s){var l=FS(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=FS(l)}}function US(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?US(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function HS(){for(var i=window,s=_r();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=_r(i.document)}return s}function Zp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function b9(i){var s=HS(),l=i.focusedElem,h=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&US(l.ownerDocument.documentElement,l)){if(h!==null&&Zp(l)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=BS(l,T);var x=BS(l,h);E&&x&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),T>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 _9=c&&"documentMode"in document&&11>=document.documentMode,Ls=null,em=null,bu=null,tm=!1;function zS(i,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;tm||Ls==null||Ls!==_r(h)||(h=Ls,"selectionStart"in h&&Zp(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}),bu&&Tu(bu,h)||(bu=h,h=Uc(em,"onSelect"),0<h.length&&(s=new qp("onSelect","select",null,s,l),i.push({event:s,listeners:h}),s.target=Ls)))}function Mc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var Ds={animationend:Mc("Animation","AnimationEnd"),animationiteration:Mc("Animation","AnimationIteration"),animationstart:Mc("Animation","AnimationStart"),transitionend:Mc("Transition","TransitionEnd")},nm={},jS={};c&&(jS=document.createElement("div").style,"AnimationEvent"in window||(delete Ds.animationend.animation,delete Ds.animationiteration.animation,delete Ds.animationstart.animation),"TransitionEvent"in window||delete Ds.transitionend.transition);function Fc(i){if(nm[i])return nm[i];if(!Ds[i])return i;var s=Ds[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in jS)return nm[i]=s[l];return i}var $S=Fc("animationend"),VS=Fc("animationiteration"),qS=Fc("animationstart"),YS=Fc("transitionend"),GS=new Map,WS="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 Ui(i,s){GS.set(i,s),a(s,[i])}for(var rm=0;rm<WS.length;rm++){var im=WS[rm],S9=im.toLowerCase(),x9=im[0].toUpperCase()+im.slice(1);Ui(S9,"on"+x9)}Ui($S,"onAnimationEnd"),Ui(VS,"onAnimationIteration"),Ui(qS,"onAnimationStart"),Ui("dblclick","onDoubleClick"),Ui("focusin","onFocus"),Ui("focusout","onBlur"),Ui(YS,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _u="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),w9=new Set("cancel close invalid load scroll toggle".split(" ").concat(_u));function XS(i,s,l){var h=i.type||"unknown-event";i.currentTarget=l,SB(h,s,void 0,i),i.currentTarget=null}function KS(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var T=void 0;if(s)for(var x=h.length-1;0<=x;x--){var R=h[x],H=R.instance,J=R.currentTarget;if(R=R.listener,H!==T&&E.isPropagationStopped())break e;XS(E,R,J),T=H}else for(x=0;x<h.length;x++){if(R=h[x],H=R.instance,J=R.currentTarget,R=R.listener,H!==T&&E.isPropagationStopped())break e;XS(E,R,J),T=H}}}if(_c)throw i=Dp,_c=!1,Dp=null,i}function St(i,s){var l=s[fm];l===void 0&&(l=s[fm]=new Set);var h=i+"__bubble";l.has(h)||(QS(s,i,2,!1),l.add(h))}function om(i,s,l){var h=0;s&&(h|=4),QS(l,i,h,s)}var Bc="_reactListening"+Math.random().toString(36).slice(2);function Su(i){if(!i[Bc]){i[Bc]=!0,r.forEach(function(l){l!=="selectionchange"&&(w9.has(l)||om(l,!1,i),om(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Bc]||(s[Bc]=!0,om("selectionchange",!1,s))}}function QS(i,s,l,h){switch(bS(s)){case 1:var E=BB;break;case 4:E=UB;break;default:E=jp}l=E.bind(null,s,l,i),E=void 0,!Lp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(s,l,{capture:!0,passive:E}):i.addEventListener(s,l,!0):E!==void 0?i.addEventListener(s,l,{passive:E}):i.addEventListener(s,l,!1)}function sm(i,s,l,h,E){var T=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 R=h.stateNode.containerInfo;if(R===E||R.nodeType===8&&R.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var H=x.tag;if((H===3||H===4)&&(H=x.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;x=x.return}for(;R!==null;){if(x=Co(R),x===null)return;if(H=x.tag,H===5||H===6){h=T=x;continue e}R=R.parentNode}}h=h.return}nS(function(){var J=T,le=Op(l),pe=[];e:{var se=GS.get(i);if(se!==void 0){var xe=qp,ke=i;switch(i){case"keypress":if(Ic(l)===0)break e;case"keydown":case"keyup":xe=e9;break;case"focusin":ke="focus",xe=Wp;break;case"focusout":ke="blur",xe=Wp;break;case"beforeblur":case"afterblur":xe=Wp;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=xS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=jB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=r9;break;case $S:case VS:case qS:xe=qB;break;case YS:xe=o9;break;case"scroll":xe=HB;break;case"wheel":xe=a9;break;case"copy":case"cut":case"paste":xe=GB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=AS}var Pe=(s&4)!==0,Mt=!Pe&&i==="scroll",Y=Pe?se!==null?se+"Capture":null:se;Pe=[];for(var z=J,X;z!==null;){X=z;var ye=X.stateNode;if(X.tag===5&&ye!==null&&(X=ye,Y!==null&&(ye=iu(z,Y),ye!=null&&Pe.push(xu(z,ye,X)))),Mt)break;z=z.return}0<Pe.length&&(se=new xe(se,ke,null,l,le),pe.push({event:se,listeners:Pe}))}}if((s&7)===0){e:{if(se=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",se&&l!==qn&&(ke=l.relatedTarget||l.fromElement)&&(Co(ke)||ke[ci]))break e;if((xe||se)&&(se=le.window===le?le:(se=le.ownerDocument)?se.defaultView||se.parentWindow:window,xe?(ke=l.relatedTarget||l.toElement,xe=J,ke=ke?Co(ke):null,ke!==null&&(Mt=Ao(ke),ke!==Mt||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(xe=null,ke=J),xe!==ke)){if(Pe=xS,ye="onMouseLeave",Y="onMouseEnter",z="mouse",(i==="pointerout"||i==="pointerover")&&(Pe=AS,ye="onPointerLeave",Y="onPointerEnter",z="pointer"),Mt=xe==null?se:Bs(xe),X=ke==null?se:Bs(ke),se=new Pe(ye,z+"leave",xe,l,le),se.target=Mt,se.relatedTarget=X,ye=null,Co(le)===J&&(Pe=new Pe(Y,z+"enter",ke,l,le),Pe.target=X,Pe.relatedTarget=Mt,ye=Pe),Mt=ye,xe&&ke)t:{for(Pe=xe,Y=ke,z=0,X=Pe;X;X=Ms(X))z++;for(X=0,ye=Y;ye;ye=Ms(ye))X++;for(;0<z-X;)Pe=Ms(Pe),z--;for(;0<X-z;)Y=Ms(Y),X--;for(;z--;){if(Pe===Y||Y!==null&&Pe===Y.alternate)break t;Pe=Ms(Pe),Y=Ms(Y)}Pe=null}else Pe=null;xe!==null&&JS(pe,se,xe,Pe,!1),ke!==null&&Mt!==null&&JS(pe,Mt,ke,Pe,!0)}}e:{if(se=J?Bs(J):window,xe=se.nodeName&&se.nodeName.toLowerCase(),xe==="select"||xe==="input"&&se.type==="file")var Le=p9;else if(OS(se))if(RS)Le=y9;else{Le=g9;var Ue=m9}else(xe=se.nodeName)&&xe.toLowerCase()==="input"&&(se.type==="checkbox"||se.type==="radio")&&(Le=E9);if(Le&&(Le=Le(i,J))){IS(pe,Le,l,le);break e}Ue&&Ue(i,se,J),i==="focusout"&&(Ue=se._wrapperState)&&Ue.controlled&&se.type==="number"&&Fe(se,"number",se.value)}switch(Ue=J?Bs(J):window,i){case"focusin":(OS(Ue)||Ue.contentEditable==="true")&&(Ls=Ue,em=J,bu=null);break;case"focusout":bu=em=Ls=null;break;case"mousedown":tm=!0;break;case"contextmenu":case"mouseup":case"dragend":tm=!1,zS(pe,l,le);break;case"selectionchange":if(_9)break;case"keydown":case"keyup":zS(pe,l,le)}var He;if(Kp)e:{switch(i){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else Rs?NS(i,l)&&(qe="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(qe="onCompositionStart");qe&&(CS&&l.locale!=="ko"&&(Rs||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Rs&&(He=_S()):(Bi=le,Vp="value"in Bi?Bi.value:Bi.textContent,Rs=!0)),Ue=Uc(J,qe),0<Ue.length&&(qe=new wS(qe,i,null,l,le),pe.push({event:qe,listeners:Ue}),He?qe.data=He:(He=PS(l),He!==null&&(qe.data=He)))),(He=l9?c9(i,l):d9(i,l))&&(J=Uc(J,"onBeforeInput"),0<J.length&&(le=new wS("onBeforeInput","beforeinput",null,l,le),pe.push({event:le,listeners:J}),le.data=He))}KS(pe,s)})}function xu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Uc(i,s){for(var l=s+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=iu(i,l),T!=null&&h.unshift(xu(i,T,E)),T=iu(i,s),T!=null&&h.push(xu(i,T,E))),i=i.return}return h}function Ms(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function JS(i,s,l,h,E){for(var T=s._reactName,x=[];l!==null&&l!==h;){var R=l,H=R.alternate,J=R.stateNode;if(H!==null&&H===h)break;R.tag===5&&J!==null&&(R=J,E?(H=iu(l,T),H!=null&&x.unshift(xu(l,H,R))):E||(H=iu(l,T),H!=null&&x.push(xu(l,H,R)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var A9=/\r\n?/g,C9=/\u0000|\uFFFD/g;function ZS(i){return(typeof i=="string"?i:""+i).replace(A9,`
|
|
15
|
+
`).replace(C9,"")}function Hc(i,s,l){if(s=ZS(s),ZS(i)!==s&&l)throw Error(n(425))}function zc(){}var am=null,um=null;function lm(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 cm=typeof setTimeout=="function"?setTimeout:void 0,v9=typeof clearTimeout=="function"?clearTimeout:void 0,ex=typeof Promise=="function"?Promise:void 0,k9=typeof queueMicrotask=="function"?queueMicrotask:typeof ex!="undefined"?function(i){return ex.resolve(null).then(i).catch(N9)}:cm;function N9(i){setTimeout(function(){throw i})}function dm(i,s){var l=s,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),hu(s);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);hu(s)}function Hi(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 tx(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 Fs=Math.random().toString(36).slice(2),Wr="__reactFiber$"+Fs,wu="__reactProps$"+Fs,ci="__reactContainer$"+Fs,fm="__reactEvents$"+Fs,P9="__reactListeners$"+Fs,O9="__reactHandles$"+Fs;function Co(i){var s=i[Wr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[ci]||l[Wr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=tx(i);i!==null;){if(l=i[Wr])return l;i=tx(i)}return s}i=l,l=i.parentNode}return null}function Au(i){return i=i[Wr]||i[ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Bs(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function jc(i){return i[wu]||null}var hm=[],Us=-1;function zi(i){return{current:i}}function xt(i){0>Us||(i.current=hm[Us],hm[Us]=null,Us--)}function bt(i,s){Us++,hm[Us]=i.current,i.current=s}var ji={},gn=zi(ji),Ln=zi(!1),vo=ji;function Hs(i,s){var l=i.type.contextTypes;if(!l)return ji;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in l)E[T]=s[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function Dn(i){return i=i.childContextTypes,i!=null}function $c(){xt(Ln),xt(gn)}function nx(i,s,l){if(gn.current!==ji)throw Error(n(168));bt(gn,s),bt(Ln,l)}function rx(i,s,l){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in s))throw Error(n(108,$e(i)||"Unknown",E));return k({},l,h)}function Vc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||ji,vo=gn.current,bt(gn,i),bt(Ln,Ln.current),!0}function ix(i,s,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=rx(i,s,vo),h.__reactInternalMemoizedMergedChildContext=i,xt(Ln),xt(gn),bt(gn,i)):xt(Ln),bt(Ln,l)}var di=null,qc=!1,pm=!1;function ox(i){di===null?di=[i]:di.push(i)}function I9(i){qc=!0,ox(i)}function $i(){if(!pm&&di!==null){pm=!0;var i=0,s=ct;try{var l=di;for(ct=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}di=null,qc=!1}catch(E){throw di!==null&&(di=di.slice(i+1)),aS(Mp,$i),E}finally{ct=s,pm=!1}}return null}var zs=[],js=0,Yc=null,Gc=0,sr=[],ar=0,ko=null,fi=1,hi="";function No(i,s){zs[js++]=Gc,zs[js++]=Yc,Yc=i,Gc=s}function sx(i,s,l){sr[ar++]=fi,sr[ar++]=hi,sr[ar++]=ko,ko=i;var h=fi;i=hi;var E=32-Sr(h)-1;h&=~(1<<E),l+=1;var T=32-Sr(s)+E;if(30<T){var x=E-E%5;T=(h&(1<<x)-1).toString(32),h>>=x,E-=x,fi=1<<32-Sr(s)+E|l<<E|h,hi=T+i}else fi=1<<T|l<<E|h,hi=i}function mm(i){i.return!==null&&(No(i,1),sx(i,1,0))}function gm(i){for(;i===Yc;)Yc=zs[--js],zs[js]=null,Gc=zs[--js],zs[js]=null;for(;i===ko;)ko=sr[--ar],sr[ar]=null,hi=sr[--ar],sr[ar]=null,fi=sr[--ar],sr[ar]=null}var Gn=null,Wn=null,vt=!1,wr=null;function ax(i,s){var l=dr(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 ux(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,Gn=i,Wn=Hi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Gn=i,Wn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=ko!==null?{id:fi,overflow:hi}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=dr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Gn=i,Wn=null,!0):!1;default:return!1}}function Em(i){return(i.mode&1)!==0&&(i.flags&128)===0}function ym(i){if(vt){var s=Wn;if(s){var l=s;if(!ux(i,s)){if(Em(i))throw Error(n(418));s=Hi(l.nextSibling);var h=Gn;s&&ux(i,s)?ax(h,l):(i.flags=i.flags&-4097|2,vt=!1,Gn=i)}}else{if(Em(i))throw Error(n(418));i.flags=i.flags&-4097|2,vt=!1,Gn=i}}}function lx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Gn=i}function Wc(i){if(i!==Gn)return!1;if(!vt)return lx(i),vt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!lm(i.type,i.memoizedProps)),s&&(s=Wn)){if(Em(i))throw cx(),Error(n(418));for(;s;)ax(i,s),s=Hi(s.nextSibling)}if(lx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){Wn=Hi(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Wn=null}}else Wn=Gn?Hi(i.stateNode.nextSibling):null;return!0}function cx(){for(var i=Wn;i;)i=Hi(i.nextSibling)}function $s(){Wn=Gn=null,vt=!1}function Tm(i){wr===null?wr=[i]:wr.push(i)}var R9=M.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 E=h,T=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===T?s.ref:(s=function(x){var R=E.refs;x===null?delete R[T]:R[T]=x},s._stringRef=T,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Xc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function dx(i){var s=i._init;return s(i._payload)}function fx(i){function s(Y,z){if(i){var X=Y.deletions;X===null?(Y.deletions=[z],Y.flags|=16):X.push(z)}}function l(Y,z){if(!i)return null;for(;z!==null;)s(Y,z),z=z.sibling;return null}function h(Y,z){for(Y=new Map;z!==null;)z.key!==null?Y.set(z.key,z):Y.set(z.index,z),z=z.sibling;return Y}function E(Y,z){return Y=Qi(Y,z),Y.index=0,Y.sibling=null,Y}function T(Y,z,X){return Y.index=X,i?(X=Y.alternate,X!==null?(X=X.index,X<z?(Y.flags|=2,z):X):(Y.flags|=2,z)):(Y.flags|=1048576,z)}function x(Y){return i&&Y.alternate===null&&(Y.flags|=2),Y}function R(Y,z,X,ye){return z===null||z.tag!==6?(z=c0(X,Y.mode,ye),z.return=Y,z):(z=E(z,X),z.return=Y,z)}function H(Y,z,X,ye){var Le=X.type;return Le===K?le(Y,z,X.props.children,ye,X.key):z!==null&&(z.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===Oe&&dx(Le)===z.type)?(ye=E(z,X.props),ye.ref=Cu(Y,z,X),ye.return=Y,ye):(ye=Td(X.type,X.key,X.props,null,Y.mode,ye),ye.ref=Cu(Y,z,X),ye.return=Y,ye)}function J(Y,z,X,ye){return z===null||z.tag!==4||z.stateNode.containerInfo!==X.containerInfo||z.stateNode.implementation!==X.implementation?(z=d0(X,Y.mode,ye),z.return=Y,z):(z=E(z,X.children||[]),z.return=Y,z)}function le(Y,z,X,ye,Le){return z===null||z.tag!==7?(z=Fo(X,Y.mode,ye,Le),z.return=Y,z):(z=E(z,X),z.return=Y,z)}function pe(Y,z,X){if(typeof z=="string"&&z!==""||typeof z=="number")return z=c0(""+z,Y.mode,X),z.return=Y,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case V:return X=Td(z.type,z.key,z.props,null,Y.mode,X),X.ref=Cu(Y,null,z),X.return=Y,X;case D:return z=d0(z,Y.mode,X),z.return=Y,z;case Oe:var ye=z._init;return pe(Y,ye(z._payload),X)}if(Me(z)||ie(z))return z=Fo(z,Y.mode,X,null),z.return=Y,z;Xc(Y,z)}return null}function se(Y,z,X,ye){var Le=z!==null?z.key:null;if(typeof X=="string"&&X!==""||typeof X=="number")return Le!==null?null:R(Y,z,""+X,ye);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case V:return X.key===Le?H(Y,z,X,ye):null;case D:return X.key===Le?J(Y,z,X,ye):null;case Oe:return Le=X._init,se(Y,z,Le(X._payload),ye)}if(Me(X)||ie(X))return Le!==null?null:le(Y,z,X,ye,null);Xc(Y,X)}return null}function xe(Y,z,X,ye,Le){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return Y=Y.get(X)||null,R(z,Y,""+ye,Le);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case V:return Y=Y.get(ye.key===null?X:ye.key)||null,H(z,Y,ye,Le);case D:return Y=Y.get(ye.key===null?X:ye.key)||null,J(z,Y,ye,Le);case Oe:var Ue=ye._init;return xe(Y,z,X,Ue(ye._payload),Le)}if(Me(ye)||ie(ye))return Y=Y.get(X)||null,le(z,Y,ye,Le,null);Xc(z,ye)}return null}function ke(Y,z,X,ye){for(var Le=null,Ue=null,He=z,qe=z=0,nn=null;He!==null&&qe<X.length;qe++){He.index>qe?(nn=He,He=null):nn=He.sibling;var ot=se(Y,He,X[qe],ye);if(ot===null){He===null&&(He=nn);break}i&&He&&ot.alternate===null&&s(Y,He),z=T(ot,z,qe),Ue===null?Le=ot:Ue.sibling=ot,Ue=ot,He=nn}if(qe===X.length)return l(Y,He),vt&&No(Y,qe),Le;if(He===null){for(;qe<X.length;qe++)He=pe(Y,X[qe],ye),He!==null&&(z=T(He,z,qe),Ue===null?Le=He:Ue.sibling=He,Ue=He);return vt&&No(Y,qe),Le}for(He=h(Y,He);qe<X.length;qe++)nn=xe(He,Y,qe,X[qe],ye),nn!==null&&(i&&nn.alternate!==null&&He.delete(nn.key===null?qe:nn.key),z=T(nn,z,qe),Ue===null?Le=nn:Ue.sibling=nn,Ue=nn);return i&&He.forEach(function(Ji){return s(Y,Ji)}),vt&&No(Y,qe),Le}function Pe(Y,z,X,ye){var Le=ie(X);if(typeof Le!="function")throw Error(n(150));if(X=Le.call(X),X==null)throw Error(n(151));for(var Ue=Le=null,He=z,qe=z=0,nn=null,ot=X.next();He!==null&&!ot.done;qe++,ot=X.next()){He.index>qe?(nn=He,He=null):nn=He.sibling;var Ji=se(Y,He,ot.value,ye);if(Ji===null){He===null&&(He=nn);break}i&&He&&Ji.alternate===null&&s(Y,He),z=T(Ji,z,qe),Ue===null?Le=Ji:Ue.sibling=Ji,Ue=Ji,He=nn}if(ot.done)return l(Y,He),vt&&No(Y,qe),Le;if(He===null){for(;!ot.done;qe++,ot=X.next())ot=pe(Y,ot.value,ye),ot!==null&&(z=T(ot,z,qe),Ue===null?Le=ot:Ue.sibling=ot,Ue=ot);return vt&&No(Y,qe),Le}for(He=h(Y,He);!ot.done;qe++,ot=X.next())ot=xe(He,Y,qe,ot.value,ye),ot!==null&&(i&&ot.alternate!==null&&He.delete(ot.key===null?qe:ot.key),z=T(ot,z,qe),Ue===null?Le=ot:Ue.sibling=ot,Ue=ot);return i&&He.forEach(function(f7){return s(Y,f7)}),vt&&No(Y,qe),Le}function Mt(Y,z,X,ye){if(typeof X=="object"&&X!==null&&X.type===K&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case V:e:{for(var Le=X.key,Ue=z;Ue!==null;){if(Ue.key===Le){if(Le=X.type,Le===K){if(Ue.tag===7){l(Y,Ue.sibling),z=E(Ue,X.props.children),z.return=Y,Y=z;break e}}else if(Ue.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===Oe&&dx(Le)===Ue.type){l(Y,Ue.sibling),z=E(Ue,X.props),z.ref=Cu(Y,Ue,X),z.return=Y,Y=z;break e}l(Y,Ue);break}else s(Y,Ue);Ue=Ue.sibling}X.type===K?(z=Fo(X.props.children,Y.mode,ye,X.key),z.return=Y,Y=z):(ye=Td(X.type,X.key,X.props,null,Y.mode,ye),ye.ref=Cu(Y,z,X),ye.return=Y,Y=ye)}return x(Y);case D:e:{for(Ue=X.key;z!==null;){if(z.key===Ue)if(z.tag===4&&z.stateNode.containerInfo===X.containerInfo&&z.stateNode.implementation===X.implementation){l(Y,z.sibling),z=E(z,X.children||[]),z.return=Y,Y=z;break e}else{l(Y,z);break}else s(Y,z);z=z.sibling}z=d0(X,Y.mode,ye),z.return=Y,Y=z}return x(Y);case Oe:return Ue=X._init,Mt(Y,z,Ue(X._payload),ye)}if(Me(X))return ke(Y,z,X,ye);if(ie(X))return Pe(Y,z,X,ye);Xc(Y,X)}return typeof X=="string"&&X!==""||typeof X=="number"?(X=""+X,z!==null&&z.tag===6?(l(Y,z.sibling),z=E(z,X),z.return=Y,Y=z):(l(Y,z),z=c0(X,Y.mode,ye),z.return=Y,Y=z),x(Y)):l(Y,z)}return Mt}var Vs=fx(!0),hx=fx(!1),Kc=zi(null),Qc=null,qs=null,bm=null;function _m(){bm=qs=Qc=null}function Sm(i){var s=Kc.current;xt(Kc),i._currentValue=s}function xm(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 Ys(i,s){Qc=i,bm=qs=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(Mn=!0),i.firstContext=null)}function ur(i){var s=i._currentValue;if(bm!==i)if(i={context:i,memoizedValue:s,next:null},qs===null){if(Qc===null)throw Error(n(308));qs=i,Qc.dependencies={lanes:0,firstContext:i}}else qs=qs.next=i;return s}var Po=null;function wm(i){Po===null?Po=[i]:Po.push(i)}function px(i,s,l,h){var E=s.interleaved;return E===null?(l.next=l,wm(s)):(l.next=E.next,E.next=l),s.interleaved=l,pi(i,h)}function pi(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 Vi=!1;function Am(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mx(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function mi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function qi(i,s,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),h.pending=s,pi(i,l)}return E=h.interleaved,E===null?(s.next=s,wm(h)):(s.next=E.next,E.next=s),h.interleaved=s,pi(i,l)}function Jc(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,Up(i,l)}}function gx(i,s){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,T=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};T===null?E=T=x:T=T.next=x,l=l.next}while(l!==null);T===null?E=T=s:T=T.next=s}else E=T=s;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,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 Zc(i,s,l,h){var E=i.updateQueue;Vi=!1;var T=E.firstBaseUpdate,x=E.lastBaseUpdate,R=E.shared.pending;if(R!==null){E.shared.pending=null;var H=R,J=H.next;H.next=null,x===null?T=J:x.next=J,x=H;var le=i.alternate;le!==null&&(le=le.updateQueue,R=le.lastBaseUpdate,R!==x&&(R===null?le.firstBaseUpdate=J:R.next=J,le.lastBaseUpdate=H))}if(T!==null){var pe=E.baseState;x=0,le=J=H=null,R=T;do{var se=R.lane,xe=R.eventTime;if((h&se)===se){le!==null&&(le=le.next={eventTime:xe,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var ke=i,Pe=R;switch(se=s,xe=l,Pe.tag){case 1:if(ke=Pe.payload,typeof ke=="function"){pe=ke.call(xe,pe,se);break e}pe=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Pe.payload,se=typeof ke=="function"?ke.call(xe,pe,se):ke,se==null)break e;pe=k({},pe,se);break e;case 2:Vi=!0}}R.callback!==null&&R.lane!==0&&(i.flags|=64,se=E.effects,se===null?E.effects=[R]:se.push(R))}else xe={eventTime:xe,lane:se,tag:R.tag,payload:R.payload,callback:R.callback,next:null},le===null?(J=le=xe,H=pe):le=le.next=xe,x|=se;if(R=R.next,R===null){if(R=E.shared.pending,R===null)break;se=R,R=se.next,se.next=null,E.lastBaseUpdate=se,E.shared.pending=null}}while(!0);if(le===null&&(H=pe),E.baseState=H,E.firstBaseUpdate=J,E.lastBaseUpdate=le,s=E.shared.interleaved,s!==null){E=s;do x|=E.lane,E=E.next;while(E!==s)}else T===null&&(E.shared.lanes=0);Ro|=x,i.lanes=x,i.memoizedState=pe}}function Ex(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var vu={},Xr=zi(vu),ku=zi(vu),Nu=zi(vu);function Oo(i){if(i===vu)throw Error(n(174));return i}function Cm(i,s){switch(bt(Nu,s),bt(ku,i),bt(Xr,vu),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)}xt(Xr),bt(Xr,s)}function Gs(){xt(Xr),xt(ku),xt(Nu)}function yx(i){Oo(Nu.current);var s=Oo(Xr.current),l=oe(s,i.type);s!==l&&(bt(ku,i),bt(Xr,l))}function vm(i){ku.current===i&&(xt(Xr),xt(ku))}var Nt=zi(0);function ed(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 km=[];function Nm(){for(var i=0;i<km.length;i++)km[i]._workInProgressVersionPrimary=null;km.length=0}var td=M.ReactCurrentDispatcher,Pm=M.ReactCurrentBatchConfig,Io=0,Pt=null,Gt=null,en=null,nd=!1,Pu=!1,Ou=0,L9=0;function En(){throw Error(n(321))}function Om(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!xr(i[l],s[l]))return!1;return!0}function Im(i,s,l,h,E,T){if(Io=T,Pt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,td.current=i===null||i.memoizedState===null?B9:U9,i=l(h,E),Pu){T=0;do{if(Pu=!1,Ou=0,25<=T)throw Error(n(301));T+=1,en=Gt=null,s.updateQueue=null,td.current=H9,i=l(h,E)}while(Pu)}if(td.current=od,s=Gt!==null&&Gt.next!==null,Io=0,en=Gt=Pt=null,nd=!1,s)throw Error(n(300));return i}function Rm(){var i=Ou!==0;return Ou=0,i}function Kr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Pt.memoizedState=en=i:en=en.next=i,en}function lr(){if(Gt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=Gt.next;var s=en===null?Pt.memoizedState:en.next;if(s!==null)en=s,Gt=i;else{if(i===null)throw Error(n(310));Gt=i,i={memoizedState:Gt.memoizedState,baseState:Gt.baseState,baseQueue:Gt.baseQueue,queue:Gt.queue,next:null},en===null?Pt.memoizedState=en=i:en=en.next=i}return en}function Iu(i,s){return typeof s=="function"?s(i):s}function Lm(i){var s=lr(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Gt,E=h.baseQueue,T=l.pending;if(T!==null){if(E!==null){var x=E.next;E.next=T.next,T.next=x}h.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,h=h.baseState;var R=x=null,H=null,J=T;do{var le=J.lane;if((Io&le)===le)H!==null&&(H=H.next={lane:0,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),h=J.hasEagerState?J.eagerState:i(h,J.action);else{var pe={lane:le,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null};H===null?(R=H=pe,x=h):H=H.next=pe,Pt.lanes|=le,Ro|=le}J=J.next}while(J!==null&&J!==T);H===null?x=h:H.next=R,xr(h,s.memoizedState)||(Mn=!0),s.memoizedState=h,s.baseState=x,s.baseQueue=H,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do T=E.lane,Pt.lanes|=T,Ro|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Dm(i){var s=lr(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,T=s.memoizedState;if(E!==null){l.pending=null;var x=E=E.next;do T=i(T,x.action),x=x.next;while(x!==E);xr(T,s.memoizedState)||(Mn=!0),s.memoizedState=T,s.baseQueue===null&&(s.baseState=T),l.lastRenderedState=T}return[T,h]}function Tx(){}function bx(i,s){var l=Pt,h=lr(),E=s(),T=!xr(h.memoizedState,E);if(T&&(h.memoizedState=E,Mn=!0),h=h.queue,Mm(xx.bind(null,l,h,i),[i]),h.getSnapshot!==s||T||en!==null&&en.memoizedState.tag&1){if(l.flags|=2048,Ru(9,Sx.bind(null,l,h,E,s),void 0,null),tn===null)throw Error(n(349));(Io&30)!==0||_x(l,s,E)}return E}function _x(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Pt.updateQueue,s===null?(s={lastEffect:null,stores:null},Pt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function Sx(i,s,l,h){s.value=l,s.getSnapshot=h,wx(s)&&Ax(i)}function xx(i,s,l){return l(function(){wx(s)&&Ax(i)})}function wx(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!xr(i,l)}catch(h){return!0}}function Ax(i){var s=pi(i,1);s!==null&&kr(s,i,1,-1)}function Cx(i){var s=Kr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Iu,lastRenderedState:i},s.queue=i,i=i.dispatch=F9.bind(null,Pt,i),[s.memoizedState,i]}function Ru(i,s,l,h){return i={tag:i,create:s,destroy:l,deps:h,next:null},s=Pt.updateQueue,s===null?(s={lastEffect:null,stores:null},Pt.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 vx(){return lr().memoizedState}function rd(i,s,l,h){var E=Kr();Pt.flags|=i,E.memoizedState=Ru(1|s,l,void 0,h===void 0?null:h)}function id(i,s,l,h){var E=lr();h=h===void 0?null:h;var T=void 0;if(Gt!==null){var x=Gt.memoizedState;if(T=x.destroy,h!==null&&Om(h,x.deps)){E.memoizedState=Ru(s,l,T,h);return}}Pt.flags|=i,E.memoizedState=Ru(1|s,l,T,h)}function kx(i,s){return rd(8390656,8,i,s)}function Mm(i,s){return id(2048,8,i,s)}function Nx(i,s){return id(4,2,i,s)}function Px(i,s){return id(4,4,i,s)}function Ox(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 Ix(i,s,l){return l=l!=null?l.concat([i]):null,id(4,4,Ox.bind(null,s,i),l)}function Fm(){}function Rx(i,s){var l=lr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Om(s,h[1])?h[0]:(l.memoizedState=[i,s],i)}function Lx(i,s){var l=lr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Om(s,h[1])?h[0]:(i=i(),l.memoizedState=[i,s],i)}function Dx(i,s,l){return(Io&21)===0?(i.baseState&&(i.baseState=!1,Mn=!0),i.memoizedState=l):(xr(l,s)||(l=dS(),Pt.lanes|=l,Ro|=l,i.baseState=!0),s)}function D9(i,s){var l=ct;ct=l!==0&&4>l?l:4,i(!0);var h=Pm.transition;Pm.transition={};try{i(!1),s()}finally{ct=l,Pm.transition=h}}function Mx(){return lr().memoizedState}function M9(i,s,l){var h=Xi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Fx(i))Bx(s,l);else if(l=px(i,s,l,h),l!==null){var E=Cn();kr(l,i,h,E),Ux(l,s,h)}}function F9(i,s,l){var h=Xi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Fx(i))Bx(s,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=s.lastRenderedReducer,T!==null))try{var x=s.lastRenderedState,R=T(x,l);if(E.hasEagerState=!0,E.eagerState=R,xr(R,x)){var H=s.interleaved;H===null?(E.next=E,wm(s)):(E.next=H.next,H.next=E),s.interleaved=E;return}}catch(J){}l=px(i,s,E,h),l!==null&&(E=Cn(),kr(l,i,h,E),Ux(l,s,h))}}function Fx(i){var s=i.alternate;return i===Pt||s!==null&&s===Pt}function Bx(i,s){Pu=nd=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function Ux(i,s,l){if((l&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,Up(i,l)}}var od={readContext:ur,useCallback:En,useContext:En,useEffect:En,useImperativeHandle:En,useInsertionEffect:En,useLayoutEffect:En,useMemo:En,useReducer:En,useRef:En,useState:En,useDebugValue:En,useDeferredValue:En,useTransition:En,useMutableSource:En,useSyncExternalStore:En,useId:En,unstable_isNewReconciler:!1},B9={readContext:ur,useCallback:function(i,s){return Kr().memoizedState=[i,s===void 0?null:s],i},useContext:ur,useEffect:kx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,rd(4194308,4,Ox.bind(null,s,i),l)},useLayoutEffect:function(i,s){return rd(4194308,4,i,s)},useInsertionEffect:function(i,s){return rd(4,2,i,s)},useMemo:function(i,s){var l=Kr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var h=Kr();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=M9.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var s=Kr();return i={current:i},s.memoizedState=i},useState:Cx,useDebugValue:Fm,useDeferredValue:function(i){return Kr().memoizedState=i},useTransition:function(){var i=Cx(!1),s=i[0];return i=D9.bind(null,i[1]),Kr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var h=Pt,E=Kr();if(vt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),tn===null)throw Error(n(349));(Io&30)!==0||_x(h,s,l)}E.memoizedState=l;var T={value:l,getSnapshot:s};return E.queue=T,kx(xx.bind(null,h,T,i),[i]),h.flags|=2048,Ru(9,Sx.bind(null,h,T,l,s),void 0,null),l},useId:function(){var i=Kr(),s=tn.identifierPrefix;if(vt){var l=hi,h=fi;l=(h&~(1<<32-Sr(h)-1)).toString(32)+l,s=":"+s+"R"+l,l=Ou++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=L9++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},U9={readContext:ur,useCallback:Rx,useContext:ur,useEffect:Mm,useImperativeHandle:Ix,useInsertionEffect:Nx,useLayoutEffect:Px,useMemo:Lx,useReducer:Lm,useRef:vx,useState:function(){return Lm(Iu)},useDebugValue:Fm,useDeferredValue:function(i){var s=lr();return Dx(s,Gt.memoizedState,i)},useTransition:function(){var i=Lm(Iu)[0],s=lr().memoizedState;return[i,s]},useMutableSource:Tx,useSyncExternalStore:bx,useId:Mx,unstable_isNewReconciler:!1},H9={readContext:ur,useCallback:Rx,useContext:ur,useEffect:Mm,useImperativeHandle:Ix,useInsertionEffect:Nx,useLayoutEffect:Px,useMemo:Lx,useReducer:Dm,useRef:vx,useState:function(){return Dm(Iu)},useDebugValue:Fm,useDeferredValue:function(i){var s=lr();return Gt===null?s.memoizedState=i:Dx(s,Gt.memoizedState,i)},useTransition:function(){var i=Dm(Iu)[0],s=lr().memoizedState;return[i,s]},useMutableSource:Tx,useSyncExternalStore:bx,useId:Mx,unstable_isNewReconciler:!1};function Ar(i,s){if(i&&i.defaultProps){s=k({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function Bm(i,s,l,h){s=i.memoizedState,l=l(h,s),l=l==null?s:k({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var sd={isMounted:function(i){return(i=i._reactInternals)?Ao(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var h=Cn(),E=Xi(i),T=mi(h,E);T.payload=s,l!=null&&(T.callback=l),s=qi(i,T,E),s!==null&&(kr(s,i,E,h),Jc(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var h=Cn(),E=Xi(i),T=mi(h,E);T.tag=1,T.payload=s,l!=null&&(T.callback=l),s=qi(i,T,E),s!==null&&(kr(s,i,E,h),Jc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=Cn(),h=Xi(i),E=mi(l,h);E.tag=2,s!=null&&(E.callback=s),s=qi(i,E,h),s!==null&&(kr(s,i,h,l),Jc(s,i,h))}};function Hx(i,s,l,h,E,T,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,x):s.prototype&&s.prototype.isPureReactComponent?!Tu(l,h)||!Tu(E,T):!0}function zx(i,s,l){var h=!1,E=ji,T=s.contextType;return typeof T=="object"&&T!==null?T=ur(T):(E=Dn(s)?vo:gn.current,h=s.contextTypes,T=(h=h!=null)?Hs(i,E):ji),s=new s(l,T),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=sd,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),s}function jx(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&&sd.enqueueReplaceState(s,s.state,null)}function Um(i,s,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Am(i);var T=s.contextType;typeof T=="object"&&T!==null?E.context=ur(T):(T=Dn(s)?vo:gn.current,E.context=Hs(i,T)),E.state=i.memoizedState,T=s.getDerivedStateFromProps,typeof T=="function"&&(Bm(i,s,T,l),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&sd.enqueueReplaceState(E,E.state,null),Zc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Ws(i,s){try{var l="",h=s;do l+=Ie(h),h=h.return;while(h);var E=l}catch(T){E=`
|
|
16
16
|
Error generating stack: `+T.message+`
|
|
17
|
-
`+T.stack}return{value:i,source:s,stack:E,digest:null}}function Hm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function zm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var H9=typeof WeakMap=="function"?WeakMap:Map;function jx(i,s,l){l=mi(-1,l),l.tag=3,l.payload={element:null};var h=s.value;return l.callback=function(){hd||(hd=!0,n0=h),zm(i,s)},l}function $x(i,s,l){l=mi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=s.value;l.payload=function(){return h(E)},l.callback=function(){zm(i,s)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){zm(i,s),typeof h!="function"&&(qi===null?qi=new Set([this]):qi.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function Vx(i,s,l){var h=i.pingCache;if(h===null){h=i.pingCache=new H9;var E=new Set;h.set(s,E)}else E=h.get(s),E===void 0&&(E=new Set,h.set(s,E));E.has(l)||(E.add(l),i=e7.bind(null,i,s,l),s.then(i,i))}function qx(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 Yx(i,s,l,h,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=mi(-1,1),s.tag=2,$i(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var z9=B.ReactCurrentOwner,Mn=!1;function Cn(i,s,l,h){s.child=i===null?fx(s,null,l,h):Vs(s,i.child,l,h)}function Gx(i,s,l,h,E){l=l.render;var T=s.ref;return Ys(s,E),h=Im(i,s,l,h,T,E),l=Rm(),i!==null&&!Mn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,gi(i,s,E)):(vt&&l&&mm(s),s.flags|=1,Cn(i,s,h,E),s.child)}function Wx(i,s,l,h,E){if(i===null){var T=l.type;return typeof T=="function"&&!l0(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=T,Xx(i,s,T,h,E)):(i=Td(l.type,null,h,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(T=i.child,(i.lanes&E)===0){var x=T.memoizedProps;if(l=l.compare,l=l!==null?l:Tu,l(x,h)&&i.ref===s.ref)return gi(i,s,E)}return s.flags|=1,i=Xi(T,h),i.ref=s.ref,i.return=s,s.child=i}function Xx(i,s,l,h,E){if(i!==null){var T=i.memoizedProps;if(Tu(T,h)&&i.ref===s.ref)if(Mn=!1,s.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Mn=!0);else return s.lanes=i.lanes,gi(i,s,E)}return jm(i,s,l,h,E)}function Kx(i,s,l){var h=s.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(Ks,Xn),Xn|=l;else{if((l&1073741824)===0)return i=T!==null?T.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,bt(Ks,Xn),Xn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:l,bt(Ks,Xn),Xn|=h}else T!==null?(h=T.baseLanes|l,s.memoizedState=null):h=l,bt(Ks,Xn),Xn|=h;return Cn(i,s,E,l),s.child}function Qx(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function jm(i,s,l,h,E){var T=Dn(l)?Ao:gn.current;return T=Hs(s,T),Ys(s,E),l=Im(i,s,l,h,T,E),h=Rm(),i!==null&&!Mn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,gi(i,s,E)):(vt&&h&&mm(s),s.flags|=1,Cn(i,s,l,E),s.child)}function Jx(i,s,l,h,E){if(Dn(l)){var T=!0;Vc(s)}else T=!1;if(Ys(s,E),s.stateNode===null)ud(i,s),Hx(s,l,h),Um(s,l,h,E),h=!0;else if(i===null){var x=s.stateNode,R=s.memoizedProps;x.props=R;var U=x.context,J=l.contextType;typeof J=="object"&&J!==null?J=ur(J):(J=Dn(l)?Ao:gn.current,J=Hs(s,J));var ue=l.getDerivedStateFromProps,pe=typeof ue=="function"||typeof x.getSnapshotBeforeUpdate=="function";pe||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==h||U!==J)&&zx(s,x,h,J),ji=!1;var se=s.memoizedState;x.state=se,Zc(s,h,x,E),U=s.memoizedState,R!==h||se!==U||Ln.current||ji?(typeof ue=="function"&&(Bm(s,l,ue,h),U=s.memoizedState),(R=ji||Ux(s,l,R,h,se,U,J))?(pe||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=U),x.props=h,x.state=U,x.context=J,h=R):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,px(i,s),R=s.memoizedProps,J=s.type===s.elementType?R:Cr(s.type,R),x.props=J,pe=s.pendingProps,se=x.context,U=l.contextType,typeof U=="object"&&U!==null?U=ur(U):(U=Dn(l)?Ao:gn.current,U=Hs(s,U));var xe=l.getDerivedStateFromProps;(ue=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==pe||se!==U)&&zx(s,x,h,U),ji=!1,se=s.memoizedState,x.state=se,Zc(s,h,x,E);var ke=s.memoizedState;R!==pe||se!==ke||Ln.current||ji?(typeof xe=="function"&&(Bm(s,l,xe,h),ke=s.memoizedState),(J=ji||Ux(s,l,J,h,se,ke,U)||!1)?(ue||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,ke,U),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,ke,U)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ke),x.props=h,x.state=ke,x.context=U,h=J):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),h=!1)}return $m(i,s,l,h,T,E)}function $m(i,s,l,h,E,T){Qx(i,s);var x=(s.flags&128)!==0;if(!h&&!x)return E&&rx(s,l,!1),gi(i,s,T);h=s.stateNode,z9.current=s;var R=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&x?(s.child=Vs(s,i.child,null,T),s.child=Vs(s,null,R,T)):Cn(i,s,R,T),s.memoizedState=h.state,E&&rx(s,l,!0),s.child}function Zx(i){var s=i.stateNode;s.pendingContext?tx(i,s.pendingContext,s.pendingContext!==s.context):s.context&&tx(i,s.context,!1),Am(i,s.containerInfo)}function e2(i,s,l,h,E){return $s(),Tm(E),s.flags|=256,Cn(i,s,l,h),s.child}var Vm={dehydrated:null,treeContext:null,retryLane:0};function qm(i){return{baseLanes:i,cachePool:null,transitions:null}}function t2(i,s,l){var h=s.pendingProps,E=Nt.current,T=!1,x=(s.flags&128)!==0,R;if((R=x)||(R=i!==null&&i.memoizedState===null?!1:(E&2)!==0),R?(T=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(Nt,E&1),i===null)return ym(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,T?(h=s.mode,T=s.child,x={mode:"hidden",children:x},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=x):T=bd(x,h,0,null),i=Mo(i,h,l,null),T.return=s,i.return=s,T.sibling=i,s.child=T,s.child.memoizedState=qm(l),s.memoizedState=Vm,i):Ym(s,x));if(E=i.memoizedState,E!==null&&(R=E.dehydrated,R!==null))return j9(i,s,x,h,R,E,l);if(T){T=h.fallback,x=s.mode,E=i.child,R=E.sibling;var U={mode:"hidden",children:h.children};return(x&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=U,s.deletions=null):(h=Xi(E,U),h.subtreeFlags=E.subtreeFlags&14680064),R!==null?T=Xi(R,T):(T=Mo(T,x,l,null),T.flags|=2),T.return=s,h.return=s,h.sibling=T,s.child=h,h=T,T=s.child,x=i.child.memoizedState,x=x===null?qm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},T.memoizedState=x,T.childLanes=i.childLanes&~l,s.memoizedState=Vm,h}return T=i.child,i=T.sibling,h=Xi(T,{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 Ym(i,s){return s=bd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ad(i,s,l,h){return h!==null&&Tm(h),Vs(s,i.child,null,l),i=Ym(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function j9(i,s,l,h,E,T,x){if(l)return s.flags&256?(s.flags&=-257,h=Hm(Error(n(422))),ad(i,s,x,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(T=h.fallback,E=s.mode,h=bd({mode:"visible",children:h.children},E,0,null),T=Mo(T,E,x,null),T.flags|=2,h.return=s,T.return=s,h.sibling=T,s.child=h,(s.mode&1)!==0&&Vs(s,i.child,null,x),s.child.memoizedState=qm(x),s.memoizedState=Vm,T);if((s.mode&1)===0)return ad(i,s,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var R=h.dgst;return h=R,T=Error(n(419)),h=Hm(T,h,void 0),ad(i,s,x,h)}if(R=(x&i.childLanes)!==0,Mn||R){if(h=tn,h!==null){switch(x&-x){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|x))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,pi(i,E),kr(h,i,E,-1))}return u0(),h=Hm(Error(n(421))),ad(i,s,x,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=t7.bind(null,i),E._reactRetry=s,null):(i=T.treeContext,Wn=Bi(E.nextSibling),Gn=s,vt=!0,wr=null,i!==null&&(sr[ar++]=fi,sr[ar++]=hi,sr[ar++]=vo,fi=i.id,hi=i.overflow,vo=s),s=Ym(s,h.children),s.flags|=4096,s)}function n2(i,s,l){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),xm(i.return,s,l)}function Gm(i,s,l,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(T.isBackwards=s,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=l,T.tailMode=E)}function r2(i,s,l){var h=s.pendingProps,E=h.revealOrder,T=h.tail;if(Cn(i,s,h.children,l),h=Nt.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&&n2(i,l,s);else if(i.tag===19)n2(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(bt(Nt,h),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(l=s.child,E=null;l!==null;)i=l.alternate,i!==null&&ed(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),Gm(s,!1,E,l,T);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&ed(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Gm(s,!0,l,null,T);break;case"together":Gm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ud(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function gi(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),Io|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Xi(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Xi(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function $9(i,s,l){switch(s.tag){case 3:Zx(s),$s();break;case 5:Ex(s);break;case 1:Dn(s.type)&&Vc(s);break;case 4:Am(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;bt(Kc,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(bt(Nt,Nt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?t2(i,s,l):(bt(Nt,Nt.current&1),i=gi(i,s,l),i!==null?i.sibling:null);bt(Nt,Nt.current&1);break;case 19:if(h=(l&s.childLanes)!==0,(i.flags&128)!==0){if(h)return r2(i,s,l);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(Nt,Nt.current),h)break;return null;case 22:case 23:return s.lanes=0,Kx(i,s,l)}return gi(i,s,l)}var i2,Wm,o2,s2;i2=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}},Wm=function(){},o2=function(i,s,l,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,Po(Xr.current);var T=null;switch(l){case"input":E=Rn(i,E),h=Rn(i,h),T=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),T=[];break;case"textarea":E=dt(i,E),h=dt(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=zc)}sn(l,h);var x;l=null;for(J in E)if(!h.hasOwnProperty(J)&&E.hasOwnProperty(J)&&E[J]!=null)if(J==="style"){var R=E[J];for(x in R)R.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else J!=="dangerouslySetInnerHTML"&&J!=="children"&&J!=="suppressContentEditableWarning"&&J!=="suppressHydrationWarning"&&J!=="autoFocus"&&(o.hasOwnProperty(J)?T||(T=[]):(T=T||[]).push(J,null));for(J in h){var U=h[J];if(R=E!=null?E[J]:void 0,h.hasOwnProperty(J)&&U!==R&&(U!=null||R!=null))if(J==="style")if(R){for(x in R)!R.hasOwnProperty(x)||U&&U.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in U)U.hasOwnProperty(x)&&R[x]!==U[x]&&(l||(l={}),l[x]=U[x])}else l||(T||(T=[]),T.push(J,l)),l=U;else J==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,R=R?R.__html:void 0,U!=null&&R!==U&&(T=T||[]).push(J,U)):J==="children"?typeof U!="string"&&typeof U!="number"||(T=T||[]).push(J,""+U):J!=="suppressContentEditableWarning"&&J!=="suppressHydrationWarning"&&(o.hasOwnProperty(J)?(U!=null&&J==="onScroll"&&St("scroll",i),T||R===U||(T=[])):(T=T||[]).push(J,U))}l&&(T=T||[]).push("style",l);var J=T;(s.updateQueue=J)&&(s.flags|=4)}},s2=function(i,s,l,h){l!==h&&(s.flags|=4)};function Lu(i,s){if(!vt)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 yn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(s)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,s}function V9(i,s,l){var h=s.pendingProps;switch(gm(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yn(s),null;case 1:return Dn(s.type)&&$c(),yn(s),null;case 3:return h=s.stateNode,Gs(),xt(Ln),xt(gn),Nm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Wc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,wr!==null&&(o0(wr),wr=null))),Wm(i,s),yn(s),null;case 5:vm(s);var E=Po(Nu.current);if(l=s.type,i!==null&&s.stateNode!=null)o2(i,s,l,h,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return yn(s),null}if(i=Po(Xr.current),Wc(s)){h=s.stateNode,l=s.type;var T=s.memoizedProps;switch(h[Wr]=s,h[wu]=T,i=(s.mode&1)!==0,l){case"dialog":St("cancel",h),St("close",h);break;case"iframe":case"object":case"embed":St("load",h);break;case"video":case"audio":for(E=0;E<_u.length;E++)St(_u[E],h);break;case"source":St("error",h);break;case"img":case"image":case"link":St("error",h),St("load",h);break;case"details":St("toggle",h);break;case"input":So(h,T),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},St("invalid",h);break;case"textarea":lt(h,T),St("invalid",h)}sn(l,T),E=null;for(var x in T)if(T.hasOwnProperty(x)){var R=T[x];x==="children"?typeof R=="string"?h.textContent!==R&&(T.suppressHydrationWarning!==!0&&Hc(h.textContent,R,i),E=["children",R]):typeof R=="number"&&h.textContent!==""+R&&(T.suppressHydrationWarning!==!0&&Hc(h.textContent,R,i),E=["children",""+R]):o.hasOwnProperty(x)&&R!=null&&x==="onScroll"&&St("scroll",h)}switch(l){case"input":on(h),ve(h,T,!0);break;case"textarea":on(h),At(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=zc)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{x=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ne(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Wr]=s,i[wu]=h,i2(i,s,!1,!1),s.stateNode=i;e:{switch(x=Yr(l,h),l){case"dialog":St("cancel",i),St("close",i),E=h;break;case"iframe":case"object":case"embed":St("load",i),E=h;break;case"video":case"audio":for(E=0;E<_u.length;E++)St(_u[E],i);E=h;break;case"source":St("error",i),E=h;break;case"img":case"image":case"link":St("error",i),St("load",i),E=h;break;case"details":St("toggle",i),E=h;break;case"input":So(i,h),E=Rn(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),St("invalid",i);break;case"textarea":lt(i,h),E=dt(i,h),St("invalid",i);break;default:E=h}sn(l,E),R=E;for(T in R)if(R.hasOwnProperty(T)){var U=R[T];T==="style"?Oi(i,U):T==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Ve(i,U)):T==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Xe(i,U):typeof U=="number"&&Xe(i,""+U):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(o.hasOwnProperty(T)?U!=null&&T==="onScroll"&&St("scroll",i):U!=null&&C(i,T,U,x))}switch(l){case"input":on(i),ve(i,h,!1);break;case"textarea":on(i),At(i);break;case"option":h.value!=null&&i.setAttribute("value",""+we(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?Qe(i,!!h.multiple,T,!1):h.defaultValue!=null&&Qe(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=zc)}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 yn(s),null;case 6:if(i&&s.stateNode!=null)s2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(l=Po(Nu.current),Po(Xr.current),Wc(s)){if(h=s.stateNode,l=s.memoizedProps,h[Wr]=s,(T=h.nodeValue!==l)&&(i=Gn,i!==null))switch(i.tag){case 3:Hc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Hc(h.nodeValue,l,(i.mode&1)!==0)}T&&(s.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Wr]=s,s.stateNode=h}return yn(s),null;case 13:if(xt(Nt),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(vt&&Wn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)lx(),$s(),s.flags|=98560,T=!1;else if(T=Wc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=s.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Wr]=s}else $s(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;yn(s),T=!1}else wr!==null&&(o0(wr),wr=null),T=!0;if(!T)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||(Nt.current&1)!==0?Wt===0&&(Wt=3):u0())),s.updateQueue!==null&&(s.flags|=4),yn(s),null);case 4:return Gs(),Wm(i,s),i===null&&Su(s.stateNode.containerInfo),yn(s),null;case 10:return Sm(s.type._context),yn(s),null;case 17:return Dn(s.type)&&$c(),yn(s),null;case 19:if(xt(Nt),T=s.memoizedState,T===null)return yn(s),null;if(h=(s.flags&128)!==0,x=T.rendering,x===null)if(h)Lu(T,!1);else{if(Wt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=ed(i),x!==null){for(s.flags|=128,Lu(T,!1),h=x.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=l,l=s.child;l!==null;)T=l,i=h,T.flags&=14680066,x=T.alternate,x===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=x.childLanes,T.lanes=x.lanes,T.child=x.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=x.memoizedProps,T.memoizedState=x.memoizedState,T.updateQueue=x.updateQueue,T.type=x.type,i=x.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return bt(Nt,Nt.current&1|2),s.child}i=i.sibling}T.tail!==null&&Mt()>Qs&&(s.flags|=128,h=!0,Lu(T,!1),s.lanes=4194304)}else{if(!h)if(i=ed(x),i!==null){if(s.flags|=128,h=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Lu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!x.alternate&&!vt)return yn(s),null}else 2*Mt()-T.renderingStartTime>Qs&&l!==1073741824&&(s.flags|=128,h=!0,Lu(T,!1),s.lanes=4194304);T.isBackwards?(x.sibling=s.child,s.child=x):(l=T.last,l!==null?l.sibling=x:s.child=x,T.last=x)}return T.tail!==null?(s=T.tail,T.rendering=s,T.tail=s.sibling,T.renderingStartTime=Mt(),s.sibling=null,l=Nt.current,bt(Nt,h?l&1|2:l&1),s):(yn(s),null);case 22:case 23:return a0(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(Xn&1073741824)!==0&&(yn(s),s.subtreeFlags&6&&(s.flags|=8192)):yn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function q9(i,s){switch(gm(s),s.tag){case 1:return Dn(s.type)&&$c(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Gs(),xt(Ln),xt(gn),Nm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return vm(s),null;case 13:if(xt(Nt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));$s()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return xt(Nt),null;case 4:return Gs(),null;case 10:return Sm(s.type._context),null;case 22:case 23:return a0(),null;case 24:return null;default:return null}}var ld=!1,Tn=!1,Y9=typeof WeakSet=="function"?WeakSet:Set,Ae=null;function Xs(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){It(i,s,h)}else l.current=null}function Xm(i,s,l){try{l()}catch(h){It(i,s,h)}}var a2=!1;function G9(i,s){if(am=Nc,i=US(),Zp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{l.nodeType,T.nodeType}catch(ye){l=null;break e}var x=0,R=-1,U=-1,J=0,ue=0,pe=i,se=null;t:for(;;){for(var xe;pe!==l||E!==0&&pe.nodeType!==3||(R=x+E),pe!==T||h!==0&&pe.nodeType!==3||(U=x+h),pe.nodeType===3&&(x+=pe.nodeValue.length),(xe=pe.firstChild)!==null;)se=pe,pe=xe;for(;;){if(pe===i)break t;if(se===l&&++J===E&&(R=x),se===T&&++ue===h&&(U=x),(xe=pe.nextSibling)!==null)break;pe=se,se=pe.parentNode}pe=xe}l=R===-1||U===-1?null:{start:R,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(um={focusedElem:i,selectionRange:l},Nc=!1,Ae=s;Ae!==null;)if(s=Ae,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ae=i;else for(;Ae!==null;){s=Ae;try{var ke=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Pe=ke.memoizedProps,Ft=ke.memoizedState,Y=s.stateNode,z=Y.getSnapshotBeforeUpdate(s.elementType===s.type?Pe:Cr(s.type,Pe),Ft);Y.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var X=s.stateNode.containerInfo;X.nodeType===1?X.textContent="":X.nodeType===9&&X.documentElement&&X.removeChild(X.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){It(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,Ae=i;break}Ae=s.return}return ke=a2,a2=!1,ke}function Du(i,s,l){var h=s.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Xm(s,l,T)}E=E.next}while(E!==h)}}function cd(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 Km(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 u2(i){var s=i.alternate;s!==null&&(i.alternate=null,u2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Wr],delete s[wu],delete s[fm],delete s[N9],delete s[P9])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function l2(i){return i.tag===5||i.tag===3||i.tag===4}function c2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||l2(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Qm(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=zc));else if(h!==4&&(i=i.child,i!==null))for(Qm(i,s,l),i=i.sibling;i!==null;)Qm(i,s,l),i=i.sibling}function Jm(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(Jm(i,s,l),i=i.sibling;i!==null;)Jm(i,s,l),i=i.sibling}var an=null,Ar=!1;function Vi(i,s,l){for(l=l.child;l!==null;)d2(i,s,l),l=l.sibling}function d2(i,s,l){if(Gr&&typeof Gr.onCommitFiberUnmount=="function")try{Gr.onCommitFiberUnmount(xc,l)}catch(R){}switch(l.tag){case 5:Tn||Xs(l,s);case 6:var h=an,E=Ar;an=null,Vi(i,s,l),an=h,Ar=E,an!==null&&(Ar?(i=an,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):an.removeChild(l.stateNode));break;case 18:an!==null&&(Ar?(i=an,l=l.stateNode,i.nodeType===8?dm(i.parentNode,l):i.nodeType===1&&dm(i,l),hu(i)):dm(an,l.stateNode));break;case 4:h=an,E=Ar,an=l.stateNode.containerInfo,Ar=!0,Vi(i,s,l),an=h,Ar=E;break;case 0:case 11:case 14:case 15:if(!Tn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,x=T.destroy;T=T.tag,x!==void 0&&((T&2)!==0||(T&4)!==0)&&Xm(l,s,x),E=E.next}while(E!==h)}Vi(i,s,l);break;case 1:if(!Tn&&(Xs(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(R){It(l,s,R)}Vi(i,s,l);break;case 21:Vi(i,s,l);break;case 22:l.mode&1?(Tn=(h=Tn)||l.memoizedState!==null,Vi(i,s,l),Tn=h):Vi(i,s,l);break;default:Vi(i,s,l)}}function f2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new Y9),s.forEach(function(h){var E=n7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function vr(i,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var T=i,x=s,R=x;e:for(;R!==null;){switch(R.tag){case 5:an=R.stateNode,Ar=!1;break e;case 3:an=R.stateNode.containerInfo,Ar=!0;break e;case 4:an=R.stateNode.containerInfo,Ar=!0;break e}R=R.return}if(an===null)throw Error(n(160));d2(T,x,E),an=null,Ar=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(J){It(E,s,J)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)h2(s,i),s=s.sibling}function h2(i,s){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(vr(s,i),Qr(i),h&4){try{Du(3,i,i.return),cd(3,i)}catch(Pe){It(i,i.return,Pe)}try{Du(5,i,i.return)}catch(Pe){It(i,i.return,Pe)}}break;case 1:vr(s,i),Qr(i),h&512&&l!==null&&Xs(l,l.return);break;case 5:if(vr(s,i),Qr(i),h&512&&l!==null&&Xs(l,l.return),i.flags&32){var E=i.stateNode;try{Xe(E,"")}catch(Pe){It(i,i.return,Pe)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,x=l!==null?l.memoizedProps:T,R=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{R==="input"&&T.type==="radio"&&T.name!=null&&Pi(E,T),Yr(R,x);var J=Yr(R,T);for(x=0;x<U.length;x+=2){var ue=U[x],pe=U[x+1];ue==="style"?Oi(E,pe):ue==="dangerouslySetInnerHTML"?Ve(E,pe):ue==="children"?Xe(E,pe):C(E,ue,pe,J)}switch(R){case"input":li(E,T);break;case"textarea":wn(E,T);break;case"select":var se=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var xe=T.value;xe!=null?Qe(E,!!T.multiple,xe,!1):se!==!!T.multiple&&(T.defaultValue!=null?Qe(E,!!T.multiple,T.defaultValue,!0):Qe(E,!!T.multiple,T.multiple?[]:"",!1))}E[wu]=T}catch(Pe){It(i,i.return,Pe)}}break;case 6:if(vr(s,i),Qr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Pe){It(i,i.return,Pe)}}break;case 3:if(vr(s,i),Qr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{hu(s.containerInfo)}catch(Pe){It(i,i.return,Pe)}break;case 4:vr(s,i),Qr(i);break;case 13:vr(s,i),Qr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(t0=Mt())),h&4&&f2(i);break;case 22:if(ue=l!==null&&l.memoizedState!==null,i.mode&1?(Tn=(J=Tn)||ue,vr(s,i),Tn=J):vr(s,i),Qr(i),h&8192){if(J=i.memoizedState!==null,(i.stateNode.isHidden=J)&&!ue&&(i.mode&1)!==0)for(Ae=i,ue=i.child;ue!==null;){for(pe=Ae=ue;Ae!==null;){switch(se=Ae,xe=se.child,se.tag){case 0:case 11:case 14:case 15:Du(4,se,se.return);break;case 1:Xs(se,se.return);var ke=se.stateNode;if(typeof ke.componentWillUnmount=="function"){h=se,l=se.return;try{s=h,ke.props=s.memoizedProps,ke.state=s.memoizedState,ke.componentWillUnmount()}catch(Pe){It(h,l,Pe)}}break;case 5:Xs(se,se.return);break;case 22:if(se.memoizedState!==null){g2(pe);continue}}xe!==null?(xe.return=se,Ae=xe):g2(pe)}ue=ue.sibling}e:for(ue=null,pe=i;;){if(pe.tag===5){if(ue===null){ue=pe;try{E=pe.stateNode,J?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(R=pe.stateNode,U=pe.memoizedProps.style,x=U!=null&&U.hasOwnProperty("display")?U.display:null,R.style.display=or("display",x))}catch(Pe){It(i,i.return,Pe)}}}else if(pe.tag===6){if(ue===null)try{pe.stateNode.nodeValue=J?"":pe.memoizedProps}catch(Pe){It(i,i.return,Pe)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;ue===pe&&(ue=null),pe=pe.return}ue===pe&&(ue=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:vr(s,i),Qr(i),h&4&&f2(i);break;case 21:break;default:vr(s,i),Qr(i)}}function Qr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(l2(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Xe(E,""),h.flags&=-33);var T=c2(i);Jm(i,T,E);break;case 3:case 4:var x=h.stateNode.containerInfo,R=c2(i);Qm(i,R,x);break;default:throw Error(n(161))}}catch(U){It(i,i.return,U)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function W9(i,s,l){Ae=i,p2(i)}function p2(i,s,l){for(var h=(i.mode&1)!==0;Ae!==null;){var E=Ae,T=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||ld;if(!x){var R=E.alternate,U=R!==null&&R.memoizedState!==null||Tn;R=ld;var J=Tn;if(ld=x,(Tn=U)&&!J)for(Ae=E;Ae!==null;)x=Ae,U=x.child,x.tag===22&&x.memoizedState!==null?E2(E):U!==null?(U.return=x,Ae=U):E2(E);for(;T!==null;)Ae=T,p2(T),T=T.sibling;Ae=E,ld=R,Tn=J}m2(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Ae=T):m2(i)}}function m2(i){for(;Ae!==null;){var s=Ae;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Tn||cd(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!Tn)if(l===null)h.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:Cr(s.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=s.updateQueue;T!==null&&gx(s,T,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}gx(s,x,l)}break;case 5:var R=s.stateNode;if(l===null&&s.flags&4){l=R;var U=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&l.focus();break;case"img":U.src&&(l.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var J=s.alternate;if(J!==null){var ue=J.memoizedState;if(ue!==null){var pe=ue.dehydrated;pe!==null&&hu(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Tn||s.flags&512&&Km(s)}catch(se){It(s,s.return,se)}}if(s===i){Ae=null;break}if(l=s.sibling,l!==null){l.return=s.return,Ae=l;break}Ae=s.return}}function g2(i){for(;Ae!==null;){var s=Ae;if(s===i){Ae=null;break}var l=s.sibling;if(l!==null){l.return=s.return,Ae=l;break}Ae=s.return}}function E2(i){for(;Ae!==null;){var s=Ae;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{cd(4,s)}catch(U){It(s,l,U)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch(U){It(s,E,U)}}var T=s.return;try{Km(s)}catch(U){It(s,T,U)}break;case 5:var x=s.return;try{Km(s)}catch(U){It(s,x,U)}}}catch(U){It(s,s.return,U)}if(s===i){Ae=null;break}var R=s.sibling;if(R!==null){R.return=s.return,Ae=R;break}Ae=s.return}}var X9=Math.ceil,dd=B.ReactCurrentDispatcher,Zm=B.ReactCurrentOwner,cr=B.ReactCurrentBatchConfig,it=0,tn=null,$t=null,un=0,Xn=0,Ks=Ui(0),Wt=0,Mu=null,Io=0,fd=0,e0=0,Fu=null,Fn=null,t0=0,Qs=1/0,Ei=null,hd=!1,n0=null,qi=null,pd=!1,Yi=null,md=0,Bu=0,r0=null,gd=-1,Ed=0;function An(){return(it&6)!==0?Mt():gd!==-1?gd:gd=Mt()}function Gi(i){return(i.mode&1)===0?1:(it&2)!==0&&un!==0?un&-un:I9.transition!==null?(Ed===0&&(Ed=cS()),Ed):(i=ct,i!==0||(i=window.event,i=i===void 0?16:TS(i.type)),i)}function kr(i,s,l,h){if(50<Bu)throw Bu=0,r0=null,Error(n(185));uu(i,l,h),((it&2)===0||i!==tn)&&(i===tn&&((it&2)===0&&(fd|=l),Wt===4&&Wi(i,un)),Bn(i,h),l===1&&it===0&&(s.mode&1)===0&&(Qs=Mt()+500,qc&&zi()))}function Bn(i,s){var l=i.callbackNode;IB(i,s);var h=Ac(i,i===tn?un:0);if(h===0)l!==null&&aS(l),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(l!=null&&aS(l),s===1)i.tag===0?O9(T2.bind(null,i)):ix(T2.bind(null,i)),v9(function(){(it&6)===0&&zi()}),l=null;else{switch(dS(h)){case 1:l=Mp;break;case 4:l=uS;break;case 16:l=Sc;break;case 536870912:l=lS;break;default:l=Sc}l=v2(l,y2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function y2(i,s){if(gd=-1,Ed=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Js()&&i.callbackNode!==l)return null;var h=Ac(i,i===tn?un:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=yd(i,h);else{s=h;var E=it;it|=2;var T=_2();(tn!==i||un!==s)&&(Ei=null,Qs=Mt()+500,Lo(i,s));do try{J9();break}catch(R){b2(i,R)}while(!0);_m(),dd.current=T,it=E,$t!==null?s=0:(tn=null,un=0,s=Wt)}if(s!==0){if(s===2&&(E=Fp(i),E!==0&&(h=E,s=i0(i,E))),s===1)throw l=Mu,Lo(i,0),Wi(i,h),Bn(i,Mt()),l;if(s===6)Wi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!K9(E)&&(s=yd(i,h),s===2&&(T=Fp(i),T!==0&&(h=T,s=i0(i,T))),s===1))throw l=Mu,Lo(i,0),Wi(i,h),Bn(i,Mt()),l;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Do(i,Fn,Ei);break;case 3:if(Wi(i,h),(h&130023424)===h&&(s=t0+500-Mt(),10<s)){if(Ac(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){An(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=cm(Do.bind(null,i,Fn,Ei),s);break}Do(i,Fn,Ei);break;case 4:if(Wi(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var x=31-Sr(h);T=1<<x,x=s[x],x>E&&(E=x),h&=~T}if(h=E,h=Mt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*X9(h/1960))-h,10<h){i.timeoutHandle=cm(Do.bind(null,i,Fn,Ei),h);break}Do(i,Fn,Ei);break;case 5:Do(i,Fn,Ei);break;default:throw Error(n(329))}}}return Bn(i,Mt()),i.callbackNode===l?y2.bind(null,i):null}function i0(i,s){var l=Fu;return i.current.memoizedState.isDehydrated&&(Lo(i,s).flags|=256),i=yd(i,s),i!==2&&(s=Fn,Fn=l,s!==null&&o0(s)),i}function o0(i){Fn===null?Fn=i:Fn.push.apply(Fn,i)}function K9(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],T=E.getSnapshot;E=E.value;try{if(!xr(T(),E))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 Wi(i,s){for(s&=~e0,s&=~fd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-Sr(s),h=1<<l;i[l]=-1,s&=~h}}function T2(i){if((it&6)!==0)throw Error(n(327));Js();var s=Ac(i,0);if((s&1)===0)return Bn(i,Mt()),null;var l=yd(i,s);if(i.tag!==0&&l===2){var h=Fp(i);h!==0&&(s=h,l=i0(i,h))}if(l===1)throw l=Mu,Lo(i,0),Wi(i,s),Bn(i,Mt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Do(i,Fn,Ei),Bn(i,Mt()),null}function s0(i,s){var l=it;it|=1;try{return i(s)}finally{it=l,it===0&&(Qs=Mt()+500,qc&&zi())}}function Ro(i){Yi!==null&&Yi.tag===0&&(it&6)===0&&Js();var s=it;it|=1;var l=cr.transition,h=ct;try{if(cr.transition=null,ct=1,i)return i()}finally{ct=h,cr.transition=l,it=s,(it&6)===0&&zi()}}function a0(){Xn=Ks.current,xt(Ks)}function Lo(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,A9(l)),$t!==null)for(l=$t.return;l!==null;){var h=l;switch(gm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&$c();break;case 3:Gs(),xt(Ln),xt(gn),Nm();break;case 5:vm(h);break;case 4:Gs();break;case 13:xt(Nt);break;case 19:xt(Nt);break;case 10:Sm(h.type._context);break;case 22:case 23:a0()}l=l.return}if(tn=i,$t=i=Xi(i.current,null),un=Xn=s,Wt=0,Mu=null,e0=fd=Io=0,Fn=Fu=null,No!==null){for(s=0;s<No.length;s++)if(l=No[s],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,T=l.pending;if(T!==null){var x=T.next;T.next=E,h.next=x}l.pending=h}No=null}return i}function b2(i,s){do{var l=$t;try{if(_m(),td.current=od,nd){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}nd=!1}if(Oo=0,en=Gt=Pt=null,Pu=!1,Ou=0,Zm.current=null,l===null||l.return===null){Wt=1,Mu=s,$t=null;break}e:{var T=i,x=l.return,R=l,U=s;if(s=un,R.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var J=U,ue=R,pe=ue.tag;if((ue.mode&1)===0&&(pe===0||pe===11||pe===15)){var se=ue.alternate;se?(ue.updateQueue=se.updateQueue,ue.memoizedState=se.memoizedState,ue.lanes=se.lanes):(ue.updateQueue=null,ue.memoizedState=null)}var xe=qx(x);if(xe!==null){xe.flags&=-257,Yx(xe,x,R,T,s),xe.mode&1&&Vx(T,J,s),s=xe,U=J;var ke=s.updateQueue;if(ke===null){var Pe=new Set;Pe.add(U),s.updateQueue=Pe}else ke.add(U);break e}else{if((s&1)===0){Vx(T,J,s),u0();break e}U=Error(n(426))}}else if(vt&&R.mode&1){var Ft=qx(x);if(Ft!==null){(Ft.flags&65536)===0&&(Ft.flags|=256),Yx(Ft,x,R,T,s),Tm(Ws(U,R));break e}}T=U=Ws(U,R),Wt!==4&&(Wt=2),Fu===null?Fu=[T]:Fu.push(T),T=x;do{switch(T.tag){case 3:T.flags|=65536,s&=-s,T.lanes|=s;var Y=jx(T,U,s);mx(T,Y);break e;case 1:R=U;var z=T.type,X=T.stateNode;if((T.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||X!==null&&typeof X.componentDidCatch=="function"&&(qi===null||!qi.has(X)))){T.flags|=65536,s&=-s,T.lanes|=s;var ye=$x(T,R,s);mx(T,ye);break e}}T=T.return}while(T!==null)}x2(l)}catch(Re){s=Re,$t===l&&l!==null&&($t=l=l.return);continue}break}while(!0)}function _2(){var i=dd.current;return dd.current=od,i===null?od:i}function u0(){(Wt===0||Wt===3||Wt===2)&&(Wt=4),tn===null||(Io&268435455)===0&&(fd&268435455)===0||Wi(tn,un)}function yd(i,s){var l=it;it|=2;var h=_2();(tn!==i||un!==s)&&(Ei=null,Lo(i,s));do try{Q9();break}catch(E){b2(i,E)}while(!0);if(_m(),it=l,dd.current=h,$t!==null)throw Error(n(261));return tn=null,un=0,Wt}function Q9(){for(;$t!==null;)S2($t)}function J9(){for(;$t!==null&&!xB();)S2($t)}function S2(i){var s=A2(i.alternate,i,Xn);i.memoizedProps=i.pendingProps,s===null?x2(i):$t=s,Zm.current=null}function x2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=V9(l,s,Xn),l!==null){$t=l;return}}else{if(l=q9(l,s),l!==null){l.flags&=32767,$t=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Wt=6,$t=null;return}}if(s=s.sibling,s!==null){$t=s;return}$t=s=i}while(s!==null);Wt===0&&(Wt=5)}function Do(i,s,l){var h=ct,E=cr.transition;try{cr.transition=null,ct=1,Z9(i,s,l,h)}finally{cr.transition=E,ct=h}return null}function Z9(i,s,l,h){do Js();while(Yi!==null);if((it&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=l.lanes|l.childLanes;if(RB(i,T),i===tn&&($t=tn=null,un=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||pd||(pd=!0,v2(Sc,function(){return Js(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=cr.transition,cr.transition=null;var x=ct;ct=1;var R=it;it|=4,Zm.current=null,G9(i,l),h2(l,i),T9(um),Nc=!!am,um=am=null,i.current=l,W9(l),wB(),it=R,ct=x,cr.transition=T}else i.current=l;if(pd&&(pd=!1,Yi=i,md=E),T=i.pendingLanes,T===0&&(qi=null),vB(l.stateNode),Bn(i,Mt()),s!==null)for(h=i.onRecoverableError,l=0;l<s.length;l++)E=s[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(hd)throw hd=!1,i=n0,n0=null,i;return(md&1)!==0&&i.tag!==0&&Js(),T=i.pendingLanes,(T&1)!==0?i===r0?Bu++:(Bu=0,r0=i):Bu=0,zi(),null}function Js(){if(Yi!==null){var i=dS(md),s=cr.transition,l=ct;try{if(cr.transition=null,ct=16>i?16:i,Yi===null)var h=!1;else{if(i=Yi,Yi=null,md=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,Ae=i.current;Ae!==null;){var T=Ae,x=T.child;if((Ae.flags&16)!==0){var R=T.deletions;if(R!==null){for(var U=0;U<R.length;U++){var J=R[U];for(Ae=J;Ae!==null;){var ue=Ae;switch(ue.tag){case 0:case 11:case 15:Du(8,ue,T)}var pe=ue.child;if(pe!==null)pe.return=ue,Ae=pe;else for(;Ae!==null;){ue=Ae;var se=ue.sibling,xe=ue.return;if(u2(ue),ue===J){Ae=null;break}if(se!==null){se.return=xe,Ae=se;break}Ae=xe}}}var ke=T.alternate;if(ke!==null){var Pe=ke.child;if(Pe!==null){ke.child=null;do{var Ft=Pe.sibling;Pe.sibling=null,Pe=Ft}while(Pe!==null)}}Ae=T}}if((T.subtreeFlags&2064)!==0&&x!==null)x.return=T,Ae=x;else e:for(;Ae!==null;){if(T=Ae,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Du(9,T,T.return)}var Y=T.sibling;if(Y!==null){Y.return=T.return,Ae=Y;break e}Ae=T.return}}var z=i.current;for(Ae=z;Ae!==null;){x=Ae;var X=x.child;if((x.subtreeFlags&2064)!==0&&X!==null)X.return=x,Ae=X;else e:for(x=z;Ae!==null;){if(R=Ae,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:cd(9,R)}}catch(Re){It(R,R.return,Re)}if(R===x){Ae=null;break e}var ye=R.sibling;if(ye!==null){ye.return=R.return,Ae=ye;break e}Ae=R.return}}if(it=E,zi(),Gr&&typeof Gr.onPostCommitFiberRoot=="function")try{Gr.onPostCommitFiberRoot(xc,i)}catch(Re){}h=!0}return h}finally{ct=l,cr.transition=s}}return!1}function w2(i,s,l){s=Ws(l,s),s=jx(i,s,1),i=$i(i,s,1),s=An(),i!==null&&(uu(i,1,s),Bn(i,s))}function It(i,s,l){if(i.tag===3)w2(i,i,l);else for(;s!==null;){if(s.tag===3){w2(s,i,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(qi===null||!qi.has(h))){i=Ws(l,i),i=$x(s,i,1),s=$i(s,i,1),i=An(),s!==null&&(uu(s,1,i),Bn(s,i));break}}s=s.return}}function e7(i,s,l){var h=i.pingCache;h!==null&&h.delete(s),s=An(),i.pingedLanes|=i.suspendedLanes&l,tn===i&&(un&l)===l&&(Wt===4||Wt===3&&(un&130023424)===un&&500>Mt()-t0?Lo(i,0):e0|=l),Bn(i,s)}function C2(i,s){s===0&&((i.mode&1)===0?s=1:(s=Cc,Cc<<=1,(Cc&130023424)===0&&(Cc=4194304)));var l=An();i=pi(i,s),i!==null&&(uu(i,s,l),Bn(i,l))}function t7(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),C2(i,l)}function n7(i,s){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),C2(i,l)}var A2;A2=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||Ln.current)Mn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return Mn=!1,$9(i,s,l);Mn=(i.flags&131072)!==0}else Mn=!1,vt&&(s.flags&1048576)!==0&&ox(s,Gc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;ud(i,s),i=s.pendingProps;var E=Hs(s,gn.current);Ys(s,l),E=Im(null,s,h,i,E,l);var T=Rm();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Dn(h)?(T=!0,Vc(s)):T=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Cm(s),E.updater=sd,s.stateNode=E,E._reactInternals=s,Um(s,h,i,l),s=$m(null,s,h,!0,T,l)):(s.tag=0,vt&&T&&mm(s),Cn(null,s,E,l),s=s.child),s;case 16:h=s.elementType;e:{switch(ud(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=i7(h),i=Cr(h,i),E){case 0:s=jm(null,s,h,i,l);break e;case 1:s=Jx(null,s,h,i,l);break e;case 11:s=Gx(null,s,h,i,l);break e;case 14:s=Wx(null,s,h,Cr(h.type,i),l);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Cr(h,E),jm(i,s,h,E,l);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Cr(h,E),Jx(i,s,h,E,l);case 3:e:{if(Zx(s),i===null)throw Error(n(387));h=s.pendingProps,T=s.memoizedState,E=T.element,px(i,s),Zc(s,h,null,l);var x=s.memoizedState;if(h=x.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=T,s.memoizedState=T,s.flags&256){E=Ws(Error(n(423)),s),s=e2(i,s,h,l,E);break e}else if(h!==E){E=Ws(Error(n(424)),s),s=e2(i,s,h,l,E);break e}else for(Wn=Bi(s.stateNode.containerInfo.firstChild),Gn=s,vt=!0,wr=null,l=fx(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if($s(),h===E){s=gi(i,s,l);break e}Cn(i,s,h,l)}s=s.child}return s;case 5:return Ex(s),i===null&&ym(s),h=s.type,E=s.pendingProps,T=i!==null?i.memoizedProps:null,x=E.children,lm(h,E)?x=null:T!==null&&lm(h,T)&&(s.flags|=32),Qx(i,s),Cn(i,s,x,l),s.child;case 6:return i===null&&ym(s),null;case 13:return t2(i,s,l);case 4:return Am(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=Vs(s,null,h,l):Cn(i,s,h,l),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Cr(h,E),Gx(i,s,h,E,l);case 7:return Cn(i,s,s.pendingProps,l),s.child;case 8:return Cn(i,s,s.pendingProps.children,l),s.child;case 12:return Cn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,T=s.memoizedProps,x=E.value,bt(Kc,h._currentValue),h._currentValue=x,T!==null)if(xr(T.value,x)){if(T.children===E.children&&!Ln.current){s=gi(i,s,l);break e}}else for(T=s.child,T!==null&&(T.return=s);T!==null;){var R=T.dependencies;if(R!==null){x=T.child;for(var U=R.firstContext;U!==null;){if(U.context===h){if(T.tag===1){U=mi(-1,l&-l),U.tag=2;var J=T.updateQueue;if(J!==null){J=J.shared;var ue=J.pending;ue===null?U.next=U:(U.next=ue.next,ue.next=U),J.pending=U}}T.lanes|=l,U=T.alternate,U!==null&&(U.lanes|=l),xm(T.return,l,s),R.lanes|=l;break}U=U.next}}else if(T.tag===10)x=T.type===s.type?null:T.child;else if(T.tag===18){if(x=T.return,x===null)throw Error(n(341));x.lanes|=l,R=x.alternate,R!==null&&(R.lanes|=l),xm(x,l,s),x=T.sibling}else x=T.child;if(x!==null)x.return=T;else for(x=T;x!==null;){if(x===s){x=null;break}if(T=x.sibling,T!==null){T.return=x.return,x=T;break}x=x.return}T=x}Cn(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,Ys(s,l),E=ur(E),h=h(E),s.flags|=1,Cn(i,s,h,l),s.child;case 14:return h=s.type,E=Cr(h,s.pendingProps),E=Cr(h.type,E),Wx(i,s,h,E,l);case 15:return Xx(i,s,s.type,s.pendingProps,l);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Cr(h,E),ud(i,s),s.tag=1,Dn(h)?(i=!0,Vc(s)):i=!1,Ys(s,l),Hx(s,h,E),Um(s,h,E,l),$m(null,s,h,!0,i,l);case 19:return r2(i,s,l);case 22:return Kx(i,s,l)}throw Error(n(156,s.tag))};function v2(i,s){return sS(i,s)}function r7(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 dr(i,s,l,h){return new r7(i,s,l,h)}function l0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function i7(i){if(typeof i=="function")return l0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ce)return 11;if(i===be)return 14}return 2}function Xi(i,s){var l=i.alternate;return l===null?(l=dr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Td(i,s,l,h,E,T){var x=2;if(h=i,typeof i=="function")l0(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case Q:return Mo(l.children,E,T,s);case re:x=8,E|=8;break;case Te:return i=dr(12,l,s,E|2),i.elementType=Te,i.lanes=T,i;case he:return i=dr(13,l,s,E),i.elementType=he,i.lanes=T,i;case le:return i=dr(19,l,s,E),i.elementType=le,i.lanes=T,i;case de:return bd(l,E,T,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:x=10;break e;case ee:x=9;break e;case ce:x=11;break e;case be:x=14;break e;case Me:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=dr(x,l,s,E),s.elementType=i,s.type=h,s.lanes=T,s}function Mo(i,s,l,h){return i=dr(7,i,h,s),i.lanes=l,i}function bd(i,s,l,h){return i=dr(22,i,h,s),i.elementType=de,i.lanes=l,i.stateNode={isHidden:!1},i}function c0(i,s,l){return i=dr(6,i,null,s),i.lanes=l,i}function d0(i,s,l){return s=dr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function o7(i,s,l,h,E){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bp(0),this.expirationTimes=Bp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function f0(i,s,l,h,E,T,x,R,U){return i=new o7(i,s,l,R,U),s===1?(s=1,T===!0&&(s|=8)):s=0,T=dr(3,null,null,s),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cm(T),i}function s7(i,s,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:s,implementation:l}}function k2(i){if(!i)return Hi;i=i._reactInternals;e:{if(wo(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(Dn(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(Dn(l))return nx(i,l,s)}return s}function N2(i,s,l,h,E,T,x,R,U){return i=f0(l,h,!0,i,E,T,x,R,U),i.context=k2(null),l=i.current,h=An(),E=Gi(l),T=mi(h,E),T.callback=s!=null?s:null,$i(l,T,E),i.current.lanes=E,uu(i,E,h),Bn(i,h),i}function _d(i,s,l,h){var E=s.current,T=An(),x=Gi(E);return l=k2(l),s.context===null?s.context=l:s.pendingContext=l,s=mi(T,x),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=$i(E,s,x),i!==null&&(kr(i,E,x,T),Jc(i,E,x)),x}function Sd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function P2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function h0(i,s){P2(i,s),(i=i.alternate)&&P2(i,s)}function a7(){return null}var O2=typeof reportError=="function"?reportError:function(i){console.error(i)};function p0(i){this._internalRoot=i}xd.prototype.render=p0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));_d(i,s,null,null)},xd.prototype.unmount=p0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Ro(function(){_d(null,i,null,null)}),s[ci]=null}};function xd(i){this._internalRoot=i}xd.prototype.unstable_scheduleHydration=function(i){if(i){var s=pS();i={blockedOn:null,target:i,priority:s};for(var l=0;l<Di.length&&s!==0&&s<Di[l].priority;l++);Di.splice(l,0,i),l===0&&ES(i)}};function m0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function wd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function I2(){}function u7(i,s,l,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var J=Sd(x);T.call(J)}}var x=N2(s,h,i,0,null,!1,!1,"",I2);return i._reactRootContainer=x,i[ci]=x.current,Su(i.nodeType===8?i.parentNode:i),Ro(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var R=h;h=function(){var J=Sd(U);R.call(J)}}var U=f0(i,0,!1,null,null,!1,!1,"",I2);return i._reactRootContainer=U,i[ci]=U.current,Su(i.nodeType===8?i.parentNode:i),Ro(function(){_d(s,U,l,h)}),U}function Cd(i,s,l,h,E){var T=l._reactRootContainer;if(T){var x=T;if(typeof E=="function"){var R=E;E=function(){var U=Sd(x);R.call(U)}}_d(s,x,i,E)}else x=u7(l,s,i,E,h);return Sd(x)}fS=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=au(s.pendingLanes);l!==0&&(Up(s,l|1),Bn(s,Mt()),(it&6)===0&&(Qs=Mt()+500,zi()))}break;case 13:Ro(function(){var h=pi(i,1);if(h!==null){var E=An();kr(h,i,1,E)}}),h0(i,1)}},Hp=function(i){if(i.tag===13){var s=pi(i,134217728);if(s!==null){var l=An();kr(s,i,134217728,l)}h0(i,134217728)}},hS=function(i){if(i.tag===13){var s=Gi(i),l=pi(i,s);if(l!==null){var h=An();kr(l,i,s,h)}h0(i,s)}},pS=function(){return ct},mS=function(i,s){var l=ct;try{return ct=i,s()}finally{ct=l}},Ip=function(i,s,l){switch(s){case"input":if(li(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==i&&h.form===i.form){var E=jc(h);if(!E)throw Error(n(90));qr(h),li(h,E)}}}break;case"textarea":wn(i,l);break;case"select":s=l.value,s!=null&&Qe(i,!!l.multiple,s,!1)}},Z_=s0,eS=Ro;var l7={usingClientEntryPoint:!1,Events:[Cu,Bs,jc,Q_,J_,s0]},Uu={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},c7={bundleType:Uu.bundleType,version:Uu.version,rendererPackageName:Uu.rendererPackageName,rendererConfig:Uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:B.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=iS(i),i===null?null:i.stateNode},findFiberByHostInstance:Uu.findFiberByHostInstance||a7,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 Ad=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ad.isDisabled&&Ad.supportsFiber)try{xc=Ad.inject(c7),Gr=Ad}catch(i){}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=l7,kn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m0(s))throw Error(n(200));return s7(i,s,null,l)},kn.createRoot=function(i,s){if(!m0(i))throw Error(n(299));var l=!1,h="",E=O2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=f0(i,1,!1,null,null,l,!1,h,E),i[ci]=s.current,Su(i.nodeType===8?i.parentNode:i),new p0(s)},kn.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=iS(s),i=i===null?null:i.stateNode,i},kn.flushSync=function(i){return Ro(i)},kn.hydrate=function(i,s,l){if(!wd(s))throw Error(n(200));return Cd(null,i,s,!0,l)},kn.hydrateRoot=function(i,s,l){if(!m0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,T="",x=O2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=N2(s,null,i,1,l!=null?l:null,E,!1,T,x),i[ci]=s.current,Su(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,E]:s.mutableSourceEagerHydrationData.push(l,E);return new xd(s)},kn.render=function(i,s,l){if(!wd(s))throw Error(n(200));return Cd(null,i,s,!1,l)},kn.unmountComponentAtNode=function(i){if(!wd(i))throw Error(n(40));return i._reactRootContainer?(Ro(function(){Cd(null,null,i,!1,function(){i._reactRootContainer=null,i[ci]=null})}),!0):!1},kn.unstable_batchedUpdates=s0,kn.unstable_renderSubtreeIntoContainer=function(i,s,l,h){if(!wd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Cd(i,s,l,!1,h)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var x1;function w1(){if(x1)return vf.exports;x1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),vf.exports=dk(),vf.exports}var Wo=w1();function C1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=C1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=C1(e))&&(r&&(r+=" "),r+=t);return r}const ni=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:w.jsx("button",{className:W(e,`${j}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?w.jsx("img",{className:W(`${j}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),fk="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",hk=()=>{const{globalClassName:e,logoUrl:t,themeVariables:n}=mt(),r=()=>{ml(!1),bi(!0)};return Wo.createPortal(w.jsx("div",{className:W(e,`${j}-minimized-container`),style:n,children:w.jsx(ni,{className:W(e,`${j}-minimized-button`),ariaLabel:"Open Copilot",icon:w.jsx("img",{src:t||fk,alt:"Copilot",className:W(e,`${j}-minimized-icon-img`)}),onClick:r})}),document.body)};var A1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},v1=Qi.createContext&&Qi.createContext(A1),pk=["attr","size","title"];function mk(e,t){if(e==null)return{};var n=gk(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 gk(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 yl(){return yl=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},yl.apply(this,arguments)}function k1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(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?k1(Object(n),!0).forEach(function(r){Ek(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ek(e,t,n){return t=yk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yk(e){var t=Tk(e,"string");return typeof t=="symbol"?t:t+""}function Tk(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function N1(e){return e&&e.map((t,n)=>Qi.createElement(t.tag,Tl({key:n},t.attr),N1(t.child)))}function Lt(e){return t=>Qi.createElement(bk,yl({attr:Tl({},e.attr)},t),N1(e.child))}function bk(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=mk(e,pk),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Qi.createElement("svg",yl({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&&Qi.createElement("title",null,a),e.children)};return v1!==void 0?Qi.createElement(v1.Consumer,null,n=>t(n)):t(A1)}function P1(e){return Lt({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 O1(e){return Lt({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 Xo(e){return Lt({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 _k(e){return Lt({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 I1(e){return Lt({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 Sk(e){return Lt({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 xk(e){return Lt({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 wk(e){return Lt({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 Ck(e){return Lt({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 Ak(e){return Lt({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 Pf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,className:W(e,`${j}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.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"})})}),bl=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>w.jsx("button",{className:W(`${j}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),vk=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:W(`${j}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(Xo,{size:"16px"})},kk=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(ni,{className:W(e,n,`cim-${r}-component`,`${j}-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:w.jsx(Xo,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(bl,{className:W(e,n,`cim-${r}-component`,`${j}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&w.jsx(vk,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function Nk(e){return Lt({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 Pk=()=>{const{messages:e}=Zn(),{handleCancel:t}=Rr();return{cancelRequest:H.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},Ok=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=mt(),{cancelRequest:r}=Pk();return n!=null&&n.enableCancelSearch?w.jsx(ni,{className:W(t,`${j}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:w.jsx(Nk,{}),disabled:!e,onClick:r}):null};function V7(){}function q7(){}function R1(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 L1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ik=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lk={};function D1(e,t){return(Lk.jsx?Rk:Ik).test(e)}const Dk=/[ \t\n\f\r]/g;function Mk(e){return typeof e=="object"?e.type==="text"?M1(e.value):!1:M1(e)}function M1(e){return e.replace(Dk,"")===""}let Ta=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ta.prototype.normal={},Ta.prototype.property={},Ta.prototype.space=void 0;function F1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ta(n,r,t)}function ba(e){return e.toLowerCase()}let Nn=class{constructor(t,n){this.attribute=n,this.property=t}};Nn.prototype.attribute="",Nn.prototype.booleanish=!1,Nn.prototype.boolean=!1,Nn.prototype.commaOrSpaceSeparated=!1,Nn.prototype.commaSeparated=!1,Nn.prototype.defined=!1,Nn.prototype.mustUseProperty=!1,Nn.prototype.number=!1,Nn.prototype.overloadedBoolean=!1,Nn.prototype.property="",Nn.prototype.spaceSeparated=!1,Nn.prototype.space=void 0;let Fk=0;const Ge=oo(),zt=oo(),Of=oo(),ge=oo(),Et=oo(),Ko=oo(),Hn=oo();function oo(){return ea(2,++Fk)}const If=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:zt,commaOrSpaceSeparated:Hn,commaSeparated:Ko,number:ge,overloadedBoolean:Of,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),Rf=Object.keys(If);let Lf=class extends Nn{constructor(t,n,r,o){let a=-1;if(super(t,n),B1(this,"space",o),typeof r=="number")for(;++a<Rf.length;){const u=Rf[a];B1(this,Rf[a],(r&If[u])===If[u])}}};Lf.prototype.defined=!0;function B1(e,t,n){n&&(e[t]=n)}function Qo(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[ba(r)]=r,n[ba(a.attribute)]=r}return new Ta(t,n,e.space)}const U1=Qo({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:Et,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:ge,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:Et,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:zt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function H1(e,t){return t in e?e[t]:t}function z1(e,t){return H1(e,t.toLowerCase())}const Bk=Qo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ko,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:Et,autoFocus:Ge,autoPlay:Ge,blocking:Et,capture:null,charSet:null,checked:Ge,cite:null,className:Et,cols:ge,colSpan:null,content:null,contentEditable:zt,controls:Ge,controlsList:Et,coords:ge|Ko,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Of,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Et,height:ge,hidden:Of,high:ge,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:Et,itemRef:Et,itemScope:Ge,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ge,optimum:ge,pattern:null,ping:Et,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:Et,required:Ge,reversed:Ge,rows:ge,rowSpan:ge,sandbox:Et,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:zt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:z1}),Uk=Qo({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:Hn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:Et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ko,g2:Ko,glyphName:Ko,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Hn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hn,rev:Hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hn,requiredFeatures:Hn,requiredFonts:Hn,requiredFormats:Hn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Hn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:H1}),j1=Qo({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()}}),$1=Qo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:z1}),V1=Qo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Hk={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"},zk=/[A-Z]/g,q1=/-[a-z]/g,jk=/^data[-\w.:]+$/i;function Df(e,t){const n=ba(t);let r=t,o=Nn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&jk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(q1,Vk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!q1.test(a)){let u=a.replace(zk,$k);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Lf}return new o(r,t)}function $k(e){return"-"+e.toLowerCase()}function Vk(e){return e.charAt(1).toUpperCase()}const _l=F1([U1,Bk,j1,$1,V1],"html"),Jo=F1([U1,Uk,j1,$1,V1],"svg");function Y1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function G1(e){return e.join(" ").trim()}var Zo={},Mf,W1;function qk(){if(W1)return Mf;W1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
18
|
-
`,f="/",p="*",g="",b="comment",y="declaration";Mf=function(S,A){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];A=A||{};var v=1,P=1;function C(he){var le=he.match(t);le&&(v+=le.length);var be=he.lastIndexOf(d);P=~be?he.length-be:P+he.length}function B(){var he={line:v,column:P};return function(le){return le.position=new q(he),re(),le}}function q(he){this.start=he,this.end={line:v,column:P},this.source=A.source}q.prototype.content=S;function D(he){var le=new Error(A.source+":"+v+":"+P+": "+he);if(le.reason=he,le.filename=A.source,le.line=v,le.column=P,le.source=S,!A.silent)throw le}function Q(he){var le=he.exec(S);if(le){var be=le[0];return C(be),S=S.slice(be.length),le}}function re(){Q(n)}function Te(he){var le;for(he=he||[];le=$();)le!==!1&&he.push(le);return he}function $(){var he=B();if(!(f!=S.charAt(0)||p!=S.charAt(1))){for(var le=2;g!=S.charAt(le)&&(p!=S.charAt(le)||f!=S.charAt(le+1));)++le;if(le+=2,g===S.charAt(le-1))return D("End of comment missing");var be=S.slice(2,le-2);return P+=2,C(be),S=S.slice(le),P+=2,he({type:b,comment:be})}}function ee(){var he=B(),le=Q(r);if(le){if($(),!Q(o))return D("property missing ':'");var be=Q(a),Me=he({type:y,property:_(le[0].replace(e,g)),value:be?_(be[0].replace(e,g)):g});return Q(u),Me}}function ce(){var he=[];Te(he);for(var le;le=ee();)le!==!1&&(he.push(le),Te(he));return he}return re(),ce()};function _(S){return S?S.replace(c,g):g}return Mf}var X1;function Yk(){if(X1)return Zo;X1=1;var e=Zo&&Zo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=n;var t=e(qk());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 Zo}var _a={},K1;function Gk(){if(K1)return _a;K1=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,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 _a.camelCase=d,_a}var Sa,Q1;function Wk(){if(Q1)return Sa;Q1=1;var e=Sa&&Sa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Yk()),n=Gk();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,Sa=r,Sa}var Xk=Wk();const Kk=ze(Xk),Sl=J1("end"),Lr=J1("start");function J1(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 Z1(e){const t=Lr(e),n=Sl(e);if(t&&n)return{start:t,end:n}}function xa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?eE(e.position):"start"in e||"end"in e?eE(e):"line"in e||"column"in e?Ff(e):""}function Ff(e){return tE(e&&e.line)+":"+tE(e&&e.column)}function eE(e){return Ff(e&&e.start)+"-"+Ff(e&&e.end)}function tE(e){return e&&typeof e=="number"?e:1}class fn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=F({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=xa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}fn.prototype.file="",fn.prototype.name="",fn.prototype.reason="",fn.prototype.message="",fn.prototype.stack="",fn.prototype.column=void 0,fn.prototype.line=void 0,fn.prototype.ancestors=void 0,fn.prototype.cause=void 0,fn.prototype.fatal=void 0,fn.prototype.place=void 0,fn.prototype.ruleId=void 0,fn.prototype.source=void 0;const Bf={}.hasOwnProperty,Qk=new Map,Jk=/[A-Z]/g,Zk=new Set(["table","tbody","thead","tfoot","tr"]),eN=new Set(["td","th"]),nE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tN(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=lN(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=uN(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"?Jo:_l,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=rE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function rE(e,t,n){if(t.type==="element")return nN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return rN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return oN(e,t,n);if(t.type==="mdxjsEsm")return iN(e,t);if(t.type==="root")return sN(e,t,n);if(t.type==="text")return aN(e,t)}function nN(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Jo,e.schema=o),e.ancestors.push(t);const a=oE(e,t.tagName,!1),u=cN(e,t);let c=Hf(e,t);return Zk.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Mk(d):!0})),iE(e,u,a,t),Uf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function rN(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}wa(e,t.position)}function iN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wa(e,t.position)}function oN(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Jo,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:oE(e,t.name,!0),u=dN(e,t),c=Hf(e,t);return iE(e,u,a,t),Uf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function sN(e,t,n){const r={};return Uf(r,Hf(e,t)),e.create(t,e.Fragment,r,n)}function aN(e,t){return t.value}function iE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Uf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function uN(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 lN(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Lr(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 cN(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Bf.call(t.properties,o)){const a=fN(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&eN.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 dN(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else wa(e,t.position);else{const 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 wa(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Hf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Qk;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=rE(e,a,u);c!==void 0&&n.push(c)}return n}function fN(e,t,n){const r=Df(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?L1(n):G1(n)),r.property==="style"){let o=typeof n=="object"?n:hN(e,String(n));return e.stylePropertyNameCase==="css"&&(o=pN(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Hk[r.property]||r.property:r.attribute,n]}}function hN(e,t){try{return Kk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new fn("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=nE+"#cannot-parse-style-attribute",o}}function oE(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=D1(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=D1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Bf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);wa(e)}function wa(e,t){const n=new fn("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=nE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function pN(e){const t={};let n;for(n in e)Bf.call(e,n)&&(t[mN(n)]=e[n]);return t}function mN(e){let t=e.replace(Jk,gN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function gN(e){return"-"+e.toLowerCase()}const zf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},EN={};function jf(e,t){const n=EN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return sE(e,r,o)}function sE(e,t,n){if(yN(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 aE(e.children,t,n)}return Array.isArray(e)?aE(e,t,n):""}function aE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=sE(e[o],t,n);return r.join("")}function yN(e){return!!(e&&typeof e=="object")}const uE=document.createElement("i");function $f(e){const t="&"+e+";";uE.innerHTML=t;const n=uE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zn(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 er(e,t){return e.length>0?(zn(e,e.length,0,t),e):t}const lE={}.hasOwnProperty;function cE(e){const t={};let n=-1;for(;++n<e.length;)TN(t,e[n]);return t}function TN(e,t){let n;for(n in t){const o=(lE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){lE.call(o,u)||(o[u]=[]);const c=a[u];bN(o[u],Array.isArray(c)?c:c?[c]:[])}}}function bN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);zn(e,0,0,r)}function dE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xn=Si(/[A-Za-z]/),hn=Si(/[\dA-Za-z]/),_N=Si(/[#-'*+\--9=?A-Z^-~]/);function xl(e){return e!==null&&(e<32||e===127)}const Vf=Si(/\d/),SN=Si(/[\dA-Fa-f]/),xN=Si(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function et(e){return e===-2||e===-1||e===32}const wl=Si(new RegExp("\\p{P}|\\p{S}","u")),so=Si(/\s/);function Si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function es(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&hn(e.charCodeAt(n+1))&&hn(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 rt(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return et(d)?(e.enter(n),c(d)):t(d)}function c(d){return et(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const wN={tokenize:CN};function CN(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"),rt(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 Be(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const AN={tokenize:vN},fE={tokenize:kN};function vN(e){const t=this,n=[];let r=0,o,a,u;return c;function c(C){if(r<n.length){const B=n[r];return t.containerState=B[1],e.attempt(B[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&P();const B=t.events.length;let q=B,D;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){D=t.events[q][1].end;break}v(r);let Q=B;for(;Q<t.events.length;)t.events[Q][1].end=F({},D),Q++;return zn(t.events,q+1,0,t.events.slice(B)),t.events.length=Q,f(C)}return c(C)}function f(C){if(r===n.length){if(!o)return b(C);if(o.currentConstruct&&o.currentConstruct.concrete)return _(C);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(fE,p,g)(C)}function p(C){return o&&P(),v(r),b(C)}function g(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(C)}function b(C){return t.containerState={},e.attempt(fE,y,_)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),b(C)}function _(C){if(C===null){o&&P(),v(0),e.consume(C);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(C)}function S(C){if(C===null){A(e.exit("chunkFlow"),!0),v(0),e.consume(C);return}return Be(C)?(e.consume(C),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),S)}function A(C,B){const q=t.sliceStream(C);if(B&&q.push(null),C.previous=a,a&&(a.next=C),a=C,o.defineSkip(C.start),o.write(q),t.parser.lazy[C.start.line]){let D=o.events.length;for(;D--;)if(o.events[D][1].start.offset<u&&(!o.events[D][1].end||o.events[D][1].end.offset>u))return;const Q=t.events.length;let re=Q,Te,$;for(;re--;)if(t.events[re][0]==="exit"&&t.events[re][1].type==="chunkFlow"){if(Te){$=t.events[re][1].end;break}Te=!0}for(v(r),D=Q;D<t.events.length;)t.events[D][1].end=F({},$),D++;zn(t.events,re+1,0,t.events.slice(Q)),t.events.length=D}}function v(C){let B=n.length;for(;B-- >C;){const q=n[B];t.containerState=q[1],q[0].exit.call(t,e)}n.length=C}function P(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function kN(e,t,n){return rt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ts(e){if(e===null||ft(e)||so(e))return 1;if(wl(e))return 2}function Cl(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 qf={name:"attention",resolveAll:NN,tokenize:PN};function NN(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 g=F({},e[r][1].end),b=F({},e[n][1].start);hE(g,-d),hE(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:g,end:F({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},c.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=er(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=er(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=er(f,Cl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=er(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=er(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,zn(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 PN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ts(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=ts(d),g=!p||p===2&&o||n.includes(d),b=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?g:g&&(o||!b)),f._close=!!(a===42?b:b&&(p||!g)),t(d)}}function hE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ON={name:"autolink",tokenize:IN};function IN(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return xn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||hn(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||hn(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||xl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):_N(y)?(e.consume(y),f):n(y)}function p(y){return hn(y)?g(y):n(y)}function g(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||hn(y))&&r++<63){const _=y===45?b:g;return e.consume(y),_}return n(y)}}const Ca={partial:!0,tokenize:RN};function RN(e,t,n){return r;function r(a){return et(a)?rt(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Be(a)?t(a):n(a)}}const pE={continuation:{tokenize:DN},exit:MN,name:"blockQuote",tokenize:LN};function LN(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 et(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function DN(e,t,n){const r=this;return o;function o(u){return et(u)?rt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(pE,t,n)(u)}}function MN(e){e.exit("blockQuote")}const mE={name:"characterEscape",tokenize:FN};function FN(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 xN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const gE={name:"characterReference",tokenize:BN};function BN(e,t,n){const r=this;let o=0,a,u;return c;function c(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=hn,p(g))}function f(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=SN,p):(e.enter("characterReferenceValue"),a=7,u=Vf,p(g))}function p(g){if(g===59&&o){const b=e.exit("characterReferenceValue");return u===hn&&!$f(r.sliceSerialize(b))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(g)&&o++<a?(e.consume(g),p):n(g)}}const EE={partial:!0,tokenize:HN},yE={concrete:!0,name:"codeFenced",tokenize:UN};function UN(e,t,n){const r=this,o={partial:!0,tokenize:q};let a=0,u=0,c;return d;function d(D){return f(D)}function f(D){const Q=r.events[r.events.length-1];return a=Q&&Q[1].type==="linePrefix"?Q[2].sliceSerialize(Q[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===c?(u++,e.consume(D),p):u<3?n(D):(e.exit("codeFencedFenceSequence"),et(D)?rt(e,g,"whitespace")(D):g(D))}function g(D){return D===null||Be(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(EE,S,B)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Be(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(D)):et(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rt(e,y,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),b)}function y(D){return D===null||Be(D)?g(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||Be(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(D)):D===96&&D===c?n(D):(e.consume(D),_)}function S(D){return e.attempt(o,B,A)(D)}function A(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),v}function v(D){return a>0&&et(D)?rt(e,P,"linePrefix",a+1)(D):P(D)}function P(D){return D===null||Be(D)?e.check(EE,S,B)(D):(e.enter("codeFlowValue"),C(D))}function C(D){return D===null||Be(D)?(e.exit("codeFlowValue"),P(D)):(e.consume(D),C)}function B(D){return e.exit("codeFenced"),t(D)}function q(D,Q,re){let Te=0;return $;function $(be){return D.enter("lineEnding"),D.consume(be),D.exit("lineEnding"),ee}function ee(be){return D.enter("codeFencedFence"),et(be)?rt(D,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(be):ce(be)}function ce(be){return be===c?(D.enter("codeFencedFenceSequence"),he(be)):re(be)}function he(be){return be===c?(Te++,D.consume(be),he):Te>=u?(D.exit("codeFencedFenceSequence"),et(be)?rt(D,le,"whitespace")(be):le(be)):re(be)}function le(be){return be===null||Be(be)?(D.exit("codeFencedFence"),Q(be)):re(be)}}}function HN(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 Yf={name:"codeIndented",tokenize:jN},zN={partial:!0,tokenize:$N};function jN(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),rt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Be(f)?e.attempt(zN,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Be(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function $N(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):rt(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Be(u)?o(u):n(u)}}const VN={name:"codeText",previous:YN,resolve:qN,tokenize:GN};function qN(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 YN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function GN(e,t,n){let r=0,o,a;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),c(g)}function c(g){return g===96?(e.consume(g),r++,c):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(a=e.enter("codeTextSequence"),o=0,p(g)):Be(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(g))}function f(g){return g===null||g===32||g===96||Be(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),f)}function p(g){return g===96?(e.consume(g),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(a.type="codeTextData",f(g))}}class WN{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Aa(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),Aa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Aa(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);Aa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Aa(this.left,n.reverse())}}}function Aa(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function TE(e){const t={};let n=-1,r,o,a,u,c,d,f;const p=new WN(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,XN(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=F({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return zn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function XN(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,g,b=-1,y=n,_=0,S=0;const A=[S];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),g&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(S=b+1,A.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),b=A.length;b--;){const v=c.slice(A[b],A[b+1]),P=a.pop();d.push([P,P+v.length-1]),e.splice(P,2,v)}for(d.reverse(),b=-1;++b<d.length;)f[_+d[b][0]]=_+d[b][1],_+=d[b][1]-d[b][0]-1;return f}const KN={resolve:JN,tokenize:ZN},QN={partial:!0,tokenize:eP};function JN(e){return TE(e),e}function ZN(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):Be(c)?e.check(QN,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 eP(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),rt(e,a,"linePrefix")}function a(u){if(u===null||Be(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function bE(e,t,n,r,o,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return g;function g(v){return v===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(v),e.exit(a),b):v===null||v===32||v===41||xl(v)?n(v):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(v))}function b(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"}),y(v))}function y(v){return v===62?(e.exit("chunkString"),e.exit(c),b(v)):v===null||v===60||Be(v)?n(v):(e.consume(v),v===92?_:y)}function _(v){return v===60||v===62||v===92?(e.consume(v),y):y(v)}function S(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++,S):v===41?(e.consume(v),p--,S):v===null||v===32||v===40||xl(v)?n(v):(e.consume(v),v===92?A:S)}function A(v){return v===40||v===41||v===92?(e.consume(v),S):S(v)}}function _E(e,t,n,r,o,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):Be(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===null||y===91||y===93||Be(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!et(y)),y===92?b:g)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,g):g(y)}}function SE(e,t,n,r,o,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Be(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),rt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Be(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?g:p)}function g(b){return b===u||b===92?(e.consume(b),p):p(b)}}function va(e,t){let n;return r;function r(o){return Be(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):et(o)?rt(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const tP={name:"definition",tokenize:rP},nP={partial:!0,tokenize:iP};function rP(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return _E.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ft(y)?va(e,f)(y):f(y)}function f(y){return bE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(nP,g,g)(y)}function g(y){return et(y)?rt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Be(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function iP(e,t,n){return r;function r(c){return ft(c)?va(e,o)(c):n(c)}function o(c){return SE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return et(c)?rt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Be(c)?t(c):n(c)}}const oP={name:"hardBreakEscape",tokenize:sP};function sP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Be(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const aP={name:"headingAtx",resolve:uP,tokenize:lP};function uP(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"},zn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function lP(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||Be(p)?(e.exit("atxHeading"),t(p)):et(p)?rt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ft(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const cP=["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"],xE=["pre","script","style","textarea"],dP={concrete:!0,name:"htmlFlow",resolveTo:pP,tokenize:mP},fP={partial:!0,tokenize:EP},hP={partial:!0,tokenize:gP};function pP(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function mP(e,t,n){const r=this;let 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),g}function g(O){return O===33?(e.consume(O),b):O===47?(e.consume(O),a=!0,S):O===63?(e.consume(O),o=3,r.interrupt?t:k):xn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function b(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,c=0,_):xn(O)?(e.consume(O),o=4,r.interrupt?t:k):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:k):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:ce:_):n(O)}function S(O){return xn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||ft(O)){const _e=O===47,Oe=u.toLowerCase();return!_e&&!a&&xE.includes(Oe)?(o=1,r.interrupt?t(O):ce(O)):cP.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),v):r.interrupt?t(O):ce(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?P(O):C(O))}return O===45||hn(O)?(e.consume(O),u+=String.fromCharCode(O),A):n(O)}function v(O){return O===62?(e.consume(O),r.interrupt?t:ce):n(O)}function P(O){return et(O)?(e.consume(O),P):$(O)}function C(O){return O===47?(e.consume(O),$):O===58||O===95||xn(O)?(e.consume(O),B):et(O)?(e.consume(O),C):$(O)}function B(O){return O===45||O===46||O===58||O===95||hn(O)?(e.consume(O),B):q(O)}function q(O){return O===61?(e.consume(O),D):et(O)?(e.consume(O),q):C(O)}function D(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,Q):et(O)?(e.consume(O),D):re(O)}function Q(O){return O===d?(e.consume(O),d=null,Te):O===null||Be(O)?n(O):(e.consume(O),Q)}function re(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ft(O)?q(O):(e.consume(O),re)}function Te(O){return O===47||O===62||et(O)?C(O):n(O)}function $(O){return O===62?(e.consume(O),ee):n(O)}function ee(O){return O===null||Be(O)?ce(O):et(O)?(e.consume(O),ee):n(O)}function ce(O){return O===45&&o===2?(e.consume(O),Me):O===60&&o===1?(e.consume(O),de):O===62&&o===4?(e.consume(O),M):O===63&&o===3?(e.consume(O),k):O===93&&o===5?(e.consume(O),ie):Be(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(fP,te,he)(O)):O===null||Be(O)?(e.exit("htmlFlowData"),he(O)):(e.consume(O),ce)}function he(O){return e.check(hP,le,te)(O)}function le(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),be}function be(O){return O===null||Be(O)?he(O):(e.enter("htmlFlowData"),ce(O))}function Me(O){return O===45?(e.consume(O),k):ce(O)}function de(O){return O===47?(e.consume(O),u="",K):ce(O)}function K(O){if(O===62){const _e=u.toLowerCase();return xE.includes(_e)?(e.consume(O),M):ce(O)}return xn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),K):ce(O)}function ie(O){return O===93?(e.consume(O),k):ce(O)}function k(O){return O===62?(e.consume(O),M):O===45&&o===2?(e.consume(O),k):ce(O)}function M(O){return O===null||Be(O)?(e.exit("htmlFlowData"),te(O)):(e.consume(O),M)}function te(O){return e.exit("htmlFlow"),t(O)}}function gP(e,t,n){const r=this;return o;function o(u){return Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function EP(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ca,t,n)}}const yP={name:"htmlText",tokenize:TP};function TP(e,t,n){const r=this;let o,a,u;return c;function c(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),q):k===63?(e.consume(k),C):xn(k)?(e.consume(k),re):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,_):xn(k)?(e.consume(k),P):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function g(k){return k===null?n(k):k===45?(e.consume(k),b):Be(k)?(u=g,de(k)):(e.consume(k),g)}function b(k){return k===45?(e.consume(k),y):g(k)}function y(k){return k===62?Me(k):k===45?b(k):g(k)}function _(k){const M="CDATA[";return k===M.charCodeAt(a++)?(e.consume(k),a===M.length?S:_):n(k)}function S(k){return k===null?n(k):k===93?(e.consume(k),A):Be(k)?(u=S,de(k)):(e.consume(k),S)}function A(k){return k===93?(e.consume(k),v):S(k)}function v(k){return k===62?Me(k):k===93?(e.consume(k),v):S(k)}function P(k){return k===null||k===62?Me(k):Be(k)?(u=P,de(k)):(e.consume(k),P)}function C(k){return k===null?n(k):k===63?(e.consume(k),B):Be(k)?(u=C,de(k)):(e.consume(k),C)}function B(k){return k===62?Me(k):C(k)}function q(k){return xn(k)?(e.consume(k),D):n(k)}function D(k){return k===45||hn(k)?(e.consume(k),D):Q(k)}function Q(k){return Be(k)?(u=Q,de(k)):et(k)?(e.consume(k),Q):Me(k)}function re(k){return k===45||hn(k)?(e.consume(k),re):k===47||k===62||ft(k)?Te(k):n(k)}function Te(k){return k===47?(e.consume(k),Me):k===58||k===95||xn(k)?(e.consume(k),$):Be(k)?(u=Te,de(k)):et(k)?(e.consume(k),Te):Me(k)}function $(k){return k===45||k===46||k===58||k===95||hn(k)?(e.consume(k),$):ee(k)}function ee(k){return k===61?(e.consume(k),ce):Be(k)?(u=ee,de(k)):et(k)?(e.consume(k),ee):Te(k)}function ce(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,he):Be(k)?(u=ce,de(k)):et(k)?(e.consume(k),ce):(e.consume(k),le)}function he(k){return k===o?(e.consume(k),o=void 0,be):k===null?n(k):Be(k)?(u=he,de(k)):(e.consume(k),he)}function le(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ft(k)?Te(k):(e.consume(k),le)}function be(k){return k===47||k===62||ft(k)?Te(k):n(k)}function Me(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function de(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),K}function K(k){return et(k)?rt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):ie(k)}function ie(k){return e.enter("htmlTextData"),u(k)}}const Gf={name:"labelEnd",resolveAll:xP,resolveTo:wP,tokenize:CP},bP={tokenize:AP},_P={tokenize:vP},SP={tokenize:kP};function xP(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&&zn(e,0,e.length,n),e}function wP(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=er(c,e.slice(a+1,a+r+3)),c=er(c,[["enter",p,t]]),c=er(c,Cl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=er(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=er(c,e.slice(u+1)),c=er(c,[["exit",d,t]]),zn(e,a,e.length,c),e}function CP(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(b){return a?a._inactive?g(b):(u=r.parser.defined.includes(gr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(bP,p,u?p:g)(b):b===91?e.attempt(_P,p,u?f:g)(b):u?p(b):g(b)}function f(b){return e.attempt(SP,p,g)(b)}function p(b){return t(b)}function g(b){return a._balanced=!0,n(b)}}function AP(e,t,n){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return ft(g)?va(e,a)(g):a(g)}function a(g){return g===41?p(g):bE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return ft(g)?va(e,d)(g):p(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?SE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function f(g){return ft(g)?va(e,p)(g):p(g)}function p(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function vP(e,t,n){const r=this;return o;function o(c){return _E.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function kP(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 NP={name:"labelStartImage",resolveAll:Gf.resolveAll,tokenize:PP};function PP(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 OP={name:"labelStartLink",resolveAll:Gf.resolveAll,tokenize:IP};function IP(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:RP};function RP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),rt(e,t,"linePrefix")}}const Al={name:"thematicBreak",tokenize:LP};function LP(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||Be(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),et(f)?rt(e,c,"whitespace")(f):c(f))}}const Pn={continuation:{tokenize:BP},exit:HP,name:"list",tokenize:FP},DP={partial:!0,tokenize:zP},MP={partial:!0,tokenize:UP};function FP(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Vf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Al,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Vf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Ca,r.interrupt?n:p,e.attempt(DP,b,g))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function g(y){return et(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function BP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ca,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,rt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!et(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(MP,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,rt(e,e.attempt(Pn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function UP(e,t,n){const r=this;return rt(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 HP(e){e.exit(this.containerState.type)}function zP(e,t,n){const r=this;return rt(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!et(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const wE={name:"setextUnderline",resolveTo:jP,tokenize:$P};function jP(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:F({},e[r][1].start),end:F({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function $P(e,t,n){const r=this;let o;return a;function a(f){let p=r.events.length,g;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){g=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),o=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"),et(f)?rt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Be(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const VP={tokenize:qP};function qP(e){const t=this,n=e.attempt(Ca,r,e.attempt(this.parser.constructs.flowInitial,o,rt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(KN,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 YP={resolveAll:AE()},GP=CE("string"),WP=CE("text");function CE(e){return{resolveAll:AE(e==="text"?XP: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 g=o[p];let b=-1;if(g)for(;++b<g.length;){const y=g[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function AE(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 XP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const f=o[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:F({},r.end)};r.end=F({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const KP=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:tP},disable:{null:[]},document:{42:Pn,43:Pn,45:Pn,48:Pn,49:Pn,50:Pn,51:Pn,52:Pn,53:Pn,54:Pn,55:Pn,56:Pn,57:Pn,62:pE},flow:{35:aP,42:Al,45:[wE,Al],60:dP,61:wE,95:Al,96:yE,126:yE},flowInitial:{[-2]:Yf,[-1]:Yf,32:Yf},insideSpan:{null:[qf,YP]},string:{38:gE,92:mE},text:{[-5]:Wf,[-4]:Wf,[-3]:Wf,33:NP,38:gE,42:qf,60:[ON,yP],91:OP,92:[oP,mE],93:Gf,95:qf,96:VN}},Symbol.toStringTag,{value:"Module"}));function QP(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:Q(q),check:Q(D),consume:P,enter:C,exit:B,interrupt:Q(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:g};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function g(ee){return u=er(u,ee),A(),u[u.length-1]!==null?[]:(re(t,0),f.events=Cl(a,f.events,f),f.events)}function b(ee,ce){return ZP(y(ee),ce)}function y(ee){return JP(u,ee)}function _(){const{_bufferIndex:ee,_index:ce,line:he,column:le,offset:be}=r;return{_bufferIndex:ee,_index:ce,line:he,column:le,offset:be}}function S(ee){o[ee.line]=ee.column,$()}function A(){let ee;for(;r._index<u.length;){const ce=u[r._index];if(typeof ce=="string")for(ee=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ee&&r._bufferIndex<ce.length;)v(ce.charCodeAt(r._bufferIndex));else v(ce)}}function v(ee){p=p(ee)}function P(ee){Be(ee)?(r.line++,r.column=1,r.offset+=ee===-3?2:1,$()):ee!==-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=ee}function C(ee,ce){const he=ce||{};return he.type=ee,he.start=_(),f.events.push(["enter",he,f]),c.push(he),he}function B(ee){const ce=c.pop();return ce.end=_(),f.events.push(["exit",ce,f]),ce}function q(ee,ce){re(ee,ce.from)}function D(ee,ce){ce.restore()}function Q(ee,ce){return he;function he(le,be,Me){let de,K,ie,k;return Array.isArray(le)?te(le):"tokenize"in le?te([le]):M(le);function M(Ce){return $e;function $e(we){const We=we!==null&&Ce[we],ht=we!==null&&Ce.null,on=[...Array.isArray(We)?We:We?[We]:[],...Array.isArray(ht)?ht:ht?[ht]:[]];return te(on)(we)}}function te(Ce){return de=Ce,K=0,Ce.length===0?Me:O(Ce[K])}function O(Ce){return $e;function $e(we){return k=Te(),ie=Ce,Ce.partial||(f.currentConstruct=Ce),Ce.name&&f.parser.constructs.disable.null.includes(Ce.name)?Oe():Ce.tokenize.call(ce?Object.assign(Object.create(f),ce):f,d,_e,Oe)(we)}}function _e(Ce){return ee(ie,k),be}function Oe(Ce){return k.restore(),++K<de.length?O(de[K]):Me}}}function re(ee,ce){ee.resolveAll&&!a.includes(ee)&&a.push(ee),ee.resolve&&zn(f.events,ce,f.events.length-ce,ee.resolve(f.events.slice(ce),f)),ee.resolveTo&&(f.events=ee.resolveTo(f.events,f))}function Te(){const ee=_(),ce=f.previous,he=f.currentConstruct,le=f.events.length,be=Array.from(c);return{from:le,restore:Me};function Me(){r=ee,f.previous=ce,f.currentConstruct=he,f.events.length=le,c=be,$()}}function $(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function JP(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 ZP(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
17
|
+
`+T.stack}return{value:i,source:s,stack:E,digest:null}}function Hm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function zm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var z9=typeof WeakMap=="function"?WeakMap:Map;function $x(i,s,l){l=mi(-1,l),l.tag=3,l.payload={element:null};var h=s.value;return l.callback=function(){hd||(hd=!0,n0=h),zm(i,s)},l}function Vx(i,s,l){l=mi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=s.value;l.payload=function(){return h(E)},l.callback=function(){zm(i,s)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){zm(i,s),typeof h!="function"&&(Gi===null?Gi=new Set([this]):Gi.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function qx(i,s,l){var h=i.pingCache;if(h===null){h=i.pingCache=new z9;var E=new Set;h.set(s,E)}else E=h.get(s),E===void 0&&(E=new Set,h.set(s,E));E.has(l)||(E.add(l),i=t7.bind(null,i,s,l),s.then(i,i))}function Yx(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 Gx(i,s,l,h,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=mi(-1,1),s.tag=2,qi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var j9=M.ReactCurrentOwner,Mn=!1;function An(i,s,l,h){s.child=i===null?hx(s,null,l,h):Vs(s,i.child,l,h)}function Wx(i,s,l,h,E){l=l.render;var T=s.ref;return Ys(s,E),h=Im(i,s,l,h,T,E),l=Rm(),i!==null&&!Mn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,gi(i,s,E)):(vt&&l&&mm(s),s.flags|=1,An(i,s,h,E),s.child)}function Xx(i,s,l,h,E){if(i===null){var T=l.type;return typeof T=="function"&&!l0(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=T,Kx(i,s,T,h,E)):(i=Td(l.type,null,h,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(T=i.child,(i.lanes&E)===0){var x=T.memoizedProps;if(l=l.compare,l=l!==null?l:Tu,l(x,h)&&i.ref===s.ref)return gi(i,s,E)}return s.flags|=1,i=Qi(T,h),i.ref=s.ref,i.return=s,s.child=i}function Kx(i,s,l,h,E){if(i!==null){var T=i.memoizedProps;if(Tu(T,h)&&i.ref===s.ref)if(Mn=!1,s.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Mn=!0);else return s.lanes=i.lanes,gi(i,s,E)}return jm(i,s,l,h,E)}function Qx(i,s,l){var h=s.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(Ks,Xn),Xn|=l;else{if((l&1073741824)===0)return i=T!==null?T.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,bt(Ks,Xn),Xn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:l,bt(Ks,Xn),Xn|=h}else T!==null?(h=T.baseLanes|l,s.memoizedState=null):h=l,bt(Ks,Xn),Xn|=h;return An(i,s,E,l),s.child}function Jx(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function jm(i,s,l,h,E){var T=Dn(l)?vo:gn.current;return T=Hs(s,T),Ys(s,E),l=Im(i,s,l,h,T,E),h=Rm(),i!==null&&!Mn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,gi(i,s,E)):(vt&&h&&mm(s),s.flags|=1,An(i,s,l,E),s.child)}function Zx(i,s,l,h,E){if(Dn(l)){var T=!0;Vc(s)}else T=!1;if(Ys(s,E),s.stateNode===null)ud(i,s),zx(s,l,h),Um(s,l,h,E),h=!0;else if(i===null){var x=s.stateNode,R=s.memoizedProps;x.props=R;var H=x.context,J=l.contextType;typeof J=="object"&&J!==null?J=ur(J):(J=Dn(l)?vo:gn.current,J=Hs(s,J));var le=l.getDerivedStateFromProps,pe=typeof le=="function"||typeof x.getSnapshotBeforeUpdate=="function";pe||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==h||H!==J)&&jx(s,x,h,J),Vi=!1;var se=s.memoizedState;x.state=se,Zc(s,h,x,E),H=s.memoizedState,R!==h||se!==H||Ln.current||Vi?(typeof le=="function"&&(Bm(s,l,le,h),H=s.memoizedState),(R=Vi||Hx(s,l,R,h,se,H,J))?(pe||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=H),x.props=h,x.state=H,x.context=J,h=R):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,mx(i,s),R=s.memoizedProps,J=s.type===s.elementType?R:Ar(s.type,R),x.props=J,pe=s.pendingProps,se=x.context,H=l.contextType,typeof H=="object"&&H!==null?H=ur(H):(H=Dn(l)?vo:gn.current,H=Hs(s,H));var xe=l.getDerivedStateFromProps;(le=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==pe||se!==H)&&jx(s,x,h,H),Vi=!1,se=s.memoizedState,x.state=se,Zc(s,h,x,E);var ke=s.memoizedState;R!==pe||se!==ke||Ln.current||Vi?(typeof xe=="function"&&(Bm(s,l,xe,h),ke=s.memoizedState),(J=Vi||Hx(s,l,J,h,se,ke,H)||!1)?(le||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,ke,H),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,ke,H)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ke),x.props=h,x.state=ke,x.context=H,h=J):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),h=!1)}return $m(i,s,l,h,T,E)}function $m(i,s,l,h,E,T){Jx(i,s);var x=(s.flags&128)!==0;if(!h&&!x)return E&&ix(s,l,!1),gi(i,s,T);h=s.stateNode,j9.current=s;var R=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&x?(s.child=Vs(s,i.child,null,T),s.child=Vs(s,null,R,T)):An(i,s,R,T),s.memoizedState=h.state,E&&ix(s,l,!0),s.child}function e2(i){var s=i.stateNode;s.pendingContext?nx(i,s.pendingContext,s.pendingContext!==s.context):s.context&&nx(i,s.context,!1),Cm(i,s.containerInfo)}function t2(i,s,l,h,E){return $s(),Tm(E),s.flags|=256,An(i,s,l,h),s.child}var Vm={dehydrated:null,treeContext:null,retryLane:0};function qm(i){return{baseLanes:i,cachePool:null,transitions:null}}function n2(i,s,l){var h=s.pendingProps,E=Nt.current,T=!1,x=(s.flags&128)!==0,R;if((R=x)||(R=i!==null&&i.memoizedState===null?!1:(E&2)!==0),R?(T=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(Nt,E&1),i===null)return ym(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,T?(h=s.mode,T=s.child,x={mode:"hidden",children:x},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=x):T=bd(x,h,0,null),i=Fo(i,h,l,null),T.return=s,i.return=s,T.sibling=i,s.child=T,s.child.memoizedState=qm(l),s.memoizedState=Vm,i):Ym(s,x));if(E=i.memoizedState,E!==null&&(R=E.dehydrated,R!==null))return $9(i,s,x,h,R,E,l);if(T){T=h.fallback,x=s.mode,E=i.child,R=E.sibling;var H={mode:"hidden",children:h.children};return(x&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=H,s.deletions=null):(h=Qi(E,H),h.subtreeFlags=E.subtreeFlags&14680064),R!==null?T=Qi(R,T):(T=Fo(T,x,l,null),T.flags|=2),T.return=s,h.return=s,h.sibling=T,s.child=h,h=T,T=s.child,x=i.child.memoizedState,x=x===null?qm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},T.memoizedState=x,T.childLanes=i.childLanes&~l,s.memoizedState=Vm,h}return T=i.child,i=T.sibling,h=Qi(T,{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 Ym(i,s){return s=bd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ad(i,s,l,h){return h!==null&&Tm(h),Vs(s,i.child,null,l),i=Ym(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function $9(i,s,l,h,E,T,x){if(l)return s.flags&256?(s.flags&=-257,h=Hm(Error(n(422))),ad(i,s,x,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(T=h.fallback,E=s.mode,h=bd({mode:"visible",children:h.children},E,0,null),T=Fo(T,E,x,null),T.flags|=2,h.return=s,T.return=s,h.sibling=T,s.child=h,(s.mode&1)!==0&&Vs(s,i.child,null,x),s.child.memoizedState=qm(x),s.memoizedState=Vm,T);if((s.mode&1)===0)return ad(i,s,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var R=h.dgst;return h=R,T=Error(n(419)),h=Hm(T,h,void 0),ad(i,s,x,h)}if(R=(x&i.childLanes)!==0,Mn||R){if(h=tn,h!==null){switch(x&-x){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|x))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,pi(i,E),kr(h,i,E,-1))}return u0(),h=Hm(Error(n(421))),ad(i,s,x,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=n7.bind(null,i),E._reactRetry=s,null):(i=T.treeContext,Wn=Hi(E.nextSibling),Gn=s,vt=!0,wr=null,i!==null&&(sr[ar++]=fi,sr[ar++]=hi,sr[ar++]=ko,fi=i.id,hi=i.overflow,ko=s),s=Ym(s,h.children),s.flags|=4096,s)}function r2(i,s,l){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),xm(i.return,s,l)}function Gm(i,s,l,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(T.isBackwards=s,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=l,T.tailMode=E)}function i2(i,s,l){var h=s.pendingProps,E=h.revealOrder,T=h.tail;if(An(i,s,h.children,l),h=Nt.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&&r2(i,l,s);else if(i.tag===19)r2(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(bt(Nt,h),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(l=s.child,E=null;l!==null;)i=l.alternate,i!==null&&ed(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),Gm(s,!1,E,l,T);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&ed(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Gm(s,!0,l,null,T);break;case"together":Gm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ud(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function gi(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),Ro|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Qi(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Qi(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function V9(i,s,l){switch(s.tag){case 3:e2(s),$s();break;case 5:yx(s);break;case 1:Dn(s.type)&&Vc(s);break;case 4:Cm(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;bt(Kc,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(bt(Nt,Nt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?n2(i,s,l):(bt(Nt,Nt.current&1),i=gi(i,s,l),i!==null?i.sibling:null);bt(Nt,Nt.current&1);break;case 19:if(h=(l&s.childLanes)!==0,(i.flags&128)!==0){if(h)return i2(i,s,l);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(Nt,Nt.current),h)break;return null;case 22:case 23:return s.lanes=0,Qx(i,s,l)}return gi(i,s,l)}var o2,Wm,s2,a2;o2=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}},Wm=function(){},s2=function(i,s,l,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,Oo(Xr.current);var T=null;switch(l){case"input":E=Rn(i,E),h=Rn(i,h),T=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),T=[];break;case"textarea":E=dt(i,E),h=dt(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=zc)}sn(l,h);var x;l=null;for(J in E)if(!h.hasOwnProperty(J)&&E.hasOwnProperty(J)&&E[J]!=null)if(J==="style"){var R=E[J];for(x in R)R.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else J!=="dangerouslySetInnerHTML"&&J!=="children"&&J!=="suppressContentEditableWarning"&&J!=="suppressHydrationWarning"&&J!=="autoFocus"&&(o.hasOwnProperty(J)?T||(T=[]):(T=T||[]).push(J,null));for(J in h){var H=h[J];if(R=E!=null?E[J]:void 0,h.hasOwnProperty(J)&&H!==R&&(H!=null||R!=null))if(J==="style")if(R){for(x in R)!R.hasOwnProperty(x)||H&&H.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in H)H.hasOwnProperty(x)&&R[x]!==H[x]&&(l||(l={}),l[x]=H[x])}else l||(T||(T=[]),T.push(J,l)),l=H;else J==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,R=R?R.__html:void 0,H!=null&&R!==H&&(T=T||[]).push(J,H)):J==="children"?typeof H!="string"&&typeof H!="number"||(T=T||[]).push(J,""+H):J!=="suppressContentEditableWarning"&&J!=="suppressHydrationWarning"&&(o.hasOwnProperty(J)?(H!=null&&J==="onScroll"&&St("scroll",i),T||R===H||(T=[])):(T=T||[]).push(J,H))}l&&(T=T||[]).push("style",l);var J=T;(s.updateQueue=J)&&(s.flags|=4)}},a2=function(i,s,l,h){l!==h&&(s.flags|=4)};function Lu(i,s){if(!vt)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 yn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(s)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,s}function q9(i,s,l){var h=s.pendingProps;switch(gm(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yn(s),null;case 1:return Dn(s.type)&&$c(),yn(s),null;case 3:return h=s.stateNode,Gs(),xt(Ln),xt(gn),Nm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Wc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,wr!==null&&(o0(wr),wr=null))),Wm(i,s),yn(s),null;case 5:vm(s);var E=Oo(Nu.current);if(l=s.type,i!==null&&s.stateNode!=null)s2(i,s,l,h,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return yn(s),null}if(i=Oo(Xr.current),Wc(s)){h=s.stateNode,l=s.type;var T=s.memoizedProps;switch(h[Wr]=s,h[wu]=T,i=(s.mode&1)!==0,l){case"dialog":St("cancel",h),St("close",h);break;case"iframe":case"object":case"embed":St("load",h);break;case"video":case"audio":for(E=0;E<_u.length;E++)St(_u[E],h);break;case"source":St("error",h);break;case"img":case"image":case"link":St("error",h),St("load",h);break;case"details":St("toggle",h);break;case"input":xo(h,T),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},St("invalid",h);break;case"textarea":lt(h,T),St("invalid",h)}sn(l,T),E=null;for(var x in T)if(T.hasOwnProperty(x)){var R=T[x];x==="children"?typeof R=="string"?h.textContent!==R&&(T.suppressHydrationWarning!==!0&&Hc(h.textContent,R,i),E=["children",R]):typeof R=="number"&&h.textContent!==""+R&&(T.suppressHydrationWarning!==!0&&Hc(h.textContent,R,i),E=["children",""+R]):o.hasOwnProperty(x)&&R!=null&&x==="onScroll"&&St("scroll",h)}switch(l){case"input":on(h),ve(h,T,!0);break;case"textarea":on(h),Ct(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=zc)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{x=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ne(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Wr]=s,i[wu]=h,o2(i,s,!1,!1),s.stateNode=i;e:{switch(x=Yr(l,h),l){case"dialog":St("cancel",i),St("close",i),E=h;break;case"iframe":case"object":case"embed":St("load",i),E=h;break;case"video":case"audio":for(E=0;E<_u.length;E++)St(_u[E],i);E=h;break;case"source":St("error",i),E=h;break;case"img":case"image":case"link":St("error",i),St("load",i),E=h;break;case"details":St("toggle",i),E=h;break;case"input":xo(i,h),E=Rn(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),St("invalid",i);break;case"textarea":lt(i,h),E=dt(i,h),St("invalid",i);break;default:E=h}sn(l,E),R=E;for(T in R)if(R.hasOwnProperty(T)){var H=R[T];T==="style"?Ri(i,H):T==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Ve(i,H)):T==="children"?typeof H=="string"?(l!=="textarea"||H!=="")&&Xe(i,H):typeof H=="number"&&Xe(i,""+H):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(o.hasOwnProperty(T)?H!=null&&T==="onScroll"&&St("scroll",i):H!=null&&A(i,T,H,x))}switch(l){case"input":on(i),ve(i,h,!1);break;case"textarea":on(i),Ct(i);break;case"option":h.value!=null&&i.setAttribute("value",""+we(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?Qe(i,!!h.multiple,T,!1):h.defaultValue!=null&&Qe(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=zc)}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 yn(s),null;case 6:if(i&&s.stateNode!=null)a2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(l=Oo(Nu.current),Oo(Xr.current),Wc(s)){if(h=s.stateNode,l=s.memoizedProps,h[Wr]=s,(T=h.nodeValue!==l)&&(i=Gn,i!==null))switch(i.tag){case 3:Hc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Hc(h.nodeValue,l,(i.mode&1)!==0)}T&&(s.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Wr]=s,s.stateNode=h}return yn(s),null;case 13:if(xt(Nt),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(vt&&Wn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)cx(),$s(),s.flags|=98560,T=!1;else if(T=Wc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=s.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Wr]=s}else $s(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;yn(s),T=!1}else wr!==null&&(o0(wr),wr=null),T=!0;if(!T)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||(Nt.current&1)!==0?Wt===0&&(Wt=3):u0())),s.updateQueue!==null&&(s.flags|=4),yn(s),null);case 4:return Gs(),Wm(i,s),i===null&&Su(s.stateNode.containerInfo),yn(s),null;case 10:return Sm(s.type._context),yn(s),null;case 17:return Dn(s.type)&&$c(),yn(s),null;case 19:if(xt(Nt),T=s.memoizedState,T===null)return yn(s),null;if(h=(s.flags&128)!==0,x=T.rendering,x===null)if(h)Lu(T,!1);else{if(Wt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=ed(i),x!==null){for(s.flags|=128,Lu(T,!1),h=x.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=l,l=s.child;l!==null;)T=l,i=h,T.flags&=14680066,x=T.alternate,x===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=x.childLanes,T.lanes=x.lanes,T.child=x.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=x.memoizedProps,T.memoizedState=x.memoizedState,T.updateQueue=x.updateQueue,T.type=x.type,i=x.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return bt(Nt,Nt.current&1|2),s.child}i=i.sibling}T.tail!==null&&Dt()>Qs&&(s.flags|=128,h=!0,Lu(T,!1),s.lanes=4194304)}else{if(!h)if(i=ed(x),i!==null){if(s.flags|=128,h=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Lu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!x.alternate&&!vt)return yn(s),null}else 2*Dt()-T.renderingStartTime>Qs&&l!==1073741824&&(s.flags|=128,h=!0,Lu(T,!1),s.lanes=4194304);T.isBackwards?(x.sibling=s.child,s.child=x):(l=T.last,l!==null?l.sibling=x:s.child=x,T.last=x)}return T.tail!==null?(s=T.tail,T.rendering=s,T.tail=s.sibling,T.renderingStartTime=Dt(),s.sibling=null,l=Nt.current,bt(Nt,h?l&1|2:l&1),s):(yn(s),null);case 22:case 23:return a0(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(Xn&1073741824)!==0&&(yn(s),s.subtreeFlags&6&&(s.flags|=8192)):yn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function Y9(i,s){switch(gm(s),s.tag){case 1:return Dn(s.type)&&$c(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Gs(),xt(Ln),xt(gn),Nm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return vm(s),null;case 13:if(xt(Nt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));$s()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return xt(Nt),null;case 4:return Gs(),null;case 10:return Sm(s.type._context),null;case 22:case 23:return a0(),null;case 24:return null;default:return null}}var ld=!1,Tn=!1,G9=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function Xs(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){It(i,s,h)}else l.current=null}function Xm(i,s,l){try{l()}catch(h){It(i,s,h)}}var u2=!1;function W9(i,s){if(am=Nc,i=HS(),Zp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{l.nodeType,T.nodeType}catch(ye){l=null;break e}var x=0,R=-1,H=-1,J=0,le=0,pe=i,se=null;t:for(;;){for(var xe;pe!==l||E!==0&&pe.nodeType!==3||(R=x+E),pe!==T||h!==0&&pe.nodeType!==3||(H=x+h),pe.nodeType===3&&(x+=pe.nodeValue.length),(xe=pe.firstChild)!==null;)se=pe,pe=xe;for(;;){if(pe===i)break t;if(se===l&&++J===E&&(R=x),se===T&&++le===h&&(H=x),(xe=pe.nextSibling)!==null)break;pe=se,se=pe.parentNode}pe=xe}l=R===-1||H===-1?null:{start:R,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(um={focusedElem:i,selectionRange:l},Nc=!1,Ce=s;Ce!==null;)if(s=Ce,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ce=i;else for(;Ce!==null;){s=Ce;try{var ke=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Pe=ke.memoizedProps,Mt=ke.memoizedState,Y=s.stateNode,z=Y.getSnapshotBeforeUpdate(s.elementType===s.type?Pe:Ar(s.type,Pe),Mt);Y.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var X=s.stateNode.containerInfo;X.nodeType===1?X.textContent="":X.nodeType===9&&X.documentElement&&X.removeChild(X.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){It(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,Ce=i;break}Ce=s.return}return ke=u2,u2=!1,ke}function Du(i,s,l){var h=s.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Xm(s,l,T)}E=E.next}while(E!==h)}}function cd(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 Km(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 l2(i){var s=i.alternate;s!==null&&(i.alternate=null,l2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Wr],delete s[wu],delete s[fm],delete s[P9],delete s[O9])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function c2(i){return i.tag===5||i.tag===3||i.tag===4}function d2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||c2(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Qm(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=zc));else if(h!==4&&(i=i.child,i!==null))for(Qm(i,s,l),i=i.sibling;i!==null;)Qm(i,s,l),i=i.sibling}function Jm(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(Jm(i,s,l),i=i.sibling;i!==null;)Jm(i,s,l),i=i.sibling}var an=null,Cr=!1;function Yi(i,s,l){for(l=l.child;l!==null;)f2(i,s,l),l=l.sibling}function f2(i,s,l){if(Gr&&typeof Gr.onCommitFiberUnmount=="function")try{Gr.onCommitFiberUnmount(xc,l)}catch(R){}switch(l.tag){case 5:Tn||Xs(l,s);case 6:var h=an,E=Cr;an=null,Yi(i,s,l),an=h,Cr=E,an!==null&&(Cr?(i=an,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):an.removeChild(l.stateNode));break;case 18:an!==null&&(Cr?(i=an,l=l.stateNode,i.nodeType===8?dm(i.parentNode,l):i.nodeType===1&&dm(i,l),hu(i)):dm(an,l.stateNode));break;case 4:h=an,E=Cr,an=l.stateNode.containerInfo,Cr=!0,Yi(i,s,l),an=h,Cr=E;break;case 0:case 11:case 14:case 15:if(!Tn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,x=T.destroy;T=T.tag,x!==void 0&&((T&2)!==0||(T&4)!==0)&&Xm(l,s,x),E=E.next}while(E!==h)}Yi(i,s,l);break;case 1:if(!Tn&&(Xs(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(R){It(l,s,R)}Yi(i,s,l);break;case 21:Yi(i,s,l);break;case 22:l.mode&1?(Tn=(h=Tn)||l.memoizedState!==null,Yi(i,s,l),Tn=h):Yi(i,s,l);break;default:Yi(i,s,l)}}function h2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new G9),s.forEach(function(h){var E=r7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function vr(i,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var T=i,x=s,R=x;e:for(;R!==null;){switch(R.tag){case 5:an=R.stateNode,Cr=!1;break e;case 3:an=R.stateNode.containerInfo,Cr=!0;break e;case 4:an=R.stateNode.containerInfo,Cr=!0;break e}R=R.return}if(an===null)throw Error(n(160));f2(T,x,E),an=null,Cr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(J){It(E,s,J)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)p2(s,i),s=s.sibling}function p2(i,s){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(vr(s,i),Qr(i),h&4){try{Du(3,i,i.return),cd(3,i)}catch(Pe){It(i,i.return,Pe)}try{Du(5,i,i.return)}catch(Pe){It(i,i.return,Pe)}}break;case 1:vr(s,i),Qr(i),h&512&&l!==null&&Xs(l,l.return);break;case 5:if(vr(s,i),Qr(i),h&512&&l!==null&&Xs(l,l.return),i.flags&32){var E=i.stateNode;try{Xe(E,"")}catch(Pe){It(i,i.return,Pe)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,x=l!==null?l.memoizedProps:T,R=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{R==="input"&&T.type==="radio"&&T.name!=null&&Ii(E,T),Yr(R,x);var J=Yr(R,T);for(x=0;x<H.length;x+=2){var le=H[x],pe=H[x+1];le==="style"?Ri(E,pe):le==="dangerouslySetInnerHTML"?Ve(E,pe):le==="children"?Xe(E,pe):A(E,le,pe,J)}switch(R){case"input":li(E,T);break;case"textarea":wn(E,T);break;case"select":var se=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var xe=T.value;xe!=null?Qe(E,!!T.multiple,xe,!1):se!==!!T.multiple&&(T.defaultValue!=null?Qe(E,!!T.multiple,T.defaultValue,!0):Qe(E,!!T.multiple,T.multiple?[]:"",!1))}E[wu]=T}catch(Pe){It(i,i.return,Pe)}}break;case 6:if(vr(s,i),Qr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Pe){It(i,i.return,Pe)}}break;case 3:if(vr(s,i),Qr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{hu(s.containerInfo)}catch(Pe){It(i,i.return,Pe)}break;case 4:vr(s,i),Qr(i);break;case 13:vr(s,i),Qr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(t0=Dt())),h&4&&h2(i);break;case 22:if(le=l!==null&&l.memoizedState!==null,i.mode&1?(Tn=(J=Tn)||le,vr(s,i),Tn=J):vr(s,i),Qr(i),h&8192){if(J=i.memoizedState!==null,(i.stateNode.isHidden=J)&&!le&&(i.mode&1)!==0)for(Ce=i,le=i.child;le!==null;){for(pe=Ce=le;Ce!==null;){switch(se=Ce,xe=se.child,se.tag){case 0:case 11:case 14:case 15:Du(4,se,se.return);break;case 1:Xs(se,se.return);var ke=se.stateNode;if(typeof ke.componentWillUnmount=="function"){h=se,l=se.return;try{s=h,ke.props=s.memoizedProps,ke.state=s.memoizedState,ke.componentWillUnmount()}catch(Pe){It(h,l,Pe)}}break;case 5:Xs(se,se.return);break;case 22:if(se.memoizedState!==null){E2(pe);continue}}xe!==null?(xe.return=se,Ce=xe):E2(pe)}le=le.sibling}e:for(le=null,pe=i;;){if(pe.tag===5){if(le===null){le=pe;try{E=pe.stateNode,J?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(R=pe.stateNode,H=pe.memoizedProps.style,x=H!=null&&H.hasOwnProperty("display")?H.display:null,R.style.display=or("display",x))}catch(Pe){It(i,i.return,Pe)}}}else if(pe.tag===6){if(le===null)try{pe.stateNode.nodeValue=J?"":pe.memoizedProps}catch(Pe){It(i,i.return,Pe)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;le===pe&&(le=null),pe=pe.return}le===pe&&(le=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:vr(s,i),Qr(i),h&4&&h2(i);break;case 21:break;default:vr(s,i),Qr(i)}}function Qr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(c2(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Xe(E,""),h.flags&=-33);var T=d2(i);Jm(i,T,E);break;case 3:case 4:var x=h.stateNode.containerInfo,R=d2(i);Qm(i,R,x);break;default:throw Error(n(161))}}catch(H){It(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function X9(i,s,l){Ce=i,m2(i)}function m2(i,s,l){for(var h=(i.mode&1)!==0;Ce!==null;){var E=Ce,T=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||ld;if(!x){var R=E.alternate,H=R!==null&&R.memoizedState!==null||Tn;R=ld;var J=Tn;if(ld=x,(Tn=H)&&!J)for(Ce=E;Ce!==null;)x=Ce,H=x.child,x.tag===22&&x.memoizedState!==null?y2(E):H!==null?(H.return=x,Ce=H):y2(E);for(;T!==null;)Ce=T,m2(T),T=T.sibling;Ce=E,ld=R,Tn=J}g2(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Ce=T):g2(i)}}function g2(i){for(;Ce!==null;){var s=Ce;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Tn||cd(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!Tn)if(l===null)h.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:Ar(s.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=s.updateQueue;T!==null&&Ex(s,T,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}Ex(s,x,l)}break;case 5:var R=s.stateNode;if(l===null&&s.flags&4){l=R;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&l.focus();break;case"img":H.src&&(l.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var J=s.alternate;if(J!==null){var le=J.memoizedState;if(le!==null){var pe=le.dehydrated;pe!==null&&hu(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Tn||s.flags&512&&Km(s)}catch(se){It(s,s.return,se)}}if(s===i){Ce=null;break}if(l=s.sibling,l!==null){l.return=s.return,Ce=l;break}Ce=s.return}}function E2(i){for(;Ce!==null;){var s=Ce;if(s===i){Ce=null;break}var l=s.sibling;if(l!==null){l.return=s.return,Ce=l;break}Ce=s.return}}function y2(i){for(;Ce!==null;){var s=Ce;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{cd(4,s)}catch(H){It(s,l,H)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch(H){It(s,E,H)}}var T=s.return;try{Km(s)}catch(H){It(s,T,H)}break;case 5:var x=s.return;try{Km(s)}catch(H){It(s,x,H)}}}catch(H){It(s,s.return,H)}if(s===i){Ce=null;break}var R=s.sibling;if(R!==null){R.return=s.return,Ce=R;break}Ce=s.return}}var K9=Math.ceil,dd=M.ReactCurrentDispatcher,Zm=M.ReactCurrentOwner,cr=M.ReactCurrentBatchConfig,it=0,tn=null,$t=null,un=0,Xn=0,Ks=zi(0),Wt=0,Mu=null,Ro=0,fd=0,e0=0,Fu=null,Fn=null,t0=0,Qs=1/0,Ei=null,hd=!1,n0=null,Gi=null,pd=!1,Wi=null,md=0,Bu=0,r0=null,gd=-1,Ed=0;function Cn(){return(it&6)!==0?Dt():gd!==-1?gd:gd=Dt()}function Xi(i){return(i.mode&1)===0?1:(it&2)!==0&&un!==0?un&-un:R9.transition!==null?(Ed===0&&(Ed=dS()),Ed):(i=ct,i!==0||(i=window.event,i=i===void 0?16:bS(i.type)),i)}function kr(i,s,l,h){if(50<Bu)throw Bu=0,r0=null,Error(n(185));uu(i,l,h),((it&2)===0||i!==tn)&&(i===tn&&((it&2)===0&&(fd|=l),Wt===4&&Ki(i,un)),Bn(i,h),l===1&&it===0&&(s.mode&1)===0&&(Qs=Dt()+500,qc&&$i()))}function Bn(i,s){var l=i.callbackNode;RB(i,s);var h=Cc(i,i===tn?un:0);if(h===0)l!==null&&uS(l),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(l!=null&&uS(l),s===1)i.tag===0?I9(b2.bind(null,i)):ox(b2.bind(null,i)),k9(function(){(it&6)===0&&$i()}),l=null;else{switch(fS(h)){case 1:l=Mp;break;case 4:l=lS;break;case 16:l=Sc;break;case 536870912:l=cS;break;default:l=Sc}l=k2(l,T2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function T2(i,s){if(gd=-1,Ed=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Js()&&i.callbackNode!==l)return null;var h=Cc(i,i===tn?un:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=yd(i,h);else{s=h;var E=it;it|=2;var T=S2();(tn!==i||un!==s)&&(Ei=null,Qs=Dt()+500,Do(i,s));do try{Z9();break}catch(R){_2(i,R)}while(!0);_m(),dd.current=T,it=E,$t!==null?s=0:(tn=null,un=0,s=Wt)}if(s!==0){if(s===2&&(E=Fp(i),E!==0&&(h=E,s=i0(i,E))),s===1)throw l=Mu,Do(i,0),Ki(i,h),Bn(i,Dt()),l;if(s===6)Ki(i,h);else{if(E=i.current.alternate,(h&30)===0&&!Q9(E)&&(s=yd(i,h),s===2&&(T=Fp(i),T!==0&&(h=T,s=i0(i,T))),s===1))throw l=Mu,Do(i,0),Ki(i,h),Bn(i,Dt()),l;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Mo(i,Fn,Ei);break;case 3:if(Ki(i,h),(h&130023424)===h&&(s=t0+500-Dt(),10<s)){if(Cc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){Cn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=cm(Mo.bind(null,i,Fn,Ei),s);break}Mo(i,Fn,Ei);break;case 4:if(Ki(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var x=31-Sr(h);T=1<<x,x=s[x],x>E&&(E=x),h&=~T}if(h=E,h=Dt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*K9(h/1960))-h,10<h){i.timeoutHandle=cm(Mo.bind(null,i,Fn,Ei),h);break}Mo(i,Fn,Ei);break;case 5:Mo(i,Fn,Ei);break;default:throw Error(n(329))}}}return Bn(i,Dt()),i.callbackNode===l?T2.bind(null,i):null}function i0(i,s){var l=Fu;return i.current.memoizedState.isDehydrated&&(Do(i,s).flags|=256),i=yd(i,s),i!==2&&(s=Fn,Fn=l,s!==null&&o0(s)),i}function o0(i){Fn===null?Fn=i:Fn.push.apply(Fn,i)}function Q9(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],T=E.getSnapshot;E=E.value;try{if(!xr(T(),E))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 Ki(i,s){for(s&=~e0,s&=~fd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-Sr(s),h=1<<l;i[l]=-1,s&=~h}}function b2(i){if((it&6)!==0)throw Error(n(327));Js();var s=Cc(i,0);if((s&1)===0)return Bn(i,Dt()),null;var l=yd(i,s);if(i.tag!==0&&l===2){var h=Fp(i);h!==0&&(s=h,l=i0(i,h))}if(l===1)throw l=Mu,Do(i,0),Ki(i,s),Bn(i,Dt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Mo(i,Fn,Ei),Bn(i,Dt()),null}function s0(i,s){var l=it;it|=1;try{return i(s)}finally{it=l,it===0&&(Qs=Dt()+500,qc&&$i())}}function Lo(i){Wi!==null&&Wi.tag===0&&(it&6)===0&&Js();var s=it;it|=1;var l=cr.transition,h=ct;try{if(cr.transition=null,ct=1,i)return i()}finally{ct=h,cr.transition=l,it=s,(it&6)===0&&$i()}}function a0(){Xn=Ks.current,xt(Ks)}function Do(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,v9(l)),$t!==null)for(l=$t.return;l!==null;){var h=l;switch(gm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&$c();break;case 3:Gs(),xt(Ln),xt(gn),Nm();break;case 5:vm(h);break;case 4:Gs();break;case 13:xt(Nt);break;case 19:xt(Nt);break;case 10:Sm(h.type._context);break;case 22:case 23:a0()}l=l.return}if(tn=i,$t=i=Qi(i.current,null),un=Xn=s,Wt=0,Mu=null,e0=fd=Ro=0,Fn=Fu=null,Po!==null){for(s=0;s<Po.length;s++)if(l=Po[s],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,T=l.pending;if(T!==null){var x=T.next;T.next=E,h.next=x}l.pending=h}Po=null}return i}function _2(i,s){do{var l=$t;try{if(_m(),td.current=od,nd){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}nd=!1}if(Io=0,en=Gt=Pt=null,Pu=!1,Ou=0,Zm.current=null,l===null||l.return===null){Wt=1,Mu=s,$t=null;break}e:{var T=i,x=l.return,R=l,H=s;if(s=un,R.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var J=H,le=R,pe=le.tag;if((le.mode&1)===0&&(pe===0||pe===11||pe===15)){var se=le.alternate;se?(le.updateQueue=se.updateQueue,le.memoizedState=se.memoizedState,le.lanes=se.lanes):(le.updateQueue=null,le.memoizedState=null)}var xe=Yx(x);if(xe!==null){xe.flags&=-257,Gx(xe,x,R,T,s),xe.mode&1&&qx(T,J,s),s=xe,H=J;var ke=s.updateQueue;if(ke===null){var Pe=new Set;Pe.add(H),s.updateQueue=Pe}else ke.add(H);break e}else{if((s&1)===0){qx(T,J,s),u0();break e}H=Error(n(426))}}else if(vt&&R.mode&1){var Mt=Yx(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),Gx(Mt,x,R,T,s),Tm(Ws(H,R));break e}}T=H=Ws(H,R),Wt!==4&&(Wt=2),Fu===null?Fu=[T]:Fu.push(T),T=x;do{switch(T.tag){case 3:T.flags|=65536,s&=-s,T.lanes|=s;var Y=$x(T,H,s);gx(T,Y);break e;case 1:R=H;var z=T.type,X=T.stateNode;if((T.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||X!==null&&typeof X.componentDidCatch=="function"&&(Gi===null||!Gi.has(X)))){T.flags|=65536,s&=-s,T.lanes|=s;var ye=Vx(T,R,s);gx(T,ye);break e}}T=T.return}while(T!==null)}w2(l)}catch(Le){s=Le,$t===l&&l!==null&&($t=l=l.return);continue}break}while(!0)}function S2(){var i=dd.current;return dd.current=od,i===null?od:i}function u0(){(Wt===0||Wt===3||Wt===2)&&(Wt=4),tn===null||(Ro&268435455)===0&&(fd&268435455)===0||Ki(tn,un)}function yd(i,s){var l=it;it|=2;var h=S2();(tn!==i||un!==s)&&(Ei=null,Do(i,s));do try{J9();break}catch(E){_2(i,E)}while(!0);if(_m(),it=l,dd.current=h,$t!==null)throw Error(n(261));return tn=null,un=0,Wt}function J9(){for(;$t!==null;)x2($t)}function Z9(){for(;$t!==null&&!wB();)x2($t)}function x2(i){var s=v2(i.alternate,i,Xn);i.memoizedProps=i.pendingProps,s===null?w2(i):$t=s,Zm.current=null}function w2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=q9(l,s,Xn),l!==null){$t=l;return}}else{if(l=Y9(l,s),l!==null){l.flags&=32767,$t=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Wt=6,$t=null;return}}if(s=s.sibling,s!==null){$t=s;return}$t=s=i}while(s!==null);Wt===0&&(Wt=5)}function Mo(i,s,l){var h=ct,E=cr.transition;try{cr.transition=null,ct=1,e7(i,s,l,h)}finally{cr.transition=E,ct=h}return null}function e7(i,s,l,h){do Js();while(Wi!==null);if((it&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=l.lanes|l.childLanes;if(LB(i,T),i===tn&&($t=tn=null,un=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||pd||(pd=!0,k2(Sc,function(){return Js(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=cr.transition,cr.transition=null;var x=ct;ct=1;var R=it;it|=4,Zm.current=null,W9(i,l),p2(l,i),b9(um),Nc=!!am,um=am=null,i.current=l,X9(l),AB(),it=R,ct=x,cr.transition=T}else i.current=l;if(pd&&(pd=!1,Wi=i,md=E),T=i.pendingLanes,T===0&&(Gi=null),kB(l.stateNode),Bn(i,Dt()),s!==null)for(h=i.onRecoverableError,l=0;l<s.length;l++)E=s[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(hd)throw hd=!1,i=n0,n0=null,i;return(md&1)!==0&&i.tag!==0&&Js(),T=i.pendingLanes,(T&1)!==0?i===r0?Bu++:(Bu=0,r0=i):Bu=0,$i(),null}function Js(){if(Wi!==null){var i=fS(md),s=cr.transition,l=ct;try{if(cr.transition=null,ct=16>i?16:i,Wi===null)var h=!1;else{if(i=Wi,Wi=null,md=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,Ce=i.current;Ce!==null;){var T=Ce,x=T.child;if((Ce.flags&16)!==0){var R=T.deletions;if(R!==null){for(var H=0;H<R.length;H++){var J=R[H];for(Ce=J;Ce!==null;){var le=Ce;switch(le.tag){case 0:case 11:case 15:Du(8,le,T)}var pe=le.child;if(pe!==null)pe.return=le,Ce=pe;else for(;Ce!==null;){le=Ce;var se=le.sibling,xe=le.return;if(l2(le),le===J){Ce=null;break}if(se!==null){se.return=xe,Ce=se;break}Ce=xe}}}var ke=T.alternate;if(ke!==null){var Pe=ke.child;if(Pe!==null){ke.child=null;do{var Mt=Pe.sibling;Pe.sibling=null,Pe=Mt}while(Pe!==null)}}Ce=T}}if((T.subtreeFlags&2064)!==0&&x!==null)x.return=T,Ce=x;else e:for(;Ce!==null;){if(T=Ce,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Du(9,T,T.return)}var Y=T.sibling;if(Y!==null){Y.return=T.return,Ce=Y;break e}Ce=T.return}}var z=i.current;for(Ce=z;Ce!==null;){x=Ce;var X=x.child;if((x.subtreeFlags&2064)!==0&&X!==null)X.return=x,Ce=X;else e:for(x=z;Ce!==null;){if(R=Ce,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:cd(9,R)}}catch(Le){It(R,R.return,Le)}if(R===x){Ce=null;break e}var ye=R.sibling;if(ye!==null){ye.return=R.return,Ce=ye;break e}Ce=R.return}}if(it=E,$i(),Gr&&typeof Gr.onPostCommitFiberRoot=="function")try{Gr.onPostCommitFiberRoot(xc,i)}catch(Le){}h=!0}return h}finally{ct=l,cr.transition=s}}return!1}function A2(i,s,l){s=Ws(l,s),s=$x(i,s,1),i=qi(i,s,1),s=Cn(),i!==null&&(uu(i,1,s),Bn(i,s))}function It(i,s,l){if(i.tag===3)A2(i,i,l);else for(;s!==null;){if(s.tag===3){A2(s,i,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Gi===null||!Gi.has(h))){i=Ws(l,i),i=Vx(s,i,1),s=qi(s,i,1),i=Cn(),s!==null&&(uu(s,1,i),Bn(s,i));break}}s=s.return}}function t7(i,s,l){var h=i.pingCache;h!==null&&h.delete(s),s=Cn(),i.pingedLanes|=i.suspendedLanes&l,tn===i&&(un&l)===l&&(Wt===4||Wt===3&&(un&130023424)===un&&500>Dt()-t0?Do(i,0):e0|=l),Bn(i,s)}function C2(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ac,Ac<<=1,(Ac&130023424)===0&&(Ac=4194304)));var l=Cn();i=pi(i,s),i!==null&&(uu(i,s,l),Bn(i,l))}function n7(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),C2(i,l)}function r7(i,s){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),C2(i,l)}var v2;v2=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||Ln.current)Mn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return Mn=!1,V9(i,s,l);Mn=(i.flags&131072)!==0}else Mn=!1,vt&&(s.flags&1048576)!==0&&sx(s,Gc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;ud(i,s),i=s.pendingProps;var E=Hs(s,gn.current);Ys(s,l),E=Im(null,s,h,i,E,l);var T=Rm();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Dn(h)?(T=!0,Vc(s)):T=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Am(s),E.updater=sd,s.stateNode=E,E._reactInternals=s,Um(s,h,i,l),s=$m(null,s,h,!0,T,l)):(s.tag=0,vt&&T&&mm(s),An(null,s,E,l),s=s.child),s;case 16:h=s.elementType;e:{switch(ud(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=o7(h),i=Ar(h,i),E){case 0:s=jm(null,s,h,i,l);break e;case 1:s=Zx(null,s,h,i,l);break e;case 11:s=Wx(null,s,h,i,l);break e;case 14:s=Xx(null,s,h,Ar(h.type,i),l);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),jm(i,s,h,E,l);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),Zx(i,s,h,E,l);case 3:e:{if(e2(s),i===null)throw Error(n(387));h=s.pendingProps,T=s.memoizedState,E=T.element,mx(i,s),Zc(s,h,null,l);var x=s.memoizedState;if(h=x.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=T,s.memoizedState=T,s.flags&256){E=Ws(Error(n(423)),s),s=t2(i,s,h,l,E);break e}else if(h!==E){E=Ws(Error(n(424)),s),s=t2(i,s,h,l,E);break e}else for(Wn=Hi(s.stateNode.containerInfo.firstChild),Gn=s,vt=!0,wr=null,l=hx(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if($s(),h===E){s=gi(i,s,l);break e}An(i,s,h,l)}s=s.child}return s;case 5:return yx(s),i===null&&ym(s),h=s.type,E=s.pendingProps,T=i!==null?i.memoizedProps:null,x=E.children,lm(h,E)?x=null:T!==null&&lm(h,T)&&(s.flags|=32),Jx(i,s),An(i,s,x,l),s.child;case 6:return i===null&&ym(s),null;case 13:return n2(i,s,l);case 4:return Cm(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=Vs(s,null,h,l):An(i,s,h,l),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),Wx(i,s,h,E,l);case 7:return An(i,s,s.pendingProps,l),s.child;case 8:return An(i,s,s.pendingProps.children,l),s.child;case 12:return An(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,T=s.memoizedProps,x=E.value,bt(Kc,h._currentValue),h._currentValue=x,T!==null)if(xr(T.value,x)){if(T.children===E.children&&!Ln.current){s=gi(i,s,l);break e}}else for(T=s.child,T!==null&&(T.return=s);T!==null;){var R=T.dependencies;if(R!==null){x=T.child;for(var H=R.firstContext;H!==null;){if(H.context===h){if(T.tag===1){H=mi(-1,l&-l),H.tag=2;var J=T.updateQueue;if(J!==null){J=J.shared;var le=J.pending;le===null?H.next=H:(H.next=le.next,le.next=H),J.pending=H}}T.lanes|=l,H=T.alternate,H!==null&&(H.lanes|=l),xm(T.return,l,s),R.lanes|=l;break}H=H.next}}else if(T.tag===10)x=T.type===s.type?null:T.child;else if(T.tag===18){if(x=T.return,x===null)throw Error(n(341));x.lanes|=l,R=x.alternate,R!==null&&(R.lanes|=l),xm(x,l,s),x=T.sibling}else x=T.child;if(x!==null)x.return=T;else for(x=T;x!==null;){if(x===s){x=null;break}if(T=x.sibling,T!==null){T.return=x.return,x=T;break}x=x.return}T=x}An(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,Ys(s,l),E=ur(E),h=h(E),s.flags|=1,An(i,s,h,l),s.child;case 14:return h=s.type,E=Ar(h,s.pendingProps),E=Ar(h.type,E),Xx(i,s,h,E,l);case 15:return Kx(i,s,s.type,s.pendingProps,l);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),ud(i,s),s.tag=1,Dn(h)?(i=!0,Vc(s)):i=!1,Ys(s,l),zx(s,h,E),Um(s,h,E,l),$m(null,s,h,!0,i,l);case 19:return i2(i,s,l);case 22:return Qx(i,s,l)}throw Error(n(156,s.tag))};function k2(i,s){return aS(i,s)}function i7(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 dr(i,s,l,h){return new i7(i,s,l,h)}function l0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function o7(i){if(typeof i=="function")return l0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ce)return 11;if(i===be)return 14}return 2}function Qi(i,s){var l=i.alternate;return l===null?(l=dr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Td(i,s,l,h,E,T){var x=2;if(h=i,typeof i=="function")l0(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case K:return Fo(l.children,E,T,s);case re:x=8,E|=8;break;case Te:return i=dr(12,l,s,E|2),i.elementType=Te,i.lanes=T,i;case he:return i=dr(13,l,s,E),i.elementType=he,i.lanes=T,i;case ue:return i=dr(19,l,s,E),i.elementType=ue,i.lanes=T,i;case de:return bd(l,E,T,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:x=10;break e;case Z:x=9;break e;case ce:x=11;break e;case be:x=14;break e;case Oe:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=dr(x,l,s,E),s.elementType=i,s.type=h,s.lanes=T,s}function Fo(i,s,l,h){return i=dr(7,i,h,s),i.lanes=l,i}function bd(i,s,l,h){return i=dr(22,i,h,s),i.elementType=de,i.lanes=l,i.stateNode={isHidden:!1},i}function c0(i,s,l){return i=dr(6,i,null,s),i.lanes=l,i}function d0(i,s,l){return s=dr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function s7(i,s,l,h,E){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bp(0),this.expirationTimes=Bp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function f0(i,s,l,h,E,T,x,R,H){return i=new s7(i,s,l,R,H),s===1?(s=1,T===!0&&(s|=8)):s=0,T=dr(3,null,null,s),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Am(T),i}function a7(i,s,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:s,implementation:l}}function N2(i){if(!i)return ji;i=i._reactInternals;e:{if(Ao(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(Dn(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(Dn(l))return rx(i,l,s)}return s}function P2(i,s,l,h,E,T,x,R,H){return i=f0(l,h,!0,i,E,T,x,R,H),i.context=N2(null),l=i.current,h=Cn(),E=Xi(l),T=mi(h,E),T.callback=s!=null?s:null,qi(l,T,E),i.current.lanes=E,uu(i,E,h),Bn(i,h),i}function _d(i,s,l,h){var E=s.current,T=Cn(),x=Xi(E);return l=N2(l),s.context===null?s.context=l:s.pendingContext=l,s=mi(T,x),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=qi(E,s,x),i!==null&&(kr(i,E,x,T),Jc(i,E,x)),x}function Sd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function O2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function h0(i,s){O2(i,s),(i=i.alternate)&&O2(i,s)}function u7(){return null}var I2=typeof reportError=="function"?reportError:function(i){console.error(i)};function p0(i){this._internalRoot=i}xd.prototype.render=p0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));_d(i,s,null,null)},xd.prototype.unmount=p0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Lo(function(){_d(null,i,null,null)}),s[ci]=null}};function xd(i){this._internalRoot=i}xd.prototype.unstable_scheduleHydration=function(i){if(i){var s=mS();i={blockedOn:null,target:i,priority:s};for(var l=0;l<Fi.length&&s!==0&&s<Fi[l].priority;l++);Fi.splice(l,0,i),l===0&&yS(i)}};function m0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function wd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function R2(){}function l7(i,s,l,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var J=Sd(x);T.call(J)}}var x=P2(s,h,i,0,null,!1,!1,"",R2);return i._reactRootContainer=x,i[ci]=x.current,Su(i.nodeType===8?i.parentNode:i),Lo(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var R=h;h=function(){var J=Sd(H);R.call(J)}}var H=f0(i,0,!1,null,null,!1,!1,"",R2);return i._reactRootContainer=H,i[ci]=H.current,Su(i.nodeType===8?i.parentNode:i),Lo(function(){_d(s,H,l,h)}),H}function Ad(i,s,l,h,E){var T=l._reactRootContainer;if(T){var x=T;if(typeof E=="function"){var R=E;E=function(){var H=Sd(x);R.call(H)}}_d(s,x,i,E)}else x=l7(l,s,i,E,h);return Sd(x)}hS=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=au(s.pendingLanes);l!==0&&(Up(s,l|1),Bn(s,Dt()),(it&6)===0&&(Qs=Dt()+500,$i()))}break;case 13:Lo(function(){var h=pi(i,1);if(h!==null){var E=Cn();kr(h,i,1,E)}}),h0(i,1)}},Hp=function(i){if(i.tag===13){var s=pi(i,134217728);if(s!==null){var l=Cn();kr(s,i,134217728,l)}h0(i,134217728)}},pS=function(i){if(i.tag===13){var s=Xi(i),l=pi(i,s);if(l!==null){var h=Cn();kr(l,i,s,h)}h0(i,s)}},mS=function(){return ct},gS=function(i,s){var l=ct;try{return ct=i,s()}finally{ct=l}},Ip=function(i,s,l){switch(s){case"input":if(li(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==i&&h.form===i.form){var E=jc(h);if(!E)throw Error(n(90));qr(h),li(h,E)}}}break;case"textarea":wn(i,l);break;case"select":s=l.value,s!=null&&Qe(i,!!l.multiple,s,!1)}},eS=s0,tS=Lo;var c7={usingClientEntryPoint:!1,Events:[Au,Bs,jc,J_,Z_,s0]},Uu={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},d7={bundleType:Uu.bundleType,version:Uu.version,rendererPackageName:Uu.rendererPackageName,rendererConfig:Uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=oS(i),i===null?null:i.stateNode},findFiberByHostInstance:Uu.findFiberByHostInstance||u7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var Cd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cd.isDisabled&&Cd.supportsFiber)try{xc=Cd.inject(d7),Gr=Cd}catch(i){}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=c7,kn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m0(s))throw Error(n(200));return a7(i,s,null,l)},kn.createRoot=function(i,s){if(!m0(i))throw Error(n(299));var l=!1,h="",E=I2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=f0(i,1,!1,null,null,l,!1,h,E),i[ci]=s.current,Su(i.nodeType===8?i.parentNode:i),new p0(s)},kn.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=oS(s),i=i===null?null:i.stateNode,i},kn.flushSync=function(i){return Lo(i)},kn.hydrate=function(i,s,l){if(!wd(s))throw Error(n(200));return Ad(null,i,s,!0,l)},kn.hydrateRoot=function(i,s,l){if(!m0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,T="",x=I2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=P2(s,null,i,1,l!=null?l:null,E,!1,T,x),i[ci]=s.current,Su(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,E]:s.mutableSourceEagerHydrationData.push(l,E);return new xd(s)},kn.render=function(i,s,l){if(!wd(s))throw Error(n(200));return Ad(null,i,s,!1,l)},kn.unmountComponentAtNode=function(i){if(!wd(i))throw Error(n(40));return i._reactRootContainer?(Lo(function(){Ad(null,null,i,!1,function(){i._reactRootContainer=null,i[ci]=null})}),!0):!1},kn.unstable_batchedUpdates=s0,kn.unstable_renderSubtreeIntoContainer=function(i,s,l,h){if(!wd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Ad(i,s,l,!1,h)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var x1;function w1(){if(x1)return vf.exports;x1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),vf.exports=hk(),vf.exports}var Wo=w1();function A1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=A1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=A1(e))&&(r&&(r+=" "),r+=t);return r}const ni=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:w.jsx("button",{className:W(e,`${j}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?w.jsx("img",{className:W(`${j}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),pk="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",mk=()=>{const{globalClassName:e,headerConfig:t,themeVariables:n}=mt(),r=()=>{ml(!1),Si(!0)};return Wo.createPortal(w.jsx("div",{className:W(e,`${j}-minimized-container`),style:n,children:w.jsx(ni,{className:W(e,`${j}-minimized-button`),ariaLabel:"Open Copilot",icon:w.jsx("img",{src:(t==null?void 0:t.logoUrl)||pk,alt:"Copilot",className:W(e,`${j}-minimized-icon-img`)}),onClick:r})}),document.body)};var C1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},v1=Zi.createContext&&Zi.createContext(C1),gk=["attr","size","title"];function Ek(e,t){if(e==null)return{};var n=yk(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 yk(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 yl(){return yl=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},yl.apply(this,arguments)}function k1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(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?k1(Object(n),!0).forEach(function(r){Tk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tk(e,t,n){return t=bk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bk(e){var t=_k(e,"string");return typeof t=="symbol"?t:t+""}function _k(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function N1(e){return e&&e.map((t,n)=>Zi.createElement(t.tag,Tl({key:n},t.attr),N1(t.child)))}function Ht(e){return t=>Zi.createElement(Sk,yl({attr:Tl({},e.attr)},t),N1(e.child))}function Sk(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=Ek(e,gk),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Zi.createElement("svg",yl({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&&Zi.createElement("title",null,a),e.children)};return v1!==void 0?Zi.createElement(v1.Consumer,null,n=>t(n)):t(C1)}function P1(e){return Ht({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 O1(e){return Ht({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 Xo(e){return Ht({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 xk(e){return Ht({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 I1(e){return Ht({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 wk(e){return Ht({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 Ak(e){return Ht({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 Ck(e){return Ht({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 vk(e){return Ht({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 kk(e){return Ht({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 R1=e=>({[`${Ti}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent"}),Pf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,className:W(e,`${j}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.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"})})}),bl=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>w.jsx("button",{className:W(`${j}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Nk=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:W(`${j}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(Xo,{size:"16px"})},Pk=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(ni,{className:W(e,n,`cim-${r}-component`,`${j}-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:w.jsx(Xo,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(bl,{className:W(e,n,`cim-${r}-component`,`${j}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&w.jsx(Nk,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function Ok(e){return Ht({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 Ik=()=>{const{messages:e}=Zn(),{handleCancel:t}=Rr();return{cancelRequest:U.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},Rk=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=mt(),{cancelRequest:r}=Ik();return n!=null&&n.enableCancelSearch?w.jsx(ni,{className:W(t,`${j}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:w.jsx(Ok,{}),disabled:!e,onClick:r}):null};function q7(){}function Y7(){}function L1(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 D1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Lk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Mk={};function M1(e,t){return(Mk.jsx?Dk:Lk).test(e)}const Fk=/[ \t\n\f\r]/g;function Bk(e){return typeof e=="object"?e.type==="text"?F1(e.value):!1:F1(e)}function F1(e){return e.replace(Fk,"")===""}let Ta=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ta.prototype.normal={},Ta.prototype.property={},Ta.prototype.space=void 0;function B1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ta(n,r,t)}function ba(e){return e.toLowerCase()}let Nn=class{constructor(t,n){this.attribute=n,this.property=t}};Nn.prototype.attribute="",Nn.prototype.booleanish=!1,Nn.prototype.boolean=!1,Nn.prototype.commaOrSpaceSeparated=!1,Nn.prototype.commaSeparated=!1,Nn.prototype.defined=!1,Nn.prototype.mustUseProperty=!1,Nn.prototype.number=!1,Nn.prototype.overloadedBoolean=!1,Nn.prototype.property="",Nn.prototype.spaceSeparated=!1,Nn.prototype.space=void 0;let Uk=0;const Ge=so(),zt=so(),Of=so(),ge=so(),Et=so(),Ko=so(),Hn=so();function so(){return ea(2,++Uk)}const If=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:zt,commaOrSpaceSeparated:Hn,commaSeparated:Ko,number:ge,overloadedBoolean:Of,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),Rf=Object.keys(If);let Lf=class extends Nn{constructor(t,n,r,o){let a=-1;if(super(t,n),U1(this,"space",o),typeof r=="number")for(;++a<Rf.length;){const u=Rf[a];U1(this,Rf[a],(r&If[u])===If[u])}}};Lf.prototype.defined=!0;function U1(e,t,n){n&&(e[t]=n)}function Qo(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[ba(r)]=r,n[ba(a.attribute)]=r}return new Ta(t,n,e.space)}const H1=Qo({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:Et,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:ge,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:Et,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:zt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function z1(e,t){return t in e?e[t]:t}function j1(e,t){return z1(e,t.toLowerCase())}const Hk=Qo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ko,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:Et,autoFocus:Ge,autoPlay:Ge,blocking:Et,capture:null,charSet:null,checked:Ge,cite:null,className:Et,cols:ge,colSpan:null,content:null,contentEditable:zt,controls:Ge,controlsList:Et,coords:ge|Ko,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Of,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Et,height:ge,hidden:Of,high:ge,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:Et,itemRef:Et,itemScope:Ge,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ge,optimum:ge,pattern:null,ping:Et,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:Et,required:Ge,reversed:Ge,rows:ge,rowSpan:ge,sandbox:Et,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:zt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:j1}),zk=Qo({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:Hn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:Et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ko,g2:Ko,glyphName:Ko,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Hn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hn,rev:Hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hn,requiredFeatures:Hn,requiredFonts:Hn,requiredFormats:Hn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Hn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:z1}),$1=Qo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),V1=Qo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:j1}),q1=Qo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),jk={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"},$k=/[A-Z]/g,Y1=/-[a-z]/g,Vk=/^data[-\w.:]+$/i;function Df(e,t){const n=ba(t);let r=t,o=Nn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Vk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Y1,Yk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Y1.test(a)){let u=a.replace($k,qk);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Lf}return new o(r,t)}function qk(e){return"-"+e.toLowerCase()}function Yk(e){return e.charAt(1).toUpperCase()}const _l=B1([H1,Hk,$1,V1,q1],"html"),Jo=B1([H1,zk,$1,V1,q1],"svg");function G1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function W1(e){return e.join(" ").trim()}var Zo={},Mf,X1;function Gk(){if(X1)return Mf;X1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
18
|
+
`,f="/",p="*",g="",b="comment",y="declaration";Mf=function(S,v){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];v=v||{};var C=1,P=1;function A(he){var ue=he.match(t);ue&&(C+=ue.length);var be=he.lastIndexOf(d);P=~be?he.length-be:P+he.length}function M(){var he={line:C,column:P};return function(ue){return ue.position=new V(he),re(),ue}}function V(he){this.start=he,this.end={line:C,column:P},this.source=v.source}V.prototype.content=S;function D(he){var ue=new Error(v.source+":"+C+":"+P+": "+he);if(ue.reason=he,ue.filename=v.source,ue.line=C,ue.column=P,ue.source=S,!v.silent)throw ue}function K(he){var ue=he.exec(S);if(ue){var be=ue[0];return A(be),S=S.slice(be.length),ue}}function re(){K(n)}function Te(he){var ue;for(he=he||[];ue=$();)ue!==!1&&he.push(ue);return he}function $(){var he=M();if(!(f!=S.charAt(0)||p!=S.charAt(1))){for(var ue=2;g!=S.charAt(ue)&&(p!=S.charAt(ue)||f!=S.charAt(ue+1));)++ue;if(ue+=2,g===S.charAt(ue-1))return D("End of comment missing");var be=S.slice(2,ue-2);return P+=2,A(be),S=S.slice(ue),P+=2,he({type:b,comment:be})}}function Z(){var he=M(),ue=K(r);if(ue){if($(),!K(o))return D("property missing ':'");var be=K(a),Oe=he({type:y,property:_(ue[0].replace(e,g)),value:be?_(be[0].replace(e,g)):g});return K(u),Oe}}function ce(){var he=[];Te(he);for(var ue;ue=Z();)ue!==!1&&(he.push(ue),Te(he));return he}return re(),ce()};function _(S){return S?S.replace(c,g):g}return Mf}var K1;function Wk(){if(K1)return Zo;K1=1;var e=Zo&&Zo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=n;var t=e(Gk());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 Zo}var _a={},Q1;function Xk(){if(Q1)return _a;Q1=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,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 _a.camelCase=d,_a}var Sa,J1;function Kk(){if(J1)return Sa;J1=1;var e=Sa&&Sa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Wk()),n=Xk();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,Sa=r,Sa}var Qk=Kk();const Jk=ze(Qk),Sl=Z1("end"),Lr=Z1("start");function Z1(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function eE(e){const t=Lr(e),n=Sl(e);if(t&&n)return{start:t,end:n}}function xa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?tE(e.position):"start"in e||"end"in e?tE(e):"line"in e||"column"in e?Ff(e):""}function Ff(e){return nE(e&&e.line)+":"+nE(e&&e.column)}function tE(e){return Ff(e&&e.start)+"-"+Ff(e&&e.end)}function nE(e){return e&&typeof e=="number"?e:1}class fn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=F({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=xa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}fn.prototype.file="",fn.prototype.name="",fn.prototype.reason="",fn.prototype.message="",fn.prototype.stack="",fn.prototype.column=void 0,fn.prototype.line=void 0,fn.prototype.ancestors=void 0,fn.prototype.cause=void 0,fn.prototype.fatal=void 0,fn.prototype.place=void 0,fn.prototype.ruleId=void 0,fn.prototype.source=void 0;const Bf={}.hasOwnProperty,Zk=new Map,eN=/[A-Z]/g,tN=new Set(["table","tbody","thead","tfoot","tr"]),nN=new Set(["td","th"]),rE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function rN(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=dN(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=cN(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"?Jo:_l,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=iE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function iE(e,t,n){if(t.type==="element")return iN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return oN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return aN(e,t,n);if(t.type==="mdxjsEsm")return sN(e,t);if(t.type==="root")return uN(e,t,n);if(t.type==="text")return lN(e,t)}function iN(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Jo,e.schema=o),e.ancestors.push(t);const a=sE(e,t.tagName,!1),u=fN(e,t);let c=Hf(e,t);return tN.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Bk(d):!0})),oE(e,u,a,t),Uf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function oN(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}wa(e,t.position)}function sN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wa(e,t.position)}function aN(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Jo,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:sE(e,t.name,!0),u=hN(e,t),c=Hf(e,t);return oE(e,u,a,t),Uf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function uN(e,t,n){const r={};return Uf(r,Hf(e,t)),e.create(t,e.Fragment,r,n)}function lN(e,t){return t.value}function oE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Uf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function cN(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 dN(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Lr(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 fN(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Bf.call(t.properties,o)){const a=pN(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&nN.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 hN(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else wa(e,t.position);else{const 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 wa(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Hf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Zk;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=iE(e,a,u);c!==void 0&&n.push(c)}return n}function pN(e,t,n){const r=Df(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?D1(n):W1(n)),r.property==="style"){let o=typeof n=="object"?n:mN(e,String(n));return e.stylePropertyNameCase==="css"&&(o=gN(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?jk[r.property]||r.property:r.attribute,n]}}function mN(e,t){try{return Jk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new fn("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=rE+"#cannot-parse-style-attribute",o}}function sE(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=M1(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=M1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Bf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);wa(e)}function wa(e,t){const n=new fn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=rE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function gN(e){const t={};let n;for(n in e)Bf.call(e,n)&&(t[EN(n)]=e[n]);return t}function EN(e){let t=e.replace(eN,yN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function yN(e){return"-"+e.toLowerCase()}const zf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},TN={};function jf(e,t){const n=TN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return aE(e,r,o)}function aE(e,t,n){if(bN(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return uE(e.children,t,n)}return Array.isArray(e)?uE(e,t,n):""}function uE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=aE(e[o],t,n);return r.join("")}function bN(e){return!!(e&&typeof e=="object")}const lE=document.createElement("i");function $f(e){const t="&"+e+";";lE.innerHTML=t;const n=lE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zn(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 er(e,t){return e.length>0?(zn(e,e.length,0,t),e):t}const cE={}.hasOwnProperty;function dE(e){const t={};let n=-1;for(;++n<e.length;)_N(t,e[n]);return t}function _N(e,t){let n;for(n in t){const o=(cE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){cE.call(o,u)||(o[u]=[]);const c=a[u];SN(o[u],Array.isArray(c)?c:c?[c]:[])}}}function SN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);zn(e,0,0,r)}function fE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xn=wi(/[A-Za-z]/),hn=wi(/[\dA-Za-z]/),xN=wi(/[#-'*+\--9=?A-Z^-~]/);function xl(e){return e!==null&&(e<32||e===127)}const Vf=wi(/\d/),wN=wi(/[\dA-Fa-f]/),AN=wi(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function et(e){return e===-2||e===-1||e===32}const wl=wi(new RegExp("\\p{P}|\\p{S}","u")),ao=wi(/\s/);function wi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function es(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&hn(e.charCodeAt(n+1))&&hn(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 rt(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return et(d)?(e.enter(n),c(d)):t(d)}function c(d){return et(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const CN={tokenize:vN};function vN(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"),rt(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 Be(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const kN={tokenize:NN},hE={tokenize:PN};function NN(e){const t=this,n=[];let r=0,o,a,u;return c;function c(A){if(r<n.length){const M=n[r];return t.containerState=M[1],e.attempt(M[0].continuation,d,f)(A)}return f(A)}function d(A){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&P();const M=t.events.length;let V=M,D;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){D=t.events[V][1].end;break}C(r);let K=M;for(;K<t.events.length;)t.events[K][1].end=F({},D),K++;return zn(t.events,V+1,0,t.events.slice(M)),t.events.length=K,f(A)}return c(A)}function f(A){if(r===n.length){if(!o)return b(A);if(o.currentConstruct&&o.currentConstruct.concrete)return _(A);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(hE,p,g)(A)}function p(A){return o&&P(),C(r),b(A)}function g(A){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(A)}function b(A){return t.containerState={},e.attempt(hE,y,_)(A)}function y(A){return r++,n.push([t.currentConstruct,t.containerState]),b(A)}function _(A){if(A===null){o&&P(),C(0),e.consume(A);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(A)}function S(A){if(A===null){v(e.exit("chunkFlow"),!0),C(0),e.consume(A);return}return Be(A)?(e.consume(A),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(A),S)}function v(A,M){const V=t.sliceStream(A);if(M&&V.push(null),A.previous=a,a&&(a.next=A),a=A,o.defineSkip(A.start),o.write(V),t.parser.lazy[A.start.line]){let D=o.events.length;for(;D--;)if(o.events[D][1].start.offset<u&&(!o.events[D][1].end||o.events[D][1].end.offset>u))return;const K=t.events.length;let re=K,Te,$;for(;re--;)if(t.events[re][0]==="exit"&&t.events[re][1].type==="chunkFlow"){if(Te){$=t.events[re][1].end;break}Te=!0}for(C(r),D=K;D<t.events.length;)t.events[D][1].end=F({},$),D++;zn(t.events,re+1,0,t.events.slice(K)),t.events.length=D}}function C(A){let M=n.length;for(;M-- >A;){const V=n[M];t.containerState=V[1],V[0].exit.call(t,e)}n.length=A}function P(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function PN(e,t,n){return rt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ts(e){if(e===null||ft(e)||ao(e))return 1;if(wl(e))return 2}function Al(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 qf={name:"attention",resolveAll:ON,tokenize:IN};function ON(e,t){let n=-1,r,o,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g=F({},e[r][1].end),b=F({},e[n][1].start);pE(g,-d),pE(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:g,end:F({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},c.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=er(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=er(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=er(f,Al(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=er(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=er(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,zn(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 IN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ts(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=ts(d),g=!p||p===2&&o||n.includes(d),b=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?g:g&&(o||!b)),f._close=!!(a===42?b:b&&(p||!g)),t(d)}}function pE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const RN={name:"autolink",tokenize:LN};function LN(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return xn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||hn(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||hn(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||xl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):xN(y)?(e.consume(y),f):n(y)}function p(y){return hn(y)?g(y):n(y)}function g(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||hn(y))&&r++<63){const _=y===45?b:g;return e.consume(y),_}return n(y)}}const Aa={partial:!0,tokenize:DN};function DN(e,t,n){return r;function r(a){return et(a)?rt(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Be(a)?t(a):n(a)}}const mE={continuation:{tokenize:FN},exit:BN,name:"blockQuote",tokenize:MN};function MN(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 et(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function FN(e,t,n){const r=this;return o;function o(u){return et(u)?rt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(mE,t,n)(u)}}function BN(e){e.exit("blockQuote")}const gE={name:"characterEscape",tokenize:UN};function UN(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 AN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const EE={name:"characterReference",tokenize:HN};function HN(e,t,n){const r=this;let o=0,a,u;return c;function c(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=hn,p(g))}function f(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=wN,p):(e.enter("characterReferenceValue"),a=7,u=Vf,p(g))}function p(g){if(g===59&&o){const b=e.exit("characterReferenceValue");return u===hn&&!$f(r.sliceSerialize(b))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(g)&&o++<a?(e.consume(g),p):n(g)}}const yE={partial:!0,tokenize:jN},TE={concrete:!0,name:"codeFenced",tokenize:zN};function zN(e,t,n){const r=this,o={partial:!0,tokenize:V};let a=0,u=0,c;return d;function d(D){return f(D)}function f(D){const K=r.events[r.events.length-1];return a=K&&K[1].type==="linePrefix"?K[2].sliceSerialize(K[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===c?(u++,e.consume(D),p):u<3?n(D):(e.exit("codeFencedFenceSequence"),et(D)?rt(e,g,"whitespace")(D):g(D))}function g(D){return D===null||Be(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(yE,S,M)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Be(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(D)):et(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rt(e,y,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),b)}function y(D){return D===null||Be(D)?g(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||Be(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(D)):D===96&&D===c?n(D):(e.consume(D),_)}function S(D){return e.attempt(o,M,v)(D)}function v(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),C}function C(D){return a>0&&et(D)?rt(e,P,"linePrefix",a+1)(D):P(D)}function P(D){return D===null||Be(D)?e.check(yE,S,M)(D):(e.enter("codeFlowValue"),A(D))}function A(D){return D===null||Be(D)?(e.exit("codeFlowValue"),P(D)):(e.consume(D),A)}function M(D){return e.exit("codeFenced"),t(D)}function V(D,K,re){let Te=0;return $;function $(be){return D.enter("lineEnding"),D.consume(be),D.exit("lineEnding"),Z}function Z(be){return D.enter("codeFencedFence"),et(be)?rt(D,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(be):ce(be)}function ce(be){return be===c?(D.enter("codeFencedFenceSequence"),he(be)):re(be)}function he(be){return be===c?(Te++,D.consume(be),he):Te>=u?(D.exit("codeFencedFenceSequence"),et(be)?rt(D,ue,"whitespace")(be):ue(be)):re(be)}function ue(be){return be===null||Be(be)?(D.exit("codeFencedFence"),K(be)):re(be)}}}function jN(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 Yf={name:"codeIndented",tokenize:VN},$N={partial:!0,tokenize:qN};function VN(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),rt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Be(f)?e.attempt($N,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Be(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function qN(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):rt(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Be(u)?o(u):n(u)}}const YN={name:"codeText",previous:WN,resolve:GN,tokenize:XN};function GN(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 WN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function XN(e,t,n){let r=0,o,a;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),c(g)}function c(g){return g===96?(e.consume(g),r++,c):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(a=e.enter("codeTextSequence"),o=0,p(g)):Be(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(g))}function f(g){return g===null||g===32||g===96||Be(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),f)}function p(g){return g===96?(e.consume(g),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(a.type="codeTextData",f(g))}}class KN{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 bE(e){const t={};let n=-1,r,o,a,u,c,d,f;const p=new KN(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,QN(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=F({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return zn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function QN(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,g,b=-1,y=n,_=0,S=0;const v=[S];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),g&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(S=b+1,v.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):v.pop(),b=v.length;b--;){const C=c.slice(v[b],v[b+1]),P=a.pop();d.push([P,P+C.length-1]),e.splice(P,2,C)}for(d.reverse(),b=-1;++b<d.length;)f[_+d[b][0]]=_+d[b][1],_+=d[b][1]-d[b][0]-1;return f}const JN={resolve:eP,tokenize:tP},ZN={partial:!0,tokenize:nP};function eP(e){return bE(e),e}function tP(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):Be(c)?e.check(ZN,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 nP(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),rt(e,a,"linePrefix")}function a(u){if(u===null||Be(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function _E(e,t,n,r,o,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return g;function g(C){return C===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(C),e.exit(a),b):C===null||C===32||C===41||xl(C)?n(C):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(C))}function b(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===62?(e.exit("chunkString"),e.exit(c),b(C)):C===null||C===60||Be(C)?n(C):(e.consume(C),C===92?_:y)}function _(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function S(C){return!p&&(C===null||C===41||ft(C))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(C)):p<f&&C===40?(e.consume(C),p++,S):C===41?(e.consume(C),p--,S):C===null||C===32||C===40||xl(C)?n(C):(e.consume(C),C===92?v:S)}function v(C){return C===40||C===41||C===92?(e.consume(C),S):S(C)}}function SE(e,t,n,r,o,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):Be(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===null||y===91||y===93||Be(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!et(y)),y===92?b:g)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,g):g(y)}}function xE(e,t,n,r,o,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Be(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),rt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Be(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?g:p)}function g(b){return b===u||b===92?(e.consume(b),p):p(b)}}function va(e,t){let n;return r;function r(o){return Be(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):et(o)?rt(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const rP={name:"definition",tokenize:oP},iP={partial:!0,tokenize:sP};function oP(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return SE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ft(y)?va(e,f)(y):f(y)}function f(y){return _E(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(iP,g,g)(y)}function g(y){return et(y)?rt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Be(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function sP(e,t,n){return r;function r(c){return ft(c)?va(e,o)(c):n(c)}function o(c){return xE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return et(c)?rt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Be(c)?t(c):n(c)}}const aP={name:"hardBreakEscape",tokenize:uP};function uP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Be(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const lP={name:"headingAtx",resolve:cP,tokenize:dP};function cP(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"},zn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function dP(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||Be(p)?(e.exit("atxHeading"),t(p)):et(p)?rt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ft(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const fP=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],wE=["pre","script","style","textarea"],hP={concrete:!0,name:"htmlFlow",resolveTo:gP,tokenize:EP},pP={partial:!0,tokenize:TP},mP={partial:!0,tokenize:yP};function gP(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 EP(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),g}function g(O){return O===33?(e.consume(O),b):O===47?(e.consume(O),a=!0,S):O===63?(e.consume(O),o=3,r.interrupt?t:k):xn(O)?(e.consume(O),u=String.fromCharCode(O),v):n(O)}function b(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,c=0,_):xn(O)?(e.consume(O),o=4,r.interrupt?t:k):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:k):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:ce:_):n(O)}function S(O){return xn(O)?(e.consume(O),u=String.fromCharCode(O),v):n(O)}function v(O){if(O===null||O===47||O===62||ft(O)){const _e=O===47,Ie=u.toLowerCase();return!_e&&!a&&wE.includes(Ie)?(o=1,r.interrupt?t(O):ce(O)):fP.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),C):r.interrupt?t(O):ce(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?P(O):A(O))}return O===45||hn(O)?(e.consume(O),u+=String.fromCharCode(O),v):n(O)}function C(O){return O===62?(e.consume(O),r.interrupt?t:ce):n(O)}function P(O){return et(O)?(e.consume(O),P):$(O)}function A(O){return O===47?(e.consume(O),$):O===58||O===95||xn(O)?(e.consume(O),M):et(O)?(e.consume(O),A):$(O)}function M(O){return O===45||O===46||O===58||O===95||hn(O)?(e.consume(O),M):V(O)}function V(O){return O===61?(e.consume(O),D):et(O)?(e.consume(O),V):A(O)}function D(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,K):et(O)?(e.consume(O),D):re(O)}function K(O){return O===d?(e.consume(O),d=null,Te):O===null||Be(O)?n(O):(e.consume(O),K)}function re(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ft(O)?V(O):(e.consume(O),re)}function Te(O){return O===47||O===62||et(O)?A(O):n(O)}function $(O){return O===62?(e.consume(O),Z):n(O)}function Z(O){return O===null||Be(O)?ce(O):et(O)?(e.consume(O),Z):n(O)}function ce(O){return O===45&&o===2?(e.consume(O),Oe):O===60&&o===1?(e.consume(O),de):O===62&&o===4?(e.consume(O),B):O===63&&o===3?(e.consume(O),k):O===93&&o===5?(e.consume(O),ie):Be(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(pP,te,he)(O)):O===null||Be(O)?(e.exit("htmlFlowData"),he(O)):(e.consume(O),ce)}function he(O){return e.check(mP,ue,te)(O)}function ue(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),be}function be(O){return O===null||Be(O)?he(O):(e.enter("htmlFlowData"),ce(O))}function Oe(O){return O===45?(e.consume(O),k):ce(O)}function de(O){return O===47?(e.consume(O),u="",Q):ce(O)}function Q(O){if(O===62){const _e=u.toLowerCase();return wE.includes(_e)?(e.consume(O),B):ce(O)}return xn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),Q):ce(O)}function ie(O){return O===93?(e.consume(O),k):ce(O)}function k(O){return O===62?(e.consume(O),B):O===45&&o===2?(e.consume(O),k):ce(O)}function B(O){return O===null||Be(O)?(e.exit("htmlFlowData"),te(O)):(e.consume(O),B)}function te(O){return e.exit("htmlFlow"),t(O)}}function yP(e,t,n){const r=this;return o;function o(u){return Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function TP(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Aa,t,n)}}const bP={name:"htmlText",tokenize:_P};function _P(e,t,n){const r=this;let o,a,u;return c;function c(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),V):k===63?(e.consume(k),A):xn(k)?(e.consume(k),re):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,_):xn(k)?(e.consume(k),P):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function g(k){return k===null?n(k):k===45?(e.consume(k),b):Be(k)?(u=g,de(k)):(e.consume(k),g)}function b(k){return k===45?(e.consume(k),y):g(k)}function y(k){return k===62?Oe(k):k===45?b(k):g(k)}function _(k){const B="CDATA[";return k===B.charCodeAt(a++)?(e.consume(k),a===B.length?S:_):n(k)}function S(k){return k===null?n(k):k===93?(e.consume(k),v):Be(k)?(u=S,de(k)):(e.consume(k),S)}function v(k){return k===93?(e.consume(k),C):S(k)}function C(k){return k===62?Oe(k):k===93?(e.consume(k),C):S(k)}function P(k){return k===null||k===62?Oe(k):Be(k)?(u=P,de(k)):(e.consume(k),P)}function A(k){return k===null?n(k):k===63?(e.consume(k),M):Be(k)?(u=A,de(k)):(e.consume(k),A)}function M(k){return k===62?Oe(k):A(k)}function V(k){return xn(k)?(e.consume(k),D):n(k)}function D(k){return k===45||hn(k)?(e.consume(k),D):K(k)}function K(k){return Be(k)?(u=K,de(k)):et(k)?(e.consume(k),K):Oe(k)}function re(k){return k===45||hn(k)?(e.consume(k),re):k===47||k===62||ft(k)?Te(k):n(k)}function Te(k){return k===47?(e.consume(k),Oe):k===58||k===95||xn(k)?(e.consume(k),$):Be(k)?(u=Te,de(k)):et(k)?(e.consume(k),Te):Oe(k)}function $(k){return k===45||k===46||k===58||k===95||hn(k)?(e.consume(k),$):Z(k)}function Z(k){return k===61?(e.consume(k),ce):Be(k)?(u=Z,de(k)):et(k)?(e.consume(k),Z):Te(k)}function ce(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,he):Be(k)?(u=ce,de(k)):et(k)?(e.consume(k),ce):(e.consume(k),ue)}function he(k){return k===o?(e.consume(k),o=void 0,be):k===null?n(k):Be(k)?(u=he,de(k)):(e.consume(k),he)}function ue(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ft(k)?Te(k):(e.consume(k),ue)}function be(k){return k===47||k===62||ft(k)?Te(k):n(k)}function Oe(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function de(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Q}function Q(k){return et(k)?rt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):ie(k)}function ie(k){return e.enter("htmlTextData"),u(k)}}const Gf={name:"labelEnd",resolveAll:AP,resolveTo:CP,tokenize:vP},SP={tokenize:kP},xP={tokenize:NP},wP={tokenize:PP};function AP(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&&zn(e,0,e.length,n),e}function CP(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=er(c,e.slice(a+1,a+r+3)),c=er(c,[["enter",p,t]]),c=er(c,Al(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=er(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=er(c,e.slice(u+1)),c=er(c,[["exit",d,t]]),zn(e,a,e.length,c),e}function vP(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(b){return a?a._inactive?g(b):(u=r.parser.defined.includes(gr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(SP,p,u?p:g)(b):b===91?e.attempt(xP,p,u?f:g)(b):u?p(b):g(b)}function f(b){return e.attempt(wP,p,g)(b)}function p(b){return t(b)}function g(b){return a._balanced=!0,n(b)}}function kP(e,t,n){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return ft(g)?va(e,a)(g):a(g)}function a(g){return g===41?p(g):_E(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return ft(g)?va(e,d)(g):p(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?xE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function f(g){return ft(g)?va(e,p)(g):p(g)}function p(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function NP(e,t,n){const r=this;return o;function o(c){return SE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function PP(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 OP={name:"labelStartImage",resolveAll:Gf.resolveAll,tokenize:IP};function IP(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 RP={name:"labelStartLink",resolveAll:Gf.resolveAll,tokenize:LP};function LP(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:DP};function DP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),rt(e,t,"linePrefix")}}const Cl={name:"thematicBreak",tokenize:MP};function MP(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||Be(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),et(f)?rt(e,c,"whitespace")(f):c(f))}}const Pn={continuation:{tokenize:HP},exit:jP,name:"list",tokenize:UP},FP={partial:!0,tokenize:$P},BP={partial:!0,tokenize:zP};function UP(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Vf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Cl,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Vf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Aa,r.interrupt?n:p,e.attempt(FP,b,g))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function g(y){return et(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function HP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Aa,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,rt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!et(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(BP,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,rt(e,e.attempt(Pn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function zP(e,t,n){const r=this;return rt(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 jP(e){e.exit(this.containerState.type)}function $P(e,t,n){const r=this;return rt(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!et(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const AE={name:"setextUnderline",resolveTo:VP,tokenize:qP};function VP(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:F({},e[r][1].start),end:F({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function qP(e,t,n){const r=this;let o;return a;function a(f){let p=r.events.length,g;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){g=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),o=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"),et(f)?rt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Be(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const YP={tokenize:GP};function GP(e){const t=this,n=e.attempt(Aa,r,e.attempt(this.parser.constructs.flowInitial,o,rt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(JN,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 WP={resolveAll:vE()},XP=CE("string"),KP=CE("text");function CE(e){return{resolveAll:vE(e==="text"?QP: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 g=o[p];let b=-1;if(g)for(;++b<g.length;){const y=g[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function vE(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 QP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const f=o[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:F({},r.end)};r.end=F({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const JP=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:rP},disable:{null:[]},document:{42:Pn,43:Pn,45:Pn,48:Pn,49:Pn,50:Pn,51:Pn,52:Pn,53:Pn,54:Pn,55:Pn,56:Pn,57:Pn,62:mE},flow:{35:lP,42:Cl,45:[AE,Cl],60:hP,61:AE,95:Cl,96:TE,126:TE},flowInitial:{[-2]:Yf,[-1]:Yf,32:Yf},insideSpan:{null:[qf,WP]},string:{38:EE,92:gE},text:{[-5]:Wf,[-4]:Wf,[-3]:Wf,33:OP,38:EE,42:qf,60:[RN,bP],91:RP,92:[aP,gE],93:Gf,95:qf,96:YN}},Symbol.toStringTag,{value:"Module"}));function ZP(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:K(V),check:K(D),consume:P,enter:A,exit:M,interrupt:K(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:g};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function g(Z){return u=er(u,Z),v(),u[u.length-1]!==null?[]:(re(t,0),f.events=Al(a,f.events,f),f.events)}function b(Z,ce){return tO(y(Z),ce)}function y(Z){return eO(u,Z)}function _(){const{_bufferIndex:Z,_index:ce,line:he,column:ue,offset:be}=r;return{_bufferIndex:Z,_index:ce,line:he,column:ue,offset:be}}function S(Z){o[Z.line]=Z.column,$()}function v(){let Z;for(;r._index<u.length;){const ce=u[r._index];if(typeof ce=="string")for(Z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Z&&r._bufferIndex<ce.length;)C(ce.charCodeAt(r._bufferIndex));else C(ce)}}function C(Z){p=p(Z)}function P(Z){Be(Z)?(r.line++,r.column=1,r.offset+=Z===-3?2:1,$()):Z!==-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=Z}function A(Z,ce){const he=ce||{};return he.type=Z,he.start=_(),f.events.push(["enter",he,f]),c.push(he),he}function M(Z){const ce=c.pop();return ce.end=_(),f.events.push(["exit",ce,f]),ce}function V(Z,ce){re(Z,ce.from)}function D(Z,ce){ce.restore()}function K(Z,ce){return he;function he(ue,be,Oe){let de,Q,ie,k;return Array.isArray(ue)?te(ue):"tokenize"in ue?te([ue]):B(ue);function B(Ae){return $e;function $e(we){const We=we!==null&&Ae[we],ht=we!==null&&Ae.null,on=[...Array.isArray(We)?We:We?[We]:[],...Array.isArray(ht)?ht:ht?[ht]:[]];return te(on)(we)}}function te(Ae){return de=Ae,Q=0,Ae.length===0?Oe:O(Ae[Q])}function O(Ae){return $e;function $e(we){return k=Te(),ie=Ae,Ae.partial||(f.currentConstruct=Ae),Ae.name&&f.parser.constructs.disable.null.includes(Ae.name)?Ie():Ae.tokenize.call(ce?Object.assign(Object.create(f),ce):f,d,_e,Ie)(we)}}function _e(Ae){return Z(ie,k),be}function Ie(Ae){return k.restore(),++Q<de.length?O(de[Q]):Oe}}}function re(Z,ce){Z.resolveAll&&!a.includes(Z)&&a.push(Z),Z.resolve&&zn(f.events,ce,f.events.length-ce,Z.resolve(f.events.slice(ce),f)),Z.resolveTo&&(f.events=Z.resolveTo(f.events,f))}function Te(){const Z=_(),ce=f.previous,he=f.currentConstruct,ue=f.events.length,be=Array.from(c);return{from:ue,restore:Oe};function Oe(){r=Z,f.previous=ce,f.currentConstruct=he,f.events.length=ue,c=be,$()}}function $(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function eO(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 tO(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
19
19
|
`;break}case-3:{u=`\r
|
|
20
|
-
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function eO(e){const r={constructs:cE([KP,...(e||{}).extensions||[]]),content:o(wN),defined:[],document:o(AN),flow:o(VP),lazy:{},string:o(GP),text:o(WP)};return r;function o(a){return u;function u(c){return QP(r,a,c)}}}function tO(e){for(;!TE(e););return e}const vE=/[\0\t\n\r]/g;function nO(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let f,p,g,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),g=0,t="",n&&(a.charCodeAt(0)===65279&&g++,n=void 0);g<a.length;){if(vE.lastIndex=g,f=vE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(g);break}if(y===10&&g===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),g<b&&(d.push(a.slice(g,b)),e+=b-g),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}g=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const rO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function iO(e){return e.replace(rO,oO)}function oO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return dE(n.slice(a?2:1),a?16:10)}return $f(n)||e}const kE={}.hasOwnProperty;function sO(e,t,n){return typeof t!="string"&&(n=t,t=void 0),aO(n)(tO(eO(n).document().write(nO()(e,t,!0))))}function aO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Fe),autolinkProtocol:Te,autolinkEmail:Te,atxHeading:a(So),blockQuote:a(ht),characterEscape:Te,characterReference:Te,codeFenced:a(on),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(on,u),codeText:a(qr,u),codeTextData:Te,data:Te,codeFlowValue:Te,definition:a(_r),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Rn),hardBreakEscape:a(Pi),hardBreakTrailing:a(Pi),htmlFlow:a(li,u),htmlFlowData:Te,htmlText:a(li,u),htmlTextData:Te,image:a(ve),label:u,link:a(Fe),listItem:a(Qe),listItemValue:b,listOrdered:a(De,g),listUnordered:a(De),paragraph:a(dt),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(So),strong:a(lt),thematicBreak:a(At)},exit:{atxHeading:d(),atxHeadingSequence:q,autolink:d(),autolinkEmail:We,autolinkProtocol:we,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:Ce,characterReference:$e,codeFenced:d(A),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:$,codeIndented:d(v),codeText:d(be),codeTextData:$,data:$,definition:d(),definitionDestinationString:B,definitionLabelString:P,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(ce),hardBreakTrailing:d(ce),htmlFlow:d(he),htmlFlowData:$,htmlText:d(le),htmlTextData:$,image:d(de),label:ie,labelText:K,lineEnding:ee,link:d(Me),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:k,resourceTitleString:M,resource:te,setextHeading:d(re),setextHeadingLineSequence:Q,setextHeadingText:D,strong:d(),thematicBreak:d()}};NE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ne){let oe={type:"root",children:[]};const Ie={stack:[oe],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let Xe=-1;for(;++Xe<ne.length;)if(ne[Xe][1].type==="listOrdered"||ne[Xe][1].type==="listUnordered")if(ne[Xe][0]==="enter")Ve.push(Xe);else{const Tt=Ve.pop();Xe=o(ne,Tt,Xe)}for(Xe=-1;++Xe<ne.length;){const Tt=t[ne[Xe][0]];kE.call(Tt,ne[Xe][1].type)&&Tt[ne[Xe][1].type].call(Object.assign({sliceSerialize:ne[Xe][2].sliceSerialize},Ie),ne[Xe][1])}if(Ie.tokenStack.length>0){const Tt=Ie.tokenStack[Ie.tokenStack.length-1];(Tt[1]||PE).call(Ie,void 0,Tt[0])}for(oe.position={start:xi(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:xi(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)oe=t.transforms[Xe](oe)||oe;return oe}function o(ne,oe,Ie){let Ve=oe-1,Xe=-1,Tt=!1,ir,or,Oi,xo;for(;++Ve<=Ie;){const sn=ne[Ve];switch(sn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{sn[0]==="enter"?Xe++:Xe--,xo=void 0;break}case"lineEndingBlank":{sn[0]==="enter"&&(ir&&!xo&&!Xe&&!Oi&&(Oi=Ve),xo=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:xo=void 0}if(!Xe&&sn[0]==="enter"&&sn[1].type==="listItemPrefix"||Xe===-1&&sn[0]==="exit"&&(sn[1].type==="listUnordered"||sn[1].type==="listOrdered")){if(ir){let Yr=Ve;for(or=void 0;Yr--;){const qn=ne[Yr];if(qn[1].type==="lineEnding"||qn[1].type==="lineEndingBlank"){if(qn[0]==="exit")continue;or&&(ne[or][1].type="lineEndingBlank",Tt=!0),qn[1].type="lineEnding",or=Yr}else if(!(qn[1].type==="linePrefix"||qn[1].type==="blockQuotePrefix"||qn[1].type==="blockQuotePrefixWhitespace"||qn[1].type==="blockQuoteMarker"||qn[1].type==="listItemIndent"))break}Oi&&(!or||Oi<or)&&(ir._spread=!0),ir.end=Object.assign({},or?ne[or][1].start:sn[1].end),ne.splice(or||Ve,0,["exit",ir,sn[2]]),Ve++,Ie++}if(sn[1].type==="listItemPrefix"){const Yr={type:"listItem",_spread:!1,start:Object.assign({},sn[1].start),end:void 0};ir=Yr,ne.splice(Ve,0,["enter",Yr,sn[2]]),Ve++,Ie++,Oi=void 0,xo=!0}}}return ne[oe][1]._spread=Tt,Ie}function a(ne,oe){return Ie;function Ie(Ve){c.call(this,ne(Ve),Ve),oe&&oe.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ne,oe,Ie){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([oe,Ie||void 0]),ne.position={start:xi(oe.start),end:void 0}}function d(ne){return oe;function oe(Ie){ne&&ne.call(this,Ie),f.call(this,Ie)}}function f(ne,oe){const Ie=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==ne.type&&(oe?oe.call(this,ne,Ve[0]):(Ve[1]||PE).call(this,ne,Ve[0]));else throw new Error("Cannot close `"+ne.type+"` ("+xa({start:ne.start,end:ne.end})+"): it’s not open");Ie.position.end=xi(ne.end)}function p(){return jf(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(ne){if(this.data.expectingFirstListItemValue){const oe=this.stack[this.stack.length-2];oe.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.lang=ne}function _(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.meta=ne}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.value=ne.replace(/(\r?\n|\r)$/g,"")}function P(ne){const oe=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=oe,Ie.identifier=gr(this.sliceSerialize(ne)).toLowerCase()}function C(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.title=ne}function B(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.url=ne}function q(ne){const oe=this.stack[this.stack.length-1];if(!oe.depth){const Ie=this.sliceSerialize(ne).length;oe.depth=Ie}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function Q(ne){const oe=this.stack[this.stack.length-1];oe.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function re(){this.data.setextHeadingSlurpLineEnding=void 0}function Te(ne){const Ie=this.stack[this.stack.length-1].children;let Ve=Ie[Ie.length-1];(!Ve||Ve.type!=="text")&&(Ve=wn(),Ve.position={start:xi(ne.start),end:void 0},Ie.push(Ve)),this.stack.push(Ve)}function $(ne){const oe=this.stack.pop();oe.value+=this.sliceSerialize(ne),oe.position.end=xi(ne.end)}function ee(ne){const oe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ie=oe.children[oe.children.length-1];Ie.position.end=xi(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(oe.type)&&(Te.call(this,ne),$.call(this,ne))}function ce(){this.data.atHardBreak=!0}function he(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.value=ne}function le(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.value=ne}function be(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.value=ne}function Me(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=oe,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function de(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=oe,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function K(ne){const oe=this.sliceSerialize(ne),Ie=this.stack[this.stack.length-2];Ie.label=iO(oe),Ie.identifier=gr(oe).toLowerCase()}function ie(){const ne=this.stack[this.stack.length-1],oe=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){const Ve=ne.children;Ie.children=Ve}else Ie.alt=oe}function k(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.url=ne}function M(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.title=ne}function te(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(ne){const oe=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=oe,Ie.identifier=gr(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function Oe(ne){this.data.characterReferenceType=ne.type}function Ce(ne){const oe=this.sliceSerialize(ne),Ie=this.data.characterReferenceType;let Ve;Ie?(Ve=dE(oe,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=$f(oe);const Xe=this.stack[this.stack.length-1];Xe.value+=Ve}function $e(ne){const oe=this.stack.pop();oe.position.end=xi(ne.end)}function we(ne){$.call(this,ne);const oe=this.stack[this.stack.length-1];oe.url=this.sliceSerialize(ne)}function We(ne){$.call(this,ne);const oe=this.stack[this.stack.length-1];oe.url="mailto:"+this.sliceSerialize(ne)}function ht(){return{type:"blockquote",children:[]}}function on(){return{type:"code",lang:null,meta:null,value:""}}function qr(){return{type:"inlineCode",value:""}}function _r(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Rn(){return{type:"emphasis",children:[]}}function So(){return{type:"heading",depth:0,children:[]}}function Pi(){return{type:"break"}}function li(){return{type:"html",value:""}}function ve(){return{type:"image",title:null,url:"",alt:null}}function Fe(){return{type:"link",title:null,url:"",children:[]}}function De(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function Qe(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function dt(){return{type:"paragraph",children:[]}}function lt(){return{type:"strong",children:[]}}function wn(){return{type:"text",value:""}}function At(){return{type:"thematicBreak"}}}function xi(e){return{line:e.line,column:e.column,offset:e.offset}}function NE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?NE(e,r):uO(e,r)}}function uO(e,t){let n;for(n in t)if(kE.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 PE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xa({start:t.start,end:t.end})+") is still open")}function lO(e){const t=this;t.parser=n;function n(r){return sO(r,me(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function cO(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 dO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
21
|
-
`}]}function
|
|
22
|
-
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function
|
|
20
|
+
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function nO(e){const r={constructs:dE([JP,...(e||{}).extensions||[]]),content:o(CN),defined:[],document:o(kN),flow:o(YP),lazy:{},string:o(XP),text:o(KP)};return r;function o(a){return u;function u(c){return ZP(r,a,c)}}}function rO(e){for(;!bE(e););return e}const kE=/[\0\t\n\r]/g;function iO(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let f,p,g,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),g=0,t="",n&&(a.charCodeAt(0)===65279&&g++,n=void 0);g<a.length;){if(kE.lastIndex=g,f=kE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(g);break}if(y===10&&g===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),g<b&&(d.push(a.slice(g,b)),e+=b-g),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}g=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const oO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sO(e){return e.replace(oO,aO)}function aO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return fE(n.slice(a?2:1),a?16:10)}return $f(n)||e}const NE={}.hasOwnProperty;function uO(e,t,n){return typeof t!="string"&&(n=t,t=void 0),lO(n)(rO(nO(n).document().write(iO()(e,t,!0))))}function lO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Fe),autolinkProtocol:Te,autolinkEmail:Te,atxHeading:a(xo),blockQuote:a(ht),characterEscape:Te,characterReference:Te,codeFenced:a(on),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(on,u),codeText:a(qr,u),codeTextData:Te,data:Te,codeFlowValue:Te,definition:a(_r),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Rn),hardBreakEscape:a(Ii),hardBreakTrailing:a(Ii),htmlFlow:a(li,u),htmlFlowData:Te,htmlText:a(li,u),htmlTextData:Te,image:a(ve),label:u,link:a(Fe),listItem:a(Qe),listItemValue:b,listOrdered:a(Me,g),listUnordered:a(Me),paragraph:a(dt),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(xo),strong:a(lt),thematicBreak:a(Ct)},exit:{atxHeading:d(),atxHeadingSequence:V,autolink:d(),autolinkEmail:We,autolinkProtocol:we,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Ie,characterReferenceMarkerNumeric:Ie,characterReferenceValue:Ae,characterReference:$e,codeFenced:d(v),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:$,codeIndented:d(C),codeText:d(be),codeTextData:$,data:$,definition:d(),definitionDestinationString:M,definitionLabelString:P,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(ce),hardBreakTrailing:d(ce),htmlFlow:d(he),htmlFlowData:$,htmlText:d(ue),htmlTextData:$,image:d(de),label:ie,labelText:Q,lineEnding:Z,link:d(Oe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:k,resourceTitleString:B,resource:te,setextHeading:d(re),setextHeadingLineSequence:K,setextHeadingText:D,strong:d(),thematicBreak:d()}};PE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ne){let oe={type:"root",children:[]};const Re={stack:[oe],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let Xe=-1;for(;++Xe<ne.length;)if(ne[Xe][1].type==="listOrdered"||ne[Xe][1].type==="listUnordered")if(ne[Xe][0]==="enter")Ve.push(Xe);else{const Tt=Ve.pop();Xe=o(ne,Tt,Xe)}for(Xe=-1;++Xe<ne.length;){const Tt=t[ne[Xe][0]];NE.call(Tt,ne[Xe][1].type)&&Tt[ne[Xe][1].type].call(Object.assign({sliceSerialize:ne[Xe][2].sliceSerialize},Re),ne[Xe][1])}if(Re.tokenStack.length>0){const Tt=Re.tokenStack[Re.tokenStack.length-1];(Tt[1]||OE).call(Re,void 0,Tt[0])}for(oe.position={start:Ai(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:Ai(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)oe=t.transforms[Xe](oe)||oe;return oe}function o(ne,oe,Re){let Ve=oe-1,Xe=-1,Tt=!1,ir,or,Ri,wo;for(;++Ve<=Re;){const sn=ne[Ve];switch(sn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{sn[0]==="enter"?Xe++:Xe--,wo=void 0;break}case"lineEndingBlank":{sn[0]==="enter"&&(ir&&!wo&&!Xe&&!Ri&&(Ri=Ve),wo=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:wo=void 0}if(!Xe&&sn[0]==="enter"&&sn[1].type==="listItemPrefix"||Xe===-1&&sn[0]==="exit"&&(sn[1].type==="listUnordered"||sn[1].type==="listOrdered")){if(ir){let Yr=Ve;for(or=void 0;Yr--;){const qn=ne[Yr];if(qn[1].type==="lineEnding"||qn[1].type==="lineEndingBlank"){if(qn[0]==="exit")continue;or&&(ne[or][1].type="lineEndingBlank",Tt=!0),qn[1].type="lineEnding",or=Yr}else if(!(qn[1].type==="linePrefix"||qn[1].type==="blockQuotePrefix"||qn[1].type==="blockQuotePrefixWhitespace"||qn[1].type==="blockQuoteMarker"||qn[1].type==="listItemIndent"))break}Ri&&(!or||Ri<or)&&(ir._spread=!0),ir.end=Object.assign({},or?ne[or][1].start:sn[1].end),ne.splice(or||Ve,0,["exit",ir,sn[2]]),Ve++,Re++}if(sn[1].type==="listItemPrefix"){const Yr={type:"listItem",_spread:!1,start:Object.assign({},sn[1].start),end:void 0};ir=Yr,ne.splice(Ve,0,["enter",Yr,sn[2]]),Ve++,Re++,Ri=void 0,wo=!0}}}return ne[oe][1]._spread=Tt,Re}function a(ne,oe){return Re;function Re(Ve){c.call(this,ne(Ve),Ve),oe&&oe.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ne,oe,Re){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([oe,Re||void 0]),ne.position={start:Ai(oe.start),end:void 0}}function d(ne){return oe;function oe(Re){ne&&ne.call(this,Re),f.call(this,Re)}}function f(ne,oe){const Re=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==ne.type&&(oe?oe.call(this,ne,Ve[0]):(Ve[1]||OE).call(this,ne,Ve[0]));else throw new Error("Cannot close `"+ne.type+"` ("+xa({start:ne.start,end:ne.end})+"): it’s not open");Re.position.end=Ai(ne.end)}function p(){return jf(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(ne){if(this.data.expectingFirstListItemValue){const oe=this.stack[this.stack.length-2];oe.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.lang=ne}function _(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.meta=ne}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.value=ne.replace(/(\r?\n|\r)$/g,"")}function P(ne){const oe=this.resume(),Re=this.stack[this.stack.length-1];Re.label=oe,Re.identifier=gr(this.sliceSerialize(ne)).toLowerCase()}function A(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.title=ne}function M(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.url=ne}function V(ne){const oe=this.stack[this.stack.length-1];if(!oe.depth){const Re=this.sliceSerialize(ne).length;oe.depth=Re}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function K(ne){const oe=this.stack[this.stack.length-1];oe.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function re(){this.data.setextHeadingSlurpLineEnding=void 0}function Te(ne){const Re=this.stack[this.stack.length-1].children;let Ve=Re[Re.length-1];(!Ve||Ve.type!=="text")&&(Ve=wn(),Ve.position={start:Ai(ne.start),end:void 0},Re.push(Ve)),this.stack.push(Ve)}function $(ne){const oe=this.stack.pop();oe.value+=this.sliceSerialize(ne),oe.position.end=Ai(ne.end)}function Z(ne){const oe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=oe.children[oe.children.length-1];Re.position.end=Ai(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(oe.type)&&(Te.call(this,ne),$.call(this,ne))}function ce(){this.data.atHardBreak=!0}function he(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.value=ne}function ue(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.value=ne}function be(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.value=ne}function Oe(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=oe,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function de(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=oe,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function Q(ne){const oe=this.sliceSerialize(ne),Re=this.stack[this.stack.length-2];Re.label=sO(oe),Re.identifier=gr(oe).toLowerCase()}function ie(){const ne=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 Ve=ne.children;Re.children=Ve}else Re.alt=oe}function k(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.url=ne}function B(){const ne=this.resume(),oe=this.stack[this.stack.length-1];oe.title=ne}function te(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(ne){const oe=this.resume(),Re=this.stack[this.stack.length-1];Re.label=oe,Re.identifier=gr(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function Ie(ne){this.data.characterReferenceType=ne.type}function Ae(ne){const oe=this.sliceSerialize(ne),Re=this.data.characterReferenceType;let Ve;Re?(Ve=fE(oe,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=$f(oe);const Xe=this.stack[this.stack.length-1];Xe.value+=Ve}function $e(ne){const oe=this.stack.pop();oe.position.end=Ai(ne.end)}function we(ne){$.call(this,ne);const oe=this.stack[this.stack.length-1];oe.url=this.sliceSerialize(ne)}function We(ne){$.call(this,ne);const oe=this.stack[this.stack.length-1];oe.url="mailto:"+this.sliceSerialize(ne)}function ht(){return{type:"blockquote",children:[]}}function on(){return{type:"code",lang:null,meta:null,value:""}}function qr(){return{type:"inlineCode",value:""}}function _r(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Rn(){return{type:"emphasis",children:[]}}function xo(){return{type:"heading",depth:0,children:[]}}function Ii(){return{type:"break"}}function li(){return{type:"html",value:""}}function ve(){return{type:"image",title:null,url:"",alt:null}}function Fe(){return{type:"link",title:null,url:"",children:[]}}function Me(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function Qe(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function dt(){return{type:"paragraph",children:[]}}function lt(){return{type:"strong",children:[]}}function wn(){return{type:"text",value:""}}function Ct(){return{type:"thematicBreak"}}}function Ai(e){return{line:e.line,column:e.column,offset:e.offset}}function PE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?PE(e,r):cO(e,r)}}function cO(e,t){let n;for(n in t)if(NE.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function OE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xa({start:t.start,end:t.end})+") is still open")}function dO(e){const t=this;t.parser=n;function n(r){return uO(r,me(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function fO(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 hO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
21
|
+
`}]}function pO(e,t){const n=t.value?t.value+`
|
|
22
|
+
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function mO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function EO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=es(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function yO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function IE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const 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 bO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return IE(e,t);const o={src:es(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 _O(e,t){const n={src:es(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 SO(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 xO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return IE(e,t);const o={href:es(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 wO(e,t){const n={href:es(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 AO(e,t,n){const r=e.all(t),o=n?CO(n):RE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let g;p&&p.type==="element"&&p.tagName==="p"?g=p:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
|
|
23
23
|
`}),p.type==="element"&&p.tagName==="p"&&!o?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
|
|
24
|
-
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function
|
|
24
|
+
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function CO(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=RE(n[r])}return t}function RE(e){const t=e.spread;return t==null?e.children.length>1:t}function vO(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 kO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function PO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function OO(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=Lr(t.children[1]),d=Sl(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 IO(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 g=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let _={type:"element",tagName:a,properties:b,children:[]};g&&(_.children=e.all(g),e.patch(g,_),_=e.applyData(g,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function RO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const LE=9,DE=32;function LO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(ME(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(ME(t.slice(o),o>0,!1)),a.join("")}function ME(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===LE||a===DE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===LE||a===DE;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function DO(e,t){const n={type:"text",value:LO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function MO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const FO={blockquote:fO,break:hO,code:pO,delete:mO,emphasis:gO,footnoteReference:EO,heading:yO,html:TO,imageReference:bO,image:_O,inlineCode:SO,linkReference:xO,link:wO,listItem:AO,list:vO,paragraph:kO,root:NO,strong:PO,table:OO,tableCell:RO,tableRow:IO,text:DO,thematicBreak:MO,toml:vl,yaml:vl,definition:vl,footnoteDefinition:vl};function vl(){}const FE=-1,kl=0,ka=1,Nl=2,Xf=3,Kf=4,Qf=5,Jf=6,BE=7,UE=8,HE=typeof self=="object"?self:globalThis,BO=(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 kl:case FE:return n(u,o);case ka:{const c=n([],o);for(const d of u)c.push(r(d));return c}case Nl:{const c=n({},o);for(const[d,f]of u)c[r(d)]=r(f);return c}case Xf:return n(new Date(u),o);case Kf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case Qf:{const c=n(new Map,o);for(const[d,f]of u)c.set(r(d),r(f));return c}case Jf:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case BE:{const{name:c,message:d}=u;return n(new HE[c](d),o)}case UE: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 HE[a](u),o)};return r},zE=e=>BO(new Map,e)(0),ns="",{toString:UO}={},{keys:HO}=Object,Na=e=>{const t=typeof e;if(t!=="object"||!e)return[kl,t];const n=UO.call(e).slice(8,-1);switch(n){case"Array":return[ka,ns];case"Object":return[Nl,ns];case"Date":return[Xf,ns];case"RegExp":return[Kf,ns];case"Map":return[Qf,ns];case"Set":return[Jf,ns];case"DataView":return[ka,n]}return n.includes("Array")?[ka,n]:n.includes("Error")?[BE,n]:[Nl,n]},Pl=([e,t])=>e===kl&&(t==="function"||t==="symbol"),zO=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=Na(u);switch(c){case kl:{let p=u;switch(d){case"bigint":c=UE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([FE],u)}return o([c,p],u)}case ka:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),o([d,[...b]],u)}const p=[],g=o([c,p],u);for(const b of u)p.push(a(b));return g}case Nl:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],g=o([c,p],u);for(const b of HO(u))(e||!Pl(Na(u[b])))&&p.push([a(b),a(u[b])]);return g}case Xf:return o([c,u.toISOString()],u);case Kf:{const{source:p,flags:g}=u;return o([c,{source:p,flags:g}],u)}case Qf:{const p=[],g=o([c,p],u);for(const[b,y]of u)(e||!(Pl(Na(b))||Pl(Na(y))))&&p.push([a(b),a(y)]);return g}case Jf:{const p=[],g=o([c,p],u);for(const b of u)(e||!Pl(Na(b)))&&p.push(a(b));return g}}const{message:f}=u;return o([c,{name:d,message:f}],u)};return a},jE=(e,{json:t,lossy:n}={})=>{const r=[];return zO(!(t||n),!!t,new Map,r)(e),r},uo=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?zE(jE(e,t)):structuredClone(e):(e,t)=>zE(jE(e,t));function jO(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 $O(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function VO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||jO,r=e.options.footnoteBackLabel||$O,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 p=e.all(f),g=String(f.identifier).toUpperCase(),b=es(g.toLowerCase());let y=0;const _=[],S=e.footnoteCounts.get(g);for(;S!==void 0&&++y<=S;){_.length>0&&_.push({type:"text",value:" "});let P=typeof n=="string"?n:n(d,y);typeof P=="string"&&(P={type:"text",value:P}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(P)?P:[P]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const P=v.children[v.children.length-1];P&&P.type==="text"?P.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(..._)}else p.push(..._);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,C),c.push(C)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:me(F({},uo(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
|
|
25
25
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
26
|
-
`}]}}const Ol=(function(e){if(e==null)return
|
|
26
|
+
`}]}}const Ol=(function(e){if(e==null)return WO;if(typeof e=="function")return Il(e);if(typeof e=="object")return Array.isArray(e)?qO(e):YO(e);if(typeof e=="string")return GO(e);throw new Error("Expected function, string, or object as test")});function qO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ol(e[n]);return Il(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function YO(e){const t=e;return Il(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function GO(e){return Il(t);function t(n){return n&&n.type===e}}function Il(e){return t;function t(n,r,o){return!!(XO(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function WO(){return!0}function XO(e){return e!==null&&typeof e=="object"&&"type"in e}function nU(e){return e}const $E=[],KO=!0,Zf=!1,QO="skip";function VE(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=Ol(o),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const y=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=$E,_,S,v;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=JO(n(d,p)),y[0]===Zf))return y;if("children"in d&&d.children){const C=d;if(C.children&&y[0]!==QO)for(S=(r?C.children.length:-1)+u,v=p.concat(C);S>-1&&S<C.children.length;){const P=C.children[S];if(_=c(P,S,v)(),_[0]===Zf)return _;S=typeof _[1]=="number"?_[1]:S+u}}return y}}}function JO(e){return Array.isArray(e)?e:typeof e=="number"?[KO,e]:e==null?$E:[e]}function Rl(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),VE(e,a,c,o);function c(d,f){const p=f[f.length-1],g=p?p.children.indexOf(d):void 0;return u(d,g,p)}}const eh={}.hasOwnProperty,ZO={};function eI(e,t){const n=t||ZO,r=new Map,o=new Map,a=new Map,u=F(F({},FO),n.handlers),c={all:f,applyData:nI,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:tI,wrap:iI};return Rl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const g=p.type==="definition"?r:o,b=String(p.identifier).toUpperCase();g.has(b)||g.set(b,p)}}),c;function d(p,g){const b=p.type,y=c.handlers[b];if(eh.call(c.handlers,b)&&y)return y(c,p,g);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in p){const S=p,{children:v}=S,C=ln(S,["children"]),P=uo(C);return P.children=c.all(p),P}return uo(p)}return(c.options.unknownHandler||rI)(c,p,g)}function f(p){const g=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const _=c.one(b[y],p);if(_){if(y&&b[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=qE(_.value)),!Array.isArray(_)&&_.type==="element")){const S=_.children[0];S&&S.type==="text"&&(S.value=qE(S.value))}Array.isArray(_)?g.push(..._):g.push(_)}}}return g}}function tI(e,t){e.position&&(t.position=eE(e))}function nI(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,uo(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function rI(e,t){const n=t.data||{},r="value"in t&&!(eh.call(n,"hProperties")||eh.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 iI(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
27
27
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
28
28
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
29
|
-
`}),n}function
|
|
30
|
-
`},o),a}function rI(e,t){return e&&"run"in e?function(n,r){return tt(this,null,function*(){const o=qE(n,F({file:r},t));yield e.run(o,r)})}:function(n,r){return qE(n,F({file:r},e||t))}}function YE(e){if(e)throw e}var th,GE;function iI(){if(GE)return th;GE=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"),g=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!g)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},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 th=function d(){var f,p,g,b,y,_,S=arguments[0],A=1,v=arguments.length,P=!1;for(typeof S=="boolean"&&(P=S,S=arguments[1]||{},A=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});A<v;++A)if(f=arguments[A],f!=null)for(p in f)g=c(S,p),b=c(f,p),S!==b&&(P&&b&&(a(b)||(y=o(b)))?(y?(y=!1,_=g&&o(g)?g:[]):_=g&&a(g)?g:{},u(S,{name:p,newValue:d(P,_,b)})):typeof b!="undefined"&&u(S,{name:p,newValue:b}));return S},th}var oI=iI();const nh=ze(oI);function rh(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 sI(){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 g=-1;if(d){u(d);return}for(;++g<o.length;)(f[g]===null||f[g]===void 0)&&(f[g]=o[g]);o=f,p?aI(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 aI(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 Dr={basename:uI,dirname:lI,extname:cI,join:dI,sep:"/"};function uI(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 lI(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 cI(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 dI(...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?".":fI(n)}function fI(e){Pa(e);const t=e.codePointAt(0)===47;let n=hI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function hI(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 pI={cwd:mI};function mI(){return"/"}function ih(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function gI(e){if(typeof e=="string")e=new URL(e);else if(!ih(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 EI(e)}function EI(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 oh=["history","path","basename","stem","extname","dirname"];class WE{constructor(t){let n;t?ih(t)?n={path:t}:typeof t=="string"||yI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":pI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<oh.length;){const a=oh[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)oh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Dr.basename(this.path):void 0}set basename(t){ah(t,"basename"),sh(t,"basename"),this.path=Dr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Dr.dirname(this.path):void 0}set dirname(t){XE(this.basename,"dirname"),this.path=Dr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Dr.extname(this.path):void 0}set extname(t){if(sh(t,"extname"),XE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Dr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ih(t)&&(t=gI(t)),ah(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Dr.basename(this.path,this.extname):void 0}set stem(t){ah(t,"stem"),sh(t,"stem"),this.path=Dr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new fn(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 sh(e,t){if(e&&e.includes(Dr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dr.sep+"`")}function ah(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function XE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function yI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const TI=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),bI={}.hasOwnProperty;class uh extends TI{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=sI()}copy(){const t=new uh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(nh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(dh("data",this.frozen),this.namespace[t]=n,this):bI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(dh("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=Ll(t),r=this.parser||this.Parser;return lh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),lh("process",this.parser||this.Parser),ch("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=Ll(t),d=r.parse(c);r.run(d,c,function(p,g,b){if(p||!g||!b)return f(p);const y=g,_=r.stringify(y,b);xI(_)?b.value=_:b.result=_,f(p,b)});function f(p,g){p||!g?u(p):a?a(g):n(void 0,g)}}}processSync(t){let n=!1,r;return this.freeze(),lh("processSync",this.parser||this.Parser),ch("processSync",this.compiler||this.Compiler),this.process(t,o),QE("processSync","process",n),r;function o(a,u){n=!0,YE(a),r=u}}run(t,n,r){KE(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=Ll(n);o.run(t,d,f);function f(p,g,b){const y=g||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),QE("runSync","run",r),o;function a(u,c){YE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=Ll(n),o=this.compiler||this.Compiler;return ch("stringify",o),KE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(dh("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,...g]=f;d(p,g)}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=nh(!0,o.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const g=f[p];a(g)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let g=-1,b=-1;for(;++g<r.length;)if(r[g][0]===f){b=g;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const S=r[b][1];rh(S)&&rh(y)&&(y=nh(!0,S,y)),r[b]=[f,y,..._]}}}}const _I=new uh().freeze();function lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ch(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dh(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 KE(e){if(!rh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function QE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ll(e){return SI(e)?e:new WE(e)}function SI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function xI(e){return typeof e=="string"||wI(e)}function wI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const CI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",JE=[],ZE={allowDangerousHtml:!0},AI=/^(https?|ircs?|mailto|xmpp)$/i,vI=[{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 ey(e){const t=kI(e),n=NI(e);return PI(t.runSync(t.parse(n),n),e)}function kI(e){const t=e.rehypePlugins||JE,n=e.remarkPlugins||JE,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),ZE):ZE;return _I().use(lO).use(n).use(rI,r).use(t)}function NI(e){const t=e.children||"",n=new WE;return typeof t=="string"&&(n.value=t),n}function PI(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||OI;for(const p of vI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+CI+p.id,void 0);return Rl(e,f),tN(e,{Fragment:w.Fragment,components:o,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function f(p,g,b){if(p.type==="raw"&&b&&typeof g=="number")return u?b.children.splice(g,1):b.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let y;for(y in zf)if(Object.hasOwn(zf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],S=zf[y];(S===null||S.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof g=="number"&&(y=!r(p,g,b)),y&&b&&typeof g=="number")return c&&p.children?b.children.splice(g,1,...p.children):b.children.splice(g,1),g}}}function OI(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||AI.test(e.slice(0,t))?e:""}const ty=/[#.]/g;function II(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){ty.lastIndex=o;const c=ty.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 ny(e,t,n){const r=n?MI(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=II(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,RI(u))c.unshift(u);else for(const[g,b]of Object.entries(u))LI(e,d.properties,g,b)}for(const f of c)fh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function RI(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const 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 LI(e,t,n,r){const o=Df(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=Y1(r):o.commaSeparated?a=R1(r):o.commaOrSpaceSeparated?a=Y1(R1(r).join(" ")):a=ry(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?DI(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(ry(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function fh(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)fh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?fh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ry(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ba(n)===ba(t)))return!0}return n}function DI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function MI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const FI=["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"],BI=ny(_l,"div"),UI=ny(Jo,"g",FI);function HI(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=iy(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=iy(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 iy(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
31
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const uo={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/"},oy={}.hasOwnProperty,zI=Object.prototype;function jI(e,t){const n=t||{};return hh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Jo:_l,verbose:n.verbose||!1},e)}function hh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Dl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:sy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=HI(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Dl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Dl(e,r,n),n}default:return n=$I(e,t),n}}function sy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=hh(e,t[n]);r.push(o)}return r}function $I(e,t){const n=e.schema;e.schema=t.namespaceURI===uo.svg?Jo:_l;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;oy.call(zI,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?UI:BI)(t.tagName,o,sy(e,t.childNodes));if(Dl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&rs(d.startTag),p=d&&d.endTag&&rs(d.endTag),g=hh(e,c.content);f&&p&&e.file&&(g.position={start:f.end,end:p.start}),u.content=g}return e.schema=n,u}function Dl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=VI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function VI(e,t,n){const r=rs(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)oy.call(n.attrs,u)&&(a[Df(e.schema,u).property]=rs(n.attrs[u]));n.startTag;const c=rs(n.startTag),d=n.endTag?rs(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function rs(e){const t=ay({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ay({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ay(e){return e.line&&e.column?e:void 0}class Oa{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Oa.prototype.property={},Oa.prototype.normal={},Oa.prototype.space=null;function uy(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 Oa(n,r,t)}function ph(e){return e.toLowerCase()}class tr{constructor(t,n){this.property=t,this.attribute=n}}tr.prototype.space=null,tr.prototype.boolean=!1,tr.prototype.booleanish=!1,tr.prototype.overloadedBoolean=!1,tr.prototype.number=!1,tr.prototype.commaSeparated=!1,tr.prototype.spaceSeparated=!1,tr.prototype.commaOrSpaceSeparated=!1,tr.prototype.mustUseProperty=!1,tr.prototype.defined=!1;let qI=0;const Ye=lo(),jt=lo(),ly=lo(),Ee=lo(),yt=lo(),is=lo(),jn=lo();function lo(){return ea(2,++qI)}const mh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ye,booleanish:jt,commaOrSpaceSeparated:jn,commaSeparated:is,number:Ee,overloadedBoolean:ly,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),gh=Object.keys(mh);class Eh extends tr{constructor(t,n,r,o){let a=-1;if(super(t,n),cy(this,"space",o),typeof r=="number")for(;++a<gh.length;){const u=gh[a];cy(this,gh[a],(r&mh[u])===mh[u])}}}Eh.prototype.defined=!0;function cy(e,t,n){n&&(e[t]=n)}const YI={}.hasOwnProperty;function os(e){const t={},n={};let r;for(r in e.properties)if(YI.call(e.properties,r)){const o=e.properties[r],a=new Eh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ph(r)]=r,n[ph(a.attribute)]=r}return new Oa(t,n,e.space)}const dy=os({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}}),fy=os({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function hy(e,t){return t in e?e[t]:t}function py(e,t){return hy(e,t.toLowerCase())}const my=os({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:py,properties:{xmlns:null,xmlnsXLink:null}}),gy=os({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:yt,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:Ee,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:yt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:jt,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null}}),GI=os({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:py,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:is,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Ye,allowPaymentRequest:Ye,allowUserMedia:Ye,alt:null,as:null,async:Ye,autoCapitalize:null,autoComplete:yt,autoFocus:Ye,autoPlay:Ye,blocking:yt,capture:null,charSet:null,checked:Ye,cite:null,className:yt,cols:Ee,colSpan:null,content:null,contentEditable:jt,controls:Ye,controlsList:yt,coords:Ee|is,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ye,defer:Ye,dir:null,dirName:null,disabled:Ye,download:ly,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ye,formTarget:null,headers:yt,height:Ee,hidden:Ye,high:Ee,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Ye,inputMode:null,integrity:null,is:null,isMap:Ye,itemId:null,itemProp:yt,itemRef:yt,itemScope:Ye,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ye,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:Ye,muted:Ye,name:null,nonce:null,noModule:Ye,noValidate:Ye,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:Ye,optimum:Ee,pattern:null,ping:yt,placeholder:null,playsInline:Ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ye,referrerPolicy:null,rel:yt,required:Ye,reversed:Ye,rows:Ee,rowSpan:Ee,sandbox:yt,scope:null,scoped:Ye,seamless:Ye,selected:Ye,shadowRootClonable:Ye,shadowRootDelegatesFocus:Ye,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:Ye,useMap:null,value:jt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ye,declare:Ye,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Ye,noHref:Ye,noShade:Ye,noWrap:Ye,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:jt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ye,disableRemotePlayback:Ye,prefix:null,property:null,results:Ee,security:null,unselectable:null}}),WI=os({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:hy,properties:{about:jn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:Ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:is,g2:is,glyphName:is,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),XI=/^data[-\w.:]+$/i,Ey=/-[a-z]/g,KI=/[A-Z]/g;function QI(e,t){const n=ph(t);let r=t,o=tr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&XI.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ey,ZI);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ey.test(a)){let u=a.replace(KI,JI);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Eh}return new o(r,t)}function JI(e){return"-"+e.toLowerCase()}function ZI(e){return e.charAt(1).toUpperCase()}const e3=uy([fy,dy,my,gy,GI],"html"),yy=uy([fy,dy,my,gy,WI],"svg"),Ty={}.hasOwnProperty;function by(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&Ty.call(o,e)){const d=String(o[e]);u=Ty.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 t3={},n3={}.hasOwnProperty,_y=by("type",{handlers:{root:i3,element:l3,text:a3,comment:u3,doctype:s3}});function r3(e,t){const r=(t||t3).space;return _y(e,r==="svg"?yy:e3)}function i3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=yh(e.children,n,t),ss(e,n),n}function o3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=yh(e.children,n,t),ss(e,n),n}function s3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ss(e,t),t}function a3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ss(e,t),t}function u3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ss(e,t),t}function l3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=yy);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&n3.call(e.properties,a)){const d=c3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:uo[u],childNodes:[],parentNode:null};return c.childNodes=yh(e.children,c,r),ss(e,c),e.tagName==="template"&&e.content&&(c.content=o3(e.content,r)),c}function c3(e,t,n){const r=QI(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?L1(n):G1(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=uo[r.space]}return o}function yh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=_y(e[r],n);a.parentNode=t,o.push(a)}return o}function ss(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 d3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],f3=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),wt="�";var N;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(N||(N={}));const On={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Sy(e){return e>=55296&&e<=57343}function h3(e){return e>=56320&&e<=57343}function p3(e,t){return(e-55296)*1024+9216+t}function xy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function wy(e){return e>=64976&&e<=65007||f3.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 m3=65536;class g3{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=m3,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(h3(n))return this.pos++,this._addGap(),p3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.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,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Sy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){xy(t)?this._err(Z.controlCharacterInInputStream):wy(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 Ke;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ke||(Ke={}));function Cy(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 E3=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))),y3=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 T3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=y3.get(e))!==null&&t!==void 0?t:e}var Kt;(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"})(Kt||(Kt={}));const b3=32;var wi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(wi||(wi={}));function Th(e){return e>=Kt.ZERO&&e<=Kt.NINE}function _3(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_F||e>=Kt.LOWER_A&&e<=Kt.LOWER_F}function S3(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_Z||e>=Kt.LOWER_A&&e<=Kt.LOWER_Z||Th(e)}function x3(e){return e===Kt.EQUALS||S3(e)}var Qt;(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"})(Qt||(Qt={}));var ri;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ri||(ri={}));class w3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ri.Strict}startEntity(t){this.decodeMode=t,this.state=Qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Qt.EntityStart:return t.charCodeAt(n)===Kt.NUM?(this.state=Qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Qt.NamedEntity,this.stateNamedEntity(t,n));case Qt.NumericStart:return this.stateNumericStart(t,n);case Qt.NumericDecimal:return this.stateNumericDecimal(t,n);case Qt.NumericHex:return this.stateNumericHex(t,n);case Qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|b3)===Kt.LOWER_X?(this.state=Qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Qt.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(Th(o)||_3(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(Th(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===Kt.SEMI)this.consumed+=1;else if(this.decodeMode===ri.Strict)return 0;return this.emitCodePoint(T3(this.result),this.consumed),this.errors&&(t!==Kt.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&wi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=C3(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ri.Attribute&&(a===0||x3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&wi.VALUE_LENGTH)>>14,a!==0){if(u===Kt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ri.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]&wi.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]&~wi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Qt.NamedEntity:return this.result!==0&&(this.decodeMode!==ri.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qt.NumericDecimal:return this.emitNumericEntity(0,2);case Qt.NumericHex:return this.emitNumericEntity(0,3);case Qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qt.EntityStart:return 0}}}function C3(e,t,n,r){const o=(t&wi.BRANCH_LENGTH)>>7,a=t&wi.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 ae;(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/"})(ae||(ae={}));var co;(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"})(co||(co={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));var G;(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"})(G||(G={}));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 A3=new Map([[G.A,m.A],[G.ADDRESS,m.ADDRESS],[G.ANNOTATION_XML,m.ANNOTATION_XML],[G.APPLET,m.APPLET],[G.AREA,m.AREA],[G.ARTICLE,m.ARTICLE],[G.ASIDE,m.ASIDE],[G.B,m.B],[G.BASE,m.BASE],[G.BASEFONT,m.BASEFONT],[G.BGSOUND,m.BGSOUND],[G.BIG,m.BIG],[G.BLOCKQUOTE,m.BLOCKQUOTE],[G.BODY,m.BODY],[G.BR,m.BR],[G.BUTTON,m.BUTTON],[G.CAPTION,m.CAPTION],[G.CENTER,m.CENTER],[G.CODE,m.CODE],[G.COL,m.COL],[G.COLGROUP,m.COLGROUP],[G.DD,m.DD],[G.DESC,m.DESC],[G.DETAILS,m.DETAILS],[G.DIALOG,m.DIALOG],[G.DIR,m.DIR],[G.DIV,m.DIV],[G.DL,m.DL],[G.DT,m.DT],[G.EM,m.EM],[G.EMBED,m.EMBED],[G.FIELDSET,m.FIELDSET],[G.FIGCAPTION,m.FIGCAPTION],[G.FIGURE,m.FIGURE],[G.FONT,m.FONT],[G.FOOTER,m.FOOTER],[G.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[G.FORM,m.FORM],[G.FRAME,m.FRAME],[G.FRAMESET,m.FRAMESET],[G.H1,m.H1],[G.H2,m.H2],[G.H3,m.H3],[G.H4,m.H4],[G.H5,m.H5],[G.H6,m.H6],[G.HEAD,m.HEAD],[G.HEADER,m.HEADER],[G.HGROUP,m.HGROUP],[G.HR,m.HR],[G.HTML,m.HTML],[G.I,m.I],[G.IMG,m.IMG],[G.IMAGE,m.IMAGE],[G.INPUT,m.INPUT],[G.IFRAME,m.IFRAME],[G.KEYGEN,m.KEYGEN],[G.LABEL,m.LABEL],[G.LI,m.LI],[G.LINK,m.LINK],[G.LISTING,m.LISTING],[G.MAIN,m.MAIN],[G.MALIGNMARK,m.MALIGNMARK],[G.MARQUEE,m.MARQUEE],[G.MATH,m.MATH],[G.MENU,m.MENU],[G.META,m.META],[G.MGLYPH,m.MGLYPH],[G.MI,m.MI],[G.MO,m.MO],[G.MN,m.MN],[G.MS,m.MS],[G.MTEXT,m.MTEXT],[G.NAV,m.NAV],[G.NOBR,m.NOBR],[G.NOFRAMES,m.NOFRAMES],[G.NOEMBED,m.NOEMBED],[G.NOSCRIPT,m.NOSCRIPT],[G.OBJECT,m.OBJECT],[G.OL,m.OL],[G.OPTGROUP,m.OPTGROUP],[G.OPTION,m.OPTION],[G.P,m.P],[G.PARAM,m.PARAM],[G.PLAINTEXT,m.PLAINTEXT],[G.PRE,m.PRE],[G.RB,m.RB],[G.RP,m.RP],[G.RT,m.RT],[G.RTC,m.RTC],[G.RUBY,m.RUBY],[G.S,m.S],[G.SCRIPT,m.SCRIPT],[G.SEARCH,m.SEARCH],[G.SECTION,m.SECTION],[G.SELECT,m.SELECT],[G.SOURCE,m.SOURCE],[G.SMALL,m.SMALL],[G.SPAN,m.SPAN],[G.STRIKE,m.STRIKE],[G.STRONG,m.STRONG],[G.STYLE,m.STYLE],[G.SUB,m.SUB],[G.SUMMARY,m.SUMMARY],[G.SUP,m.SUP],[G.TABLE,m.TABLE],[G.TBODY,m.TBODY],[G.TEMPLATE,m.TEMPLATE],[G.TEXTAREA,m.TEXTAREA],[G.TFOOT,m.TFOOT],[G.TD,m.TD],[G.TH,m.TH],[G.THEAD,m.THEAD],[G.TITLE,m.TITLE],[G.TR,m.TR],[G.TRACK,m.TRACK],[G.TT,m.TT],[G.U,m.U],[G.UL,m.UL],[G.SVG,m.SVG],[G.VAR,m.VAR],[G.WBR,m.WBR],[G.XMP,m.XMP]]);function as(e){var t;return(t=A3.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const fe=m,v3={[ae.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[ae.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[ae.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[ae.XLINK]:new Set,[ae.XML]:new Set,[ae.XMLNS]:new Set},bh=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);G.STYLE,G.SCRIPT,G.XMP,G.IFRAME,G.NOEMBED,G.NOFRAMES,G.PLAINTEXT;var I;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(I||(I={}));const Dt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function k3(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Ia(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function N3(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function Ci(e){return N3(e)||Ia(e)}function Ay(e){return Ci(e)||k3(e)}function Ml(e){return e+32}function vy(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function ky(e){return vy(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function P3(e){return e===N.NULL?Z.nullCharacterReference:e>1114111?Z.characterReferenceOutsideUnicodeRange:Sy(e)?Z.surrogateCharacterReference:wy(e)?Z.noncharacterCharacterReference:xy(e)||e===N.CARRIAGE_RETURN?Z.controlCharacterReference:null}class O3{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new g3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new w3(E3,(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=P3(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:Ke.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ke.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Cy(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=as(t.tagName),t.type===Ke.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 Ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ke.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ke.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=vy(t)?Ke.WHITESPACE_CHARACTER:t===N.NULL?Ke.NULL_CHARACTER:Ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ri.Attribute:ri.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ci(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(Z.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(Z.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Z.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ci(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(Z.missingEndTagName),this.state=I.DATA;break}case N.EOF:{this._err(Z.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Z.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.tagName+=wt;break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ia(t)?Ml(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ci(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ci(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ci(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ci(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ci(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&ky(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&ky(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(Z.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(Z.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.name+=wt;break}default:this.currentAttr.name+=String.fromCodePoint(Ia(t)?Ml(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(Z.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._err(Z.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._err(Z.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.data+=wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(On.DASH_DASH,!0)?(this._createCommentToken(On.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(On.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(On.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(On.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(Z.cdataInHtmlContent),this._createCommentToken(On.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Z.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.data+=wt;break}case N.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 N.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(Z.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case N.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(Z.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(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=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ia(t))this._createDoctypeToken(String.fromCharCode(Ml(t))),this.state=I.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(Z.unexpectedNullCharacter),this._createDoctypeToken(wt),this.state=I.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.name+=wt;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ia(t)?Ml(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(On.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(On.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Z.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(Z.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Z.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.publicId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.publicId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(Z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(Z.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Z.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.systemId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(Z.unexpectedNullCharacter),n.systemId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.NULL:{this._err(Z.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(Z.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=I.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ay(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ay(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(Z.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Ny=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),Py=new Set([...Ny,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Fl=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),I3=new Set([...Fl,m.OL,m.UL]),R3=new Set([...Fl,m.BUTTON]),Oy=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),Iy=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),L3=new Set([m.TR,m.TEMPLATE,m.HTML]),D3=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),M3=new Set([m.TABLE,m.TEMPLATE,m.HTML]),F3=new Set([m.TD,m.TH]);class B3{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)===ae.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])!==ae.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(bh,ae.HTML)}popUntilTableCellPopped(){this.popUntilPopped(F3,ae.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(M3,ae.HTML)}clearBackToTableBodyContext(){this.clearBackTo(D3,ae.HTML)}clearBackToTableRowContext(){this.clearBackTo(L3,ae.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 ae.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ae.SVG:{if(Iy.has(o))return!1;break}case ae.MATHML:{if(Oy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Fl)}hasInListItemScope(t){return this.hasInDynamicScope(t,I3)}hasInButtonScope(t){return this.hasInDynamicScope(t,R3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ae.HTML:{if(bh.has(n))return!0;if(Fl.has(n))return!1;break}case ae.SVG:{if(Iy.has(n))return!1;break}case ae.MATHML:{if(Oy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ae.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])===ae.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])===ae.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&&Ny.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Py.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Py.has(this.currentTagId);)this.pop()}}const _h=3;var Mr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Mr||(Mr={}));const Ry={type:Mr.Marker};class U3{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===Mr.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<_h)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<_h)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>=_h&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Ry)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Mr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Mr.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(Ry);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Mr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Mr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Mr.Element&&n.element===t)}}const Ai={createDocument(){return{nodeName:"#document",mode:nr.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};Ai.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ai.isTextNode(n)){n.value+=t;return}}Ai.appendChild(e,Ai.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ai.isTextNode(r)?r.value+=t:Ai.insertBefore(e,Ai.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=F(F({},e.sourceCodeLocation),t)}},Ly="html",H3="about:legacy-compat",z3="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Dy=["+//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//"],j3=[...Dy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],$3=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),My=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],V3=[...My,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Fy(e,t){return t.some(n=>e.startsWith(n))}function q3(e){return e.name===Ly&&e.publicId===null&&(e.systemId===null||e.systemId===H3)}function Y3(e){if(e.name!==Ly)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===z3)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),$3.has(n))return nr.QUIRKS;let r=t===null?j3:Dy;if(Fy(n,r))return nr.QUIRKS;if(r=t===null?My:V3,Fy(n,r))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const By={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},G3="definitionurl",W3="definitionURL",X3=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])),K3=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ae.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ae.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ae.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ae.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ae.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ae.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ae.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ae.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ae.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ae.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ae.XMLNS}]]),Q3=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])),J3=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 Z3(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===co.COLOR||r===co.SIZE||r===co.FACE)||J3.has(t)}function Uy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===G3){e.attrs[t].name=W3;break}}function Hy(e){for(let t=0;t<e.attrs.length;t++){const n=X3.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Sh(e){for(let t=0;t<e.attrs.length;t++){const n=K3.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 eR(e){const t=Q3.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=as(e.tagName))}function tR(e,t){return t===ae.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function nR(e,t,n){if(t===ae.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===co.ENCODING){const o=n[r].value.toLowerCase();return o===By.TEXT_HTML||o===By.APPLICATION_XML}}return t===ae.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function rR(e,t,n,r){return(!r||r===ae.HTML)&&nR(e,t,n)||(!r||r===ae.MATHML)&&tR(e,t)}const iR="hidden",oR=8,sR=3;var L;(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"})(L||(L={}));const aR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},zy=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),jy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ai,onParseError:null};class $y{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=F(F({},jy),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 O3(this.options,this),this.activeFormattingElements=new U3(this.treeAdapter),this.fragmentContextID=r?as(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new B3(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=F(F({},jy),n);t!=null||(t=r.treeAdapter.createElement(G.TEMPLATE,ae.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ae.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(L.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:aR,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)===ae.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ae.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=Dt.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)===G.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ae.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=Dt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=Dt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=Dt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=Dt.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&&me(F({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ae.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ae.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(G.HTML,ae.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===Ke.END_TAG&&o===n.tagName?{endTag:F({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===G.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ae.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ae.HTML)}_processToken(t){switch(t.type){case Ke.CHARACTER:{this.onCharacter(t);break}case Ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ke.COMMENT:{this.onComment(t);break}case Ke.DOCTYPE:{this.onDoctype(t);break}case Ke.START_TAG:{this._processStartTag(t);break}case Ke.END_TAG:{this.onEndTag(t);break}case Ke.EOF:{this.onEof(t);break}case Ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return rR(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Mr.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=L.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=L.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=L.IN_TABLE;return}case m.BODY:{this.insertionMode=L.IN_BODY;return}case m.FRAMESET:{this.insertionMode=L.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?L.AFTER_HEAD:L.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.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=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return zy.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)===ae.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 v3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){FL(this,t);return}switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{qy(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ah(this,t);break}case L.IN_TABLE_TEXT:{Zy(this,t);break}case L.IN_COLUMN_GROUP:{Hl(this,t);break}case L.AFTER_BODY:{$l(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ML(this,t);return}switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ah(this,t);break}case L.IN_COLUMN_GROUP:{Hl(this,t);break}case L.AFTER_BODY:{$l(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){wh(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{wh(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.AFTER_BODY:{pR(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{mR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{gR(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,Z.misplacedDoctype);break}case L.IN_TABLE_TEXT:{za(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Z.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?BL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{ER(this,t);break}case L.BEFORE_HEAD:{TR(this,t);break}case L.IN_HEAD:{Er(this,t);break}case L.IN_HEAD_NO_SCRIPT:{SR(this,t);break}case L.AFTER_HEAD:{wR(this,t);break}case L.IN_BODY:{pn(this,t);break}case L.IN_TABLE:{us(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_CAPTION:{bL(this,t);break}case L.IN_COLUMN_GROUP:{vh(this,t);break}case L.IN_TABLE_BODY:{zl(this,t);break}case L.IN_ROW:{jl(this,t);break}case L.IN_CELL:{xL(this,t);break}case L.IN_SELECT:{nT(this,t);break}case L.IN_SELECT_IN_TABLE:{CL(this,t);break}case L.IN_TEMPLATE:{vL(this,t);break}case L.AFTER_BODY:{NL(this,t);break}case L.IN_FRAMESET:{PL(this,t);break}case L.AFTER_FRAMESET:{IL(this,t);break}case L.AFTER_AFTER_BODY:{LL(this,t);break}case L.AFTER_AFTER_FRAMESET:{DL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?UL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{yR(this,t);break}case L.BEFORE_HEAD:{bR(this,t);break}case L.IN_HEAD:{_R(this,t);break}case L.IN_HEAD_NO_SCRIPT:{xR(this,t);break}case L.AFTER_HEAD:{CR(this,t);break}case L.IN_BODY:{Ul(this,t);break}case L.TEXT:{cL(this,t);break}case L.IN_TABLE:{Ua(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_CAPTION:{_L(this,t);break}case L.IN_COLUMN_GROUP:{SL(this,t);break}case L.IN_TABLE_BODY:{kh(this,t);break}case L.IN_ROW:{tT(this,t);break}case L.IN_CELL:{wL(this,t);break}case L.IN_SELECT:{rT(this,t);break}case L.IN_SELECT_IN_TABLE:{AL(this,t);break}case L.IN_TEMPLATE:{kL(this,t);break}case L.AFTER_BODY:{oT(this,t);break}case L.IN_FRAMESET:{OL(this,t);break}case L.AFTER_FRAMESET:{RL(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{Qy(this,t);break}case L.TEXT:{dL(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_TEMPLATE:{iT(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{Ch(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{Vy(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ah(this,t);break}case L.IN_TABLE_TEXT:{Jy(this,t);break}}}}function uR(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):Ky(e,t),n}function lR(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 cR(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>=sR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=dR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function dR(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 fR(e,t,n){const r=e.treeAdapter.getTagName(t),o=as(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===ae.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function hR(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 xh(e,t){for(let n=0;n<oR;n++){const r=uR(e,t);if(!r)break;const o=lR(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=cR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&fR(e,u,a),hR(e,o,r)}}function wh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function pR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function mR(e,t){e._appendCommentNode(t,e.document)}function Ch(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function gR(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:Y3(t);q3(t)||e._err(t,Z.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function Ra(e,t){e._err(t,Z.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function ER(e,t){t.tagID===m.HTML?(e._insertElement(t,ae.HTML),e.insertionMode=L.BEFORE_HEAD):La(e,t)}function yR(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&La(e,t)}function La(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function TR(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.HEAD:{e._insertElement(t,ae.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Da(e,t)}}function bR(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Da(e,t):e._err(t,Z.endTagWithoutMatchingOpenElement)}function Da(e,t){e._insertFakeElement(G.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function Er(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,Dt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Dt.RAWTEXT):(e._insertElement(t,ae.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,Dt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,Dt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case m.HEAD:{e._err(t,Z.misplacedStartTagForHeadElement);break}default:Ma(e,t)}}function _R(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ma(e,t);break}case m.TEMPLATE:{fo(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function fo(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 Ma(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function SR(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{Er(e,t);break}case m.NOSCRIPT:{e._err(t,Z.nestedNoscriptInHead);break}default:Fa(e,t)}}function xR(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case m.BR:{Fa(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function Fa(e,t){const n=t.type===Ke.EOF?Z.openElementsLeftAfterEof:Z.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function wR(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.BODY:{e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ae.HTML),e.insertionMode=L.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),Er(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,Z.misplacedStartTagForHeadElement);break}default:Ba(e,t)}}function CR(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Ba(e,t);break}case m.TEMPLATE:{fo(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function Ba(e,t){e._insertFakeElement(G.BODY,m.BODY),e.insertionMode=L.IN_BODY,Bl(e,t)}function Bl(e,t){switch(t.type){case Ke.CHARACTER:{qy(e,t);break}case Ke.WHITESPACE_CHARACTER:{Vy(e,t);break}case Ke.COMMENT:{wh(e,t);break}case Ke.START_TAG:{pn(e,t);break}case Ke.END_TAG:{Ul(e,t);break}case Ke.EOF:{Qy(e,t);break}}}function Vy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function qy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function AR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function vR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function kR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_FRAMESET)}function NR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML)}function PR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&bh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ae.HTML)}function OR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function IR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),n||(e.formElement=e.openElements.current))}function RR(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,ae.HTML)}function LR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.tokenizer.state=Dt.PLAINTEXT}function DR(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1}function MR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(G.A);n&&(xh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function FR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function BR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(xh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function UR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function HR(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function Yy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Gy(e){const t=Cy(e,co.TYPE);return t!=null&&t.toLowerCase()===iR}function zR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),Gy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function jR(e,t){e._appendElement(t,ae.HTML),t.ackSelfClosing=!0}function $R(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function VR(e,t){t.tagName=G.IMG,t.tagID=m.IMG,Yy(e,t)}function qR(e,t){e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Dt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function YR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Dt.RAWTEXT)}function GR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Dt.RAWTEXT)}function Wy(e,t){e._switchToTextParsing(t,Dt.RAWTEXT)}function WR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function XR(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function KR(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ae.HTML)}function QR(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ae.HTML)}function JR(e,t){e._reconstructActiveFormattingElements(),Uy(t),Sh(t),t.selfClosing?e._appendElement(t,ae.MATHML):e._insertElement(t,ae.MATHML),t.ackSelfClosing=!0}function ZR(e,t){e._reconstructActiveFormattingElements(),Hy(t),Sh(t),t.selfClosing?e._appendElement(t,ae.SVG):e._insertElement(t,ae.SVG),t.ackSelfClosing=!0}function Xy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function pn(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:{FR(e,t);break}case m.A:{MR(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{PR(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:{NR(e,t);break}case m.LI:case m.DD:case m.DT:{RR(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{Yy(e,t);break}case m.HR:{$R(e,t);break}case m.RB:case m.RTC:{KR(e,t);break}case m.RT:case m.RP:{QR(e,t);break}case m.PRE:case m.LISTING:{OR(e,t);break}case m.XMP:{YR(e,t);break}case m.SVG:{ZR(e,t);break}case m.HTML:{AR(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{Er(e,t);break}case m.BODY:{vR(e,t);break}case m.FORM:{IR(e,t);break}case m.NOBR:{BR(e,t);break}case m.MATH:{JR(e,t);break}case m.TABLE:{HR(e,t);break}case m.INPUT:{zR(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{jR(e,t);break}case m.IMAGE:{VR(e,t);break}case m.BUTTON:{DR(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{UR(e,t);break}case m.IFRAME:{GR(e,t);break}case m.SELECT:{WR(e,t);break}case m.OPTION:case m.OPTGROUP:{XR(e,t);break}case m.NOEMBED:case m.NOFRAMES:{Wy(e,t);break}case m.FRAMESET:{kR(e,t);break}case m.TEXTAREA:{qR(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?Wy(e,t):Xy(e,t);break}case m.PLAINTEXT:{LR(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:Xy(e,t)}}function eL(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function tL(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,oT(e,t))}function nL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function rL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function iL(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(G.P,m.P),e._closePElement()}function oL(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function sL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function aL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function uL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function lL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(G.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function Ky(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 Ul(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:{xh(e,t);break}case m.P:{iL(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:{nL(e,t);break}case m.LI:{oL(e);break}case m.DD:case m.DT:{sL(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{aL(e);break}case m.BR:{lL(e);break}case m.BODY:{eL(e,t);break}case m.HTML:{tL(e,t);break}case m.FORM:{rL(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{uL(e,t);break}case m.TEMPLATE:{fo(e,t);break}default:Ky(e,t)}}function Qy(e,t){e.tmplInsertionModeStack.length>0?iT(e,t):Ch(e,t)}function cL(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 dL(e,t){e._err(t,Z.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ah(e,t){if(e.openElements.currentTagId!==void 0&&zy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{Zy(e,t);break}case Ke.WHITESPACE_CHARACTER:{Jy(e,t);break}}else Ha(e,t)}function fL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_CAPTION}function hL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function pL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.COLGROUP,m.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,vh(e,t)}function mL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_TABLE_BODY}function gL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.TBODY,m.TBODY),e.insertionMode=L.IN_TABLE_BODY,zl(e,t)}function EL(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function yL(e,t){Gy(t)?e._appendElement(t,ae.HTML):Ha(e,t),t.ackSelfClosing=!0}function TL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ae.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function us(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{gL(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{Er(e,t);break}case m.COL:{pL(e,t);break}case m.FORM:{TL(e,t);break}case m.TABLE:{EL(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{mL(e,t);break}case m.INPUT:{yL(e,t);break}case m.CAPTION:{fL(e,t);break}case m.COLGROUP:{hL(e,t);break}default:Ha(e,t)}}function Ua(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{fo(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Ha(e,t)}}function Ha(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Bl(e,t),e.fosterParentingEnabled=n}function Jy(e,t){e.pendingCharacterTokens.push(t)}function Zy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function za(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ha(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const eT=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function bL(e,t){const n=t.tagID;eT.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,us(e,t)):pn(e,t)}function _L(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=L.IN_TABLE,n===m.TABLE&&Ua(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:Ul(e,t)}}function vh(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.COL:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{Er(e,t);break}default:Hl(e,t)}}function SL(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TEMPLATE:{fo(e,t);break}case m.COL:break;default:Hl(e,t)}}function Hl(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function zl(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(G.TR,m.TR),e.insertionMode=L.IN_ROW,jl(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=L.IN_TABLE,us(e,t));break}default:us(e,t)}}function kh(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=L.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ua(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:Ua(e,t)}}function jl(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.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=L.IN_TABLE_BODY,zl(e,t));break}default:us(e,t)}}function tT(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,kh(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=L.IN_TABLE_BODY,kh(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:Ua(e,t)}}function xL(e,t){const n=t.tagID;eT.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),jl(e,t)):pn(e,t)}function wL(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=L.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),tT(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:Ul(e,t)}}function nT(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{Er(e,t);break}}}function rT(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:{fo(e,t);break}}}function CL(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)):nT(e,t)}function AL(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)):rT(e,t)}function vL(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{Er(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,us(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,vh(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,zl(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,jl(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,pn(e,t)}}function kL(e,t){t.tagID===m.TEMPLATE&&fo(e,t)}function iT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ch(e,t)}function NL(e,t){t.tagID===m.HTML?pn(e,t):$l(e,t)}function oT(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=L.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 $l(e,t)}function $l(e,t){e.insertionMode=L.IN_BODY,Bl(e,t)}function PL(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.FRAMESET:{e._insertElement(t,ae.HTML);break}case m.FRAME:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{Er(e,t);break}}}function OL(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function IL(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.NOFRAMES:{Er(e,t);break}}}function RL(e,t){t.tagID===m.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function LL(e,t){t.tagID===m.HTML?pn(e,t):Vl(e,t)}function Vl(e,t){e.insertionMode=L.IN_BODY,Bl(e,t)}function DL(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.NOFRAMES:{Er(e,t);break}}}function ML(e,t){t.chars=wt,e._insertCharacters(t)}function FL(e,t){e._insertCharacters(t),e.framesetOk=!1}function sT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ae.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function BL(e,t){if(Z3(t))sT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ae.MATHML?Uy(t):r===ae.SVG&&(eR(t),Hy(t)),Sh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function UL(e,t){if(t.tagID===m.P||t.tagID===m.BR){sT(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)===ae.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}G.AREA,G.BASE,G.BASEFONT,G.BGSOUND,G.BR,G.COL,G.EMBED,G.FRAME,G.HR,G.IMG,G.INPUT,G.KEYGEN,G.LINK,G.META,G.PARAM,G.SOURCE,G.TRACK,G.WBR;const HL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,zL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),aT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function uT(e,t){const n=QL(e),r=by("type",{handlers:{root:jL,element:$L,text:VL,comment:cT,doctype:qL,raw:GL},unknown:WL}),o={parser:n?new $y(aT):$y.getFragmentParser(void 0,aT),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),ls(o,Lr());const a=n?o.parser.document:o.parser.getFragment(),u=jI(a,{file:o.options.file});return o.stitches&&Rl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const g=f.children;return g[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function lT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function jL(e,t){lT(e.children,t)}function $L(e,t){XL(e,t),lT(e.children,t),KL(e,t)}function VL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:ja(e)};ls(t,Lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function qL(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ja(e)};ls(t,Lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function YL(e,t){t.stitches=!0;const n=JL(e);if("children"in e&&"children"in n){const r=uT({type:"root",children:e.children},t.options);n.children=r.children}cT({type:"comment",value:{stitch:n}},t)}function cT(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:ja(e)};ls(t,Lr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function GL(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,dT(t,Lr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(HL,"<$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 WL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))YL(n,t);else{let r="";throw zL.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 ls(e,t){dT(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=Dt.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 dT(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 XL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Dt.PLAINTEXT)return;ls(t,Lr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:uo.html;o===uo.html&&n==="svg"&&(o=uo.svg);const a=r3(me(F({},e),{children:[]}),{space:o===uo.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:as(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ja(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function KL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&d3.includes(n)||t.parser.tokenizer.state===Dt.PLAINTEXT)return;ls(t,Sl(e));const r={type:Ke.END_TAG,tagName:n,tagID:as(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ja(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Dt.RCDATA||t.parser.tokenizer.state===Dt.RAWTEXT||t.parser.tokenizer.state===Dt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Dt.DATA)}function QL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ja(e){const t=Lr(e)||{line:void 0,column:void 0,offset:void 0},n=Sl(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 JL(e){return"children"in e?ao(me(F({},e),{children:[]})):ao(e)}function fT(e){return function(t,n){return uT(t,me(F({},e),{file:n}))}}const ho=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],hT={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ho,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ho],h2:[["className","sr-only"]],img:[...ho,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ho,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ho],table:[...ho],ul:[...ho,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},vi={}.hasOwnProperty;function ZL(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},hT),t):hT,stack:[]},o=pT(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function pT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return e6(e,n);case"doctype":return t6(e,n);case"element":return n6(e,n);case"root":return r6(e,n);case"text":return i6(e,n)}}}function e6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return $a(a,t),a}}function t6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return $a(n,t),n}}function n6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=mT(e,t.children),o=o6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&vi.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return $a(u,t),u}function r6(e,t){const r={type:"root",children:mT(e,t.children)};return $a(r,t),r}function i6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return $a(r,t),r}function mT(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=pT(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function o6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&vi.call(r,n)?r[n]:void 0,u=r&&vi.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(vi.call(c,f)){const p=c[f];let g=gT(e,yT(a,f),f,p);g==null&&(g=gT(e,yT(u,f),f,p)),g!=null&&(d[f]=g)}if(o&&vi.call(o,n)){const p=o[n];for(f in p)vi.call(p,f)&&!vi.call(d,f)&&(d[f]=p[f])}return d}function gT(e,t,n,r){return t?Array.isArray(r)?s6(e,t,n,r):ET(e,t,n,r):void 0}function s6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=ET(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function ET(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&a6(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 a6(e,t,n){const r=e.schema.protocols&&vi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const 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 $a(e,t){const n=Z1(t);t.data&&(e.data=ao(t.data)),n&&(e.position=n)}function yT(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 u6(e){return function(t){return ZL(t,e)}}const TT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",me(F(F({className:W(e,`${j}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},l6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=mt();return!e&&!t?null:w.jsx("div",{className:W(n,`${j}-disclaimer`),children:t?w.jsx(ey,{rehypePlugins:[fT,u6],components:{ul:({children:r})=>w.jsx("ul",{className:W(n,`${j}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:W(n,`${j}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:W(n,`${j}-li`),children:r}),a:({href:r,title:o,children:a})=>w.jsx(TT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>w.jsx("img",{className:W(n,`${j}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>w.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:W(n,`${j}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:e})})},Nh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Zn(),{setImageFile:u}=Go(),{logger:c,globalClassName:d,searchConfig:f,features:p}=mt(),g=H.useRef(null),b=H.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",S=!!o||!1,A=S?"connected":"disconnected",v=t||!S,P=()=>a?new Promise((D,Q)=>{const re=new FileReader;re.readAsDataURL(a),re.onload=()=>D(re.result),re.onerror=Te=>Q(Te)}):Promise.resolve(""),C=D=>tt(null,null,function*(){var Te;if(v)return;const Q=10*1024*1024,re=(Te=D.target.files)==null?void 0:Te[0];if(re){if(re.size>Q){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(re)}}),B=()=>{u(null),b.current&&(b.current.value="")},q=D=>tt(null,null,function*(){var Te;D.preventDefault();const Q=(((Te=g.current)==null?void 0:Te.value)||"").trim();let re="";try{re=yield P()}catch($){c==null||c.error("Error converting file to base64:",$),alert("There was an error processing the file. Please try again.");return}Q&&(B(),g.current.value="",r(Q,re))});return w.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${j}-search-bar-wrapper`),children:[a&&w.jsxs("div",{className:W(d,`cim-${n}-component`,`${j}-image-file-preview`),children:[w.jsx("img",{className:W(d,`cim-${n}-component`,`${j}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),w.jsx("span",{className:W(d,`cim-${n}-component`,`${j}-image-file-name`),title:_,children:_}),w.jsx(Pf,{className:W(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:B})]}),w.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${j}-search-bar`),name:`${j}-search-form`,onSubmit:q,children:[w.jsx("span",{role:"status",className:W(`${j}-connection-status-icon`,A)}),y&&w.jsxs("div",{role:"button",className:W(d,e,`cim-${n}-component`,v&&"disabled",`${j}-image-upload-button`),"aria-disabled":v,tabIndex:0,children:[w.jsx("label",{className:W(d,e,`cim-${n}-component`,v&&"disabled",`${j}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:w.jsx(Ak,{})}),w.jsx("input",{className:W(d,e,`cim-${n}-component`,`${j}-file-input`),type:"file",ref:b,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${j}-file-input`,disabled:v,onInput:C})]}),w.jsx("input",{className:W(d,e,`cim-${n}-component`,`${j}-search-input`),type:"text",ref:g,placeholder:f==null?void 0:f.placeholder,name:`${j}-user-input`}),w.jsx(Ok,{isLoading:v}),w.jsx(kk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:v})]}),w.jsx(l6,{})]})};function c6(e){return Lt({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 bT=H.createContext(null),Va=()=>{var n;const e=()=>{},t=H.useContext(bT);return(n=t==null?void 0:t.closeMenu)!=null?n:e},Ph=({onClearChat:e,componentType:t})=>{const n=Va(),r=()=>{e(),n()};return w.jsxs("button",{className:W(`${j}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(c6,{}),"Clear chat"]})};function d6(e){return e==null?[]:Array.isArray(e)?e:[e]}var f6=(e,...t)=>e.concat(t),h6=(e,...t)=>e.filter(n=>!t.includes(n)),p6=e=>Array.from(new Set(e));function _T(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function m6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return _T(e,t,{step:-r,loop:o})}var g6=e=>Array.isArray(e),ST=e=>e!=null&&typeof e=="object",E6=e=>ST(e)&&!g6(e),ql=e=>typeof e=="string",cs=e=>typeof e=="function",y6=e=>e==null,T6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),b6=e=>Object.prototype.toString.call(e),xT=Function.prototype.toString,_6=xT.call(Object),S6=e=>{if(!ST(e)||b6(e)!="[object Object]"||C6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=T6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&xT.call(n)==_6},x6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,w6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,C6=e=>x6(e)||w6(e),A6=e=>e(),v6=()=>{},Oh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function k6(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:N6,max:P6}=Math,O6=e=>Number.isNaN(e),I6=e=>O6(e)?0:e,wT=(e,t,n)=>N6(P6(I6(e),t),n);function Ih(e){if(!S6(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]=Ih(o))}return n}function Rh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function R6(e,t){if(e==null)throw new Error(t())}function L6(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var D6=Object.defineProperty,M6=(e,t,n)=>t in e?D6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lh=(e,t,n)=>M6(e,typeof t!="symbol"?t+"":t,n),CT=()=>{},Yl=e=>typeof e=="object"&&e!==null,ds=e=>e?"":void 0,AT=e=>e?"true":void 0,F6=1,B6=9,U6=11,Jt=e=>Yl(e)&&e.nodeType===F6&&typeof e.nodeName=="string",Gl=e=>Yl(e)&&e.nodeType===B6,H6=e=>Yl(e)&&e===e.window,vT=e=>Jt(e)?e.localName||"":"#document";function z6(e){return["html","body","#document"].includes(vT(e))}var j6=e=>Yl(e)&&e.nodeType!==void 0,po=e=>j6(e)&&e.nodeType===U6&&"host"in e,$6=e=>Jt(e)&&e.localName==="input",V6=e=>Jt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function qa(e){if(!e)return!1;const t=e.getRootNode();return ps(t)===e}var q6=/(textarea|select)/;function Y6(e){if(e==null||!Jt(e))return!1;try{return $6(e)&&e.selectionStart!=null||q6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function fs(e,t){var r;if(!e||!t||!Jt(e)||!Jt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&po(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Fr(e){var t;return Gl(e)?e:H6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function G6(e){return Fr(e).documentElement}function hs(e){var t,n,r;return po(e)?hs(e.host):Gl(e)?(t=e.defaultView)!=null?t:window:Jt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ps(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 W6(e){if(vT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||po(e)&&e.host||G6(e);return po(t)?t.host:t}function Dh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gl(t)||po(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Mh=new WeakMap;function ms(e){return Mh.has(e)||Mh.set(e,hs(e).getComputedStyle(e)),Mh.get(e)}var Fh=new Set(["menu","listbox","dialog","grid","tree","region"]),X6=e=>Fh.has(e),kT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function NT(e,t){const n=new Set,r=Dh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=kT(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const g=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(g&&X6(g)&&!b&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function PT(e,t){const n=Dh(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=kT(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const g=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";g&&Fh.has(g)&&!b&&(t(p),o(p))}}}};o(e)}function K6(e){const t=new Set;return PT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function Q6(e){const t=e.getAttribute("role");return!!(t&&Fh.has(t))}function J6(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function Z6(e){var t;return J6(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function e4(e){if(!e.id)return!1;const t=Dh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&Q6(e))}var Bh=()=>typeof document!="undefined";function t4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Uh=e=>Bh()&&e.test(t4()),n4=e=>Bh()&&e.test(navigator.vendor),OT=()=>Bh()&&!!navigator.maxTouchPoints,r4=()=>Uh(/^iPhone/i),i4=()=>Uh(/^iPad/i)||Hh()&&navigator.maxTouchPoints>1,Wl=()=>r4()||i4(),o4=()=>Hh()||Wl(),Hh=()=>Uh(/^Mac/i),s4=()=>o4()&&n4(/apple/i);function a4(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=a4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var IT=e=>e.button===0,u4=e=>e.button===2||Hh()&&e.ctrlKey&&e.button===0,l4=e=>"touches"in e&&e.touches.length>0,c4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},RT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function d4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=c4[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in RT&&(o=RT[o]),o}function LT(e,t="client"){const n=l4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Zt=(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)}},DT=e=>Jt(e)&&e.tagName==="IFRAME",f4=/^(audio|video|details)$/;function MT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var h4=e=>!Number.isNaN(MT(e)),p4=e=>MT(e)<0;function m4(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 FT(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=m4(d,t);if(f){const p=Array.from(f.querySelectorAll(Xl)).filter(n),g=u.get(d);if(g!==void 0){const b=g+1;r.splice(b,0,...p),p.forEach((y,_)=>{u.set(y,b+_)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,b+_)})}o.push(...p)}}return r}var Xl="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",BT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Xl));(n==!0||n=="if-empty"&&o.length===0)&&Jt(e)&&Br(e)&&o.unshift(e);const u=[];for(const c of o)if(Br(c)){if(DT(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...BT(d,{getShadowRoot:r}));continue}u.push(c)}return r?FT(u,r,Br):u};function Br(e){return!Jt(e)||e.closest("[inert]")?!1:e.matches(Xl)&&V6(e)}function gs(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Xl));n&&mo(e)&&o.unshift(e);const a=[];for(const u of o)if(mo(u)){if(DT(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...gs(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=FT(a,r,mo);return!u.length&&n?o:u}return!a.length&&n?o:a}function mo(e){return Jt(e)&&e.tabIndex>0?!0:Br(e)&&!p4(e)}function g4(e,t={}){const n=gs(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function E4(e,t={}){const{current:n,getShadowRoot:r}=t,o=gs(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:ps(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Ya(e){return e.tabIndex<0&&(f4.test(e.localName)||Y6(e))&&!h4(e)?0:e.tabIndex}function UT(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=gs(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var y4=class B2{constructor(){Lh(this,"id",null),Lh(this,"fn_cleanup"),Lh(this,"cleanup",()=>{this.cancel()})}static create(){return new B2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function qt(e){const t=y4.create();return t.request(e),t.cleanup}function HT(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 zh(e){const t=W6(e);return z6(t)?Fr(t).body:Jt(t)&&_4(t)?t:zh(t)}var T4=/auto|scroll|overlay|hidden|clip/,b4=new Set(["inline","contents"]);function _4(e){const t=hs(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return T4.test(n+o+r)&&!b4.has(a)}var Es="default",jh="",Kl=new WeakMap;function S4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Wl()?(Es==="default"&&(jh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Es="disabled"):t&&(Kl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>x4({target:t,doc:r})}function x4(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Wl()){if(Es!=="disabled")return;Es="restoring",setTimeout(()=>{HT(()=>{Es==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=jh||""),jh="",Es="default")})},300)}else if(t&&Kl.has(t)){const a=Kl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Kl.delete(t)}}function w4(e={}){const u=e,{defer:t,target:n}=u,r=ln(u,["defer","target"]),o=t?qt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(S4(me(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function C4(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=LT(c),f=Math.sqrt(ea(d.x,2)+ea(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=LT(c);r({point:d,event:c})},u=[Zt(e,"pointermove",o,!1),Zt(e,"pointerup",a,!1),Zt(e,"pointercancel",a,!1),Zt(e,"contextmenu",a,!1),w4({doc:e})];return()=>{u.forEach(c=>c())}}function A4(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[g,b]=g4(e,{includeContainer:!0,getShadowRoot:a}),y=E4(c,{current:n,getShadowRoot:a}),_=!g&&!b;f.shiftKey&&qa(y)?(o==null||o(),p=b):f.shiftKey&&(qa(g)||_)?p=n:!f.shiftKey&&qa(n)?(o==null||o(),p=g):!f.shiftKey&&(qa(b)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Zt(u,"keydown",d,!0)}function v4(e,t){const c=t,{defer:n,triggerElement:r}=c,o=ln(c,["defer","triggerElement"]),a=n?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(A4(d,F({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function k4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Ql(e,t){if(!e)return CT;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 N4(e,t,n){if(!e)return CT;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 P4(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 O4(e,t){const{timeout:n,rootNode:r}=t,o=hs(r),a=Fr(r),u=new o.AbortController;return P4(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 I4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),R4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,zT=e=>{const t={};let n;for(;n=R4.exec(e);)t[n[1]]=n[2];return t},L4=(e,t)=>{if(ql(e)){if(ql(t))return`${e};${t}`;e=zT(e)}else ql(t)&&(t=zT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Yt(...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]=Oh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=I4(t[o],n[o]);continue}if(o==="style"){t[o]=L4(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 nU(e){return e}var ys=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ys||{}),$h="__init__";function D4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Fr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>ps(t()),a=u=>t().getElementById(u);return me(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:qa,getById:a})}function M4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Ts=()=>e=>Array.from(new Set(e)),jT=typeof globalThis.document!="undefined"?H.useLayoutEffect:H.useEffect;function Jl(e){var g,b;const t=(g=e().value)!=null?g:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=H.useState(t),[o,a]=H.useState(r),u=e().value!==void 0,c=H.useRef(o);c.current=u?e().value:o;const d=H.useRef(c.current);jT(()=>{d.current=c.current},[o,e().value]);const f=y=>{var A,v;const _=d.current,S=cs(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),u||a(S),n(S,_)||(v=(A=e()).onChange)==null||v.call(A,S,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Wo.flushSync:A6)(()=>f(y))},invoke(y,_){var S,A;(A=(S=e()).onChange)==null||A.call(S,y,_)},hash(y){var _,S,A;return(A=(S=(_=e()).hash)==null?void 0:S.call(_,y))!=null?A:String(y)}}}Jl.cleanup=e=>{H.useEffect(()=>e,[])},Jl.ref=e=>{const t=H.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function F4(e){const t=H.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var B4=(e,t)=>{const n=H.useRef(!1),r=H.useRef(!1);H.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),H.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Zl(e,t={}){var ee,ce,he,le,be,Me;const n=H.useMemo(()=>{const{id:de,ids:K,getRootNode:ie}=t;return D4({id:de,ids:K,getRootNode:ie})},[t]),r=(...de)=>{e.debug&&console.log(...de)},o=(ce=(ee=e.props)==null?void 0:ee.call(e,{props:Ih(t),scope:n}))!=null?ce:t,a=U4(o),u=(he=e.context)==null?void 0:he.call(e,{prop:a,bindable:Jl,scope:n,flush:VT,getContext(){return d},getComputed(){return q},getRefs(){return S},getEvent(){return y()}}),c=$T(u),d={get(de){var K;return(K=c.current)==null?void 0:K[de].ref.current},set(de,K){var ie;(ie=c.current)==null||ie[de].set(K)},initial(de){var K;return(K=c.current)==null?void 0:K[de].initial},hash(de){var ie,k;const K=(ie=c.current)==null?void 0:ie[de].get();return(k=c.current)==null?void 0:k[de].hash(K)}},f=H.useRef(new Map),p=H.useRef(null),g=H.useRef(null),b=H.useRef({type:""}),y=()=>me(F({},b.current),{current(){return b.current},previous(){return g.current}}),_=()=>me(F({},D),{matches(...de){return de.includes(D.ref.current)},hasTag(de){var K,ie;return!!((ie=(K=e.states[D.ref.current])==null?void 0:K.tags)!=null&&ie.includes(de))}}),S=F4((be=(le=e.refs)==null?void 0:le.call(e,{prop:a,context:d}))!=null?be:{}),A=()=>({state:_(),context:d,event:y(),prop:a,send:$,action:v,guard:P,track:B4,refs:S,computed:q,flush:VT,scope:n,choose:B}),v=de=>{const K=cs(de)?de(A()):de;if(!K)return;const ie=K.map(k=>{var te,O;const M=(O=(te=e.implementations)==null?void 0:te.actions)==null?void 0:O[k];return M||Rh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),M});for(const k of ie)k==null||k(A())},P=de=>{var K,ie;return cs(de)?de(A()):(ie=(K=e.implementations)==null?void 0:K.guards)==null?void 0:ie[de](A())},C=de=>{const K=cs(de)?de(A()):de;if(!K)return;const ie=K.map(M=>{var O,_e;const te=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[M];return te||Rh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),te}),k=[];for(const M of ie){const te=M==null?void 0:M(A());te&&k.push(te)}return()=>k.forEach(M=>M==null?void 0:M())},B=de=>d6(de).find(K=>{let ie=!K.guard;return ql(K.guard)?ie=!!P(K.guard):cs(K.guard)&&(ie=K.guard(A())),ie}),q=de=>{R6(e.computed,()=>"[zag-js] No computed object found on machine");const K=e.computed[de];return K({context:d,event:y(),prop:a,refs:S,scope:n,computed:q})},D=Jl(()=>({defaultValue:e.initialState({prop:a}),onChange(de,K){var k,M,te,O;if(K){const _e=f.current.get(K);_e==null||_e(),f.current.delete(K)}K&&v((k=e.states[K])==null?void 0:k.exit),v((M=p.current)==null?void 0:M.actions);const ie=C((te=e.states[de])==null?void 0:te.effects);if(ie&&f.current.set(de,ie),K===$h){v(e.entry);const _e=C(e.effects);_e&&f.current.set($h,_e)}v((O=e.states[de])==null?void 0:O.entry)}})),Q=H.useRef(void 0),re=H.useRef(ys.NotStarted);jT(()=>{queueMicrotask(()=>{var M;const ie=re.current===ys.Started;re.current=ys.Started,r(ie?"rehydrating...":"initializing...");const k=(M=Q.current)!=null?M:D.initial;D.invoke(k,ie?D.get():$h)});const de=f.current,K=D.ref.current;return()=>{r("unmounting..."),Q.current=K,re.current=ys.Stopped,de.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{v(e.exit)})}},[]);const Te=()=>"ref"in D?D.ref.current:D.get(),$=de=>{queueMicrotask(()=>{var O,_e,Oe,Ce,$e;if(re.current!==ys.Started)return;g.current=b.current,b.current=de;let K=Te();const ie=(Oe=(O=e.states[K].on)==null?void 0:O[de.type])!=null?Oe:(_e=e.on)==null?void 0:_e[de.type],k=B(ie);if(!k)return;p.current=k;const M=(Ce=k.target)!=null?Ce:K;r("transition",de.type,k.target||K,`(${k.actions})`);const te=M!==K;te?Wo.flushSync(()=>D.set(M)):k.reenter&&!te?D.invoke(K,K):v(($e=k.actions)!=null?$e:[])})};return(Me=e.watch)==null||Me.call(e,A()),{state:_(),send:$,context:d,prop:a,scope:n,refs:S,computed:q,event:y(),getStatus:()=>re.current}}function $T(e){const t=H.useRef(e);return t.current=e,t}function U4(e){const t=$T(e);return function(r){return t.current[r]}}function VT(e){queueMicrotask(()=>{Wo.flushSync(()=>e())})}var Vh=M4(e=>e);function ec(...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 H4(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 qh=e=>{const t=H.memo(H.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=ln(f,["asChild","children"]);if(!o)return H.createElement(e,me(F({},u),{ref:r}),a);if(!H.isValidElement(a))return null;const c=H.Children.only(a),d=H4(c);return H.cloneElement(c,me(F({},Yt(u,c.props)),{ref:r?ec(r,d):d}))}));return t.displayName=e.displayName||e.name,t},mn=(()=>{const e=new Map;return new Proxy(qh,{apply(t,n,r){return qh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,qh(r)),e.get(r)}})})();function z4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function go(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=H.createContext(u);c.displayName=t;function d(){var p;const f=H.useContext(c);if(!f&&n){const g=new Error(a!=null?a:z4(r,o));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return f}return[c.Provider,d,c]}const[j4,Yh]=go({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[qT,Ga]=go({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),YT=H.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(mn.div,me(F({},o),{ref:ec(r.ref,t)}))});YT.displayName="PopoverContent";const GT=H.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=Yt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(mn.div,me(F({},o),{ref:t}))});GT.displayName="PopoverPositioner";const Wa=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},F({},e)]),WT=e=>Wa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function $4(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 V4={props({props:e}){return me(F({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",ms(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"});qt(()=>{var c,d;const u=tc(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})=>{qt(()=>{e.set("prevAnimationName",tc(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,g,b;((b=(g=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:g[0])!=null?b:d.target)===o&&e.set("prevAnimationName",tc(t.get("styles")))},u=d=>{const f=tc(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=Ql(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),HT(()=>c())}}}}};function tc(e){return(e==null?void 0:e.animationName)||"none"}Ts()(["onExitComplete","present","immediate"]);function q4(e,t={}){const{sync:n=!1}=t,r=Y4(e);return H.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 Y4(e){const t=H.useRef(e);return t.current=e,t}const Gh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,a=ln(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=H.useRef(!1),c=me(F({},a),{present:r,onExitComplete:q4(e.onExitComplete)}),d=Zl(V4,c),f=$4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,g=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:g,present:f.present,unmounted:p}};var Eo=(e,t=[])=>({parts:(...n)=>{if(G4(t))return Eo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Eo(e,[...t,...n]),omit:(...n)=>Eo(e,t.filter(r=>!n.includes(r))),rename:n=>Eo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${bs(e)}"][data-part="${bs(r)}"]`,`& [data-scope="${bs(e)}"][data-part="${bs(r)}"]`].join(", "),attrs:{"data-scope":bs(e),"data-part":bs(r)}}}),{})}),bs=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),G4=e=>e.length===0;const W4=["top","right","bottom","left"],ki=Math.min,$n=Math.max,nc=Math.round,rc=Math.floor,Ur=e=>({x:e,y:e}),X4={left:"right",right:"left",bottom:"top",top:"bottom"},K4={start:"end",end:"start"};function Wh(e,t,n){return $n(e,ki(t,n))}function ii(e,t){return typeof e=="function"?e(t):e}function oi(e){return e.split("-")[0]}function _s(e){return e.split("-")[1]}function Xh(e){return e==="x"?"y":"x"}function Kh(e){return e==="y"?"height":"width"}const Q4=new Set(["top","bottom"]);function Hr(e){return Q4.has(oi(e))?"y":"x"}function Qh(e){return Xh(Hr(e))}function J4(e,t,n){n===void 0&&(n=!1);const r=_s(e),o=Qh(e),a=Kh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ic(u)),[u,ic(u)]}function Z4(e){const t=ic(e);return[Jh(e),t,Jh(t)]}function Jh(e){return e.replace(/start|end/g,t=>K4[t])}const XT=["left","right"],KT=["right","left"],eD=["top","bottom"],tD=["bottom","top"];function nD(e,t,n){switch(e){case"top":case"bottom":return n?t?KT:XT:t?XT:KT;case"left":case"right":return t?eD:tD;default:return[]}}function rD(e,t,n,r){const o=_s(e);let a=nD(oi(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Jh)))),a}function ic(e){return e.replace(/left|right|bottom|top/g,t=>X4[t])}function iD(e){return F({top:0,right:0,bottom:0,left:0},e)}function QT(e){return typeof e!="number"?iD(e):{top:e,right:e,bottom:e,left:e}}function oc(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 JT(e,t,n){let{reference:r,floating:o}=e;const a=Hr(t),u=Qh(t),c=Kh(u),d=oi(t),f=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,b=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-o.width,y:g};break;default:y={x:r.x,y:r.y}}switch(_s(t)){case"start":y[u]-=b*(n&&f?-1:1);break;case"end":y[u]+=b*(n&&f?-1:1);break}return y}const oD=(e,t,n)=>tt(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:g}=JT(f,r,d),b=r,y={},_=0;for(let S=0;S<c.length;S++){const{name:A,fn:v}=c[S],{x:P,y:C,data:B,reset:q}=yield v({x:p,y:g,initialPlacement:r,placement:b,strategy:o,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=P!=null?P:p,g=C!=null?C:g,y=me(F({},y),{[A]:F(F({},y[A]),B)}),q&&_<=50&&(_++,typeof q=="object"&&(q.placement&&(b=q.placement),q.rects&&(f=q.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):q.rects),{x:p,y:g}=JT(f,b,d)),S=-1)}return{x:p,y:g,placement:b,strategy:o,middlewareData:y}});function Xa(e,t){return tt(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:g="floating",altBoundary:b=!1,padding:y=0}=ii(t,e),_=QT(y),A=c[b?g==="floating"?"reference":"floating":g],v=oc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),P=g==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),B=(yield a.isElement==null?void 0:a.isElement(C))?(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},q=oc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:P,offsetParent:C,strategy:d}):P);return{top:(v.top-q.top+_.top)/B.y,bottom:(q.bottom-v.bottom+_.bottom)/B.y,left:(v.left-q.left+_.left)/B.x,right:(q.right-v.right+_.right)/B.x}})}const sD=e=>({name:"arrow",options:e,fn(n){return tt(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:g=0}=ii(e,n)||{};if(p==null)return{};const b=QT(g),y={x:r,y:o},_=Qh(a),S=Kh(_),A=yield c.getDimensions(p),v=_==="y",P=v?"top":"left",C=v?"bottom":"right",B=v?"clientHeight":"clientWidth",q=u.reference[S]+u.reference[_]-y[_]-u.floating[S],D=y[_]-u.reference[_],Q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let re=Q?Q[B]:0;(!re||!(yield c.isElement==null?void 0:c.isElement(Q)))&&(re=d.floating[B]||u.floating[S]);const Te=q/2-D/2,$=re/2-A[S]/2-1,ee=ki(b[P],$),ce=ki(b[C],$),he=ee,le=re-A[S]-ce,be=re/2-A[S]/2+Te,Me=Wh(he,be,le),de=!f.arrow&&_s(a)!=null&&be!==Me&&u.reference[S]/2-(be<he?ee:ce)-A[S]/2<0,K=de?be<he?be-he:be-le:0;return{[_]:y[_]+K,data:F({[_]:Me,centerOffset:be-Me-K},de&&{alignmentOffset:K}),reset:de}})}}),aD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return tt(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,be=ii(e,n),{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:A=!0}=be,v=ln(be,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const P=oi(a),C=Hr(d),B=oi(d)===d,q=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(B||!A?[ic(d)]:Z4(d)),Q=S!=="none";!y&&Q&&D.push(...rD(d,A,S,q));const re=[d,...D],Te=yield Xa(n,v),$=[];let ee=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&$.push(Te[P]),b){const Me=J4(a,c,q);$.push(Te[Me[0]],Te[Me[1]])}if(ee=[...ee,{placement:a,overflows:$}],!$.every(Me=>Me<=0)){var ce,he;const Me=(((ce=u.flip)==null?void 0:ce.index)||0)+1,de=re[Me];if(de&&(!(b==="alignment"?C!==Hr(de):!1)||ee.every(k=>Hr(k.placement)===C?k.overflows[0]>0:!0)))return{data:{index:Me,overflows:ee},reset:{placement:de}};let K=(he=ee.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:he.placement;if(!K)switch(_){case"bestFit":{var le;const ie=(le=ee.filter(k=>{if(Q){const M=Hr(k.placement);return M===C||M==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(M=>M>0).reduce((M,te)=>M+te,0)]).sort((k,M)=>k[1]-M[1])[0])==null?void 0:le[0];ie&&(K=ie);break}case"initialPlacement":K=d;break}if(a!==K)return{reset:{placement:K}}}return{}})}}};function ZT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eb(e){return W4.some(t=>e[t]>=0)}const uD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return tt(this,null,function*(){const{rects:r}=n,u=ii(e,n),{strategy:o="referenceHidden"}=u,a=ln(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Xa(n,me(F({},a),{elementContext:"reference"})),d=ZT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:eb(d)}}}case"escaped":{const c=yield Xa(n,me(F({},a),{altBoundary:!0})),d=ZT(c,r.floating);return{data:{escapedOffsets:d,escaped:eb(d)}}}default:return{}}})}}},tb=new Set(["left","top"]);function lD(e,t){return tt(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=oi(n),c=_s(n),d=Hr(n)==="y",f=tb.has(u)?-1:1,p=a&&d?-1:1,g=ii(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}})}const cD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return tt(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield lD(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:me(F({},f),{placement:c})}})}}},dD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return tt(this,null,function*(){const{x:r,y:o,placement:a}=n,v=ii(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:P=>{let{x:C,y:B}=P;return{x:C,y:B}}}}=v,f=ln(v,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},g=yield Xa(n,f),b=Hr(oi(a)),y=Xh(b);let _=p[y],S=p[b];if(u){const P=y==="y"?"top":"left",C=y==="y"?"bottom":"right",B=_+g[P],q=_-g[C];_=Wh(B,_,q)}if(c){const P=b==="y"?"top":"left",C=b==="y"?"bottom":"right",B=S+g[P],q=S-g[C];S=Wh(B,S,q)}const A=d.fn(me(F({},n),{[y]:_,[b]:S}));return me(F({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[y]:u,[b]:c}}})})}}},fD=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}=ii(e,t),p={x:n,y:r},g=Hr(o),b=Xh(g);let y=p[b],_=p[g];const S=ii(c,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:F({mainAxis:0,crossAxis:0},S);if(d){const C=b==="y"?"height":"width",B=a.reference[b]-a.floating[C]+A.mainAxis,q=a.reference[b]+a.reference[C]-A.mainAxis;y<B?y=B:y>q&&(y=q)}if(f){var v,P;const C=b==="y"?"width":"height",B=tb.has(oi(o)),q=a.reference[g]-a.floating[C]+(B&&((v=u.offset)==null?void 0:v[g])||0)+(B?0:A.crossAxis),D=a.reference[g]+a.reference[C]+(B?0:((P=u.offset)==null?void 0:P[g])||0)-(B?A.crossAxis:0);_<q?_=q:_>D&&(_=D)}return{[b]:y,[g]:_}}}},hD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return tt(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ee=ii(e,n),{apply:f=()=>{}}=ee,p=ln(ee,["apply"]),g=yield Xa(n,p),b=oi(a),y=_s(a),_=Hr(a)==="y",{width:S,height:A}=u.floating;let v,P;b==="top"||b==="bottom"?(v=b,P=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(P=b,v=y==="end"?"top":"bottom");const C=A-g.top-g.bottom,B=S-g.left-g.right,q=ki(A-g[v],C),D=ki(S-g[P],B),Q=!n.middlewareData.shift;let re=q,Te=D;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(Te=B),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(re=C),Q&&!y){const ce=$n(g.left,0),he=$n(g.right,0),le=$n(g.top,0),be=$n(g.bottom,0);_?Te=S-2*(ce!==0||he!==0?ce+he:$n(g.left,g.right)):re=A-2*(le!==0||be!==0?le+be:$n(g.top,g.bottom))}yield f(me(F({},n),{availableWidth:Te,availableHeight:re}));const $=yield c.getDimensions(d.floating);return S!==$.width||A!==$.height?{reset:{rects:!0}}:{}})}}};function sc(){return typeof window!="undefined"}function Ss(e){return nb(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zr(e){var t;return(t=(nb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nb(e){return sc()?e instanceof Node||e instanceof Vn(e).Node:!1}function Tr(e){return sc()?e instanceof Element||e instanceof Vn(e).Element:!1}function jr(e){return sc()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function rb(e){return!sc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}const pD=new Set(["inline","contents"]);function Ka(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!pD.has(o)}const mD=new Set(["table","td","th"]);function gD(e){return mD.has(Ss(e))}const ED=[":popover-open",":modal"];function ac(e){return ED.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const yD=["transform","translate","scale","rotate","perspective"],TD=["transform","translate","scale","rotate","perspective","filter"],bD=["paint","layout","strict","content"];function Zh(e){const t=ep(),n=Tr(e)?br(e):e;return yD.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)||TD.some(r=>(n.willChange||"").includes(r))||bD.some(r=>(n.contain||"").includes(r))}function _D(e){let t=Ni(e);for(;jr(t)&&!xs(t);){if(Zh(t))return t;if(ac(t))return null;t=Ni(t)}return null}function ep(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const SD=new Set(["html","body","#document"]);function xs(e){return SD.has(Ss(e))}function br(e){return Vn(e).getComputedStyle(e)}function uc(e){return Tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ni(e){if(Ss(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rb(e)&&e.host||zr(e);return rb(t)?t.host:t}function ib(e){const t=Ni(e);return xs(t)?e.ownerDocument?e.ownerDocument.body:e.body:jr(t)&&Ka(t)?t:ib(t)}function Qa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ib(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Vn(o);if(a){const c=tp(u);return t.concat(u,u.visualViewport||[],Ka(o)?o:[],c&&n?Qa(c):[])}return t.concat(o,Qa(o,[],n))}function tp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ob(e){const t=br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=jr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=nc(n)!==a||nc(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function np(e){return Tr(e)?e:e.contextElement}function ws(e){const t=np(e);if(!jr(t))return Ur(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=ob(t);let u=(a?nc(n.width):n.width)/r,c=(a?nc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const xD=Ur(0);function sb(e){const t=Vn(e);return!ep()||!t.visualViewport?xD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function yo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=np(e);let u=Ur(1);t&&(r?Tr(r)&&(u=ws(r)):u=ws(e));const c=wD(a,n,r)?sb(a):Ur(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,g=o.height/u.y;if(a){const b=Vn(a),y=r&&Tr(r)?Vn(r):r;let _=b,S=tp(_);for(;S&&r&&y!==_;){const A=ws(S),v=S.getBoundingClientRect(),P=br(S),C=v.left+(S.clientLeft+parseFloat(P.paddingLeft))*A.x,B=v.top+(S.clientTop+parseFloat(P.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,g*=A.y,d+=C,f+=B,_=Vn(S),S=tp(_)}}return oc({width:p,height:g,x:d,y:f})}function lc(e,t){const n=uc(e).scrollLeft;return t?t.left+n:yo(zr(e)).left+n}function ab(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-lc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function CD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=zr(r),c=t?ac(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Ur(1);const p=Ur(0),g=jr(r);if((g||!g&&!a)&&((Ss(r)!=="body"||Ka(u))&&(d=uc(r)),jr(r))){const y=yo(r);f=ws(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!g&&!a?ab(u,d):Ur(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function AD(e){return Array.from(e.getClientRects())}function vD(e){const t=zr(e),n=uc(e),r=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+lc(e);const c=-n.scrollTop;return br(r).direction==="rtl"&&(u+=$n(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const ub=25;function kD(e,t){const n=Vn(e),r=zr(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=ep();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=lc(r);if(f<=0){const p=r.ownerDocument,g=p.body,b=getComputedStyle(g),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-y);_<=ub&&(a-=_)}else f<=ub&&(a+=f);return{width:a,height:u,x:c,y:d}}const ND=new Set(["absolute","fixed"]);function PD(e,t){const n=yo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=jr(e)?ws(e):Ur(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 lb(e,t,n){let r;if(t==="viewport")r=kD(e,n);else if(t==="document")r=vD(zr(e));else if(Tr(t))r=PD(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 oc(r)}function cb(e,t){const n=Ni(e);return n===t||!Tr(n)||xs(n)?!1:br(n).position==="fixed"||cb(n,t)}function OD(e,t){const n=t.get(e);if(n)return n;let r=Qa(e,[],!1).filter(c=>Tr(c)&&Ss(c)!=="body"),o=null;const a=br(e).position==="fixed";let u=a?Ni(e):e;for(;Tr(u)&&!xs(u);){const c=br(u),d=Zh(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&ND.has(o.position)||Ka(u)&&!d&&cb(e,u))?r=r.filter(p=>p!==u):o=c,u=Ni(u)}return t.set(e,r),r}function ID(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ac(t)?[]:OD(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const g=lb(t,p,o);return f.top=$n(g.top,f.top),f.right=ki(g.right,f.right),f.bottom=ki(g.bottom,f.bottom),f.left=$n(g.left,f.left),f},lb(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function RD(e){const{width:t,height:n}=ob(e);return{width:t,height:n}}function LD(e,t,n){const r=jr(t),o=zr(t),a=n==="fixed",u=yo(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Ur(0);function f(){d.x=lc(o)}if(r||!r&&!a)if((Ss(t)!=="body"||Ka(o))&&(c=uc(t)),r){const y=yo(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?ab(o,c):Ur(0),g=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:g,y:b,width:u.width,height:u.height}}function rp(e){return br(e).position==="static"}function db(e,t){if(!jr(e)||br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zr(e)===n&&(n=n.ownerDocument.body),n}function fb(e,t){const n=Vn(e);if(ac(e))return n;if(!jr(e)){let o=Ni(e);for(;o&&!xs(o);){if(Tr(o)&&!rp(o))return o;o=Ni(o)}return n}let r=db(e,t);for(;r&&gD(r)&&rp(r);)r=db(r,t);return r&&xs(r)&&rp(r)&&!Zh(r)?n:r||_D(e)||n}const DD=function(e){return tt(this,null,function*(){const t=this.getOffsetParent||fb,n=this.getDimensions,r=yield n(e.floating);return{reference:LD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function MD(e){return br(e).direction==="rtl"}const FD={convertOffsetParentRelativeRectToViewportRelativeRect:CD,getDocumentElement:zr,getClippingRect:ID,getOffsetParent:fb,getElementRects:DD,getClientRects:AD,getDimensions:RD,getScale:ws,isElement:Tr,isRTL:MD};function hb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function BD(e,t){let n=null,r;const o=zr(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:g,width:b,height:y}=f;if(c||t(),!b||!y)return;const _=rc(g),S=rc(o.clientWidth-(p+b)),A=rc(o.clientHeight-(g+y)),v=rc(p),C={rootMargin:-_+"px "+-S+"px "+-A+"px "+-v+"px",threshold:$n(0,ki(1,d))||1};let B=!0;function q(D){const Q=D[0].intersectionRatio;if(Q!==d){if(!B)return u();Q?u(!1,Q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}Q===1&&!hb(f,e.getBoundingClientRect())&&u(),B=!1}try{n=new IntersectionObserver(q,me(F({},C),{root:o.ownerDocument}))}catch(D){n=new IntersectionObserver(q,C)}n.observe(e)}return u(!0),a}function UD(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=np(e),p=o||a?[...f?Qa(f):[],...Qa(t)]:[];p.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const g=f&&c?BD(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(v=>{let[P]=v;P&&P.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,S=d?yo(e):null;d&&A();function A(){const v=yo(e);S&&!hb(S,v)&&n(),S=v,_=requestAnimationFrame(A)}return n(),()=>{var v;p.forEach(P=>{o&&P.removeEventListener("scroll",n),a&&P.removeEventListener("resize",n)}),g==null||g(),(v=y)==null||v.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const HD=cD,zD=dD,jD=aD,$D=hD,VD=uD,qD=sD,YD=fD,GD=(e,t,n)=>{const r=new Map,o=F({platform:FD},n),a=me(F({},o.platform),{_c:r});return oD(e,t,me(F({},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 me(F({},o),{toJSON:()=>o})}function WD(e){if(!e)return pb();const{x:t,y:n,width:r,height:o}=e;return pb(t,n,r,o)}function XD(e,t){return{contextElement:Jt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?WD(r):n.getBoundingClientRect()}}}var Ja=e=>({variable:e,reference:`var(${e})`}),si={arrowSize:Ja("--arrow-size"),arrowSizeHalf:Ja("--arrow-size-half"),arrowBg:Ja("--arrow-background"),transformOrigin:Ja("--transform-origin"),arrowOffset:Ja("--arrow-offset")},KD=e=>e==="top"||e==="bottom"?"y":"x";function QD(e,t){return{name:"transformOrigin",fn(n){var Te,$,ee,ce,he;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=KD(d),p=((Te=o.arrow)==null?void 0:Te.x)||0,g=(($=o.arrow)==null?void 0:$.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+b/2,S=g+y/2,A=Math.abs(((ee=o.shift)==null?void 0:ee.y)||0),v=u.reference.height/2,P=y/2,C=(he=(ce=e.offset)==null?void 0:ce.mainAxis)!=null?he:e.gutter,B=typeof C=="number"?C+P:C!=null?C:P,q=A>B,D={top:`${_}px calc(100% + ${B}px)`,bottom:`${_}px ${-B}px`,left:`calc(100% + ${B}px) ${S}px`,right:`${-B}px ${S}px`}[d],Q=`${_}px ${u.reference.y+v-c}px`,re=!!e.overlap&&f==="y"&&q;return r.floating.style.setProperty(si.transformOrigin.variable,re?Q:D),{data:{transformOrigin:re?Q:D}}}}}var JD={name:"rects",fn({rects:e}){return{data:e}}},ZD=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% + ${si.arrowOffset.reference})`}),{}}}};function e5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var t5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function mb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function ip(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function n5(e,t,n){const r=e||t.createElement("div");return qD({element:r,padding:n.arrowPadding})}function r5(e,t){var n;if(!y6((n=t.offset)!=null?n:t.gutter))return HD(({placement:r})=>{var p,g,b,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(g=(p=t.offset)==null?void 0:p.mainAxis)!=null?g:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=e5(r),d=c?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return Ih({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function i5(e){if(!e.flip)return;const t=ip(e.boundary);return jD(me(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function o5(e){if(!e.slide&&!e.overlap)return;const t=ip(e.boundary);return zD(me(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:YD()}))}function s5(e){return $D({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 a5(e){var t;if(e.hideWhenDetached)return VD({strategy:"referenceHidden",boundary:(t=ip(e.boundary))!=null?t:"clippingAncestors"})}function u5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function l5(e,t,n={}){const r=XD(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},t5,n),a=t.querySelector("[data-part=arrow]"),u=[r5(a,o),i5(o),o5(o),n5(a,t.ownerDocument,o),ZD(a),QD({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),s5(o),a5(o),JD],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,g=()=>tt(null,null,function*(){var B;if(!r||!t)return;const S=yield GD(r,t,{placement:c,middleware:u,strategy:d});f==null||f(S),p==null||p({placed:!0});const A=hs(t),v=mb(A,S.x),P=mb(A,S.y);t.style.setProperty("--x",`${v}px`),t.style.setProperty("--y",`${P}px`),o.hideWhenDetached&&(((B=S.middlewareData.hide)==null?void 0:B.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const q=ms(C);t.style.setProperty("--z-index",q.zIndex)}}),b=()=>tt(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=u5(o.listeners),_=o.listeners?UD(r,t,b,y):v6;return b(),()=>{_==null||_(),p==null||p({placed:!1})}}function gb(e,t,n={}){const c=n,{defer:r}=c,o=ln(c,["defer"]),a=r?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(l5(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var c5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function d5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:si.arrowSize.reference,height:si.arrowSize.reference,[si.arrowSizeHalf.variable]:`calc(${si.arrowSize.reference} / 2)`,[si.arrowOffset.variable]:`calc(${si.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?c5[t.split("-")[0]]:void 0,background:si.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 Cs=new WeakMap,cc=new WeakMap,dc={},op=0,Eb=e=>e&&(e.host||Eb(e.parentNode)),f5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Eb(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),h5=new Set(["script","output","status","next-route-announcer"]),p5=e=>h5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),m5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=f5(n,Array.isArray(e)?e:[e]);dc[r]||(dc[r]=new WeakMap);const c=dc[r],d=[],f=new Set,p=new Set(u),g=y=>{!y||f.has(y)||(f.add(y),g(y.parentNode))};u.forEach(y=>{g(y),a&&Jt(y)&&PT(y,_=>{g(_)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))b(_);else try{if(p5(_))return;const A=_.getAttribute(o)==="true",v=(Cs.get(_)||0)+1,P=(c.get(_)||0)+1;Cs.set(_,v),c.set(_,P),d.push(_),v===1&&A&&cc.set(_,!0),P===1&&_.setAttribute(r,""),A||_.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return b(n),f.clear(),op++,()=>{d.forEach(y=>{const _=Cs.get(y)-1,S=c.get(y)-1;Cs.set(y,_),c.set(y,S),_||(cc.has(y)||y.removeAttribute(o),cc.delete(y)),S||y.removeAttribute(r)}),op--,op||(Cs=new WeakMap,Cs=new WeakMap,cc=new WeakMap,dc={})}},g5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,E5=(e,t=g5(e),n="data-aria-hidden",r=!0)=>{if(t)return m5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},y5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function yb(e,t={}){const{defer:n=!0}=t,r=n?y5:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(E5(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function T5(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 b5(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 Tb="pointerdown.outside",bb="focus.outside";function _5(e){for(const t of e)if(Jt(t)&&Br(t))return!0;return!1}var _b=e=>"clientY"in e;function S5(e,t){if(!_b(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 x5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Sb(e,t){if(!t||!_b(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 x5(u,c)?r||a:!1}function w5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Fr(e),f=hs(e),p=T5(f),g=b5(f);function b(C,B){if(!Jt(B)||!B.isConnected||fs(e,B)||S5(e,C)||c&&NT(e,B))return!1;const q=d.querySelector(`[aria-controls="${e.id}"]`);if(q){const Q=zh(q);if(Sb(C,Q))return!1}const D=zh(e);return Sb(C,D)?!1:!(n!=null&&n(B))}const y=new Set,_=po(e==null?void 0:e.getRootNode());function S(C){function B(q){var Te,$;const D=u&&!OT()?qt:ee=>ee(),Q=q!=null?q:C,re=($=(Te=Q==null?void 0:Q.composedPath)==null?void 0:Te.call(Q))!=null?$:[Q==null?void 0:Q.target];D(()=>{const ee=_?re[0]:yr(C);if(!(!e||!b(C,ee))){if(o||a){const ce=Oh(o,a);e.addEventListener(Tb,ce,{once:!0})}xb(e,Tb,{bubbles:!1,cancelable:!0,detail:{originalEvent:Q,contextmenu:u4(Q),focusable:_5(re),target:ee}})}})}C.pointerType==="touch"?(y.forEach(q=>q()),y.add(Zt(d,"click",B,{once:!0})),y.add(g.addEventListener("click",B,{once:!0})),y.add(p.addEventListener("click",B,{once:!0}))):B()}const A=new Set,v=setTimeout(()=>{A.add(Zt(d,"pointerdown",S,!0)),A.add(g.addEventListener("pointerdown",S,!0)),A.add(p.addEventListener("pointerdown",S,!0))},0);function P(C){(u?qt:q=>q())(()=>{var Q,re;const q=(re=(Q=C==null?void 0:C.composedPath)==null?void 0:Q.call(C))!=null?re:[C==null?void 0:C.target],D=_?q[0]:yr(C);if(!(!e||!b(C,D))){if(r||a){const Te=Oh(r,a);e.addEventListener(bb,Te,{once:!0})}xb(e,bb,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Br(D),target:D}})}})}return OT()||(A.add(Zt(d,"focusin",P,!0)),A.add(g.addEventListener("focusin",P,!0)),A.add(p.addEventListener("focusin",P,!0))),()=>{clearTimeout(v),y.forEach(C=>C()),A.forEach(C=>C())}}function C5(e,t){const{defer:n}=t,r=n?qt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(w5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function xb(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function A5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Zt(Fr(e),"keydown",n,{capture:!0})}var wb="layer:request-dismiss",rr={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=>fs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>fs(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=>rr.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];k5(e,wb,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),v5(e,wb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function v5(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 k5(e,t,n){e.addEventListener(t,n,{once:!0})}var Cb;function Ab(){rr.layers.forEach(({node:e})=>{e.style.pointerEvents=rr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function N5(e){e.style.pointerEvents=""}function P5(e,t){const n=Fr(e),r=[];return rr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Cb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=O4(()=>{const c=o();return Jt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Ql(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{rr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Cb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function O5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Rh("[@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};rr.add(f),Ab();function p(S){var v,P;const A=yr(S.detail.originalEvent);rr.isBelowPointerBlockingLayer(e)||rr.isInBranch(A)||((v=t.onPointerDownOutside)==null||v.call(t,S),(P=t.onInteractOutside)==null||P.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function g(S){var v,P;const A=yr(S.detail.originalEvent);rr.isInBranch(A)||((v=t.onFocusOutside)==null||v.call(t,S),(P=t.onInteractOutside)==null||P.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var A;rr.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var C;if(!e)return!1;const A=typeof u=="function"?u():u,v=Array.isArray(A)?A:[A],P=(C=t.persistentElements)==null?void 0:C.map(B=>B()).filter(Jt);return P&&v.push(...P),v.some(B=>fs(B,S))||rr.isInNestedLayer(e,S)}const _=[a?P5(e,t.persistentElements):void 0,A5(e,b),C5(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{rr.remove(e),Ab(),N5(e),_.forEach(S=>S==null?void 0:S())}}function vb(e,t){const{defer:n}=t,r=n?qt:a=>a(),o=[];return o.push(r(()=>{const a=cs(e)?e():e;o.push(O5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var I5=Object.defineProperty,R5=(e,t,n)=>t in e?I5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>R5(e,typeof t!="symbol"?t+"":t,n),kb={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()}},L5=[],D5=class{constructor(e,t){Ct(this,"trapStack"),Ct(this,"config"),Ct(this,"doc"),Ct(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ct(this,"portalContainers",new Set),Ct(this,"listenerCleanups",[]),Ct(this,"handleFocus",r=>{const o=yr(r),a=this.findContainerIndex(o,r)>=0;if(a||Gl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Ya(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(g=>g===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=>Ya(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Ct(this,"handlePointerDown",r=>{const o=yr(r);if(!(this.findContainerIndex(o,r)>=0)){if(eu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}eu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const o=yr(r);this.findContainerIndex(o,r)>=0||eu(this.config.clickOutsideDeactivates,r)||eu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ct(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;Za(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{M5(r)&&eu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ct(this,"_mutationObserver"),Ct(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return Z6(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?e4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ct(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),Ct(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Br(r)){const o=ps(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Ct(this,"tryFocus",r=>{if(r!==!1&&r!==ps(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,F5(r)&&r.select()}}),Ct(this,"deactivate",r=>{if(!this.state.active)return this;const o=F({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),kb.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=()=>{Nb(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),Ct(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ct(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Ct(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),Ct(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),Ct(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||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:g})=>u===g);if(p<0&&((f==null?void 0:f.container)===u||Br(u)&&!mo(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const g=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[g];c=Ya(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Za(o)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:g})=>u===g);if(p<0&&((f==null?void 0:f.container)===u||Br(u)&&!mo(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const g=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[g];c=Ya(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Za(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||L5;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Za(r)&&!r.shiftKey},isKeyBackward(r){return Za(r)&&r.shiftKey}},t);this.doc=n.document||Fr(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=>{K6(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?NT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=gs(e,{getShadowRoot:this.config.getShadowRoot}),n=BT(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(Ya(t[f])>0){c=!0;break}function d(f,p=!0){const g=t.indexOf(f);if(g>=0)return t[g+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(mo(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(mo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return kb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Nb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Zt(this.doc,"focusin",this.handleFocus,!0),Zt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Zt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Zt(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=ps(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)}},Za=e=>e.key==="Tab",eu=(e,...t)=>typeof e=="function"?e(...t):e,M5=e=>!e.isComposing&&e.key==="Escape",Nb=e=>setTimeout(e,0),F5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Pb(e,t={}){let n;const r=qt(()=>{const o=typeof e=="function"?e():e;if(o){n=new D5(o,me(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Fr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var sp="data-scroll-lock";function B5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Ob(e){const t=ms(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Ib(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(sp))return;const u=Ob(r)||Ob(o),c=n.innerWidth-r.clientWidth;o.setAttribute(sp,"");const d=()=>N4(r,"--scrollbar-width",`${c}px`),f=B5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Ql(o,_)},g=()=>{var q,D;const{scrollX:_,scrollY:S,visualViewport:A}=n,v=(q=A==null?void 0:A.offsetLeft)!=null?q:0,P=(D=A==null?void 0:A.offsetTop)!=null?D:0,C={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(P))}px`,left:`${-(_-Math.floor(v))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const B=Ql(o,C);return()=>{B==null||B(),n.scrollTo({left:_,top:S,behavior:"instant"})}},b=[d(),Wl()?g():p()];return()=>{b.forEach(_=>_==null?void 0:_()),o.removeAttribute(sp)}}var U5=Eo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),$r=U5.build(),Rb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Lb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Db=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},H5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},z5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Mb=e=>e.getById(Rb(e)),As=e=>e.getById(Lb(e)),vs=e=>e.getById(ap(e)),Fb=e=>e.getById(Db(e)),j5=e=>e.getById(up(e)),$5=e=>e.getById(lp(e));function V5(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"),g=r.get("renderedElements"),b=d5(me(F({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(me(F({id:H5(c)},$r.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(me(F({},$r.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(me(F({},$r.anchor.attrs),{dir:u("dir"),id:Rb(c)}))},getTriggerProps(){return t.button(me(F({},$r.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:Lb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ap(c),onPointerDown(y){IT(y)&&s4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(me(F({},$r.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(F({id:Db(c)},$r.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(me(F({},$r.content.attrs),{dir:u("dir"),id:ap(c),tabIndex:-1,role:"dialog","aria-modal":AT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ds(d),"aria-labelledby":g.title?up(c):void 0,"aria-describedby":g.description?lp(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(me(F({},$r.title.attrs),{id:up(c),dir:u("dir")}))},getDescriptionProps(){return t.element(me(F({},$r.description.attrs),{id:lp(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(me(F({},$r.closeTrigger.attrs),{dir:u("dir"),id:z5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var q5={props({props:e}){return me(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=Mb(n))!=null?a:As(n);return gb(r,()=>Fb(n),me(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>vs(n);let o=!0;return vb(r,{type:"popover",pointerBlocking:t("modal"),exclude:As(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:v4(()=>vs(t),{triggerElement:As(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?yb(()=>[vs(t),As(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Ib(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Pb(()=>vs(t),{initialFocus:()=>UT({root:vs(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=Mb(n))!=null?u:As(n);gb(o,()=>Fb(n),me(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){qt(()=>{Object.assign(e.get("renderedElements"),{title:!!j5(t),description:!!$5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||qt(()=>{const n=UT({root:vs(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||qt(()=>{const a=As(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})}}}};Ts()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[iU,fc]=go({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[oU,cp]=go({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),Y5=e=>{const t=H.useId(),{getRootNode:n}=fc(),{dir:r}=cp(),o=F({id:t,dir:r,getRootNode:n},e),a=Zl(q5,o);return V5(a,Vh)},G5=e=>{const[t,u]=WT(e),c=u,{children:n}=c,r=ln(c,["children"]),o=Y5(r),a=Gh(Yt({present:o.open},t));return w.jsx(j4,{value:o,children:w.jsx(qT,{value:a,children:n})})},Bb=H.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=Yt(me(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(mn.button,me(F({},o),{ref:t}))});Bb.displayName="PopoverTrigger";function W5(e){return Lt({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 X5(e){return Lt({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 K5(e){return Lt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function Q5(e){return Lt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function J5(e){return Lt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function Z5(e){return Lt({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)}const dp=({className:e,componentType:t,children:n})=>{const[r,o]=H.useState(!1),{globalClassName:a}=mt(),u=f=>{o(f.open)},c=H.useCallback(()=>{o(!1)},[]),d=H.useMemo(()=>({closeMenu:c}),[c]);return w.jsxs(G5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(Bb,{"aria-label":`Overflow menu for ${t}`,className:W(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(Z5,{})}),w.jsx(GT,{children:w.jsx(YT,{className:W(`${j}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(bT.Provider,{value:d,children:n})})})]})};function Ub(e){return Lt({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 Hb(e){return Lt({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[eM,To]=go({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),zb=H.forwardRef((e,t)=>{const n=To(),r=Yt(n.getControlProps(),e);return w.jsx(mn.div,me(F(F({},r),e),{ref:t}))});zb.displayName="CarouselControl";const jb=H.forwardRef((e,t)=>{const[n,r]=Wa()(e,["readOnly","index"]),o=To(),a=Yt(o.getIndicatorProps(n),r);return w.jsx(mn.button,me(F({},a),{ref:t}))});jb.displayName="CarouselIndicator";const $b=H.forwardRef((e,t)=>{const n=To(),r=Yt(n.getIndicatorGroupProps(),e);return w.jsx(mn.div,me(F({},r),{ref:t}))});$b.displayName="CarouselIndicatorGroup";const Vb=H.forwardRef((e,t)=>{const[n,r]=Wa()(e,["index","snapAlign"]),o=To(),a=Yt(o.getItemProps(n),r);return w.jsx(mn.div,me(F({},a),{ref:t}))});Vb.displayName="CarouselItem";const qb=H.forwardRef((e,t)=>{const n=To(),r=Yt(n.getItemGroupProps(),e);return w.jsx(mn.div,me(F({},r),{ref:t}))});qb.displayName="CarouselItemGroup";const Yb=H.forwardRef((e,t)=>{const n=To(),r=Yt(n.getNextTriggerProps(),e);return w.jsx(mn.button,me(F({},r),{ref:t}))});Yb.displayName="CarouselNextTrigger";const Gb=H.forwardRef((e,t)=>{const n=To(),r=Yt(n.getPrevTriggerProps(),e);return w.jsx(mn.button,me(F({},r),{ref:t}))});Gb.displayName="CarouselPrevTrigger";function tM(e){const t=ms(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(b,y){let _=parseFloat(b);return/%/.test(b)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(o,n.height),p=c(a,n.width),g=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:g}}}function nM(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function Wb(e){let t=[];for(const n of e.children)t=t.concat(n,Wb(n));return t}function Xb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?Wb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const g=p.getBoundingClientRect();if(!nM(n,g,u))continue;const b=ms(p);let[y,_]=b.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const S=a==="x"?_:y,A=g[c]-n[c]+e[f];switch(S){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+g[d]/2});break;case"end":r[a].end.push({node:p,position:A+g[d]});break}}}return r}function Kb(e){const t=e.getBoundingClientRect(),n=tM(e),r=Xb(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Qb([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(Jb(0,o.x))),y:Qb([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(Jb(0,o.y)))}}function rM(e,t,n){const r=Xb(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var Qb=e=>[...new Set(e)],Jb=(e,t)=>n=>Math.max(e,Math.min(t,n)),iM=Eo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ai=iM.build(),oM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},sM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},hc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},aM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},uM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},lM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Zb=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},In=e=>e.getById(hc(e)),e_=e=>k4(In(e),"[data-part=item]"),cM=(e,t)=>e.getById(Zb(e,t)),t_=e=>{const t=In(e);if(!t)return;const n=gs(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function dM(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),g=o("canScrollPrev"),b=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),S=c("slidesPerPage"),A=c("padding"),v=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:g,getProgress(){return _/y.length},scrollToIndex(P,C){a({type:"INDEX.SET",index:P,instant:C})},scrollTo(P,C){a({type:"PAGE.SET",index:P,instant:C})},scrollNext(P){a({type:"PAGE.NEXT",instant:P})},scrollPrev(P){a({type:"PAGE.PREV",instant:P})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(P){return Array.from(r.get("slidesInView")).includes(P)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(me(F({},ai.root.attrs),{id:oM(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":S,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(me(F({},ai.itemGroup.attrs),{id:hc(u),"data-orientation":c("orientation"),"data-dragging":ds(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(P){fs(P.currentTarget,yr(P))&&a({type:"VIEWPORT.FOCUS"})},onBlur(P){fs(P.currentTarget,P.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(P){if(P.defaultPrevented||!c("allowMouseDrag")||!IT(P))return;const C=yr(P);Br(C)&&C!==P.currentTarget||(P.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:k6(P=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";P[C]<0&&!o("canScrollPrev")||P[C]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:A,[b?"paddingInline":"paddingBlock"]:A,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(P){const C=r.get("slidesInView").includes(P.index);return t.element(me(F({},ai.item.attrs),{id:sM(u,P.index),dir:c("dir"),role:"group","data-index":P.index,"data-inview":ds(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":v.item(P.index,c("slideCount")),"aria-hidden":AT(!C),style:{scrollSnapAlign:(()=>{var re;const B=(re=P.snapAlign)!=null?re:"start",q=c("slidesPerMove"),D=q==="auto"?Math.floor(c("slidesPerPage")):q;return(P.index+D)%D===0?B:void 0})()}}))},getControlProps(){return t.element(me(F({},ai.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(me(F({},ai.prevTrigger.attrs),{id:uM(u),type:"button",disabled:!g,dir:c("dir"),"aria-label":v.prevTrigger,"data-orientation":c("orientation"),"aria-controls":hc(u),onClick(P){P.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(me(F({},ai.nextTrigger.attrs),{dir:c("dir"),id:aM(u),type:"button","aria-label":v.nextTrigger,"data-orientation":c("orientation"),"aria-controls":hc(u),disabled:!p,onClick(P){P.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(me(F({},ai.indicatorGroup.attrs),{dir:c("dir"),id:lM(u),"data-orientation":c("orientation"),onKeyDown(P){if(P.defaultPrevented)return;const C="indicator",B={ArrowDown(Q){b||(a({type:"PAGE.NEXT",src:C}),Q.preventDefault())},ArrowUp(Q){b||(a({type:"PAGE.PREV",src:C}),Q.preventDefault())},ArrowRight(Q){b&&(a({type:"PAGE.NEXT",src:C}),Q.preventDefault())},ArrowLeft(Q){b&&(a({type:"PAGE.PREV",src:C}),Q.preventDefault())},Home(Q){a({type:"PAGE.SET",index:0,src:C}),Q.preventDefault()},End(Q){a({type:"PAGE.SET",index:y.length-1,src:C}),Q.preventDefault()}},q=d4(P,{dir:c("dir"),orientation:c("orientation")}),D=B[q];D==null||D(P)}}))},getIndicatorProps(P){return t.button(me(F({},ai.indicator.attrs),{dir:c("dir"),id:Zb(u,P.index),type:"button","data-orientation":c("orientation"),"data-index":P.index,"data-readonly":ds(P.readOnly),"data-current":ds(P.index===_),"aria-label":v.indicator(P.index),onClick(C){C.defaultPrevented||P.readOnly||a({type:"PAGE.SET",index:P.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(me(F({},ai.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ds(d),"aria-label":d?v.autoplayStop:v.autoplayStart,onClick(P){P.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var fM={props({props:e}){return L6(e,["slideCount"],"carousel"),me(F({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:F({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:hM(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return E6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(In(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=In(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),t_(e)});return t_(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!In(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};qt(()=>{o(),qt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return e_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=In(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var b;const p=f.target,g=Number((b=p.dataset.index)!=null?b:"-1");return g==null||Number.isNaN(g)||g===-1?d:f.isIntersecting?f6(d,g):h6(d,g)},n.get("slidesInView"));n.set("slidesInView",p6(c))},{root:r,threshold:t("inViewThreshold")});return e_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=In(n);return r?Zt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Zt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return C4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Zt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var f;const a=t.instant?"instant":"smooth",u=wT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=In(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=In(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=_T(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=m6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=In(r);if(!o)return;const a=rM(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=wT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=In(n);if(!r)return;const o=Kb(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=In(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=In(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=In(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=Kb(r),c=u.x.reduce((f,p)=>Math.abs(p-o)<Math.abs(f-o)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);qt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=cM(n,e.get("page"));r&&qt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function hM(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}Ts()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Ts()(["index","readOnly"]),Ts()(["index","snapAlign"]);const pM=e=>{const t=H.useId(),{getRootNode:n}=fc(),{dir:r}=cp(),o=F({id:t,dir:r,getRootNode:n},e),a=Zl(fM,o);return dM(a,Vh)},n_=H.forwardRef((e,t)=>{const[n,r]=Wa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=pM(n),a=Yt(o.getRootProps(),r);return w.jsx(eM,{value:o,children:w.jsx(mn.div,me(F({},a),{ref:t}))})});n_.displayName="CarouselRoot";const mM=180,gM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},EM=({globalClassName:e,itemMinWidth:t=mM,spacing:n="0.5rem",loop:r=!1,allowMouseDrag:o=!0,showIndicators:a=!0,showNavigation:u=!0,onPageChange:c,ariaLabel:d="Product carousel",children:f})=>{const p=Array.from(f),g=p.length,b=H.useRef(null),[y,_]=H.useState(0),{width:S}=gv();H.useLayoutEffect(()=>{b.current&&_(b.current.getBoundingClientRect().width)},[S,g]);const A=gM(n),v=t+A,P=y>0?(y+A)/v:1,C=Math.max(1,Math.floor(P));if(g===0)return null;const B=g>C,q=Math.ceil(g/C),D=B?Math.max(1,P):C;return w.jsxs(n_,{ref:b,className:W(e,`${j}-carousel`),slidesPerPage:D,slidesPerMove:C,spacing:n,loop:r,allowMouseDrag:o,slideCount:g,onPageChange:c,"aria-label":d,children:[w.jsx(qb,{className:W(e,`${j}-carousel__item-group`),children:p.map((Q,re)=>w.jsx(Vb,{index:re,className:W(e,`${j}-carousel__item`),children:Q},re))}),u&&B&&w.jsxs(zb,{className:W(e,`${j}-carousel__control`),children:[w.jsx(Gb,{className:W(e,`${j}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(K5,{})}),w.jsx(Yb,{className:W(e,`${j}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(Q5,{})})]}),a&&B&&w.jsx($b,{className:W(e,`${j}-carousel__indicator-group`),children:Array.from({length:q},(Q,re)=>w.jsx(jb,{index:re,className:W(e,`${j}-carousel__indicator`),"aria-label":`Go to slide group ${re+1}`},re))})]})},fp=()=>{const{status:e,entryType:t}=mr(),{messages:n}=Zn(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o};function yM(e){return Lt({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 TM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return w.jsx("div",{className:W(t,`${j}-suggestion-container ${u}`,e),children:n.map(d=>o?w.jsxs(bl,{disabled:r,className:W(t,`${j}-suggestion-button standalone`),onClick:c(d),children:[w.jsx(yM,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",d]},d):w.jsx("button",{disabled:r,className:W(t,`${j}-suggestion-button embedded`),onClick:c(d),children:d},d))})},r_=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=mt();if(!r)return null;const o=()=>{bi(!1),ml(!0)};return t?w.jsx(ni,{className:W(n,`${j}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:w.jsx(O1,{})}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(O1,{}),"Minimize"]})},i_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=mt(),r=Va(),o=()=>{gl("modal"),r()};return t?w.jsx(ni,{className:W(n,`${j}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Toggle Modal",onClick:o,icon:w.jsx(Hb,{})}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(Hb,{}),"Show modal"]})},bM=({isWidgetStandalone:e})=>{var g;const{globalClassName:t,entryMessage:n,resetConversationMessage:r}=mt(),{askCimPrompts:o,messages:a}=Zn(),{isLoading:u,handleSuggestion:c}=Rr(),d=H.useMemo(()=>{const b=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return a.some(_=>_.name==="conversation_reset")&&r||b},[a,n,r]),f=((g=o.message)==null?void 0:g.suggestions)||[],p=(b,y)=>()=>{c(b,y)};return w.jsxs("div",{className:W(t,`${j}-ask-cim-entry-message`,`${j}-message-group`,e?"standalone":"embedded"),children:[w.jsx("p",{className:W(t,`${j}-ask-cim-entry-text`),children:d}),!!(f!=null&&f.length)&&w.jsx("div",{className:W(t,`${j}-ask-cim-suggestions-container`,`${j}-suggestion-container`,e?"standalone":"embedded"),children:f.map(b=>{var y;return w.jsx(bl,{disabled:u,className:W(t,`${j}-ask-cim-suggestion-button`,`${j}-suggestion-button`,e?"standalone":"embedded"),onClick:p(b,((y=o.message)==null?void 0:y.eventSourceId)||""),children:b.displayText},b.displayText)})})]})},_M=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=mt();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),g=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return w.jsxs("div",{className:W(r,`${j}-product-tile`,{embedded:!e,standalone:e}),children:[g?w.jsx("a",{href:`${g}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:w.jsx("img",{className:W(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):w.jsx("img",{className:W(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),w.jsxs("div",{className:W(r,`${j}-product-tile-details`,{embedded:!e,standalone:e}),children:[w.jsxs("div",{className:W(r,`${j}-product-tile-content`),children:[u&&w.jsx("p",{className:`${j}-product-tile-brand`,children:u}),g?w.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:W(r,`${j}-product-tile-pdp`),href:`${g}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",w.jsx("span",{className:W(r,`${j}-product-tile-pdp-arrow`),children:"→"})]}):w.jsx("p",{className:W(r,`${j}-product-tile-name`),title:a,children:a})]}),w.jsx("div",{className:W(r,`${j}-product-tile-footer`),children:w.jsx("p",{className:W(r,`${j}-product-tile-price`),children:c})})]})]})},SM=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=mt(),o=t;return n?w.jsxs("div",{className:W(r,`${j}-display-products widget-message`),children:[w.jsx("p",{children:o.message}),o.products&&o.products.length>0&&w.jsx(EM,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:o.products.map(a=>{const u=n.getPid(a);return w.jsx(_M,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},xM=({globalClassName:e,message:t,isWidgetStandalone:n})=>w.jsx("div",{className:W(e,`${j}-error-message`,{standalone:n,embedded:!n}),children:w.jsxs("p",{className:W(e,`${j}-error-message-text`,{standalone:n,embedded:!n}),children:[w.jsx(_k,{})," ",t.message||"An error occurred while processing your request."]})}),wM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var _;const{isLoading:a}=Rr(),{messages:u}=Zn(),c=u.find(S=>S.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?lC(f):null,b=a||!d||!(d&&(p===t||t==="ask_cim")),y=S=>{const A=n.suggestions.find(v=>v.displayText===S);A&&o(A,n.eventSourceId||n.id)};return w.jsxs("div",{className:W(e,`${j}-follow-up`),children:[w.jsx("p",{className:W(e,`${j}-text`),children:n.message}),w.jsx(TM,{suggestions:n.suggestions.map(S=>S.displayText),disabled:b,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function o_(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 CM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function AM(e,t,n){const o=Ol((n||{}).ignore||[]),a=vM(t);let u=-1;for(;++u<a.length;)$E(e,"text",c);function c(f,p){let g=-1,b;for(;++g<p.length;){const y=p[g],_=b?b.children:void 0;if(o(y,_?_.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const g=p[p.length-1],b=a[u][0],y=a[u][1];let _=0;const A=g.children.indexOf(f);let v=!1,P=[];b.lastIndex=0;let C=b.exec(f.value);for(;C;){const B=C.index,q={index:C.index,input:C.input,stack:[...p,f]};let D=y(...C,q);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=B+1:(_!==B&&P.push({type:"text",value:f.value.slice(_,B)}),Array.isArray(D)?P.push(...D):D&&P.push(D),_=B+C[0].length,v=!0),!b.global)break;C=b.exec(f.value)}return v?(_<f.value.length&&P.push({type:"text",value:f.value.slice(_)}),g.children.splice(A,1,...P)):P=[f],A+P.length}}function vM(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([kM(o[0]),NM(o[1])])}return t}function kM(e){return typeof e=="string"?new RegExp(CM(e),"g"):e}function NM(e){return typeof e=="function"?e:function(){return e}}const hp="phrasing",pp=["autolink","link","image","label"];function PM(){return{transforms:[FM],enter:{literalAutolink:IM,literalAutolinkEmail:mp,literalAutolinkHttp:mp,literalAutolinkWww:mp},exit:{literalAutolink:MM,literalAutolinkEmail:DM,literalAutolinkHttp:RM,literalAutolinkWww:LM}}}function OM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hp,notInConstruct:pp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hp,notInConstruct:pp},{character:":",before:"[ps]",after:"\\/",inConstruct:hp,notInConstruct:pp}]}}function IM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function mp(e){this.config.enter.autolinkProtocol.call(this,e)}function RM(e){this.config.exit.autolinkProtocol.call(this,e)}function LM(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 DM(e){this.config.exit.autolinkEmail.call(this,e)}function MM(e){this.exit(e)}function FM(e){AM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,BM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),UM]],{ignore:["link","linkReference"]})}function BM(e,t,n,r,o){let a="";if(!s_(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!HM(n)))return!1;const u=zM(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 UM(e,t,n,r){return!s_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function HM(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 zM(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=o_(e,"(");let a=o_(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 s_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||so(n)||wl(n))&&(!t||n!==47)}a_.peek=KM;function jM(){this.buffer()}function $M(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function VM(){this.buffer()}function qM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function YM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function GM(e){this.exit(e)}function WM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function XM(e){this.exit(e)}function KM(){return"["}function a_(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 QM(){return{enter:{gfmFootnoteCallString:jM,gfmFootnoteCall:$M,gfmFootnoteDefinitionLabelString:VM,gfmFootnoteDefinition:qM},exit:{gfmFootnoteCallString:YM,gfmFootnoteCall:GM,gfmFootnoteDefinitionLabelString:WM,gfmFootnoteDefinition:XM}}}function JM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:a_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
32
|
-
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?
|
|
33
|
-
`)}function
|
|
34
|
-
`&&
|
|
35
|
-
`}function
|
|
29
|
+
`}),n}function qE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function YE(e,t){const n=eI(e,t),r=n.one(e,void 0),o=VO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
30
|
+
`},o),a}function oI(e,t){return e&&"run"in e?function(n,r){return tt(this,null,function*(){const o=YE(n,F({file:r},t));yield e.run(o,r)})}:function(n,r){return YE(n,F({file:r},e||t))}}function GE(e){if(e)throw e}var th,WE;function sI(){if(WE)return th;WE=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"),g=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!g)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},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 th=function d(){var f,p,g,b,y,_,S=arguments[0],v=1,C=arguments.length,P=!1;for(typeof S=="boolean"&&(P=S,S=arguments[1]||{},v=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});v<C;++v)if(f=arguments[v],f!=null)for(p in f)g=c(S,p),b=c(f,p),S!==b&&(P&&b&&(a(b)||(y=o(b)))?(y?(y=!1,_=g&&o(g)?g:[]):_=g&&a(g)?g:{},u(S,{name:p,newValue:d(P,_,b)})):typeof b!="undefined"&&u(S,{name:p,newValue:b}));return S},th}var aI=sI();const nh=ze(aI);function rh(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 uI(){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 g=-1;if(d){u(d);return}for(;++g<o.length;)(f[g]===null||f[g]===void 0)&&(f[g]=o[g]);o=f,p?lI(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 lI(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 Dr={basename:cI,dirname:dI,extname:fI,join:hI,sep:"/"};function cI(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 dI(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 fI(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 hI(...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?".":pI(n)}function pI(e){Pa(e);const t=e.codePointAt(0)===47;let n=mI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function mI(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 gI={cwd:EI};function EI(){return"/"}function ih(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function yI(e){if(typeof e=="string")e=new URL(e);else if(!ih(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 TI(e)}function TI(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 oh=["history","path","basename","stem","extname","dirname"];class XE{constructor(t){let n;t?ih(t)?n={path:t}:typeof t=="string"||bI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":gI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<oh.length;){const a=oh[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)oh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Dr.basename(this.path):void 0}set basename(t){ah(t,"basename"),sh(t,"basename"),this.path=Dr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Dr.dirname(this.path):void 0}set dirname(t){KE(this.basename,"dirname"),this.path=Dr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Dr.extname(this.path):void 0}set extname(t){if(sh(t,"extname"),KE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Dr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ih(t)&&(t=yI(t)),ah(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Dr.basename(this.path,this.extname):void 0}set stem(t){ah(t,"stem"),sh(t,"stem"),this.path=Dr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new fn(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 sh(e,t){if(e&&e.includes(Dr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dr.sep+"`")}function ah(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function KE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function bI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _I=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),SI={}.hasOwnProperty;class uh extends _I{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=uI()}copy(){const t=new uh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(nh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(dh("data",this.frozen),this.namespace[t]=n,this):SI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(dh("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=Ll(t),r=this.parser||this.Parser;return lh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),lh("process",this.parser||this.Parser),ch("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=Ll(t),d=r.parse(c);r.run(d,c,function(p,g,b){if(p||!g||!b)return f(p);const y=g,_=r.stringify(y,b);AI(_)?b.value=_:b.result=_,f(p,b)});function f(p,g){p||!g?u(p):a?a(g):n(void 0,g)}}}processSync(t){let n=!1,r;return this.freeze(),lh("processSync",this.parser||this.Parser),ch("processSync",this.compiler||this.Compiler),this.process(t,o),JE("processSync","process",n),r;function o(a,u){n=!0,GE(a),r=u}}run(t,n,r){QE(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=Ll(n);o.run(t,d,f);function f(p,g,b){const y=g||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),JE("runSync","run",r),o;function a(u,c){GE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=Ll(n),o=this.compiler||this.Compiler;return ch("stringify",o),QE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(dh("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,...g]=f;d(p,g)}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=nh(!0,o.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const g=f[p];a(g)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let g=-1,b=-1;for(;++g<r.length;)if(r[g][0]===f){b=g;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const S=r[b][1];rh(S)&&rh(y)&&(y=nh(!0,S,y)),r[b]=[f,y,..._]}}}}const xI=new uh().freeze();function lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ch(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dh(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 QE(e){if(!rh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function JE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ll(e){return wI(e)?e:new XE(e)}function wI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function AI(e){return typeof e=="string"||CI(e)}function CI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ZE=[],ey={allowDangerousHtml:!0},kI=/^(https?|ircs?|mailto|xmpp)$/i,NI=[{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 ty(e){const t=PI(e),n=OI(e);return II(t.runSync(t.parse(n),n),e)}function PI(e){const t=e.rehypePlugins||ZE,n=e.remarkPlugins||ZE,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),ey):ey;return xI().use(dO).use(n).use(oI,r).use(t)}function OI(e){const t=e.children||"",n=new XE;return typeof t=="string"&&(n.value=t),n}function II(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||RI;for(const p of NI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+vI+p.id,void 0);return Rl(e,f),rN(e,{Fragment:w.Fragment,components:o,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function f(p,g,b){if(p.type==="raw"&&b&&typeof g=="number")return u?b.children.splice(g,1):b.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let y;for(y in zf)if(Object.hasOwn(zf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],S=zf[y];(S===null||S.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof g=="number"&&(y=!r(p,g,b)),y&&b&&typeof g=="number")return c&&p.children?b.children.splice(g,1,...p.children):b.children.splice(g,1),g}}}function RI(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||kI.test(e.slice(0,t))?e:""}const ny=/[#.]/g;function LI(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){ny.lastIndex=o;const c=ny.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 ry(e,t,n){const r=n?BI(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=LI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,DI(u))c.unshift(u);else for(const[g,b]of Object.entries(u))MI(e,d.properties,g,b)}for(const f of c)fh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function DI(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 MI(e,t,n,r){const o=Df(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=G1(r):o.commaSeparated?a=L1(r):o.commaOrSpaceSeparated?a=G1(L1(r).join(" ")):a=iy(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?FI(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(iy(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function fh(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)fh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?fh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function iy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ba(n)===ba(t)))return!0}return n}function FI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function BI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const UI=["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"],HI=ry(_l,"div"),zI=ry(Jo,"g",UI);function jI(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=oy(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function 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=oy(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function oy(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
31
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const lo={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/"},sy={}.hasOwnProperty,$I=Object.prototype;function VI(e,t){const n=t||{};return hh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Jo:_l,verbose:n.verbose||!1},e)}function hh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Dl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:ay(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=jI(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Dl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Dl(e,r,n),n}default:return n=qI(e,t),n}}function ay(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=hh(e,t[n]);r.push(o)}return r}function qI(e,t){const n=e.schema;e.schema=t.namespaceURI===lo.svg?Jo:_l;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;sy.call($I,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?zI:HI)(t.tagName,o,ay(e,t.childNodes));if(Dl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&rs(d.startTag),p=d&&d.endTag&&rs(d.endTag),g=hh(e,c.content);f&&p&&e.file&&(g.position={start:f.end,end:p.start}),u.content=g}return e.schema=n,u}function Dl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=YI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function YI(e,t,n){const r=rs(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)sy.call(n.attrs,u)&&(a[Df(e.schema,u).property]=rs(n.attrs[u]));n.startTag;const c=rs(n.startTag),d=n.endTag?rs(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function rs(e){const t=uy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=uy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function uy(e){return e.line&&e.column?e:void 0}class Oa{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Oa.prototype.property={},Oa.prototype.normal={},Oa.prototype.space=null;function ly(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 Oa(n,r,t)}function ph(e){return e.toLowerCase()}class tr{constructor(t,n){this.property=t,this.attribute=n}}tr.prototype.space=null,tr.prototype.boolean=!1,tr.prototype.booleanish=!1,tr.prototype.overloadedBoolean=!1,tr.prototype.number=!1,tr.prototype.commaSeparated=!1,tr.prototype.spaceSeparated=!1,tr.prototype.commaOrSpaceSeparated=!1,tr.prototype.mustUseProperty=!1,tr.prototype.defined=!1;let GI=0;const Ye=co(),jt=co(),cy=co(),Ee=co(),yt=co(),is=co(),jn=co();function co(){return ea(2,++GI)}const mh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ye,booleanish:jt,commaOrSpaceSeparated:jn,commaSeparated:is,number:Ee,overloadedBoolean:cy,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),gh=Object.keys(mh);class Eh extends tr{constructor(t,n,r,o){let a=-1;if(super(t,n),dy(this,"space",o),typeof r=="number")for(;++a<gh.length;){const u=gh[a];dy(this,gh[a],(r&mh[u])===mh[u])}}}Eh.prototype.defined=!0;function dy(e,t,n){n&&(e[t]=n)}const WI={}.hasOwnProperty;function os(e){const t={},n={};let r;for(r in e.properties)if(WI.call(e.properties,r)){const o=e.properties[r],a=new Eh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ph(r)]=r,n[ph(a.attribute)]=r}return new Oa(t,n,e.space)}const fy=os({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}}),hy=os({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function py(e,t){return t in e?e[t]:t}function my(e,t){return py(e,t.toLowerCase())}const gy=os({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:my,properties:{xmlns:null,xmlnsXLink:null}}),Ey=os({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:yt,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:Ee,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:yt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:jt,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null}}),XI=os({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:my,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:is,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Ye,allowPaymentRequest:Ye,allowUserMedia:Ye,alt:null,as:null,async:Ye,autoCapitalize:null,autoComplete:yt,autoFocus:Ye,autoPlay:Ye,blocking:yt,capture:null,charSet:null,checked:Ye,cite:null,className:yt,cols:Ee,colSpan:null,content:null,contentEditable:jt,controls:Ye,controlsList:yt,coords:Ee|is,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ye,defer:Ye,dir:null,dirName:null,disabled:Ye,download:cy,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ye,formTarget:null,headers:yt,height:Ee,hidden:Ye,high:Ee,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Ye,inputMode:null,integrity:null,is:null,isMap:Ye,itemId:null,itemProp:yt,itemRef:yt,itemScope:Ye,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ye,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:Ye,muted:Ye,name:null,nonce:null,noModule:Ye,noValidate:Ye,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:Ye,optimum:Ee,pattern:null,ping:yt,placeholder:null,playsInline:Ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ye,referrerPolicy:null,rel:yt,required:Ye,reversed:Ye,rows:Ee,rowSpan:Ee,sandbox:yt,scope:null,scoped:Ye,seamless:Ye,selected:Ye,shadowRootClonable:Ye,shadowRootDelegatesFocus:Ye,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:Ye,useMap:null,value:jt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ye,declare:Ye,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Ye,noHref:Ye,noShade:Ye,noWrap:Ye,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:jt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ye,disableRemotePlayback:Ye,prefix:null,property:null,results:Ee,security:null,unselectable:null}}),KI=os({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:py,properties:{about:jn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:Ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:is,g2:is,glyphName:is,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),QI=/^data[-\w.:]+$/i,yy=/-[a-z]/g,JI=/[A-Z]/g;function ZI(e,t){const n=ph(t);let r=t,o=tr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&QI.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(yy,t3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!yy.test(a)){let u=a.replace(JI,e3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Eh}return new o(r,t)}function e3(e){return"-"+e.toLowerCase()}function t3(e){return e.charAt(1).toUpperCase()}const n3=ly([hy,fy,gy,Ey,XI],"html"),Ty=ly([hy,fy,gy,Ey,KI],"svg"),by={}.hasOwnProperty;function _y(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&by.call(o,e)){const d=String(o[e]);u=by.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 r3={},i3={}.hasOwnProperty,Sy=_y("type",{handlers:{root:s3,element:d3,text:l3,comment:c3,doctype:u3}});function o3(e,t){const r=(t||r3).space;return Sy(e,r==="svg"?Ty:n3)}function s3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=yh(e.children,n,t),ss(e,n),n}function a3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=yh(e.children,n,t),ss(e,n),n}function u3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ss(e,t),t}function l3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ss(e,t),t}function c3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ss(e,t),t}function d3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Ty);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&i3.call(e.properties,a)){const d=f3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:lo[u],childNodes:[],parentNode:null};return c.childNodes=yh(e.children,c,r),ss(e,c),e.tagName==="template"&&e.content&&(c.content=a3(e.content,r)),c}function f3(e,t,n){const r=ZI(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?D1(n):W1(n));const 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=lo[r.space]}return o}function yh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Sy(e[r],n);a.parentNode=t,o.push(a)}return o}function ss(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 h3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],p3=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),wt="�";var N;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(N||(N={}));const On={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function xy(e){return e>=55296&&e<=57343}function m3(e){return e>=56320&&e<=57343}function g3(e,t){return(e-55296)*1024+9216+t}function wy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ay(e){return e>=64976&&e<=65007||p3.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 E3=65536;class y3{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=E3,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(m3(n))return this.pos++,this._addGap(),g3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.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,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,xy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){wy(t)?this._err(ee.controlCharacterInInputStream):Ay(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 Ke;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ke||(Ke={}));function Cy(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 T3=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))),b3=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 _3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=b3.get(e))!==null&&t!==void 0?t:e}var Kt;(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"})(Kt||(Kt={}));const S3=32;var Ci;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ci||(Ci={}));function Th(e){return e>=Kt.ZERO&&e<=Kt.NINE}function x3(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_F||e>=Kt.LOWER_A&&e<=Kt.LOWER_F}function w3(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_Z||e>=Kt.LOWER_A&&e<=Kt.LOWER_Z||Th(e)}function A3(e){return e===Kt.EQUALS||w3(e)}var Qt;(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"})(Qt||(Qt={}));var ri;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ri||(ri={}));class C3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ri.Strict}startEntity(t){this.decodeMode=t,this.state=Qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Qt.EntityStart:return t.charCodeAt(n)===Kt.NUM?(this.state=Qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Qt.NamedEntity,this.stateNamedEntity(t,n));case Qt.NumericStart:return this.stateNumericStart(t,n);case Qt.NumericDecimal:return this.stateNumericDecimal(t,n);case Qt.NumericHex:return this.stateNumericHex(t,n);case Qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|S3)===Kt.LOWER_X?(this.state=Qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Qt.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(Th(o)||x3(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(Th(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===Kt.SEMI)this.consumed+=1;else if(this.decodeMode===ri.Strict)return 0;return this.emitCodePoint(_3(this.result),this.consumed),this.errors&&(t!==Kt.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&Ci.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=v3(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ri.Attribute&&(a===0||A3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Ci.VALUE_LENGTH)>>14,a!==0){if(u===Kt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ri.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]&Ci.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]&~Ci.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Qt.NamedEntity:return this.result!==0&&(this.decodeMode!==ri.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qt.NumericDecimal:return this.emitNumericEntity(0,2);case Qt.NumericHex:return this.emitNumericEntity(0,3);case Qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qt.EntityStart:return 0}}}function v3(e,t,n,r){const o=(t&Ci.BRANCH_LENGTH)>>7,a=t&Ci.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 ae;(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/"})(ae||(ae={}));var fo;(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"})(fo||(fo={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));var G;(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"})(G||(G={}));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 k3=new Map([[G.A,m.A],[G.ADDRESS,m.ADDRESS],[G.ANNOTATION_XML,m.ANNOTATION_XML],[G.APPLET,m.APPLET],[G.AREA,m.AREA],[G.ARTICLE,m.ARTICLE],[G.ASIDE,m.ASIDE],[G.B,m.B],[G.BASE,m.BASE],[G.BASEFONT,m.BASEFONT],[G.BGSOUND,m.BGSOUND],[G.BIG,m.BIG],[G.BLOCKQUOTE,m.BLOCKQUOTE],[G.BODY,m.BODY],[G.BR,m.BR],[G.BUTTON,m.BUTTON],[G.CAPTION,m.CAPTION],[G.CENTER,m.CENTER],[G.CODE,m.CODE],[G.COL,m.COL],[G.COLGROUP,m.COLGROUP],[G.DD,m.DD],[G.DESC,m.DESC],[G.DETAILS,m.DETAILS],[G.DIALOG,m.DIALOG],[G.DIR,m.DIR],[G.DIV,m.DIV],[G.DL,m.DL],[G.DT,m.DT],[G.EM,m.EM],[G.EMBED,m.EMBED],[G.FIELDSET,m.FIELDSET],[G.FIGCAPTION,m.FIGCAPTION],[G.FIGURE,m.FIGURE],[G.FONT,m.FONT],[G.FOOTER,m.FOOTER],[G.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[G.FORM,m.FORM],[G.FRAME,m.FRAME],[G.FRAMESET,m.FRAMESET],[G.H1,m.H1],[G.H2,m.H2],[G.H3,m.H3],[G.H4,m.H4],[G.H5,m.H5],[G.H6,m.H6],[G.HEAD,m.HEAD],[G.HEADER,m.HEADER],[G.HGROUP,m.HGROUP],[G.HR,m.HR],[G.HTML,m.HTML],[G.I,m.I],[G.IMG,m.IMG],[G.IMAGE,m.IMAGE],[G.INPUT,m.INPUT],[G.IFRAME,m.IFRAME],[G.KEYGEN,m.KEYGEN],[G.LABEL,m.LABEL],[G.LI,m.LI],[G.LINK,m.LINK],[G.LISTING,m.LISTING],[G.MAIN,m.MAIN],[G.MALIGNMARK,m.MALIGNMARK],[G.MARQUEE,m.MARQUEE],[G.MATH,m.MATH],[G.MENU,m.MENU],[G.META,m.META],[G.MGLYPH,m.MGLYPH],[G.MI,m.MI],[G.MO,m.MO],[G.MN,m.MN],[G.MS,m.MS],[G.MTEXT,m.MTEXT],[G.NAV,m.NAV],[G.NOBR,m.NOBR],[G.NOFRAMES,m.NOFRAMES],[G.NOEMBED,m.NOEMBED],[G.NOSCRIPT,m.NOSCRIPT],[G.OBJECT,m.OBJECT],[G.OL,m.OL],[G.OPTGROUP,m.OPTGROUP],[G.OPTION,m.OPTION],[G.P,m.P],[G.PARAM,m.PARAM],[G.PLAINTEXT,m.PLAINTEXT],[G.PRE,m.PRE],[G.RB,m.RB],[G.RP,m.RP],[G.RT,m.RT],[G.RTC,m.RTC],[G.RUBY,m.RUBY],[G.S,m.S],[G.SCRIPT,m.SCRIPT],[G.SEARCH,m.SEARCH],[G.SECTION,m.SECTION],[G.SELECT,m.SELECT],[G.SOURCE,m.SOURCE],[G.SMALL,m.SMALL],[G.SPAN,m.SPAN],[G.STRIKE,m.STRIKE],[G.STRONG,m.STRONG],[G.STYLE,m.STYLE],[G.SUB,m.SUB],[G.SUMMARY,m.SUMMARY],[G.SUP,m.SUP],[G.TABLE,m.TABLE],[G.TBODY,m.TBODY],[G.TEMPLATE,m.TEMPLATE],[G.TEXTAREA,m.TEXTAREA],[G.TFOOT,m.TFOOT],[G.TD,m.TD],[G.TH,m.TH],[G.THEAD,m.THEAD],[G.TITLE,m.TITLE],[G.TR,m.TR],[G.TRACK,m.TRACK],[G.TT,m.TT],[G.U,m.U],[G.UL,m.UL],[G.SVG,m.SVG],[G.VAR,m.VAR],[G.WBR,m.WBR],[G.XMP,m.XMP]]);function as(e){var t;return(t=k3.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const fe=m,N3={[ae.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[ae.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[ae.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[ae.XLINK]:new Set,[ae.XML]:new Set,[ae.XMLNS]:new Set},bh=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);G.STYLE,G.SCRIPT,G.XMP,G.IFRAME,G.NOEMBED,G.NOFRAMES,G.PLAINTEXT;var I;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(I||(I={}));const Lt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function P3(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Ia(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function O3(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function vi(e){return O3(e)||Ia(e)}function vy(e){return vi(e)||P3(e)}function Ml(e){return e+32}function ky(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function Ny(e){return ky(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function I3(e){return e===N.NULL?ee.nullCharacterReference:e>1114111?ee.characterReferenceOutsideUnicodeRange:xy(e)?ee.surrogateCharacterReference:Ay(e)?ee.noncharacterCharacterReference:wy(e)||e===N.CARRIAGE_RETURN?ee.controlCharacterReference:null}class R3{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new y3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new C3(T3,(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=I3(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:Ke.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ke.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Cy(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=as(t.tagName),t.type===Ke.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 Ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ke.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ke.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ky(t)?Ke.WHITESPACE_CHARACTER:t===N.NULL?Ke.NULL_CHARACTER:Ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ri.Attribute:ri.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(vi(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(ee.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(vi(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(ee.missingEndTagName),this.state=I.DATA;break}case N.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ee.unexpectedNullCharacter),n.tagName+=wt;break}case N.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ia(t)?Ml(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){vi(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){vi(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){vi(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:vi(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){vi(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&Ny(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(On.SCRIPT,!1)&&Ny(this.preprocessor.peek(On.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<On.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(ee.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(ee.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.name+=wt;break}default:this.currentAttr.name+=String.fromCodePoint(Ia(t)?Ml(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ee.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(ee.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(ee.unexpectedNullCharacter),n.data+=wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(On.DASH_DASH,!0)?(this._createCommentToken(On.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(On.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(On.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(On.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(ee.cdataInHtmlContent),this._createCommentToken(On.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ee.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ee.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(ee.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ee.unexpectedNullCharacter),n.data+=wt;break}case N.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 N.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(ee.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case N.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ee.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(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=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ia(t))this._createDoctypeToken(String.fromCharCode(Ml(t))),this.state=I.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(ee.unexpectedNullCharacter),this._createDoctypeToken(wt),this.state=I.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(ee.unexpectedNullCharacter),n.name+=wt;break}case N.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ia(t)?Ml(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(On.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(On.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ee.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ee.unexpectedNullCharacter),n.publicId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ee.unexpectedNullCharacter),n.publicId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ee.unexpectedNullCharacter),n.systemId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ee.unexpectedNullCharacter),n.systemId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.NULL:{this._err(ee.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(ee.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=I.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&vy(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){vy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(ee.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Py=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),Oy=new Set([...Py,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Fl=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),L3=new Set([...Fl,m.OL,m.UL]),D3=new Set([...Fl,m.BUTTON]),Iy=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),Ry=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),M3=new Set([m.TR,m.TEMPLATE,m.HTML]),F3=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),B3=new Set([m.TABLE,m.TEMPLATE,m.HTML]),U3=new Set([m.TD,m.TH]);class H3{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)===ae.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])!==ae.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(bh,ae.HTML)}popUntilTableCellPopped(){this.popUntilPopped(U3,ae.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(B3,ae.HTML)}clearBackToTableBodyContext(){this.clearBackTo(F3,ae.HTML)}clearBackToTableRowContext(){this.clearBackTo(M3,ae.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 ae.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ae.SVG:{if(Ry.has(o))return!1;break}case ae.MATHML:{if(Iy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Fl)}hasInListItemScope(t){return this.hasInDynamicScope(t,L3)}hasInButtonScope(t){return this.hasInDynamicScope(t,D3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ae.HTML:{if(bh.has(n))return!0;if(Fl.has(n))return!1;break}case ae.SVG:{if(Ry.has(n))return!1;break}case ae.MATHML:{if(Iy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ae.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])===ae.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])===ae.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&&Py.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Oy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Oy.has(this.currentTagId);)this.pop()}}const _h=3;var Mr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Mr||(Mr={}));const Ly={type:Mr.Marker};class z3{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===Mr.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<_h)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<_h)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>=_h&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Ly)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Mr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Mr.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(Ly);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Mr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Mr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Mr.Element&&n.element===t)}}const ki={createDocument(){return{nodeName:"#document",mode:nr.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};ki.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(ki.isTextNode(n)){n.value+=t;return}}ki.appendChild(e,ki.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ki.isTextNode(r)?r.value+=t:ki.insertBefore(e,ki.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=F(F({},e.sourceCodeLocation),t)}},Dy="html",j3="about:legacy-compat",$3="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",My=["+//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//"],V3=[...My,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],q3=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Fy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Y3=[...Fy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function By(e,t){return t.some(n=>e.startsWith(n))}function G3(e){return e.name===Dy&&e.publicId===null&&(e.systemId===null||e.systemId===j3)}function W3(e){if(e.name!==Dy)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===$3)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),q3.has(n))return nr.QUIRKS;let r=t===null?V3:My;if(By(n,r))return nr.QUIRKS;if(r=t===null?Fy:Y3,By(n,r))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const Uy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},X3="definitionurl",K3="definitionURL",Q3=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])),J3=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ae.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ae.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ae.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ae.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ae.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ae.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ae.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ae.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ae.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ae.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ae.XMLNS}]]),Z3=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])),eR=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 tR(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===fo.COLOR||r===fo.SIZE||r===fo.FACE)||eR.has(t)}function Hy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===X3){e.attrs[t].name=K3;break}}function zy(e){for(let t=0;t<e.attrs.length;t++){const n=Q3.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Sh(e){for(let t=0;t<e.attrs.length;t++){const n=J3.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function nR(e){const t=Z3.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=as(e.tagName))}function rR(e,t){return t===ae.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function iR(e,t,n){if(t===ae.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===fo.ENCODING){const o=n[r].value.toLowerCase();return o===Uy.TEXT_HTML||o===Uy.APPLICATION_XML}}return t===ae.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function oR(e,t,n,r){return(!r||r===ae.HTML)&&iR(e,t,n)||(!r||r===ae.MATHML)&&rR(e,t)}const sR="hidden",aR=8,uR=3;var L;(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"})(L||(L={}));const lR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},jy=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),$y={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ki,onParseError:null};class Vy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=F(F({},$y),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 R3(this.options,this),this.activeFormattingElements=new z3(this.treeAdapter),this.fragmentContextID=r?as(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new H3(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=F(F({},$y),n);t!=null||(t=r.treeAdapter.createElement(G.TEMPLATE,ae.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ae.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(L.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:lR,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)===ae.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ae.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.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)===G.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ae.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&&me(F({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ae.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ae.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(G.HTML,ae.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===Ke.END_TAG&&o===n.tagName?{endTag:F({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===G.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ae.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ae.HTML)}_processToken(t){switch(t.type){case Ke.CHARACTER:{this.onCharacter(t);break}case Ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ke.COMMENT:{this.onComment(t);break}case Ke.DOCTYPE:{this.onDoctype(t);break}case Ke.START_TAG:{this._processStartTag(t);break}case Ke.END_TAG:{this.onEndTag(t);break}case Ke.EOF:{this.onEof(t);break}case Ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return oR(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Mr.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=L.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=L.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=L.IN_TABLE;return}case m.BODY:{this.insertionMode=L.IN_BODY;return}case m.FRAMESET:{this.insertionMode=L.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?L.AFTER_HEAD:L.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.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=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return jy.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)===ae.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 N3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){UL(this,t);return}switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{Yy(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_TABLE_TEXT:{eT(this,t);break}case L.IN_COLUMN_GROUP:{Hl(this,t);break}case L.AFTER_BODY:{$l(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){BL(this,t);return}switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_COLUMN_GROUP:{Hl(this,t);break}case L.AFTER_BODY:{$l(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){wh(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{wh(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.AFTER_BODY:{gR(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{ER(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{yR(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,ee.misplacedDoctype);break}case L.IN_TABLE_TEXT:{za(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ee.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?HL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{TR(this,t);break}case L.BEFORE_HEAD:{_R(this,t);break}case L.IN_HEAD:{Er(this,t);break}case L.IN_HEAD_NO_SCRIPT:{wR(this,t);break}case L.AFTER_HEAD:{CR(this,t);break}case L.IN_BODY:{pn(this,t);break}case L.IN_TABLE:{us(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_CAPTION:{SL(this,t);break}case L.IN_COLUMN_GROUP:{vh(this,t);break}case L.IN_TABLE_BODY:{zl(this,t);break}case L.IN_ROW:{jl(this,t);break}case L.IN_CELL:{AL(this,t);break}case L.IN_SELECT:{rT(this,t);break}case L.IN_SELECT_IN_TABLE:{vL(this,t);break}case L.IN_TEMPLATE:{NL(this,t);break}case L.AFTER_BODY:{OL(this,t);break}case L.IN_FRAMESET:{IL(this,t);break}case L.AFTER_FRAMESET:{LL(this,t);break}case L.AFTER_AFTER_BODY:{ML(this,t);break}case L.AFTER_AFTER_FRAMESET:{FL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?zL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{bR(this,t);break}case L.BEFORE_HEAD:{SR(this,t);break}case L.IN_HEAD:{xR(this,t);break}case L.IN_HEAD_NO_SCRIPT:{AR(this,t);break}case L.AFTER_HEAD:{vR(this,t);break}case L.IN_BODY:{Ul(this,t);break}case L.TEXT:{fL(this,t);break}case L.IN_TABLE:{Ua(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_CAPTION:{xL(this,t);break}case L.IN_COLUMN_GROUP:{wL(this,t);break}case L.IN_TABLE_BODY:{kh(this,t);break}case L.IN_ROW:{nT(this,t);break}case L.IN_CELL:{CL(this,t);break}case L.IN_SELECT:{iT(this,t);break}case L.IN_SELECT_IN_TABLE:{kL(this,t);break}case L.IN_TEMPLATE:{PL(this,t);break}case L.AFTER_BODY:{sT(this,t);break}case L.IN_FRAMESET:{RL(this,t);break}case L.AFTER_FRAMESET:{DL(this,t);break}case L.AFTER_AFTER_BODY:{Vl(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{Ra(this,t);break}case L.BEFORE_HTML:{La(this,t);break}case L.BEFORE_HEAD:{Da(this,t);break}case L.IN_HEAD:{Ma(this,t);break}case L.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case L.AFTER_HEAD:{Ba(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{Jy(this,t);break}case L.TEXT:{hL(this,t);break}case L.IN_TABLE_TEXT:{za(this,t);break}case L.IN_TEMPLATE:{oT(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{Ah(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{qy(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Ch(this,t);break}case L.IN_TABLE_TEXT:{Zy(this,t);break}}}}function cR(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):Qy(e,t),n}function dR(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 fR(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>=uR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=hR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function hR(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 pR(e,t,n){const r=e.treeAdapter.getTagName(t),o=as(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===ae.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function mR(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 xh(e,t){for(let n=0;n<aR;n++){const r=cR(e,t);if(!r)break;const o=dR(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=fR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&pR(e,u,a),mR(e,o,r)}}function wh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function gR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function ER(e,t){e._appendCommentNode(t,e.document)}function Ah(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function yR(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:W3(t);G3(t)||e._err(t,ee.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function Ra(e,t){e._err(t,ee.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function TR(e,t){t.tagID===m.HTML?(e._insertElement(t,ae.HTML),e.insertionMode=L.BEFORE_HEAD):La(e,t)}function bR(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&La(e,t)}function La(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function _R(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.HEAD:{e._insertElement(t,ae.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Da(e,t)}}function SR(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Da(e,t):e._err(t,ee.endTagWithoutMatchingOpenElement)}function Da(e,t){e._insertFakeElement(G.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function Er(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ae.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,ae.HTML),e.insertionMode=L.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=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case m.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:Ma(e,t)}}function xR(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ma(e,t);break}case m.TEMPLATE:{ho(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function ho(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,ee.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ee.endTagWithoutMatchingOpenElement)}function Ma(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function wR(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{Er(e,t);break}case m.NOSCRIPT:{e._err(t,ee.nestedNoscriptInHead);break}default:Fa(e,t)}}function AR(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case m.BR:{Fa(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function Fa(e,t){const n=t.type===Ke.EOF?ee.openElementsLeftAfterEof:ee.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function CR(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.BODY:{e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ae.HTML),e.insertionMode=L.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,ee.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),Er(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:Ba(e,t)}}function vR(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Ba(e,t);break}case m.TEMPLATE:{ho(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function Ba(e,t){e._insertFakeElement(G.BODY,m.BODY),e.insertionMode=L.IN_BODY,Bl(e,t)}function Bl(e,t){switch(t.type){case Ke.CHARACTER:{Yy(e,t);break}case Ke.WHITESPACE_CHARACTER:{qy(e,t);break}case Ke.COMMENT:{wh(e,t);break}case Ke.START_TAG:{pn(e,t);break}case Ke.END_TAG:{Ul(e,t);break}case Ke.EOF:{Jy(e,t);break}}}function qy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Yy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function kR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function NR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function PR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_FRAMESET)}function OR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML)}function IR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&bh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ae.HTML)}function RR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function LR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),n||(e.formElement=e.openElements.current))}function DR(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,ae.HTML)}function MR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.tokenizer.state=Lt.PLAINTEXT}function FR(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1}function BR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(G.A);n&&(xh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function UR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function HR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(xh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ae.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function jR(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function Gy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Wy(e){const t=Cy(e,fo.TYPE);return t!=null&&t.toLowerCase()===sR}function $R(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ae.HTML),Wy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function VR(e,t){e._appendElement(t,ae.HTML),t.ackSelfClosing=!0}function qR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ae.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function YR(e,t){t.tagName=G.IMG,t.tagID=m.IMG,Gy(e,t)}function GR(e,t){e._insertElement(t,ae.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function WR(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function XR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function Xy(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function KR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function QR(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function JR(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ae.HTML)}function ZR(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ae.HTML)}function eL(e,t){e._reconstructActiveFormattingElements(),Hy(t),Sh(t),t.selfClosing?e._appendElement(t,ae.MATHML):e._insertElement(t,ae.MATHML),t.ackSelfClosing=!0}function tL(e,t){e._reconstructActiveFormattingElements(),zy(t),Sh(t),t.selfClosing?e._appendElement(t,ae.SVG):e._insertElement(t,ae.SVG),t.ackSelfClosing=!0}function Ky(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ae.HTML)}function pn(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:{UR(e,t);break}case m.A:{BR(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{IR(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:{OR(e,t);break}case m.LI:case m.DD:case m.DT:{DR(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{Gy(e,t);break}case m.HR:{qR(e,t);break}case m.RB:case m.RTC:{JR(e,t);break}case m.RT:case m.RP:{ZR(e,t);break}case m.PRE:case m.LISTING:{RR(e,t);break}case m.XMP:{WR(e,t);break}case m.SVG:{tL(e,t);break}case m.HTML:{kR(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{Er(e,t);break}case m.BODY:{NR(e,t);break}case m.FORM:{LR(e,t);break}case m.NOBR:{HR(e,t);break}case m.MATH:{eL(e,t);break}case m.TABLE:{jR(e,t);break}case m.INPUT:{$R(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{VR(e,t);break}case m.IMAGE:{YR(e,t);break}case m.BUTTON:{FR(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{zR(e,t);break}case m.IFRAME:{XR(e,t);break}case m.SELECT:{KR(e,t);break}case m.OPTION:case m.OPTGROUP:{QR(e,t);break}case m.NOEMBED:case m.NOFRAMES:{Xy(e,t);break}case m.FRAMESET:{PR(e,t);break}case m.TEXTAREA:{GR(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?Xy(e,t):Ky(e,t);break}case m.PLAINTEXT:{MR(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:Ky(e,t)}}function nL(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function rL(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=L.AFTER_BODY,sT(e,t))}function iL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function oL(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 sL(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(G.P,m.P),e._closePElement()}function aL(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function uL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function lL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function cL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function dL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(G.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function Qy(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 Ul(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:{xh(e,t);break}case m.P:{sL(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:{iL(e,t);break}case m.LI:{aL(e);break}case m.DD:case m.DT:{uL(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{lL(e);break}case m.BR:{dL(e);break}case m.BODY:{nL(e,t);break}case m.HTML:{rL(e,t);break}case m.FORM:{oL(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{cL(e,t);break}case m.TEMPLATE:{ho(e,t);break}default:Qy(e,t)}}function Jy(e,t){e.tmplInsertionModeStack.length>0?oT(e,t):Ah(e,t)}function fL(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 hL(e,t){e._err(t,ee.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ch(e,t){if(e.openElements.currentTagId!==void 0&&jy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{eT(e,t);break}case Ke.WHITESPACE_CHARACTER:{Zy(e,t);break}}else Ha(e,t)}function pL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_CAPTION}function mL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function gL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.COLGROUP,m.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,vh(e,t)}function EL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_TABLE_BODY}function yL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.TBODY,m.TBODY),e.insertionMode=L.IN_TABLE_BODY,zl(e,t)}function TL(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function bL(e,t){Wy(t)?e._appendElement(t,ae.HTML):Ha(e,t),t.ackSelfClosing=!0}function _L(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ae.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function us(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{yL(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{Er(e,t);break}case m.COL:{gL(e,t);break}case m.FORM:{_L(e,t);break}case m.TABLE:{TL(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{EL(e,t);break}case m.INPUT:{bL(e,t);break}case m.CAPTION:{pL(e,t);break}case m.COLGROUP:{mL(e,t);break}default:Ha(e,t)}}function Ua(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{ho(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Ha(e,t)}}function Ha(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Bl(e,t),e.fosterParentingEnabled=n}function Zy(e,t){e.pendingCharacterTokens.push(t)}function eT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function za(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ha(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const tT=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function SL(e,t){const n=t.tagID;tT.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,us(e,t)):pn(e,t)}function xL(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=L.IN_TABLE,n===m.TABLE&&Ua(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:Ul(e,t)}}function vh(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.COL:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{Er(e,t);break}default:Hl(e,t)}}function wL(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case m.TEMPLATE:{ho(e,t);break}case m.COL:break;default:Hl(e,t)}}function Hl(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function zl(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(G.TR,m.TR),e.insertionMode=L.IN_ROW,jl(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=L.IN_TABLE,us(e,t));break}default:us(e,t)}}function kh(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=L.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ua(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:Ua(e,t)}}function jl(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ae.HTML),e.insertionMode=L.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=L.IN_TABLE_BODY,zl(e,t));break}default:us(e,t)}}function nT(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,kh(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=L.IN_TABLE_BODY,kh(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:Ua(e,t)}}function AL(e,t){const n=t.tagID;tT.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),jl(e,t)):pn(e,t)}function CL(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=L.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),nT(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:Ul(e,t)}}function rT(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ae.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{Er(e,t);break}}}function iT(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:{ho(e,t);break}}}function vL(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)):rT(e,t)}function kL(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)):iT(e,t)}function NL(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{Er(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,us(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,vh(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,zl(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,jl(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,pn(e,t)}}function PL(e,t){t.tagID===m.TEMPLATE&&ho(e,t)}function oT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ah(e,t)}function OL(e,t){t.tagID===m.HTML?pn(e,t):$l(e,t)}function sT(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=L.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 $l(e,t)}function $l(e,t){e.insertionMode=L.IN_BODY,Bl(e,t)}function IL(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.FRAMESET:{e._insertElement(t,ae.HTML);break}case m.FRAME:{e._appendElement(t,ae.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{Er(e,t);break}}}function RL(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function LL(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.NOFRAMES:{Er(e,t);break}}}function DL(e,t){t.tagID===m.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function ML(e,t){t.tagID===m.HTML?pn(e,t):Vl(e,t)}function Vl(e,t){e.insertionMode=L.IN_BODY,Bl(e,t)}function FL(e,t){switch(t.tagID){case m.HTML:{pn(e,t);break}case m.NOFRAMES:{Er(e,t);break}}}function BL(e,t){t.chars=wt,e._insertCharacters(t)}function UL(e,t){e._insertCharacters(t),e.framesetOk=!1}function aT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ae.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function HL(e,t){if(tR(t))aT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ae.MATHML?Hy(t):r===ae.SVG&&(nR(t),zy(t)),Sh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function zL(e,t){if(t.tagID===m.P||t.tagID===m.BR){aT(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)===ae.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}G.AREA,G.BASE,G.BASEFONT,G.BGSOUND,G.BR,G.COL,G.EMBED,G.FRAME,G.HR,G.IMG,G.INPUT,G.KEYGEN,G.LINK,G.META,G.PARAM,G.SOURCE,G.TRACK,G.WBR;const jL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,$L=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),uT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function lT(e,t){const n=ZL(e),r=_y("type",{handlers:{root:VL,element:qL,text:YL,comment:dT,doctype:GL,raw:XL},unknown:KL}),o={parser:n?new Vy(uT):Vy.getFragmentParser(void 0,uT),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),ls(o,Lr());const a=n?o.parser.document:o.parser.getFragment(),u=VI(a,{file:o.options.file});return o.stitches&&Rl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const g=f.children;return g[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function cT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function VL(e,t){cT(e.children,t)}function qL(e,t){QL(e,t),cT(e.children,t),JL(e,t)}function YL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:ja(e)};ls(t,Lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function GL(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ja(e)};ls(t,Lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function WL(e,t){t.stitches=!0;const n=e6(e);if("children"in e&&"children"in n){const r=lT({type:"root",children:e.children},t.options);n.children=r.children}dT({type:"comment",value:{stitch:n}},t)}function dT(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:ja(e)};ls(t,Lr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function XL(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,fT(t,Lr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(jL,"<$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 KL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))WL(n,t);else{let r="";throw $L.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 ls(e,t){fT(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 fT(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 QL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;ls(t,Lr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:lo.html;o===lo.html&&n==="svg"&&(o=lo.svg);const a=o3(me(F({},e),{children:[]}),{space:o===lo.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:as(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ja(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function JL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&h3.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;ls(t,Sl(e));const r={type:Ke.END_TAG,tagName:n,tagID:as(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ja(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function ZL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ja(e){const t=Lr(e)||{line:void 0,column:void 0,offset:void 0},n=Sl(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 e6(e){return"children"in e?uo(me(F({},e),{children:[]})):uo(e)}function hT(e){return function(t,n){return lT(t,me(F({},e),{file:n}))}}const po=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],pT={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...po,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...po],h2:[["className","sr-only"]],img:[...po,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...po,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...po],table:[...po],ul:[...po,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Ni={}.hasOwnProperty;function t6(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},pT),t):pT,stack:[]},o=mT(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function mT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return n6(e,n);case"doctype":return r6(e,n);case"element":return i6(e,n);case"root":return o6(e,n);case"text":return s6(e,n)}}}function n6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return $a(a,t),a}}function r6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return $a(n,t),n}}function i6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=gT(e,t.children),o=a6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Ni.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return $a(u,t),u}function o6(e,t){const r={type:"root",children:gT(e,t.children)};return $a(r,t),r}function s6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return $a(r,t),r}function gT(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=mT(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function a6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ni.call(r,n)?r[n]:void 0,u=r&&Ni.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ni.call(c,f)){const p=c[f];let g=ET(e,TT(a,f),f,p);g==null&&(g=ET(e,TT(u,f),f,p)),g!=null&&(d[f]=g)}if(o&&Ni.call(o,n)){const p=o[n];for(f in p)Ni.call(p,f)&&!Ni.call(d,f)&&(d[f]=p[f])}return d}function ET(e,t,n,r){return t?Array.isArray(r)?u6(e,t,n,r):yT(e,t,n,r):void 0}function u6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=yT(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function yT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&l6(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 l6(e,t,n){const r=e.schema.protocols&&Ni.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let 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 $a(e,t){const n=eE(t);t.data&&(e.data=uo(t.data)),n&&(e.position=n)}function TT(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 c6(e){return function(t){return t6(t,e)}}const bT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",me(F(F({className:W(e,`${j}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},d6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=mt();return!e&&!t?null:w.jsx("div",{className:W(n,`${j}-disclaimer`),children:t?w.jsx(ty,{rehypePlugins:[hT,c6],components:{ul:({children:r})=>w.jsx("ul",{className:W(n,`${j}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:W(n,`${j}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:W(n,`${j}-li`),children:r}),a:({href:r,title:o,children:a})=>w.jsx(bT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>w.jsx("img",{className:W(n,`${j}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>w.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:W(n,`${j}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:e})})},Nh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Zn(),{setImageFile:u}=Go(),{logger:c,globalClassName:d,searchConfig:f,features:p}=mt(),g=U.useRef(null),b=U.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",S=!!o||!1,v=S?"connected":"disconnected",C=t||!S,P=()=>a?new Promise((D,K)=>{const re=new FileReader;re.readAsDataURL(a),re.onload=()=>D(re.result),re.onerror=Te=>K(Te)}):Promise.resolve(""),A=D=>tt(null,null,function*(){var Te;if(C)return;const K=10*1024*1024,re=(Te=D.target.files)==null?void 0:Te[0];if(re){if(re.size>K){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(re)}}),M=()=>{u(null),b.current&&(b.current.value="")},V=D=>tt(null,null,function*(){var Te;D.preventDefault();const K=(((Te=g.current)==null?void 0:Te.value)||"").trim();let re="";try{re=yield P()}catch($){c==null||c.error("Error converting file to base64:",$),alert("There was an error processing the file. Please try again.");return}K&&(M(),g.current.value="",r(K,re))});return w.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${j}-search-bar-wrapper`),children:[a&&w.jsxs("div",{className:W(d,`cim-${n}-component`,`${j}-image-file-preview`),children:[w.jsx("img",{className:W(d,`cim-${n}-component`,`${j}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),w.jsx("span",{className:W(d,`cim-${n}-component`,`${j}-image-file-name`),title:_,children:_}),w.jsx(Pf,{className:W(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:M})]}),w.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${j}-search-bar`),name:`${j}-search-form`,onSubmit:V,children:[w.jsx("span",{role:"status",className:W(`${j}-connection-status-icon`,v)}),y&&w.jsxs("div",{role:"button",className:W(d,e,`cim-${n}-component`,C&&"disabled",`${j}-image-upload-button`),"aria-disabled":C,tabIndex:0,children:[w.jsx("label",{className:W(d,e,`cim-${n}-component`,C&&"disabled",`${j}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:w.jsx(kk,{})}),w.jsx("input",{className:W(d,e,`cim-${n}-component`,`${j}-file-input`),type:"file",ref:b,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${j}-file-input`,disabled:C,onInput:A})]}),w.jsx("input",{className:W(d,e,`cim-${n}-component`,`${j}-search-input`),type:"text",ref:g,placeholder:f==null?void 0:f.placeholder,name:`${j}-user-input`}),w.jsx(Rk,{isLoading:C}),w.jsx(Pk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:C})]}),w.jsx(d6,{})]})};function f6(e){return Ht({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 _T=U.createContext(null),Va=()=>{var n;const e=()=>{},t=U.useContext(_T);return(n=t==null?void 0:t.closeMenu)!=null?n:e},Ph=({onClearChat:e,componentType:t})=>{const n=Va(),r=()=>{e(),n()};return w.jsxs("button",{className:W(`${j}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(f6,{}),"Clear chat"]})};function h6(e){return e==null?[]:Array.isArray(e)?e:[e]}var p6=(e,...t)=>e.concat(t),m6=(e,...t)=>e.filter(n=>!t.includes(n)),g6=e=>Array.from(new Set(e));function ST(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function E6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return ST(e,t,{step:-r,loop:o})}var y6=e=>Array.isArray(e),xT=e=>e!=null&&typeof e=="object",T6=e=>xT(e)&&!y6(e),ql=e=>typeof e=="string",cs=e=>typeof e=="function",b6=e=>e==null,_6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),S6=e=>Object.prototype.toString.call(e),wT=Function.prototype.toString,x6=wT.call(Object),w6=e=>{if(!xT(e)||S6(e)!="[object Object]"||v6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=_6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&wT.call(n)==x6},A6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,C6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,v6=e=>A6(e)||C6(e),k6=e=>e(),N6=()=>{},Oh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function P6(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:O6,max:I6}=Math,R6=e=>Number.isNaN(e),L6=e=>R6(e)?0:e,AT=(e,t,n)=>O6(I6(L6(e),t),n);function Ih(e){if(!w6(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]=Ih(o))}return n}function Rh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function D6(e,t){if(e==null)throw new Error(t())}function M6(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var F6=Object.defineProperty,B6=(e,t,n)=>t in e?F6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lh=(e,t,n)=>B6(e,typeof t!="symbol"?t+"":t,n),CT=()=>{},Yl=e=>typeof e=="object"&&e!==null,ds=e=>e?"":void 0,vT=e=>e?"true":void 0,U6=1,H6=9,z6=11,Jt=e=>Yl(e)&&e.nodeType===U6&&typeof e.nodeName=="string",Gl=e=>Yl(e)&&e.nodeType===H6,j6=e=>Yl(e)&&e===e.window,kT=e=>Jt(e)?e.localName||"":"#document";function $6(e){return["html","body","#document"].includes(kT(e))}var V6=e=>Yl(e)&&e.nodeType!==void 0,mo=e=>V6(e)&&e.nodeType===z6&&"host"in e,q6=e=>Jt(e)&&e.localName==="input",Y6=e=>Jt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function qa(e){if(!e)return!1;const t=e.getRootNode();return ps(t)===e}var G6=/(textarea|select)/;function W6(e){if(e==null||!Jt(e))return!1;try{return q6(e)&&e.selectionStart!=null||G6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function fs(e,t){var r;if(!e||!t||!Jt(e)||!Jt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&mo(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Fr(e){var t;return Gl(e)?e:j6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function X6(e){return Fr(e).documentElement}function hs(e){var t,n,r;return mo(e)?hs(e.host):Gl(e)?(t=e.defaultView)!=null?t:window:Jt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ps(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 K6(e){if(kT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mo(e)&&e.host||X6(e);return mo(t)?t.host:t}function Dh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gl(t)||mo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Mh=new WeakMap;function ms(e){return Mh.has(e)||Mh.set(e,hs(e).getComputedStyle(e)),Mh.get(e)}var Fh=new Set(["menu","listbox","dialog","grid","tree","region"]),Q6=e=>Fh.has(e),NT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function PT(e,t){const n=new Set,r=Dh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=NT(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const g=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(g&&Q6(g)&&!b&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function OT(e,t){const n=Dh(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=NT(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const g=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";g&&Fh.has(g)&&!b&&(t(p),o(p))}}}};o(e)}function J6(e){const t=new Set;return OT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function Z6(e){const t=e.getAttribute("role");return!!(t&&Fh.has(t))}function eD(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function tD(e){var t;return eD(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function nD(e){if(!e.id)return!1;const t=Dh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&Z6(e))}var Bh=()=>typeof document!="undefined";function rD(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Uh=e=>Bh()&&e.test(rD()),iD=e=>Bh()&&e.test(navigator.vendor),IT=()=>Bh()&&!!navigator.maxTouchPoints,oD=()=>Uh(/^iPhone/i),sD=()=>Uh(/^iPad/i)||Hh()&&navigator.maxTouchPoints>1,Wl=()=>oD()||sD(),aD=()=>Hh()||Wl(),Hh=()=>Uh(/^Mac/i),uD=()=>aD()&&iD(/apple/i);function lD(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=lD(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var RT=e=>e.button===0,cD=e=>e.button===2||Hh()&&e.ctrlKey&&e.button===0,dD=e=>"touches"in e&&e.touches.length>0,fD={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},LT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function hD(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=fD[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in LT&&(o=LT[o]),o}function DT(e,t="client"){const n=dD(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Zt=(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)}},MT=e=>Jt(e)&&e.tagName==="IFRAME",pD=/^(audio|video|details)$/;function FT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var mD=e=>!Number.isNaN(FT(e)),gD=e=>FT(e)<0;function ED(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 BT(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=ED(d,t);if(f){const p=Array.from(f.querySelectorAll(Xl)).filter(n),g=u.get(d);if(g!==void 0){const b=g+1;r.splice(b,0,...p),p.forEach((y,_)=>{u.set(y,b+_)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,b+_)})}o.push(...p)}}return r}var Xl="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",UT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Xl));(n==!0||n=="if-empty"&&o.length===0)&&Jt(e)&&Br(e)&&o.unshift(e);const u=[];for(const c of o)if(Br(c)){if(MT(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...UT(d,{getShadowRoot:r}));continue}u.push(c)}return r?BT(u,r,Br):u};function Br(e){return!Jt(e)||e.closest("[inert]")?!1:e.matches(Xl)&&Y6(e)}function gs(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Xl));n&&go(e)&&o.unshift(e);const a=[];for(const u of o)if(go(u)){if(MT(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...gs(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=BT(a,r,go);return!u.length&&n?o:u}return!a.length&&n?o:a}function go(e){return Jt(e)&&e.tabIndex>0?!0:Br(e)&&!gD(e)}function yD(e,t={}){const n=gs(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function TD(e,t={}){const{current:n,getShadowRoot:r}=t,o=gs(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:ps(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Ya(e){return e.tabIndex<0&&(pD.test(e.localName)||W6(e))&&!mD(e)?0:e.tabIndex}function HT(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=gs(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var bD=class U2{constructor(){Lh(this,"id",null),Lh(this,"fn_cleanup"),Lh(this,"cleanup",()=>{this.cancel()})}static create(){return new U2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function qt(e){const t=bD.create();return t.request(e),t.cleanup}function zT(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 zh(e){const t=K6(e);return $6(t)?Fr(t).body:Jt(t)&&xD(t)?t:zh(t)}var _D=/auto|scroll|overlay|hidden|clip/,SD=new Set(["inline","contents"]);function xD(e){const t=hs(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return _D.test(n+o+r)&&!SD.has(a)}var Es="default",jh="",Kl=new WeakMap;function wD(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Wl()?(Es==="default"&&(jh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Es="disabled"):t&&(Kl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>AD({target:t,doc:r})}function AD(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Wl()){if(Es!=="disabled")return;Es="restoring",setTimeout(()=>{zT(()=>{Es==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=jh||""),jh="",Es="default")})},300)}else if(t&&Kl.has(t)){const a=Kl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Kl.delete(t)}}function CD(e={}){const u=e,{defer:t,target:n}=u,r=ln(u,["defer","target"]),o=t?qt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(wD(me(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function vD(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=DT(c),f=Math.sqrt(ea(d.x,2)+ea(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=DT(c);r({point:d,event:c})},u=[Zt(e,"pointermove",o,!1),Zt(e,"pointerup",a,!1),Zt(e,"pointercancel",a,!1),Zt(e,"contextmenu",a,!1),CD({doc:e})];return()=>{u.forEach(c=>c())}}function kD(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[g,b]=yD(e,{includeContainer:!0,getShadowRoot:a}),y=TD(c,{current:n,getShadowRoot:a}),_=!g&&!b;f.shiftKey&&qa(y)?(o==null||o(),p=b):f.shiftKey&&(qa(g)||_)?p=n:!f.shiftKey&&qa(n)?(o==null||o(),p=g):!f.shiftKey&&(qa(b)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Zt(u,"keydown",d,!0)}function ND(e,t){const c=t,{defer:n,triggerElement:r}=c,o=ln(c,["defer","triggerElement"]),a=n?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(kD(d,F({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function PD(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Ql(e,t){if(!e)return CT;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 OD(e,t,n){if(!e)return CT;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 ID(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 RD(e,t){const{timeout:n,rootNode:r}=t,o=hs(r),a=Fr(r),u=new o.AbortController;return ID(new Promise(c=>{const d=e();if(d){c(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var LD=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),DD=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,jT=e=>{const t={};let n;for(;n=DD.exec(e);)t[n[1]]=n[2];return t},MD=(e,t)=>{if(ql(e)){if(ql(t))return`${e};${t}`;e=jT(e)}else ql(t)&&(t=jT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Yt(...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]=Oh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=LD(t[o],n[o]);continue}if(o==="style"){t[o]=MD(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 rU(e){return e}var ys=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ys||{}),$h="__init__";function FD(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Fr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>ps(t()),a=u=>t().getElementById(u);return me(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:qa,getById:a})}function BD(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Ts=()=>e=>Array.from(new Set(e)),$T=typeof globalThis.document!="undefined"?U.useLayoutEffect:U.useEffect;function Jl(e){var g,b;const t=(g=e().value)!=null?g:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=U.useState(t),[o,a]=U.useState(r),u=e().value!==void 0,c=U.useRef(o);c.current=u?e().value:o;const d=U.useRef(c.current);$T(()=>{d.current=c.current},[o,e().value]);const f=y=>{var v,C;const _=d.current,S=cs(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),u||a(S),n(S,_)||(C=(v=e()).onChange)==null||C.call(v,S,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Wo.flushSync:k6)(()=>f(y))},invoke(y,_){var S,v;(v=(S=e()).onChange)==null||v.call(S,y,_)},hash(y){var _,S,v;return(v=(S=(_=e()).hash)==null?void 0:S.call(_,y))!=null?v:String(y)}}}Jl.cleanup=e=>{U.useEffect(()=>e,[])},Jl.ref=e=>{const t=U.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function UD(e){const t=U.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var HD=(e,t)=>{const n=U.useRef(!1),r=U.useRef(!1);U.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),U.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Zl(e,t={}){var Z,ce,he,ue,be,Oe;const n=U.useMemo(()=>{const{id:de,ids:Q,getRootNode:ie}=t;return FD({id:de,ids:Q,getRootNode:ie})},[t]),r=(...de)=>{e.debug&&console.log(...de)},o=(ce=(Z=e.props)==null?void 0:Z.call(e,{props:Ih(t),scope:n}))!=null?ce:t,a=zD(o),u=(he=e.context)==null?void 0:he.call(e,{prop:a,bindable:Jl,scope:n,flush:qT,getContext(){return d},getComputed(){return V},getRefs(){return S},getEvent(){return y()}}),c=VT(u),d={get(de){var Q;return(Q=c.current)==null?void 0:Q[de].ref.current},set(de,Q){var ie;(ie=c.current)==null||ie[de].set(Q)},initial(de){var Q;return(Q=c.current)==null?void 0:Q[de].initial},hash(de){var ie,k;const Q=(ie=c.current)==null?void 0:ie[de].get();return(k=c.current)==null?void 0:k[de].hash(Q)}},f=U.useRef(new Map),p=U.useRef(null),g=U.useRef(null),b=U.useRef({type:""}),y=()=>me(F({},b.current),{current(){return b.current},previous(){return g.current}}),_=()=>me(F({},D),{matches(...de){return de.includes(D.ref.current)},hasTag(de){var Q,ie;return!!((ie=(Q=e.states[D.ref.current])==null?void 0:Q.tags)!=null&&ie.includes(de))}}),S=UD((be=(ue=e.refs)==null?void 0:ue.call(e,{prop:a,context:d}))!=null?be:{}),v=()=>({state:_(),context:d,event:y(),prop:a,send:$,action:C,guard:P,track:HD,refs:S,computed:V,flush:qT,scope:n,choose:M}),C=de=>{const Q=cs(de)?de(v()):de;if(!Q)return;const ie=Q.map(k=>{var te,O;const B=(O=(te=e.implementations)==null?void 0:te.actions)==null?void 0:O[k];return B||Rh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),B});for(const k of ie)k==null||k(v())},P=de=>{var Q,ie;return cs(de)?de(v()):(ie=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:ie[de](v())},A=de=>{const Q=cs(de)?de(v()):de;if(!Q)return;const ie=Q.map(B=>{var O,_e;const te=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[B];return te||Rh(`[zag-js] No implementation found for effect "${JSON.stringify(B)}"`),te}),k=[];for(const B of ie){const te=B==null?void 0:B(v());te&&k.push(te)}return()=>k.forEach(B=>B==null?void 0:B())},M=de=>h6(de).find(Q=>{let ie=!Q.guard;return ql(Q.guard)?ie=!!P(Q.guard):cs(Q.guard)&&(ie=Q.guard(v())),ie}),V=de=>{D6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[de];return Q({context:d,event:y(),prop:a,refs:S,scope:n,computed:V})},D=Jl(()=>({defaultValue:e.initialState({prop:a}),onChange(de,Q){var k,B,te,O;if(Q){const _e=f.current.get(Q);_e==null||_e(),f.current.delete(Q)}Q&&C((k=e.states[Q])==null?void 0:k.exit),C((B=p.current)==null?void 0:B.actions);const ie=A((te=e.states[de])==null?void 0:te.effects);if(ie&&f.current.set(de,ie),Q===$h){C(e.entry);const _e=A(e.effects);_e&&f.current.set($h,_e)}C((O=e.states[de])==null?void 0:O.entry)}})),K=U.useRef(void 0),re=U.useRef(ys.NotStarted);$T(()=>{queueMicrotask(()=>{var B;const ie=re.current===ys.Started;re.current=ys.Started,r(ie?"rehydrating...":"initializing...");const k=(B=K.current)!=null?B:D.initial;D.invoke(k,ie?D.get():$h)});const de=f.current,Q=D.ref.current;return()=>{r("unmounting..."),K.current=Q,re.current=ys.Stopped,de.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{C(e.exit)})}},[]);const Te=()=>"ref"in D?D.ref.current:D.get(),$=de=>{queueMicrotask(()=>{var O,_e,Ie,Ae,$e;if(re.current!==ys.Started)return;g.current=b.current,b.current=de;let Q=Te();const ie=(Ie=(O=e.states[Q].on)==null?void 0:O[de.type])!=null?Ie:(_e=e.on)==null?void 0:_e[de.type],k=M(ie);if(!k)return;p.current=k;const B=(Ae=k.target)!=null?Ae:Q;r("transition",de.type,k.target||Q,`(${k.actions})`);const te=B!==Q;te?Wo.flushSync(()=>D.set(B)):k.reenter&&!te?D.invoke(Q,Q):C(($e=k.actions)!=null?$e:[])})};return(Oe=e.watch)==null||Oe.call(e,v()),{state:_(),send:$,context:d,prop:a,scope:n,refs:S,computed:V,event:y(),getStatus:()=>re.current}}function VT(e){const t=U.useRef(e);return t.current=e,t}function zD(e){const t=VT(e);return function(r){return t.current[r]}}function qT(e){queueMicrotask(()=>{Wo.flushSync(()=>e())})}var Vh=BD(e=>e);function ec(...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 jD(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 qh=e=>{const t=U.memo(U.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=ln(f,["asChild","children"]);if(!o)return U.createElement(e,me(F({},u),{ref:r}),a);if(!U.isValidElement(a))return null;const c=U.Children.only(a),d=jD(c);return U.cloneElement(c,me(F({},Yt(u,c.props)),{ref:r?ec(r,d):d}))}));return t.displayName=e.displayName||e.name,t},mn=(()=>{const e=new Map;return new Proxy(qh,{apply(t,n,r){return qh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,qh(r)),e.get(r)}})})();function $D(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Eo(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=U.createContext(u);c.displayName=t;function d(){var p;const f=U.useContext(c);if(!f&&n){const g=new Error(a!=null?a:$D(r,o));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return f}return[c.Provider,d,c]}const[VD,Yh]=Eo({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[YT,Ga]=Eo({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),GT=U.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(mn.div,me(F({},o),{ref:ec(r.ref,t)}))});GT.displayName="PopoverContent";const WT=U.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=Yt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(mn.div,me(F({},o),{ref:t}))});WT.displayName="PopoverPositioner";const Wa=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},F({},e)]),XT=e=>Wa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function qD(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 YD={props({props:e}){return me(F({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",ms(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"});qt(()=>{var c,d;const u=tc(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})=>{qt(()=>{e.set("prevAnimationName",tc(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,g,b;((b=(g=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:g[0])!=null?b:d.target)===o&&e.set("prevAnimationName",tc(t.get("styles")))},u=d=>{const f=tc(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=Ql(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),zT(()=>c())}}}}};function tc(e){return(e==null?void 0:e.animationName)||"none"}Ts()(["onExitComplete","present","immediate"]);function GD(e,t={}){const{sync:n=!1}=t,r=WD(e);return U.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 WD(e){const t=U.useRef(e);return t.current=e,t}const Gh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,a=ln(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=U.useRef(!1),c=me(F({},a),{present:r,onExitComplete:GD(e.onExitComplete)}),d=Zl(YD,c),f=qD(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,g=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:g,present:f.present,unmounted:p}};var yo=(e,t=[])=>({parts:(...n)=>{if(XD(t))return yo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>yo(e,[...t,...n]),omit:(...n)=>yo(e,t.filter(r=>!n.includes(r))),rename:n=>yo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${bs(e)}"][data-part="${bs(r)}"]`,`& [data-scope="${bs(e)}"][data-part="${bs(r)}"]`].join(", "),attrs:{"data-scope":bs(e),"data-part":bs(r)}}}),{})}),bs=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),XD=e=>e.length===0;const KD=["top","right","bottom","left"],Pi=Math.min,$n=Math.max,nc=Math.round,rc=Math.floor,Ur=e=>({x:e,y:e}),QD={left:"right",right:"left",bottom:"top",top:"bottom"},JD={start:"end",end:"start"};function Wh(e,t,n){return $n(e,Pi(t,n))}function ii(e,t){return typeof e=="function"?e(t):e}function oi(e){return e.split("-")[0]}function _s(e){return e.split("-")[1]}function Xh(e){return e==="x"?"y":"x"}function Kh(e){return e==="y"?"height":"width"}const ZD=new Set(["top","bottom"]);function Hr(e){return ZD.has(oi(e))?"y":"x"}function Qh(e){return Xh(Hr(e))}function e4(e,t,n){n===void 0&&(n=!1);const r=_s(e),o=Qh(e),a=Kh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ic(u)),[u,ic(u)]}function t4(e){const t=ic(e);return[Jh(e),t,Jh(t)]}function Jh(e){return e.replace(/start|end/g,t=>JD[t])}const KT=["left","right"],QT=["right","left"],n4=["top","bottom"],r4=["bottom","top"];function i4(e,t,n){switch(e){case"top":case"bottom":return n?t?QT:KT:t?KT:QT;case"left":case"right":return t?n4:r4;default:return[]}}function o4(e,t,n,r){const o=_s(e);let a=i4(oi(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Jh)))),a}function ic(e){return e.replace(/left|right|bottom|top/g,t=>QD[t])}function s4(e){return F({top:0,right:0,bottom:0,left:0},e)}function JT(e){return typeof e!="number"?s4(e):{top:e,right:e,bottom:e,left:e}}function oc(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 ZT(e,t,n){let{reference:r,floating:o}=e;const a=Hr(t),u=Qh(t),c=Kh(u),d=oi(t),f=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,b=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-o.width,y:g};break;default:y={x:r.x,y:r.y}}switch(_s(t)){case"start":y[u]-=b*(n&&f?-1:1);break;case"end":y[u]+=b*(n&&f?-1:1);break}return y}const a4=(e,t,n)=>tt(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:g}=ZT(f,r,d),b=r,y={},_=0;for(let S=0;S<c.length;S++){const{name:v,fn:C}=c[S],{x:P,y:A,data:M,reset:V}=yield C({x:p,y:g,initialPlacement:r,placement:b,strategy:o,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=P!=null?P:p,g=A!=null?A:g,y=me(F({},y),{[v]:F(F({},y[v]),M)}),V&&_<=50&&(_++,typeof V=="object"&&(V.placement&&(b=V.placement),V.rects&&(f=V.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):V.rects),{x:p,y:g}=ZT(f,b,d)),S=-1)}return{x:p,y:g,placement:b,strategy:o,middlewareData:y}});function Xa(e,t){return tt(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:g="floating",altBoundary:b=!1,padding:y=0}=ii(t,e),_=JT(y),v=c[b?g==="floating"?"reference":"floating":g],C=oc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),P=g==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,A=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),M=(yield a.isElement==null?void 0:a.isElement(A))?(yield a.getScale==null?void 0:a.getScale(A))||{x:1,y:1}:{x:1,y:1},V=oc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:P,offsetParent:A,strategy:d}):P);return{top:(C.top-V.top+_.top)/M.y,bottom:(V.bottom-C.bottom+_.bottom)/M.y,left:(C.left-V.left+_.left)/M.x,right:(V.right-C.right+_.right)/M.x}})}const u4=e=>({name:"arrow",options:e,fn(n){return tt(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:g=0}=ii(e,n)||{};if(p==null)return{};const b=JT(g),y={x:r,y:o},_=Qh(a),S=Kh(_),v=yield c.getDimensions(p),C=_==="y",P=C?"top":"left",A=C?"bottom":"right",M=C?"clientHeight":"clientWidth",V=u.reference[S]+u.reference[_]-y[_]-u.floating[S],D=y[_]-u.reference[_],K=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let re=K?K[M]:0;(!re||!(yield c.isElement==null?void 0:c.isElement(K)))&&(re=d.floating[M]||u.floating[S]);const Te=V/2-D/2,$=re/2-v[S]/2-1,Z=Pi(b[P],$),ce=Pi(b[A],$),he=Z,ue=re-v[S]-ce,be=re/2-v[S]/2+Te,Oe=Wh(he,be,ue),de=!f.arrow&&_s(a)!=null&&be!==Oe&&u.reference[S]/2-(be<he?Z:ce)-v[S]/2<0,Q=de?be<he?be-he:be-ue:0;return{[_]:y[_]+Q,data:F({[_]:Oe,centerOffset:be-Oe-Q},de&&{alignmentOffset:Q}),reset:de}})}}),l4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return tt(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,be=ii(e,n),{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:v=!0}=be,C=ln(be,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const P=oi(a),A=Hr(d),M=oi(d)===d,V=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(M||!v?[ic(d)]:t4(d)),K=S!=="none";!y&&K&&D.push(...o4(d,v,S,V));const re=[d,...D],Te=yield Xa(n,C),$=[];let Z=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&$.push(Te[P]),b){const Oe=e4(a,c,V);$.push(Te[Oe[0]],Te[Oe[1]])}if(Z=[...Z,{placement:a,overflows:$}],!$.every(Oe=>Oe<=0)){var ce,he;const Oe=(((ce=u.flip)==null?void 0:ce.index)||0)+1,de=re[Oe];if(de&&(!(b==="alignment"?A!==Hr(de):!1)||Z.every(k=>Hr(k.placement)===A?k.overflows[0]>0:!0)))return{data:{index:Oe,overflows:Z},reset:{placement:de}};let Q=(he=Z.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:he.placement;if(!Q)switch(_){case"bestFit":{var ue;const ie=(ue=Z.filter(k=>{if(K){const B=Hr(k.placement);return B===A||B==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(B=>B>0).reduce((B,te)=>B+te,0)]).sort((k,B)=>k[1]-B[1])[0])==null?void 0:ue[0];ie&&(Q=ie);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 tb(e){return KD.some(t=>e[t]>=0)}const c4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return tt(this,null,function*(){const{rects:r}=n,u=ii(e,n),{strategy:o="referenceHidden"}=u,a=ln(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Xa(n,me(F({},a),{elementContext:"reference"})),d=eb(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:tb(d)}}}case"escaped":{const c=yield Xa(n,me(F({},a),{altBoundary:!0})),d=eb(c,r.floating);return{data:{escapedOffsets:d,escaped:tb(d)}}}default:return{}}})}}},nb=new Set(["left","top"]);function d4(e,t){return tt(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=oi(n),c=_s(n),d=Hr(n)==="y",f=nb.has(u)?-1:1,p=a&&d?-1:1,g=ii(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}})}const f4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return tt(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield d4(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:me(F({},f),{placement:c})}})}}},h4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return tt(this,null,function*(){const{x:r,y:o,placement:a}=n,C=ii(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:P=>{let{x:A,y:M}=P;return{x:A,y:M}}}}=C,f=ln(C,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},g=yield Xa(n,f),b=Hr(oi(a)),y=Xh(b);let _=p[y],S=p[b];if(u){const P=y==="y"?"top":"left",A=y==="y"?"bottom":"right",M=_+g[P],V=_-g[A];_=Wh(M,_,V)}if(c){const P=b==="y"?"top":"left",A=b==="y"?"bottom":"right",M=S+g[P],V=S-g[A];S=Wh(M,S,V)}const v=d.fn(me(F({},n),{[y]:_,[b]:S}));return me(F({},v),{data:{x:v.x-r,y:v.y-o,enabled:{[y]:u,[b]:c}}})})}}},p4=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}=ii(e,t),p={x:n,y:r},g=Hr(o),b=Xh(g);let y=p[b],_=p[g];const S=ii(c,t),v=typeof S=="number"?{mainAxis:S,crossAxis:0}:F({mainAxis:0,crossAxis:0},S);if(d){const A=b==="y"?"height":"width",M=a.reference[b]-a.floating[A]+v.mainAxis,V=a.reference[b]+a.reference[A]-v.mainAxis;y<M?y=M:y>V&&(y=V)}if(f){var C,P;const A=b==="y"?"width":"height",M=nb.has(oi(o)),V=a.reference[g]-a.floating[A]+(M&&((C=u.offset)==null?void 0:C[g])||0)+(M?0:v.crossAxis),D=a.reference[g]+a.reference[A]+(M?0:((P=u.offset)==null?void 0:P[g])||0)-(M?v.crossAxis:0);_<V?_=V:_>D&&(_=D)}return{[b]:y,[g]:_}}}},m4=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return tt(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,Z=ii(e,n),{apply:f=()=>{}}=Z,p=ln(Z,["apply"]),g=yield Xa(n,p),b=oi(a),y=_s(a),_=Hr(a)==="y",{width:S,height:v}=u.floating;let C,P;b==="top"||b==="bottom"?(C=b,P=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(P=b,C=y==="end"?"top":"bottom");const A=v-g.top-g.bottom,M=S-g.left-g.right,V=Pi(v-g[C],A),D=Pi(S-g[P],M),K=!n.middlewareData.shift;let re=V,Te=D;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(Te=M),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(re=A),K&&!y){const ce=$n(g.left,0),he=$n(g.right,0),ue=$n(g.top,0),be=$n(g.bottom,0);_?Te=S-2*(ce!==0||he!==0?ce+he:$n(g.left,g.right)):re=v-2*(ue!==0||be!==0?ue+be:$n(g.top,g.bottom))}yield f(me(F({},n),{availableWidth:Te,availableHeight:re}));const $=yield c.getDimensions(d.floating);return S!==$.width||v!==$.height?{reset:{rects:!0}}:{}})}}};function sc(){return typeof window!="undefined"}function Ss(e){return rb(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zr(e){var t;return(t=(rb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rb(e){return sc()?e instanceof Node||e instanceof Vn(e).Node:!1}function Tr(e){return sc()?e instanceof Element||e instanceof Vn(e).Element:!1}function jr(e){return sc()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function ib(e){return!sc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}const g4=new Set(["inline","contents"]);function Ka(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!g4.has(o)}const E4=new Set(["table","td","th"]);function y4(e){return E4.has(Ss(e))}const T4=[":popover-open",":modal"];function ac(e){return T4.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const b4=["transform","translate","scale","rotate","perspective"],_4=["transform","translate","scale","rotate","perspective","filter"],S4=["paint","layout","strict","content"];function Zh(e){const t=ep(),n=Tr(e)?br(e):e;return b4.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)||_4.some(r=>(n.willChange||"").includes(r))||S4.some(r=>(n.contain||"").includes(r))}function x4(e){let t=Oi(e);for(;jr(t)&&!xs(t);){if(Zh(t))return t;if(ac(t))return null;t=Oi(t)}return null}function ep(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const w4=new Set(["html","body","#document"]);function xs(e){return w4.has(Ss(e))}function br(e){return Vn(e).getComputedStyle(e)}function uc(e){return Tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oi(e){if(Ss(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ib(e)&&e.host||zr(e);return ib(t)?t.host:t}function ob(e){const t=Oi(e);return xs(t)?e.ownerDocument?e.ownerDocument.body:e.body:jr(t)&&Ka(t)?t:ob(t)}function Qa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ob(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Vn(o);if(a){const c=tp(u);return t.concat(u,u.visualViewport||[],Ka(o)?o:[],c&&n?Qa(c):[])}return t.concat(o,Qa(o,[],n))}function tp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sb(e){const t=br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=jr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=nc(n)!==a||nc(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function np(e){return Tr(e)?e:e.contextElement}function ws(e){const t=np(e);if(!jr(t))return Ur(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=sb(t);let u=(a?nc(n.width):n.width)/r,c=(a?nc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const A4=Ur(0);function ab(e){const t=Vn(e);return!ep()||!t.visualViewport?A4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function C4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vn(e)?!1:t}function To(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=np(e);let u=Ur(1);t&&(r?Tr(r)&&(u=ws(r)):u=ws(e));const c=C4(a,n,r)?ab(a):Ur(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,g=o.height/u.y;if(a){const b=Vn(a),y=r&&Tr(r)?Vn(r):r;let _=b,S=tp(_);for(;S&&r&&y!==_;){const v=ws(S),C=S.getBoundingClientRect(),P=br(S),A=C.left+(S.clientLeft+parseFloat(P.paddingLeft))*v.x,M=C.top+(S.clientTop+parseFloat(P.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,g*=v.y,d+=A,f+=M,_=Vn(S),S=tp(_)}}return oc({width:p,height:g,x:d,y:f})}function lc(e,t){const n=uc(e).scrollLeft;return t?t.left+n:To(zr(e)).left+n}function ub(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-lc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function v4(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=zr(r),c=t?ac(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Ur(1);const p=Ur(0),g=jr(r);if((g||!g&&!a)&&((Ss(r)!=="body"||Ka(u))&&(d=uc(r)),jr(r))){const y=To(r);f=ws(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!g&&!a?ub(u,d):Ur(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function k4(e){return Array.from(e.getClientRects())}function N4(e){const t=zr(e),n=uc(e),r=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+lc(e);const c=-n.scrollTop;return br(r).direction==="rtl"&&(u+=$n(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const lb=25;function P4(e,t){const n=Vn(e),r=zr(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=ep();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=lc(r);if(f<=0){const p=r.ownerDocument,g=p.body,b=getComputedStyle(g),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-y);_<=lb&&(a-=_)}else f<=lb&&(a+=f);return{width:a,height:u,x:c,y:d}}const O4=new Set(["absolute","fixed"]);function I4(e,t){const n=To(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=jr(e)?ws(e):Ur(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=P4(e,n);else if(t==="document")r=N4(zr(e));else if(Tr(t))r=I4(t,n);else{const o=ab(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return oc(r)}function db(e,t){const n=Oi(e);return n===t||!Tr(n)||xs(n)?!1:br(n).position==="fixed"||db(n,t)}function R4(e,t){const n=t.get(e);if(n)return n;let r=Qa(e,[],!1).filter(c=>Tr(c)&&Ss(c)!=="body"),o=null;const a=br(e).position==="fixed";let u=a?Oi(e):e;for(;Tr(u)&&!xs(u);){const c=br(u),d=Zh(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&O4.has(o.position)||Ka(u)&&!d&&db(e,u))?r=r.filter(p=>p!==u):o=c,u=Oi(u)}return t.set(e,r),r}function L4(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ac(t)?[]:R4(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const g=cb(t,p,o);return f.top=$n(g.top,f.top),f.right=Pi(g.right,f.right),f.bottom=Pi(g.bottom,f.bottom),f.left=$n(g.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 D4(e){const{width:t,height:n}=sb(e);return{width:t,height:n}}function M4(e,t,n){const r=jr(t),o=zr(t),a=n==="fixed",u=To(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Ur(0);function f(){d.x=lc(o)}if(r||!r&&!a)if((Ss(t)!=="body"||Ka(o))&&(c=uc(t)),r){const y=To(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?ub(o,c):Ur(0),g=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:g,y:b,width:u.width,height:u.height}}function rp(e){return br(e).position==="static"}function fb(e,t){if(!jr(e)||br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zr(e)===n&&(n=n.ownerDocument.body),n}function hb(e,t){const n=Vn(e);if(ac(e))return n;if(!jr(e)){let o=Oi(e);for(;o&&!xs(o);){if(Tr(o)&&!rp(o))return o;o=Oi(o)}return n}let r=fb(e,t);for(;r&&y4(r)&&rp(r);)r=fb(r,t);return r&&xs(r)&&rp(r)&&!Zh(r)?n:r||x4(e)||n}const F4=function(e){return tt(this,null,function*(){const t=this.getOffsetParent||hb,n=this.getDimensions,r=yield n(e.floating);return{reference:M4(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function B4(e){return br(e).direction==="rtl"}const U4={convertOffsetParentRelativeRectToViewportRelativeRect:v4,getDocumentElement:zr,getClippingRect:L4,getOffsetParent:hb,getElementRects:F4,getClientRects:k4,getDimensions:D4,getScale:ws,isElement:Tr,isRTL:B4};function pb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function H4(e,t){let n=null,r;const o=zr(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:g,width:b,height:y}=f;if(c||t(),!b||!y)return;const _=rc(g),S=rc(o.clientWidth-(p+b)),v=rc(o.clientHeight-(g+y)),C=rc(p),A={rootMargin:-_+"px "+-S+"px "+-v+"px "+-C+"px",threshold:$n(0,Pi(1,d))||1};let M=!0;function V(D){const K=D[0].intersectionRatio;if(K!==d){if(!M)return u();K?u(!1,K):r=setTimeout(()=>{u(!1,1e-7)},1e3)}K===1&&!pb(f,e.getBoundingClientRect())&&u(),M=!1}try{n=new IntersectionObserver(V,me(F({},A),{root:o.ownerDocument}))}catch(D){n=new IntersectionObserver(V,A)}n.observe(e)}return u(!0),a}function z4(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=np(e),p=o||a?[...f?Qa(f):[],...Qa(t)]:[];p.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const g=f&&c?H4(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(C=>{let[P]=C;P&&P.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var A;(A=y)==null||A.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,S=d?To(e):null;d&&v();function v(){const C=To(e);S&&!pb(S,C)&&n(),S=C,_=requestAnimationFrame(v)}return n(),()=>{var C;p.forEach(P=>{o&&P.removeEventListener("scroll",n),a&&P.removeEventListener("resize",n)}),g==null||g(),(C=y)==null||C.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const j4=f4,$4=h4,V4=l4,q4=m4,Y4=c4,G4=u4,W4=p4,X4=(e,t,n)=>{const r=new Map,o=F({platform:U4},n),a=me(F({},o.platform),{_c:r});return a4(e,t,me(F({},o),{platform:a}))};function mb(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 me(F({},o),{toJSON:()=>o})}function K4(e){if(!e)return mb();const{x:t,y:n,width:r,height:o}=e;return mb(t,n,r,o)}function Q4(e,t){return{contextElement:Jt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?K4(r):n.getBoundingClientRect()}}}var Ja=e=>({variable:e,reference:`var(${e})`}),si={arrowSize:Ja("--arrow-size"),arrowSizeHalf:Ja("--arrow-size-half"),arrowBg:Ja("--arrow-background"),transformOrigin:Ja("--transform-origin"),arrowOffset:Ja("--arrow-offset")},J4=e=>e==="top"||e==="bottom"?"y":"x";function Z4(e,t){return{name:"transformOrigin",fn(n){var Te,$,Z,ce,he;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=J4(d),p=((Te=o.arrow)==null?void 0:Te.x)||0,g=(($=o.arrow)==null?void 0:$.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+b/2,S=g+y/2,v=Math.abs(((Z=o.shift)==null?void 0:Z.y)||0),C=u.reference.height/2,P=y/2,A=(he=(ce=e.offset)==null?void 0:ce.mainAxis)!=null?he:e.gutter,M=typeof A=="number"?A+P:A!=null?A:P,V=v>M,D={top:`${_}px calc(100% + ${M}px)`,bottom:`${_}px ${-M}px`,left:`calc(100% + ${M}px) ${S}px`,right:`${-M}px ${S}px`}[d],K=`${_}px ${u.reference.y+C-c}px`,re=!!e.overlap&&f==="y"&&V;return r.floating.style.setProperty(si.transformOrigin.variable,re?K:D),{data:{transformOrigin:re?K:D}}}}}var e5={name:"rects",fn({rects:e}){return{data:e}}},t5=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% + ${si.arrowOffset.reference})`}),{}}}};function n5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var r5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function gb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function ip(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function i5(e,t,n){const r=e||t.createElement("div");return G4({element:r,padding:n.arrowPadding})}function o5(e,t){var n;if(!b6((n=t.offset)!=null?n:t.gutter))return j4(({placement:r})=>{var p,g,b,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(g=(p=t.offset)==null?void 0:p.mainAxis)!=null?g:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=n5(r),d=c?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return Ih({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function s5(e){if(!e.flip)return;const t=ip(e.boundary);return V4(me(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function a5(e){if(!e.slide&&!e.overlap)return;const t=ip(e.boundary);return $4(me(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:W4()}))}function u5(e){return q4({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 l5(e){var t;if(e.hideWhenDetached)return Y4({strategy:"referenceHidden",boundary:(t=ip(e.boundary))!=null?t:"clippingAncestors"})}function c5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function d5(e,t,n={}){const r=Q4(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},r5,n),a=t.querySelector("[data-part=arrow]"),u=[o5(a,o),s5(o),a5(o),i5(a,t.ownerDocument,o),t5(a),Z4({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),u5(o),l5(o),e5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,g=()=>tt(null,null,function*(){var M;if(!r||!t)return;const S=yield X4(r,t,{placement:c,middleware:u,strategy:d});f==null||f(S),p==null||p({placed:!0});const v=hs(t),C=gb(v,S.x),P=gb(v,S.y);t.style.setProperty("--x",`${C}px`),t.style.setProperty("--y",`${P}px`),o.hideWhenDetached&&(((M=S.middlewareData.hide)==null?void 0:M.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const A=t.firstElementChild;if(A){const V=ms(A);t.style.setProperty("--z-index",V.zIndex)}}),b=()=>tt(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=c5(o.listeners),_=o.listeners?z4(r,t,b,y):N6;return b(),()=>{_==null||_(),p==null||p({placed:!1})}}function Eb(e,t,n={}){const c=n,{defer:r}=c,o=ln(c,["defer"]),a=r?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(d5(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var f5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function h5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:si.arrowSize.reference,height:si.arrowSize.reference,[si.arrowSizeHalf.variable]:`calc(${si.arrowSize.reference} / 2)`,[si.arrowOffset.variable]:`calc(${si.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?f5[t.split("-")[0]]:void 0,background:si.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 As=new WeakMap,cc=new WeakMap,dc={},op=0,yb=e=>e&&(e.host||yb(e.parentNode)),p5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=yb(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),m5=new Set(["script","output","status","next-route-announcer"]),g5=e=>m5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),E5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=p5(n,Array.isArray(e)?e:[e]);dc[r]||(dc[r]=new WeakMap);const c=dc[r],d=[],f=new Set,p=new Set(u),g=y=>{!y||f.has(y)||(f.add(y),g(y.parentNode))};u.forEach(y=>{g(y),a&&Jt(y)&&OT(y,_=>{g(_)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))b(_);else try{if(g5(_))return;const v=_.getAttribute(o)==="true",C=(As.get(_)||0)+1,P=(c.get(_)||0)+1;As.set(_,C),c.set(_,P),d.push(_),C===1&&v&&cc.set(_,!0),P===1&&_.setAttribute(r,""),v||_.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return b(n),f.clear(),op++,()=>{d.forEach(y=>{const _=As.get(y)-1,S=c.get(y)-1;As.set(y,_),c.set(y,S),_||(cc.has(y)||y.removeAttribute(o),cc.delete(y)),S||y.removeAttribute(r)}),op--,op||(As=new WeakMap,As=new WeakMap,cc=new WeakMap,dc={})}},y5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,T5=(e,t=y5(e),n="data-aria-hidden",r=!0)=>{if(t)return E5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},b5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Tb(e,t={}){const{defer:n=!0}=t,r=n?b5:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(T5(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function _5(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 S5(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 bb="pointerdown.outside",_b="focus.outside";function x5(e){for(const t of e)if(Jt(t)&&Br(t))return!0;return!1}var Sb=e=>"clientY"in e;function w5(e,t){if(!Sb(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 A5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function xb(e,t){if(!t||!Sb(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 A5(u,c)?r||a:!1}function C5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Fr(e),f=hs(e),p=_5(f),g=S5(f);function b(A,M){if(!Jt(M)||!M.isConnected||fs(e,M)||w5(e,A)||c&&PT(e,M))return!1;const V=d.querySelector(`[aria-controls="${e.id}"]`);if(V){const K=zh(V);if(xb(A,K))return!1}const D=zh(e);return xb(A,D)?!1:!(n!=null&&n(M))}const y=new Set,_=mo(e==null?void 0:e.getRootNode());function S(A){function M(V){var Te,$;const D=u&&!IT()?qt:Z=>Z(),K=V!=null?V:A,re=($=(Te=K==null?void 0:K.composedPath)==null?void 0:Te.call(K))!=null?$:[K==null?void 0:K.target];D(()=>{const Z=_?re[0]:yr(A);if(!(!e||!b(A,Z))){if(o||a){const ce=Oh(o,a);e.addEventListener(bb,ce,{once:!0})}wb(e,bb,{bubbles:!1,cancelable:!0,detail:{originalEvent:K,contextmenu:cD(K),focusable:x5(re),target:Z}})}})}A.pointerType==="touch"?(y.forEach(V=>V()),y.add(Zt(d,"click",M,{once:!0})),y.add(g.addEventListener("click",M,{once:!0})),y.add(p.addEventListener("click",M,{once:!0}))):M()}const v=new Set,C=setTimeout(()=>{v.add(Zt(d,"pointerdown",S,!0)),v.add(g.addEventListener("pointerdown",S,!0)),v.add(p.addEventListener("pointerdown",S,!0))},0);function P(A){(u?qt:V=>V())(()=>{var K,re;const V=(re=(K=A==null?void 0:A.composedPath)==null?void 0:K.call(A))!=null?re:[A==null?void 0:A.target],D=_?V[0]:yr(A);if(!(!e||!b(A,D))){if(r||a){const Te=Oh(r,a);e.addEventListener(_b,Te,{once:!0})}wb(e,_b,{bubbles:!1,cancelable:!0,detail:{originalEvent:A,contextmenu:!1,focusable:Br(D),target:D}})}})}return IT()||(v.add(Zt(d,"focusin",P,!0)),v.add(g.addEventListener("focusin",P,!0)),v.add(p.addEventListener("focusin",P,!0))),()=>{clearTimeout(C),y.forEach(A=>A()),v.forEach(A=>A())}}function v5(e,t){const{defer:n}=t,r=n?qt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(C5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function wb(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function k5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Zt(Fr(e),"keydown",n,{capture:!0})}var Ab="layer:request-dismiss",rr={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=>fs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>fs(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=>rr.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];P5(e,Ab,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),N5(e,Ab,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function N5(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 P5(e,t,n){e.addEventListener(t,n,{once:!0})}var Cb;function vb(){rr.layers.forEach(({node:e})=>{e.style.pointerEvents=rr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function O5(e){e.style.pointerEvents=""}function I5(e,t){const n=Fr(e),r=[];return rr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Cb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=RD(()=>{const c=o();return Jt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Ql(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{rr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Cb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function R5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Rh("[@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};rr.add(f),vb();function p(S){var C,P;const v=yr(S.detail.originalEvent);rr.isBelowPointerBlockingLayer(e)||rr.isInBranch(v)||((C=t.onPointerDownOutside)==null||C.call(t,S),(P=t.onInteractOutside)==null||P.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function g(S){var C,P;const v=yr(S.detail.originalEvent);rr.isInBranch(v)||((C=t.onFocusOutside)==null||C.call(t,S),(P=t.onInteractOutside)==null||P.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var v;rr.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var A;if(!e)return!1;const v=typeof u=="function"?u():u,C=Array.isArray(v)?v:[v],P=(A=t.persistentElements)==null?void 0:A.map(M=>M()).filter(Jt);return P&&C.push(...P),C.some(M=>fs(M,S))||rr.isInNestedLayer(e,S)}const _=[a?I5(e,t.persistentElements):void 0,k5(e,b),v5(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{rr.remove(e),vb(),O5(e),_.forEach(S=>S==null?void 0:S())}}function kb(e,t){const{defer:n}=t,r=n?qt:a=>a(),o=[];return o.push(r(()=>{const a=cs(e)?e():e;o.push(R5(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var L5=Object.defineProperty,D5=(e,t,n)=>t in e?L5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t,n)=>D5(e,typeof t!="symbol"?t+"":t,n),Nb={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()}},M5=[],F5=class{constructor(e,t){At(this,"trapStack"),At(this,"config"),At(this,"doc"),At(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),At(this,"portalContainers",new Set),At(this,"listenerCleanups",[]),At(this,"handleFocus",r=>{const o=yr(r),a=this.findContainerIndex(o,r)>=0;if(a||Gl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Ya(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(g=>g===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=>Ya(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),At(this,"handlePointerDown",r=>{const o=yr(r);if(!(this.findContainerIndex(o,r)>=0)){if(eu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}eu(this.config.allowOutsideClick,r)||r.preventDefault()}}),At(this,"handleClick",r=>{const o=yr(r);this.findContainerIndex(o,r)>=0||eu(this.config.clickOutsideDeactivates,r)||eu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),At(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;Za(r)&&r.preventDefault(),this.tryFocus(a)}}),At(this,"handleEscapeKey",r=>{B5(r)&&eu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),At(this,"_mutationObserver"),At(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(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 tD(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?nD(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),At(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(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)}))}),At(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Br(r)){const o=ps(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}),At(this,"tryFocus",r=>{if(r!==!1&&r!==ps(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,U5(r)&&r.select()}}),At(this,"deactivate",r=>{if(!this.state.active)return this;const o=F({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Nb.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=()=>{Pb(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),At(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const 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}),At(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}),At(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),At(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),At(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),At(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}),At(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:g})=>u===g);if(p<0&&((f==null?void 0:f.container)===u||Br(u)&&!go(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const g=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[g];c=Ya(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Za(o)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:g})=>u===g);if(p<0&&((f==null?void 0:f.container)===u||Br(u)&&!go(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const g=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[g];c=Ya(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Za(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||M5;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Za(r)&&!r.shiftKey},isKeyBackward(r){return Za(r)&&r.shiftKey}},t);this.doc=n.document||Fr(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=>{J6(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?PT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=gs(e,{getShadowRoot:this.config.getShadowRoot}),n=UT(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(Ya(t[f])>0){c=!0;break}function d(f,p=!0){const g=t.indexOf(f);if(g>=0)return t[g+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(go(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(go(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return Nb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Pb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Zt(this.doc,"focusin",this.handleFocus,!0),Zt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Zt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Zt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Zt(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=ps(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)}},Za=e=>e.key==="Tab",eu=(e,...t)=>typeof e=="function"?e(...t):e,B5=e=>!e.isComposing&&e.key==="Escape",Pb=e=>setTimeout(e,0),U5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Ob(e,t={}){let n;const r=qt(()=>{const o=typeof e=="function"?e():e;if(o){n=new F5(o,me(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Fr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var sp="data-scroll-lock";function H5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Ib(e){const t=ms(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Rb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(sp))return;const u=Ib(r)||Ib(o),c=n.innerWidth-r.clientWidth;o.setAttribute(sp,"");const d=()=>OD(r,"--scrollbar-width",`${c}px`),f=H5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Ql(o,_)},g=()=>{var V,D;const{scrollX:_,scrollY:S,visualViewport:v}=n,C=(V=v==null?void 0:v.offsetLeft)!=null?V:0,P=(D=v==null?void 0:v.offsetTop)!=null?D:0,A={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(P))}px`,left:`${-(_-Math.floor(C))}px`,right:"0"};!u&&c>0&&(A[f]=`${c}px`);const M=Ql(o,A);return()=>{M==null||M(),n.scrollTo({left:_,top:S,behavior:"instant"})}},b=[d(),Wl()?g():p()];return()=>{b.forEach(_=>_==null?void 0:_()),o.removeAttribute(sp)}}var z5=yo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),$r=z5.build(),Lb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Db=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Mb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},j5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},$5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Fb=e=>e.getById(Lb(e)),Cs=e=>e.getById(Db(e)),vs=e=>e.getById(ap(e)),Bb=e=>e.getById(Mb(e)),V5=e=>e.getById(up(e)),q5=e=>e.getById(lp(e));function Y5(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"),g=r.get("renderedElements"),b=h5(me(F({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(me(F({id:j5(c)},$r.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(me(F({},$r.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(me(F({},$r.anchor.attrs),{dir:u("dir"),id:Lb(c)}))},getTriggerProps(){return t.button(me(F({},$r.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:Db(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ap(c),onPointerDown(y){RT(y)&&uD()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(me(F({},$r.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(F({id:Mb(c)},$r.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(me(F({},$r.content.attrs),{dir:u("dir"),id:ap(c),tabIndex:-1,role:"dialog","aria-modal":vT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ds(d),"aria-labelledby":g.title?up(c):void 0,"aria-describedby":g.description?lp(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(me(F({},$r.title.attrs),{id:up(c),dir:u("dir")}))},getDescriptionProps(){return t.element(me(F({},$r.description.attrs),{id:lp(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(me(F({},$r.closeTrigger.attrs),{dir:u("dir"),id:$5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var G5={props({props:e}){return me(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=Fb(n))!=null?a:Cs(n);return Eb(r,()=>Bb(n),me(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>vs(n);let o=!0;return kb(r,{type:"popover",pointerBlocking:t("modal"),exclude:Cs(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:ND(()=>vs(t),{triggerElement:Cs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Tb(()=>[vs(t),Cs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Rb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Ob(()=>vs(t),{initialFocus:()=>HT({root:vs(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=Fb(n))!=null?u:Cs(n);Eb(o,()=>Bb(n),me(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){qt(()=>{Object.assign(e.get("renderedElements"),{title:!!V5(t),description:!!q5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||qt(()=>{const n=HT({root:vs(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||qt(()=>{const a=Cs(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})}}}};Ts()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[oU,fc]=Eo({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[sU,cp]=Eo({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),W5=e=>{const t=U.useId(),{getRootNode:n}=fc(),{dir:r}=cp(),o=F({id:t,dir:r,getRootNode:n},e),a=Zl(G5,o);return Y5(a,Vh)},X5=e=>{const[t,u]=XT(e),c=u,{children:n}=c,r=ln(c,["children"]),o=W5(r),a=Gh(Yt({present:o.open},t));return w.jsx(VD,{value:o,children:w.jsx(YT,{value:a,children:n})})},Ub=U.forwardRef((e,t)=>{const n=Yh(),r=Ga(),o=Yt(me(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(mn.button,me(F({},o),{ref:t}))});Ub.displayName="PopoverTrigger";function K5(e){return Ht({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 Q5(e){return Ht({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 J5(e){return Ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function Z5(e){return Ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function eM(e){return Ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function tM(e){return Ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const dp=({className:e,componentType:t,children:n})=>{const[r,o]=U.useState(!1),{globalClassName:a}=mt(),u=f=>{o(f.open)},c=U.useCallback(()=>{o(!1)},[]),d=U.useMemo(()=>({closeMenu:c}),[c]);return w.jsxs(X5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(Ub,{"aria-label":`Overflow menu for ${t}`,className:W(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(tM,{})}),w.jsx(WT,{children:w.jsx(GT,{className:W(`${j}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(_T.Provider,{value:d,children:n})})})]})};function Hb(e){return Ht({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 zb(e){return Ht({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[nM,bo]=Eo({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),jb=U.forwardRef((e,t)=>{const n=bo(),r=Yt(n.getControlProps(),e);return w.jsx(mn.div,me(F(F({},r),e),{ref:t}))});jb.displayName="CarouselControl";const $b=U.forwardRef((e,t)=>{const[n,r]=Wa()(e,["readOnly","index"]),o=bo(),a=Yt(o.getIndicatorProps(n),r);return w.jsx(mn.button,me(F({},a),{ref:t}))});$b.displayName="CarouselIndicator";const Vb=U.forwardRef((e,t)=>{const n=bo(),r=Yt(n.getIndicatorGroupProps(),e);return w.jsx(mn.div,me(F({},r),{ref:t}))});Vb.displayName="CarouselIndicatorGroup";const qb=U.forwardRef((e,t)=>{const[n,r]=Wa()(e,["index","snapAlign"]),o=bo(),a=Yt(o.getItemProps(n),r);return w.jsx(mn.div,me(F({},a),{ref:t}))});qb.displayName="CarouselItem";const Yb=U.forwardRef((e,t)=>{const n=bo(),r=Yt(n.getItemGroupProps(),e);return w.jsx(mn.div,me(F({},r),{ref:t}))});Yb.displayName="CarouselItemGroup";const Gb=U.forwardRef((e,t)=>{const n=bo(),r=Yt(n.getNextTriggerProps(),e);return w.jsx(mn.button,me(F({},r),{ref:t}))});Gb.displayName="CarouselNextTrigger";const Wb=U.forwardRef((e,t)=>{const n=bo(),r=Yt(n.getPrevTriggerProps(),e);return w.jsx(mn.button,me(F({},r),{ref:t}))});Wb.displayName="CarouselPrevTrigger";function rM(e){const t=ms(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(b,y){let _=parseFloat(b);return/%/.test(b)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(o,n.height),p=c(a,n.width),g=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:g}}}function iM(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function Xb(e){let t=[];for(const n of e.children)t=t.concat(n,Xb(n));return t}function Kb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?Xb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const g=p.getBoundingClientRect();if(!iM(n,g,u))continue;const b=ms(p);let[y,_]=b.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const S=a==="x"?_:y,v=g[c]-n[c]+e[f];switch(S){case"none":break;case"start":r[a].start.push({node:p,position:v});break;case"center":r[a].center.push({node:p,position:v+g[d]/2});break;case"end":r[a].end.push({node:p,position:v+g[d]});break}}}return r}function Qb(e){const t=e.getBoundingClientRect(),n=rM(e),r=Kb(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Jb([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(Zb(0,o.x))),y:Jb([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(Zb(0,o.y)))}}function oM(e,t,n){const r=Kb(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var Jb=e=>[...new Set(e)],Zb=(e,t)=>n=>Math.max(e,Math.min(t,n)),sM=yo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ai=sM.build(),aM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},uM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},hc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},lM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},cM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},dM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},e_=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},In=e=>e.getById(hc(e)),t_=e=>PD(In(e),"[data-part=item]"),fM=(e,t)=>e.getById(e_(e,t)),n_=e=>{const t=In(e);if(!t)return;const n=gs(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function hM(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),g=o("canScrollPrev"),b=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),S=c("slidesPerPage"),v=c("padding"),C=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:g,getProgress(){return _/y.length},scrollToIndex(P,A){a({type:"INDEX.SET",index:P,instant:A})},scrollTo(P,A){a({type:"PAGE.SET",index:P,instant:A})},scrollNext(P){a({type:"PAGE.NEXT",instant:P})},scrollPrev(P){a({type:"PAGE.PREV",instant:P})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(P){return Array.from(r.get("slidesInView")).includes(P)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(me(F({},ai.root.attrs),{id:aM(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":S,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(me(F({},ai.itemGroup.attrs),{id:hc(u),"data-orientation":c("orientation"),"data-dragging":ds(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(P){fs(P.currentTarget,yr(P))&&a({type:"VIEWPORT.FOCUS"})},onBlur(P){fs(P.currentTarget,P.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(P){if(P.defaultPrevented||!c("allowMouseDrag")||!RT(P))return;const A=yr(P);Br(A)&&A!==P.currentTarget||(P.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:P6(P=>{const A=c("orientation")==="horizontal"?"deltaX":"deltaY";P[A]<0&&!o("canScrollPrev")||P[A]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:v,[b?"paddingInline":"paddingBlock"]:v,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(P){const A=r.get("slidesInView").includes(P.index);return t.element(me(F({},ai.item.attrs),{id:uM(u,P.index),dir:c("dir"),role:"group","data-index":P.index,"data-inview":ds(A),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":C.item(P.index,c("slideCount")),"aria-hidden":vT(!A),style:{scrollSnapAlign:(()=>{var re;const M=(re=P.snapAlign)!=null?re:"start",V=c("slidesPerMove"),D=V==="auto"?Math.floor(c("slidesPerPage")):V;return(P.index+D)%D===0?M:void 0})()}}))},getControlProps(){return t.element(me(F({},ai.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(me(F({},ai.prevTrigger.attrs),{id:cM(u),type:"button",disabled:!g,dir:c("dir"),"aria-label":C.prevTrigger,"data-orientation":c("orientation"),"aria-controls":hc(u),onClick(P){P.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(me(F({},ai.nextTrigger.attrs),{dir:c("dir"),id:lM(u),type:"button","aria-label":C.nextTrigger,"data-orientation":c("orientation"),"aria-controls":hc(u),disabled:!p,onClick(P){P.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(me(F({},ai.indicatorGroup.attrs),{dir:c("dir"),id:dM(u),"data-orientation":c("orientation"),onKeyDown(P){if(P.defaultPrevented)return;const A="indicator",M={ArrowDown(K){b||(a({type:"PAGE.NEXT",src:A}),K.preventDefault())},ArrowUp(K){b||(a({type:"PAGE.PREV",src:A}),K.preventDefault())},ArrowRight(K){b&&(a({type:"PAGE.NEXT",src:A}),K.preventDefault())},ArrowLeft(K){b&&(a({type:"PAGE.PREV",src:A}),K.preventDefault())},Home(K){a({type:"PAGE.SET",index:0,src:A}),K.preventDefault()},End(K){a({type:"PAGE.SET",index:y.length-1,src:A}),K.preventDefault()}},V=hD(P,{dir:c("dir"),orientation:c("orientation")}),D=M[V];D==null||D(P)}}))},getIndicatorProps(P){return t.button(me(F({},ai.indicator.attrs),{dir:c("dir"),id:e_(u,P.index),type:"button","data-orientation":c("orientation"),"data-index":P.index,"data-readonly":ds(P.readOnly),"data-current":ds(P.index===_),"aria-label":C.indicator(P.index),onClick(A){A.defaultPrevented||P.readOnly||a({type:"PAGE.SET",index:P.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(me(F({},ai.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ds(d),"aria-label":d?C.autoplayStop:C.autoplayStart,onClick(P){P.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var pM={props({props:e}){return M6(e,["slideCount"],"carousel"),me(F({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:F({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:mM(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return T6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(In(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=In(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),n_(e)});return n_(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!In(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};qt(()=>{o(),qt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return t_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=In(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var b;const p=f.target,g=Number((b=p.dataset.index)!=null?b:"-1");return g==null||Number.isNaN(g)||g===-1?d:f.isIntersecting?p6(d,g):m6(d,g)},n.get("slidesInView"));n.set("slidesInView",g6(c))},{root:r,threshold:t("inViewThreshold")});return t_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=In(n);return r?Zt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Zt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return vD(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Zt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var f;const a=t.instant?"instant":"smooth",u=AT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=In(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=In(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=ST(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=E6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=In(r);if(!o)return;const a=oM(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=AT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=In(n);if(!r)return;const o=Qb(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=In(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=In(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=In(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=Qb(r),c=u.x.reduce((f,p)=>Math.abs(p-o)<Math.abs(f-o)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);qt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=fM(n,e.get("page"));r&&qt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function mM(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}Ts()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Ts()(["index","readOnly"]),Ts()(["index","snapAlign"]);const gM=e=>{const t=U.useId(),{getRootNode:n}=fc(),{dir:r}=cp(),o=F({id:t,dir:r,getRootNode:n},e),a=Zl(pM,o);return hM(a,Vh)},r_=U.forwardRef((e,t)=>{const[n,r]=Wa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=gM(n),a=Yt(o.getRootProps(),r);return w.jsx(nM,{value:o,children:w.jsx(mn.div,me(F({},a),{ref:t}))})});r_.displayName="CarouselRoot";const EM=180,yM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},TM=({globalClassName:e,className:t,itemMinWidth:n=EM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const g=Array.from(p),b=g.length,y=U.useRef(null),[_,S]=U.useState(0),{width:v}=yv();U.useLayoutEffect(()=>{y.current&&S(y.current.getBoundingClientRect().width)},[v,b]);const C=yM(r),P=n+C,A=_>0?(_+C)/P:1,M=Math.max(1,Math.floor(A));if(b===0)return null;const V=b>M,D=Math.ceil(b/M),K=V?Math.max(1,A):M;return w.jsxs(r_,{ref:y,className:W(e,t,`${j}-carousel`),slidesPerPage:K,slidesPerMove:M,spacing:r,loop:o,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":f,children:[w.jsx(Yb,{className:W(e,`${j}-carousel__item-group`,{"carousel-row-container":!V}),children:g.map((re,Te)=>w.jsx(qb,{index:Te,className:W(e,`${j}-carousel__item`),children:re},Te))}),c&&V&&w.jsxs(jb,{className:W(e,`${j}-carousel__control`),children:[w.jsx(Wb,{className:W(e,`${j}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(J5,{})}),w.jsx(Gb,{className:W(e,`${j}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(Z5,{})})]}),u&&V&&w.jsx(Vb,{className:W(e,`${j}-carousel__indicator-group`),children:Array.from({length:D},(re,Te)=>w.jsx($b,{index:Te,className:W(e,`${j}-carousel__indicator`),"aria-label":`Go to slide group ${Te+1}`},Te))})]})},fp=()=>{const{status:e,entryType:t}=mr(),{messages:n}=Zn(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},bM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return w.jsx("div",{className:W(t,`${j}-suggestion-container ${u}`,e),children:n.map(d=>o?w.jsx(bl,{disabled:r,className:W(t,`${j}-suggestion-button standalone`),onClick:c(d),children:d},d):w.jsx("button",{disabled:r,className:W(t,`${j}-suggestion-button embedded`),onClick:c(d),children:d},d))})},i_=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=mt();if(!r)return null;const o=()=>{Si(!1),ml(!0)};return t?w.jsx(ni,{className:W(n,`${j}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:w.jsx(O1,{})}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(O1,{}),"Minimize"]})},o_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=mt(),r=Va(),o=()=>{gl("modal"),r()};return t?w.jsx(ni,{className:W(n,`${j}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Toggle Modal",onClick:o,icon:w.jsx(zb,{})}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[w.jsx(zb,{}),"Show modal"]})},_M=({isWidgetStandalone:e})=>{var g;const{globalClassName:t,entryMessage:n,resetConversationMessage:r}=mt(),{askCimPrompts:o,messages:a}=Zn(),{isLoading:u,handleSuggestion:c}=Rr(),d=U.useMemo(()=>{const b=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return a.some(_=>_.name==="conversation_reset")&&r||b},[a,n,r]),f=((g=o.message)==null?void 0:g.suggestions)||[],p=(b,y)=>()=>{c(b,y)};return w.jsxs("div",{className:W(t,`${j}-ask-cim-entry-message`,`${j}-message-group`,e?"standalone":"embedded"),children:[w.jsx("p",{className:W(t,`${j}-ask-cim-entry-text`),children:d}),!!(f!=null&&f.length)&&w.jsx("div",{className:W(t,`${j}-ask-cim-suggestions-container`,`${j}-suggestion-container`,e?"standalone":"embedded"),children:f.map(b=>{var y;return w.jsx(bl,{disabled:u,className:W(t,`${j}-ask-cim-suggestion-button`,`${j}-suggestion-button`,e?"standalone":"embedded"),onClick:p(b,((y=o.message)==null?void 0:y.eventSourceId)||""),children:b.displayText},b.displayText)})})]})},SM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=mt();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),g=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return w.jsxs("div",{className:W(r,`${j}-product-tile`,{embedded:!e,standalone:e}),children:[g?w.jsx("a",{href:`${g}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:w.jsx("img",{className:W(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):w.jsx("img",{className:W(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),w.jsxs("div",{className:W(r,`${j}-product-tile-details`,{embedded:!e,standalone:e}),children:[w.jsxs("div",{className:W(r,`${j}-product-tile-content`),children:[u&&w.jsx("p",{className:`${j}-product-tile-brand`,children:u}),g?w.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:W(r,`${j}-product-tile-pdp`),href:`${g}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",w.jsx("span",{className:W(r,`${j}-product-tile-pdp-arrow`),children:"→"})]}):w.jsx("p",{className:W(r,`${j}-product-tile-name`),title:a,children:a})]}),w.jsx("div",{className:W(r,`${j}-product-tile-footer`),children:w.jsx("p",{className:W(r,`${j}-product-tile-price`),children:c})})]})]})},xM=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=mt(),o=t;return n?w.jsxs("div",{className:W(r,`${j}-display-products`),children:[w.jsx("p",{children:o.message}),o.products&&o.products.length>0&&w.jsx(TM,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:o.products.map(a=>{const u=n.getPid(a);return w.jsx(SM,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},wM=({globalClassName:e,message:t,isWidgetStandalone:n})=>w.jsx("div",{className:W(e,`${j}-error-message`,{standalone:n,embedded:!n}),children:w.jsxs("p",{className:W(e,`${j}-error-message-text`,{standalone:n,embedded:!n}),children:[w.jsx(xk,{})," ",t.message||"An error occurred while processing your request."]})}),AM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var _;const{isLoading:a}=Rr(),{messages:u}=Zn(),c=u.find(S=>S.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?cA(f):null,b=a||!d||!(d&&(p===t||t==="ask_cim")),y=S=>{const v=n.suggestions.find(C=>C.displayText===S);v&&o(v,n.eventSourceId||n.id)};return w.jsxs("div",{className:W(e,`${j}-follow-up`),children:[w.jsx("p",{className:W(e,`${j}-text`),children:n.message}),w.jsx(bM,{suggestions:n.suggestions.map(S=>S.displayText),disabled:b,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function s_(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 CM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vM(e,t,n){const o=Ol((n||{}).ignore||[]),a=kM(t);let u=-1;for(;++u<a.length;)VE(e,"text",c);function c(f,p){let g=-1,b;for(;++g<p.length;){const y=p[g],_=b?b.children:void 0;if(o(y,_?_.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const g=p[p.length-1],b=a[u][0],y=a[u][1];let _=0;const v=g.children.indexOf(f);let C=!1,P=[];b.lastIndex=0;let A=b.exec(f.value);for(;A;){const M=A.index,V={index:A.index,input:A.input,stack:[...p,f]};let D=y(...A,V);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=M+1:(_!==M&&P.push({type:"text",value:f.value.slice(_,M)}),Array.isArray(D)?P.push(...D):D&&P.push(D),_=M+A[0].length,C=!0),!b.global)break;A=b.exec(f.value)}return C?(_<f.value.length&&P.push({type:"text",value:f.value.slice(_)}),g.children.splice(v,1,...P)):P=[f],v+P.length}}function kM(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([NM(o[0]),PM(o[1])])}return t}function NM(e){return typeof e=="string"?new RegExp(CM(e),"g"):e}function PM(e){return typeof e=="function"?e:function(){return e}}const hp="phrasing",pp=["autolink","link","image","label"];function OM(){return{transforms:[BM],enter:{literalAutolink:RM,literalAutolinkEmail:mp,literalAutolinkHttp:mp,literalAutolinkWww:mp},exit:{literalAutolink:FM,literalAutolinkEmail:MM,literalAutolinkHttp:LM,literalAutolinkWww:DM}}}function IM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hp,notInConstruct:pp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hp,notInConstruct:pp},{character:":",before:"[ps]",after:"\\/",inConstruct:hp,notInConstruct:pp}]}}function RM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function mp(e){this.config.enter.autolinkProtocol.call(this,e)}function LM(e){this.config.exit.autolinkProtocol.call(this,e)}function DM(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function MM(e){this.config.exit.autolinkEmail.call(this,e)}function FM(e){this.exit(e)}function BM(e){vM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,UM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),HM]],{ignore:["link","linkReference"]})}function UM(e,t,n,r,o){let a="";if(!a_(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!zM(n)))return!1;const u=jM(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 HM(e,t,n,r){return!a_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function zM(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 jM(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=s_(e,"(");let a=s_(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 a_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ao(n)||wl(n))&&(!t||n!==47)}u_.peek=QM;function $M(){this.buffer()}function VM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function qM(){this.buffer()}function YM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function GM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WM(e){this.exit(e)}function XM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function KM(e){this.exit(e)}function QM(){return"["}function u_(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 JM(){return{enter:{gfmFootnoteCallString:$M,gfmFootnoteCall:VM,gfmFootnoteDefinitionLabelString:qM,gfmFootnoteDefinition:YM},exit:{gfmFootnoteCallString:GM,gfmFootnoteCall:WM,gfmFootnoteDefinitionLabelString:XM,gfmFootnoteDefinition:KM}}}function ZM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:u_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
32
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?l_:e8))),f(),d}}function e8(e,t,n){return t===0?e:l_(e,t,n)}function l_(e,t,n){return(n?"":" ")+e}const t8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];c_.peek=s8;function n8(){return{canContainEols:["delete"],enter:{strikethrough:i8},exit:{strikethrough:o8}}}function r8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:t8}],handlers:{delete:c_}}}function i8(e){this.enter({type:"delete",children:[]},e)}function o8(e){this.exit(e)}function c_(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,me(F({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function s8(){return"~"}function a8(e){return e.length}function u8(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||a8,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const S=[],v=[];let C=-1;for(e[p].length>f&&(f=e[p].length);++C<e[p].length;){const P=l8(e[p][C]);if(n.alignDelimiters!==!1){const A=o(P);v[C]=A,(d[C]===void 0||A>d[C])&&(d[C]=A)}S.push(P)}u[p]=S,c[p]=v}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<f;)a[g]=d_(r[g]);else{const S=d_(r);for(;++g<f;)a[g]=S}g=-1;const b=[],y=[];for(;++g<f;){const S=a[g];let v="",C="";S===99?(v=":",C=":"):S===108?v=":":S===114&&(C=":");let P=n.alignDelimiters===!1?1:Math.max(1,d[g]-v.length-C.length);const A=v+"-".repeat(P)+C;n.alignDelimiters!==!1&&(P=v.length+P+C.length,P>d[g]&&(d[g]=P),y[g]=P),b[g]=A}u.splice(1,0,b),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const S=u[p],v=c[p];g=-1;const C=[];for(;++g<f;){const P=S[g]||"";let A="",M="";if(n.alignDelimiters!==!1){const V=d[g]-(v[g]||0),D=a[g];D===114?A=" ".repeat(V):D===99?V%2?(A=" ".repeat(V/2+.5),M=" ".repeat(V/2-.5)):(A=" ".repeat(V/2),M=A):M=" ".repeat(V)}n.delimiterStart!==!1&&!g&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&P==="")&&(n.delimiterStart!==!1||g)&&C.push(" "),n.alignDelimiters!==!1&&C.push(A),C.push(P),n.alignDelimiters!==!1&&C.push(M),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||g!==f-1)&&C.push("|")}_.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return _.join(`
|
|
33
|
+
`)}function l8(e){return e==null?"":String(e)}function d_(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 c8(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()),d8);return o(),u}function d8(e,t,n){return">"+(n?"":" ")+e}function f8(e,t){return f_(e,t.inConstruct,!0)&&!f_(e,t.notInConstruct,!1)}function f_(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 h_(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
34
|
+
`&&f8(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
35
|
+
`}function h8(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 p8(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 m8(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 g8(e,t,n,r){const o=m8(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(p8(e,n)){const g=n.enter("codeIndented"),b=n.indentLines(a,E8);return g(),b}const c=n.createTracker(r),d=o.repeat(Math.max(h8(a,o)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const g=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,F({before:p,after:" ",encode:["`"]},c.current()))),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,F({before:p,after:`
|
|
36
36
|
`,encode:["`"]},c.current()))),g()}return p+=c.move(`
|
|
37
37
|
`),a&&(p+=c.move(a+`
|
|
38
|
-
`)),p+=c.move(d),f(),p}function
|
|
39
|
-
`},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,F({before:f,after:o},d.current()))),f+=d.move(o),c()),u(),f}function
|
|
38
|
+
`)),p+=c.move(d),f(),p}function E8(e,t,n){return(n?"":" ")+e}function gp(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 y8(e,t,n,r){const o=gp(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),F({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,F({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":`
|
|
39
|
+
`},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,F({before:f,after:o},d.current()))),f+=d.move(o),c()),u(),f}function T8(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 tu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pc(e,t,n){const r=ts(e),o=ts(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}}p_.peek=b8;function p_(e,t,n,r){const o=T8(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,F({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=pc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=tu(f)+d.slice(1));const g=d.charCodeAt(d.length-1),b=pc(r.after.charCodeAt(0),g,o);b.inside&&(d=d.slice(0,-1)+tu(g));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function b8(e,t,n){return n.options.emphasis||"*"}function _8(e,t){let n=!1;return Rl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Zf}),!!((!e.depth||e.depth<3)&&jf(e)&&(t.options.setext||n))}function S8(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(_8(e,n)){const p=n.enter("headingSetext"),g=n.enter("phrasing"),b=n.containerPhrasing(e,me(F({},a.current()),{before:`
|
|
40
40
|
`,after:`
|
|
41
41
|
`}));return g(),p(),b+`
|
|
42
42
|
`+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
43
43
|
`))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,F({before:"# ",after:`
|
|
44
|
-
`},a.current()));return/^[\t ]/.test(f)&&(f=tu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}
|
|
45
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:d,tableRow:c}};function u(y,_,S,
|
|
46
|
-
`))}function d(y,_,S,A){const v=S.enter("tableCell"),P=S.enter("phrasing"),C=S.containerPhrasing(y,me(F({},A),{before:a,after:a}));return P(),v(),C}function f(y,_){return a8(y,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function p(y,_,S){const A=y.children;let v=-1;const P=[],C=_.enter("table");for(;++v<A.length;)P[v]=g(A[v],_,S);return C(),P}function g(y,_,S){const A=y.children;let v=-1;const P=[],C=_.enter("tableRow");for(;++v<A.length;)P[v]=d(A[v],y,_,S);return C(),P}function b(y,_,S){let A=x_.inlineCode(y,_,S);return S.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function W8(){return{exit:{taskListCheckValueChecked:C_,taskListCheckValueUnchecked:C_,paragraph:K8}}}function X8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Q8}}}function C_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function K8(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 Q8(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=x_.listItem(e,t,n,F(F({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function J8(){return[PM(),QM(),t8(),z8(),W8()]}function Z8(e){return{extensions:[OM(),JM(e),n8(),G8(e),X8()]}}const eF={tokenize:sF,partial:!0},A_={tokenize:aF,partial:!0},v_={tokenize:uF,partial:!0},k_={tokenize:lF,partial:!0},tF={tokenize:cF,partial:!0},N_={name:"wwwAutolink",tokenize:iF,previous:O_},P_={name:"protocolAutolink",tokenize:oF,previous:I_},ui={name:"emailAutolink",tokenize:rF,previous:R_},Vr={};function nF(){return{text:Vr}}let bo=48;for(;bo<123;)Vr[bo]=ui,bo++,bo===58?bo=65:bo===91&&(bo=97);Vr[43]=ui,Vr[45]=ui,Vr[46]=ui,Vr[95]=ui,Vr[72]=[ui,P_],Vr[104]=[ui,P_],Vr[87]=[ui,N_],Vr[119]=[ui,N_];function rF(e,t,n){const r=this;let o,a;return u;function u(g){return!Tp(g)||!R_.call(r,r.previous)||bp(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return Tp(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(tF,p,f)(g):g===45||g===95||hn(g)?(a=!0,e.consume(g),d):p(g)}function f(g){return e.consume(g),o=!0,d}function p(g){return a&&o&&xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function iF(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!O_.call(r,r.previous)||bp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(eF,e.attempt(A_,e.attempt(v_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function oF(e,t,n){const r=this;let o="",a=!1;return u;function u(g){return(g===72||g===104)&&I_.call(r,r.previous)&&!bp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(xn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),a?f:(a=!0,d)):n(g)}function f(g){return g===null||xl(g)||ft(g)||so(g)||wl(g)?n(g):e.attempt(A_,e.attempt(v_,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function sF(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 aF(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(k_,d,c)(f):f===null||ft(f)||so(f)||f!==45&&wl(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 uF(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(k_,t,a)(u):u===null||ft(u)||so(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function lF(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)||so(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ft(c)||so(c)?t(c):r(c)}function a(c){return xn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):xn(c)?(e.consume(c),u):n(c)}}function cF(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return hn(a)?n(a):t(a)}}function O_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function I_(e){return!xn(e)}function R_(e){return!(e===47||Tp(e))}function Tp(e){return e===43||e===45||e===46||e===95||hn(e)}function bp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const dF={tokenize:TF,partial:!0};function fF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:gF,continuation:{tokenize:EF},exit:yF}},text:{91:{name:"gfmFootnoteCall",tokenize:mF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:hF,resolveTo:pF}}}}function hF(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=gr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function pF(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 mF(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(g){if(a>999||g===93&&!u||g===null||g===91||ft(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(gr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return ft(g)||(u=!0),a++,e.consume(g),g===92?p:f}function p(g){return g===91||g===92||g===93?(e.consume(g),a++,f):f(g)}}function gF(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 S=e.exit("gfmFootnoteDefinitionLabelString");return a=gr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ft(_)||(c=!0),u++,e.consume(_),_===92?g:p}function g(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),rt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function EF(e,t,n){return e.check(Ca,t,e.attempt(dF,t,n))}function yF(e){e.exit("gfmFootnoteDefinition")}function TF(e,t,n){const r=this;return rt(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 bF(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)},g={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",g,c]],y=c.parser.constructs.insideSpan.null;y&&zn(b,b.length,0,Cl(y,u.slice(f+1,d),c)),zn(b,b.length,0,[["exit",g,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),zn(u,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let g=0;return b;function b(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const S=ts(f);if(_===126)return g>1?d(_):(u.consume(_),g++,y);if(g<2&&!n)return d(_);const A=u.exit("strikethroughSequenceTemporary"),v=ts(_);return A._open=!v||v===2&&!!S,A._close=!S||S===2&&!!v,c(_)}}}class _F{constructor(){this.map=[]}add(t,n,r){SF(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 SF(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 xF(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 wF(){return{flow:{null:{name:"table",tokenize:CF,resolveAll:AF}}}}function CF(e,t,n){const r=this;let o=0,a=0,u;return c;function c($){let ee=r.events.length-1;for(;ee>-1;){const le=r.events[ee][1].type;if(le==="lineEnding"||le==="linePrefix")ee--;else break}const ce=ee>-1?r.events[ee][1].type:null,he=ce==="tableHead"||ce==="tableRow"?D:d;return he===D&&r.parser.lazy[r.now().line]?n($):he($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):Be($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):et($)?rt(e,p,"whitespace")($):(a+=1,u&&(u=!1,o+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g($)))}function g($){return $===null||$===124||ft($)?(e.exit("data"),p($)):(e.consume($),$===92?b:g)}function b($){return $===92||$===124?(e.consume($),g):g($)}function y($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),u=!1,et($)?rt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):_($))}function _($){return $===45||$===58?A($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),S):q($)}function S($){return et($)?rt(e,A,"whitespace")($):A($)}function A($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),v):$===45?(a+=1,v($)):$===null||Be($)?B($):q($)}function v($){return $===45?(e.enter("tableDelimiterFiller"),P($)):q($)}function P($){return $===45?(e.consume($),P):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C($))}function C($){return et($)?rt(e,B,"whitespace")($):B($)}function B($){return $===124?_($):$===null||Be($)?!u||o!==a?q($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):q($)}function q($){return n($)}function D($){return e.enter("tableRow"),Q($)}function Q($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),Q):$===null||Be($)?(e.exit("tableRow"),t($)):et($)?rt(e,Q,"whitespace")($):(e.enter("data"),re($))}function re($){return $===null||$===124||ft($)?(e.exit("data"),Q($)):(e.consume($),$===92?Te:re)}function Te($){return $===92||$===124?(e.consume($),re):re($)}}function AF(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,g;const b=new _F;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(L_(b,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,g=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.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],g=mc(b,t,a,o,void 0,g),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],g=mc(b,t,a,o,void 0,g)),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],g=mc(b,t,a,o,n,g)):u[1]!==0&&(g=mc(b,t,u,o,n,g)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&L_(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=xF(t.events,n))}return e}function mc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},ks(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=ks(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=ks(t.events,n[2]),p=ks(t.events,n[3]),g={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,S=n[3]-n[2]-1;e.add(_,S,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return o!==void 0&&(a.end=Object.assign({},ks(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function L_(e,t,n,r,o){const a=[],u=ks(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 ks(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const vF={name:"tasklistCheck",tokenize:NF};function kF(){return{text:{91:vF}}}function NF(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 Be(d)?t(d):et(d)?e.check({tokenize:PF},t,n)(d):n(d)}}function PF(e,t,n){return rt(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function OF(e){return cE([nF(),fF(),bF(e),wF(),kF()])}const IF={};function RF(e){const t=this,n=e||IF,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(OF(n)),a.push(J8()),u.push(Z8(n))}const gc=()=>w.jsx("span",{className:`${j}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),_p=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(ey,{remarkPlugins:[RF],rehypePlugins:[fT],components:{h1:({children:o})=>w.jsx("h1",{className:W(e,`${j}-header h1`),children:o}),h2:({children:o})=>w.jsx("h2",{className:W(e,`${j}-header h2`),children:o}),h3:({children:o})=>w.jsx("h3",{className:W(e,`${j}-header h3`),children:o}),ul:({children:o})=>w.jsx("ul",{className:W(e,`${j}-ul`),children:o}),ol:({children:o})=>w.jsx("ol",{className:W(e,`${j}-ol`),children:o}),li:({children:o})=>w.jsx("li",{className:W(e,`${j}-li`),children:o}),a:({href:o,children:a})=>w.jsx(TT,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>w.jsx("div",{className:W(e,`${j}-table-container`),children:w.jsx("table",{className:W(e,`${j}-table`),children:o})}),thead:({children:o})=>w.jsx("thead",{className:W(e,`${j}-thead`),children:o}),tbody:({children:o})=>w.jsx("tbody",{className:W(e,`${j}-tbody`),children:o}),tr:({children:o})=>w.jsx("tr",{className:W(e,`${j}-tr`),children:o}),th:({children:o})=>w.jsx("th",{className:W(e,`${j}-th`),children:o}),td:({children:o})=>w.jsx("td",{className:W(e,`${j}-td`),children:o}),span:({className:o,children:a})=>o===`${j}-blinking-cursor`?w.jsx(gc,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${j}-blinking-cursor'></span>`:"")}),LF=({globalClassName:e,message:t})=>{const[n,r]=H.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return w.jsxs("div",{children:[w.jsxs("div",{className:W(e,`${j}-progress-message`,"standalone"),children:[w.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","standalone"),children:w.jsx(P1,{})}),w.jsx("p",{className:W(e,`${j}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&w.jsxs(w.Fragment,{children:[w.jsx(bl,{className:W(e,`${j}-thought-context-button`),onClick:c,children:n?w.jsxs(w.Fragment,{children:["Hide ",w.jsx(Sk,{})]}):w.jsxs(w.Fragment,{children:["Context ",w.jsx(xk,{})]})}),n&&w.jsx("div",{className:W(e,`${j}-thought-container`),children:a&&w.jsx("p",{className:W(e,`${j}-progress-thought`),children:t.thought})})]})]})},DF=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?w.jsx(LF,{globalClassName:e,message:t}):w.jsxs("div",{className:W(e,`${j}-progress-message`,"embedded"),title:t.message,children:[w.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","embedded"),children:w.jsx(P1,{})}),w.jsx("i",{className:W(e,`${j}-progress-text`,"embedded"),children:t.message})]}),MF=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return w.jsxs("div",{className:W(e,`${j}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&w.jsxs("div",{className:W(e,`${j}-refined-event-query`,{embedded:!n,standalone:n}),children:[w.jsx("span",{className:W(e,`${j}-message-icon`,`${j}-refined-event-icon`,{embedded:!n,standalone:n}),children:w.jsx(Xo,{role:"img"})}),w.jsx("p",{className:W(e,`${j}-text`,`${j}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),w.jsx(_p,{text:t.message})]})},D_=e=>{var d,f;const{configModule:t}=mt(),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,g)=>p+g.length,0);return{facetFiltersList:u,filterCount:c}},Ec=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>w.jsx("span",{className:W(t,`${j}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),M_=({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 w.jsxs("div",{className:W(e,`${j}-facets`),children:[w.jsx("p",{className:W(e,`${j}-facet-category`),children:c}),w.jsx("p",{className:W(e,`${j}-facet-values`),children:d})]},c)})},nu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>w.jsx("span",{className:W(e,`${j}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),FF=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=D_(t),c=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?w.jsxs("div",{className:W(e,`${j}-user-message standalone`),children:[w.jsxs("div",{className:W(e,`${j}-user-message-row standalone`),children:[d?w.jsx("img",{className:W(e,`${j}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-message-icon standalone`),children:w.jsx(I1,{})}),w.jsx("p",{className:W(e,`${j}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&w.jsx(Ec,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),w.jsx(M_,{globalClassName:e,facetFiltersList:a,message:t}),w.jsx(nu,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):w.jsxs("div",{className:W(e,`${j}-user-message embedded`),children:[w.jsxs("div",{className:W(e,`${j}-user-message-row embedded`),children:[d?w.jsx("img",{className:W(e,`${j}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-message-icon embedded`),children:w.jsx(I1,{})}),w.jsx("p",{className:W(e,`${j}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&w.jsx(Ec,{isWidgetStandalone:!1,filterCount:u})]}),w.jsx(nu,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},BF=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>w.jsxs("div",{className:W(e,`${j}-user-search standalone`),children:[w.jsxs("div",{children:[w.jsxs("div",{className:W(e,`${j}-user-search-query standalone`),children:[d?w.jsx("img",{className:W(e,`${j}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-search-icon standalone`),children:w.jsx(Xo,{})}),w.jsx("p",{className:W(e,`${j}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&w.jsx(Ec,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),w.jsx(M_,{globalClassName:e,facetFiltersList:u,message:a})]}),w.jsx(nu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),UF=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=D_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:g,queryLabel:b}=H.useMemo(()=>{var S,A,v;const _=typeof((S=r==null?void 0:r.clientContext)==null?void 0:S.cimLabel)=="string"?(A=r==null?void 0:r.clientContext)==null?void 0:A.cimLabel:r==null?void 0:r.label;switch(o){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(v=r==null?void 0:r.browseParams)==null?void 0:v.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 g?n?w.jsx(BF,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:g,queryLabel:b,facetFiltersList:u,filterCount:c}):w.jsxs("div",{className:W(e,`${j}-user-search embedded`),children:[w.jsxs("div",{className:W(e,`${j}-user-search-query embedded`),children:[f?w.jsx("img",{className:W(e,`${j}-user-search-image embedded`),src:f,alt:b||g,loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-search-icon embedded`),children:w.jsx(Xo,{})}),w.jsx("p",{className:W(e,`${j}-text bold embedded`),children:b||g}),u.length>0&&w.jsx(Ec,{isWidgetStandalone:!1,filterCount:c})]}),w.jsx(nu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},F_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var b;const{isLoading:c,isResponseLoading:d}=Rr(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,g=!!((b=e.request)!=null&&b.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return g?w.jsx(FF,{globalClassName:t,isWidgetStandalone:a,message:e}):w.jsx(UF,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return w.jsx(MF,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return w.jsx(wM,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return w.jsx(_p,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return w.jsx(xM,{message:e,isWidgetStandalone:a});case"display_products":return w.jsx(SM,{message:e,isWidgetStandalone:a});case"progress":return w.jsx(DF,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:w.jsxs(w.Fragment,{children:[w.jsx("p",{className:W(t,`${j}-reset-message`),children:"This conversation has been reset."}),w.jsx("p",{className:W(t,`${j}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},HF=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=mt(),{groupedMessages:a}=Zn(),{entryType:u}=mr();return w.jsxs(w.Fragment,{children:[u==="ask_cim"&&w.jsx(bM,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),w.jsxs("div",{className:W(n,`${j}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>w.jsx("div",{className:`${j}-message-group-child`,children:w.jsx(F_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),w.jsx(nu,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return w.jsx("div",{className:W(n,`${j}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:w.jsx(F_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},zF=({isOpen:e}={})=>{const{messages:t}=Rr(),n=H.useRef(null);return H.useEffect(()=>{n.current&&n.current.scrollIntoView({behavior:"smooth",block:"end"})},[t]),H.useEffect(()=>{e&&n.current&&n.current.scrollIntoView(!0)},[e]),n},jF={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Sp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=zF({isOpen:e});return w.jsxs(w.Fragment,{children:[w.jsx(HF,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&w.jsx("div",{style:F(F({},jF),o),children:w.jsx(gc,{})}),w.jsx("div",{ref:a})]})},B_=()=>{const{globalClassName:e,themeVariables:t}=mt(),{copilot:n,isLoading:r,handleUserInput:o,handleSuggestion:a,resetConversation:u}=Rr();return fp()?n?w.jsxs("div",{className:W(e,`${j}-container`,`${j}-embedded-chat`),style:t,children:[w.jsx("div",{className:W(e,`${j}-message-container`,"embedded"),children:w.jsx(Sp,{isWidgetStandalone:!1,isLoading:r,handleSuggestionClick:a})}),w.jsx(Nh,{componentType:"chat",className:"embedded-chat",isLoading:r,onSubmit:o}),w.jsx("div",{className:W(`${j}-embedded-chat-menu`),children:w.jsxs(dp,{componentType:"chat",children:[w.jsx(i_,{componentType:"chat"}),w.jsx(Ph,{componentType:"chat",onClearChat:u})]})})]}):w.jsx("div",{children:"Loading Copilot..."}):null},[$F,VF]=go({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),qF=e=>Wa()(e,["lazyMount","unmountOnExit"]),[YF,ru]=go({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),U_=H.forwardRef((e,t)=>{const n=ru(),r=VF(),o=Gh(me(F({},r),{present:n.open})),a=Yt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:w.jsx(mn.div,me(F({},a),{ref:ec(o.ref,t)}))});U_.displayName="DialogBackdrop";const xp=H.forwardRef((e,t)=>{const n=ru(),r=Ga(),o=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(mn.div,me(F({},o),{ref:ec(r.ref,t)}))});xp.displayName="DialogContent";const wp=H.forwardRef((e,t)=>{const n=ru(),r=Yt(n.getDescriptionProps(),e);return w.jsx(mn.div,me(F({},r),{ref:t}))});wp.displayName="DialogDescription";const Cp=H.forwardRef((e,t)=>{const n=ru(),r=Yt(n.getPositionerProps(),e);return Ga().unmounted?null:w.jsx(mn.div,me(F({},r),{ref:t}))});Cp.displayName="DialogPositioner";var GF=Eo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),_o=GF.build(),H_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},z_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},j_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},vp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},kp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},$_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},yc=e=>e.getById(Ap(e)),WF=e=>e.getById(H_(e)),XF=e=>e.getById(z_(e)),KF=e=>e.getById(j_(e)),QF=e=>e.getById(vp(e)),JF=e=>e.getById(kp(e)),ZF=e=>e.getById($_(e));function eB(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(me(F({},_o.trigger.attrs),{dir:a("dir"),id:j_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Ap(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(me(F({},_o.backdrop.attrs),{dir:a("dir"),hidden:!d,id:z_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(F({},_o.positioner.attrs),{dir:a("dir"),id:H_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(me(F({},_o.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Ap(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:vp(u),"aria-describedby":f.description?kp(u):void 0}))},getTitleProps(){return t.element(me(F({},_o.title.attrs),{dir:a("dir"),id:vp(u)}))},getDescriptionProps(){return t.element(me(F({},_o.description.attrs),{dir:a("dir"),id:kp(u)}))},getCloseTriggerProps(){return t.button(me(F({},_o.closeTrigger.attrs),{dir:a("dir"),id:$_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var tB={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>ZF(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return vb(()=>yc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[KF(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 Ib(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Pb(()=>yc(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")?yb(()=>[yc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){qt(()=>{e.set("rendered",{title:!!QF(t),description:!!JF(t)})})},syncZIndex({scope:e}){qt(()=>{const t=yc(e);if(!t)return;const n=ms(t);[WF(e),XF(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})}}}};Ts()(["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 nB=e=>{const t=H.useId(),{getRootNode:n}=fc(),{dir:r}=cp(),o=F({id:t,getRootNode:n,dir:r},e),a=Zl(tB,o);return eB(a,Vh)},V_=e=>{const[t,c]=WT(e),d=c,{children:n}=d,r=ln(d,["children"]),[o]=qF(t),a=nB(r),u=Gh(Yt({present:a.open},t));return w.jsx(YF,{value:a,children:w.jsx($F,{value:o,children:w.jsx(qT,{value:u,children:n})})})},Np=H.forwardRef((e,t)=>{const n=ru(),r=Yt(n.getTitleProps(),e);return w.jsx(mn.h2,me(F({},r),{ref:t}))});Np.displayName="DialogTitle";const q_=e=>{var d;const{children:t,disabled:n}=e,[r,o]=H.useState((d=e.container)==null?void 0:d.current),a=H.useSyncExternalStore(iB,()=>!1,()=>!0),{getRootNode:u}=fc();if(H.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return w.jsx(w.Fragment,{children:t});const c=r!=null?r:rB(u);return w.jsx(w.Fragment,{children:H.Children.map(t,f=>Wo.createPortal(f,c))})},rB=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return po(n)?n:Fr(t).body},iB=()=>()=>{},oB=({componentType:e,isIcon:t})=>{const{globalClassName:n}=mt(),{dialogPosition:r}=mr(),o=Va(),a=r==="bottom-left",u=()=>{Cf(a?"bottom-right":"bottom-left"),o()},c=a?X5:W5,d=a?"Move right":"Move left";return t?w.jsx(ni,{className:W(n,`${j}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,onClick:u,icon:w.jsx(c,{})}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(c,{}),d]})},Y_=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=mt(),{mode:o,status:a,dialogPosition:u,isDialogFullHeight:c,dialogWidth:d}=mr(),{copilot:f,isLoading:p,handleUserInput:g,handleSuggestion:b,resetConversation:y}=Rr(),_=fp(),{isOpen:S}=a||{},A=o==="standalone",v=()=>{bi(!1)};return _?f?w.jsx(V_,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:S,children:w.jsx(q_,{children:w.jsx(Cp,{className:W(n,`${j}-container`,`${j}-dialog`,u,c&&"full-height"),style:F(F({},r),d&&{width:d}),children:w.jsxs(xp,{className:W(n,`${j}-dialog-content`,{standalone:A,embedded:!A}),children:[w.jsxs("div",{className:W(n,`${j}-dialog-header`,{standalone:A,embedded:!A}),children:[e&&w.jsx("img",{alt:"",role:"img",className:W(n,`${j}-dialog-logo`,{standalone:A,embedded:!A}),src:e}),w.jsx(Np,{className:W(n,`${j}-dialog-title`,{standalone:A,embedded:!A}),children:t}),w.jsxs("div",{className:W(n,`${j}-dialog-controls`),children:[w.jsx(i_,{componentType:"dialog",isIcon:!0}),w.jsxs(dp,{componentType:"dialog",children:[w.jsx(oB,{componentType:"dialog"}),w.jsx(r_,{componentType:"dialog"}),w.jsx(Ph,{componentType:"dialog",onClearChat:y})]}),w.jsx(Pf,{className:`dialog ${n}`,onClick:v})]})]}),w.jsx(wp,{className:W(n,`${j}-message-container`,{standalone:A,embedded:!A}),children:w.jsx(Sp,{isWidgetStandalone:A,isLoading:p,isOpen:S,handleSuggestionClick:b})}),w.jsx(Nh,{componentType:"dialog",isLoading:p,onSubmit:g})]})})})}):w.jsx("div",{children:"Loading Copilot..."}):null},sB=({componentType:e,isIcon:t})=>{const{globalClassName:n}=mt(),{isModalFullscreen:r}=mr(),o=Va(),a=()=>{wf(!r),o()},u=r?wk:Ck,c="Toggle Fullscreen";return t?w.jsx(ni,{ariaLabel:c,title:c,className:W(n,`${j}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),c]})},aB=({componentType:e,isIcon:t})=>{const{globalClassName:n}=mt(),{previousComponentType:r}=mr(),o=Va(),a=()=>{gl(r||"dialog"),o()};return t?w.jsx(ni,{className:W(n,`${j}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Toggle Dialog",onClick:a,icon:w.jsx(Ub,{})}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(Ub,{}),"Show ",r||"dialog"]})},G_=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=mt(),{mode:o,status:a,isModalFullscreen:u}=mr(),{copilot:c,isLoading:d,handleUserInput:f,handleSuggestion:p,resetConversation:g}=Rr(),{isOpen:b}=a||{},y=o==="standalone",_=fp(),S=({open:v})=>{bi(v)},A=()=>{bi(!1)};return _?c?w.jsx(V_,{lazyMount:!0,open:b,onOpenChange:S,children:w.jsx(q_,{children:w.jsxs("div",{className:W(n,`${j}-modal-container`),style:r,children:[w.jsx(U_,{className:W(n,`${j}-modal-backdrop`)}),w.jsx(Cp,{className:W(n,`${j}-container`,`${j}-modal`,{fullscreen:u,standalone:y,embedded:!y}),children:w.jsxs(xp,{className:W(n,`${j}-modal-content`,{standalone:y,embedded:!y}),children:[w.jsxs("div",{className:W(n,`${j}-modal-header`,{standalone:y,embedded:!y}),children:[e&&w.jsx("img",{alt:"",role:"img",className:W(n,`${j}-modal-logo`,{standalone:y,embedded:!y}),src:e}),w.jsx(Np,{className:W(n,`${j}-modal-title`,{standalone:y,embedded:!y}),children:t}),w.jsxs("div",{className:W(n,`${j}-modal-controls`),children:[w.jsx(aB,{componentType:"modal",isIcon:!0}),w.jsxs(dp,{componentType:"modal",children:[w.jsx(sB,{componentType:"modal"}),w.jsx(r_,{componentType:"modal"}),w.jsx(Ph,{componentType:"modal",onClearChat:g})]}),w.jsx(Pf,{className:`modal ${n}`,onClick:A})]})]}),w.jsx(wp,{className:W(n,`${j}-message-container`,{standalone:y,embedded:!y}),children:w.jsx(Sp,{isWidgetStandalone:y,isLoading:d,isOpen:b,handleSuggestionClick:p,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),w.jsx(Nh,{componentType:"modal",isLoading:d,onSubmit:f})]})})]})})}):w.jsx("div",{children:"Loading Copilot..."}):null},uB=()=>{const e=mr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(hk,{}):t==="dialog"?w.jsx(Y_,{}):t==="modal"?w.jsx(G_,{}):w.jsx(B_,{})},lB=()=>{const{copilot:e}=Zn(),{entryType:t,activePromptsId:n,params:r}=_i(),{setIsInitialized:o,setIsOpen:a,setIsInline:u,setElementId:c,setEntryType:d,setActivePromptsId:f,setParams:p,setPromptsMessage:g,setResponseMessage:b,setIsResponseLoading:y}=g1(),{getCopilotSuggestions:_}=y1();H.useEffect(()=>{const C=B=>{const{property:q,value:D}=B.detail||{};!q||D===void 0||(q==="isOpen"&&a(D),q==="isInline"&&u(D),q==="elementId"&&c(D),q==="entryType"&&d(D),q==="params"&&p(D))};return Iv(C),()=>{Rv(C)}},[a,u,c,d,p]);const S=H.useCallback(C=>{if(!t||!C)return;_(C,t,q=>{f(q.id)})},[t,_,f]);H.useEffect(()=>{!e||!t||!r||S(r)},[e,t,r,S]);const A=H.useCallback(C=>{C.eventSourceId===n&&(g(C),f(C.id),o(!0))},[n,g,f,o]),v=H.useCallback(C=>{(C==null?void 0:C.eventSourceId)===n&&(b(C),y(!1))},[n,b,y]),P=H.useCallback(()=>{o(!0),y(!1)},[o,y]);return H.useEffect(()=>{if(e)return e.on("follow_up",A),e.on("inquiry",v),e.on("error",P),()=>{e.off("follow_up",A),e.off("inquiry",v),e.off("error",P)}},[e,A,v,P]),null},cB=({sendCopilotPrompt:e})=>{const{globalClassName:t}=mt(),{placeholder:n,isResponseLoading:r}=_i(),[o,a]=H.useState(""),u=c=>{const d=o.trim();d&&(c.preventDefault(),e(d),a(""))};return w.jsxs("form",{className:W(t,`${j}-prompts-input-container`),name:`${j}-prompts-form`,onSubmit:u,children:[w.jsx("label",{htmlFor:`${j}-prompts-input`,"aria-label":n||"Ask Copilot",children:w.jsx(J5,{className:W(t,`${j}-prompts-input-icon`)})}),w.jsx("input",{id:`${j}-prompts-input`,className:W(t,`${j}-prompts-input`),name:`${j}-prompts-input`,placeholder:n||"Ask Copilot",type:"text",disabled:r,value:o,onChange:c=>a(c.target.value)}),w.jsx(ni,{className:W(t,`${j}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Xo,{}),disabled:r})]})},dB=({sendCopilotPrompt:e})=>{var c,d;const{globalClassName:t}=mt(),{promptsMessage:n,isResponseLoading:r,isInitialized:o}=_i(),a=f=>()=>{const p=f.displayText.trim();p&&e(p)},u=!!(n!=null&&n.suggestions&&((c=n==null?void 0:n.suggestions)!=null&&c.length));return w.jsxs("div",{className:W(t,`${j}-prompts-button-group`),children:[!o&&w.jsx(gc,{}),o&&u&&((d=n==null?void 0:n.suggestions)==null?void 0:d.map(f=>w.jsx("button",{className:W(t,`${j}-prompts-button`),disabled:r,onClick:a(f),children:f.displayText},f.displayText)))]})},fB=()=>{const{globalClassName:e}=mt(),{isInline:t,userPrompt:n}=_i();return!n||!t?null:w.jsx("div",{className:W(e,`${j}-prompts-user-message-container`),children:w.jsx("p",{className:W(e,`${j}-prompts-user-message`),children:n})})},hB=()=>{const{globalClassName:e,openLinksInNewTab:t}=mt(),{isInline:n,responseMessage:r,isResponseLoading:o}=_i();return!n||!r&&!o?null:o?w.jsx(gc,{}):r?w.jsx("div",{className:W(e,`${j}-prompts-response-container`,`${j}-message-container`),children:w.jsx(_p,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},pB=()=>{const{globalClassName:e,themeVariables:t}=mt(),{connected:n,copilot:r}=Zn(),{handleCopilotRequestAck:o}=Go(),{status:{isOpen:a}}=mr(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p}=_i(),{setActivePromptsId:g,setUserPrompt:b,setResponseMessage:y,setIsResponseLoading:_}=g1(),[S,A]=H.useState(null);H.useEffect(()=>{if(!d||S)return;const P=document.getElementById(d);P&&A(P)},[d,S]);const v=H.useCallback(P=>{if(!r||!f||!p)return;const C=q=>{c?(y(null),b(P),g(q.id),_(!0)):(a||bi(!0),o(q))},B={userPrompt:P,clientContext:F({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(B,C);break;case"search":r.search(F({searchParams:p},B),C);break;case"browse":r.browse(F({browseParams:p},B),C);break;case"pdp":r.productView(F(F({},p),B),C);break}},[r,c,f,p,a,g,y,b,_,o]);return!n||!u||!S?null:Wo.createPortal(w.jsxs("div",{className:W(e,`${j}-prompts-extension-container`),style:t,children:[w.jsx(cB,{sendCopilotPrompt:v}),w.jsx(dB,{sendCopilotPrompt:v}),w.jsxs("div",{className:W(e,`${j}-prompts-extension-messages-container`),children:[w.jsx(fB,{}),w.jsx(hB,{})]})]}),S)},mB=()=>w.jsxs(w.Fragment,{children:[w.jsx(lB,{}),w.jsx(pB,{})]}),Pp=e=>w.jsxs(T1,me(F({},e),{children:[w.jsx(uB,{}),w.jsx(mB,{})]}));var Tc={},W_;function gB(){if(W_)return Tc;W_=1;var e=w1();return Tc.createRoot=e.createRoot,Tc.hydrateRoot=e.hydrateRoot,Tc}var X_=gB();const EB=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=ln(o,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const g of d)if(g.type==="childList"&&g.addedNodes.length)for(const b of g.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Yo(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=X_.createRoot(b))==null||p.render(w.jsx(Pp,F({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Yo(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c};return Object.freeze(Object.defineProperty({__proto__:null,CopilotDialog:Y_,CopilotEmbed:B_,CopilotModal:G_,CopilotWidget:Pp,CopilotWidgetProvider:T1,eventHandlers:{search:qv,browse:vv,pdp:{setPdpContext:n1,updatePdpProductId:Nv,updatePdpLink:Pv},components:{setEntryType:ga,toggleWidgetOpen:bi,toggleWidgetMinimized:ml,toggleModalFullscreen:wf,setWidgetType:gl,setWidgetDialogPosition:Cf,togglePromptsExtensionOpen:i1,togglePromptsExtensionInline:o1,loadPromptsComponent:Bv,getAskCimPrompts:Lv,getSearchPrompts:Dv,getBrowsePrompts:Mv,getProductViewPrompts:Fv},session:Uv},injectCopilotWidget:r=>{var o=r,{timeout:e,elementId:t}=o,n=ln(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Yo(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Yo(!0,"warn","Container element not found for id:",t),Yo(!0,"warn","Beginning observation for element"),EB(F({elementId:t,timeout:e},n));return}X_.createRoot(a).render(w.jsx(Pp,F({},n)))},state:()=>Object.freeze({search:Object.freeze(_t.state),browse:Object.freeze(ut.state),pdp:Object.freeze(pr.state),isConnected:Ze.state.connected,isOpen:Ze.isOpen,entryType:Ze.entryType}),useCopilot:Rr},Symbol.toStringTag,{value:"Module"}))}));
|
|
44
|
+
`},a.current()));return/^[\t ]/.test(f)&&(f=tu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}m_.peek=x8;function m_(e){return e.value||""}function x8(){return"<"}g_.peek=w8;function g_(e,t,n,r){const o=gp(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,F({before:f,after:"]"},d.current()))),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,F({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,F({before:f,after:o},d.current()))),f+=d.move(o),c()),f+=d.move(")"),u(),f}function w8(){return"!"}E_.peek=A8;function E_(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,F({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==g?d+=c.move(g+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function A8(){return"!"}y_.peek=C8;function y_(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 C8(){return"`"}function T_(e,t){const n=jf(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))}b_.peek=v8;function b_(e,t,n,r){const o=gp(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(T_(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let g=u.move("<");return g+=u.move(n.containerPhrasing(e,F({before:g,after:">"},u.current()))),g+=u.move(">"),c(),n.stack=p,g}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,F({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,F({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+o),f+=u.move(n.safe(e.title,F({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),c(),f}function v8(e,t,n){return T_(e,n)?"<":"["}__.peek=k8;function __(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,F({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==g?d+=c.move(g+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function k8(){return"["}function Ep(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function N8(e){const t=Ep(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function P8(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 S_(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 O8(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?P8(n):Ep(n);const c=e.ordered?u==="."?")":".":N8(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),S_(n)===u&&p){let g=-1;for(;++g<e.children.length;){const b=e.children[g];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),f}function I8(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 R8(e,t,n,r){const o=I8(n);let a=n.bulletCurrent||Ep(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(g,b,y){return b?(y?"":" ".repeat(u))+g:(y?a:a+" ".repeat(u-a.length))+g}}function L8(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const D8=Ol(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function M8(e,t,n,r){return(e.children.some(function(u){return D8(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function F8(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}x_.peek=B8;function x_(e,t,n,r){const o=F8(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,F({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=pc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=tu(f)+d.slice(1));const g=d.charCodeAt(d.length-1),b=pc(r.after.charCodeAt(0),g,o);b.inside&&(d=d.slice(0,-1)+tu(g));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function B8(e,t,n){return n.options.strong||"*"}function U8(e,t,n,r){return n.safe(e.value,r)}function H8(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 z8(e,t,n){const r=(S_(n)+(n.options.ruleSpaces?" ":"")).repeat(H8(n));return n.options.ruleSpaces?r.slice(0,-1):r}const w_={blockquote:c8,break:h_,code:g8,definition:y8,emphasis:p_,hardBreak:h_,heading:S8,html:m_,image:g_,imageReference:E_,inlineCode:y_,link:b_,linkReference:__,list:O8,listItem:R8,paragraph:L8,root:M8,strong:x_,text:U8,thematicBreak:z8};function j8(){return{enter:{table:$8,tableData:A_,tableHeader:A_,tableRow:q8},exit:{codeText:Y8,table:V8,tableData:yp,tableHeader:yp,tableRow:yp}}}function $8(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 V8(e){this.exit(e),this.data.inTable=void 0}function q8(e){this.enter({type:"tableRow",children:[]},e)}function yp(e){this.exit(e)}function A_(e){this.enter({type:"tableCell",children:[]},e)}function Y8(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,G8));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function G8(e,t){return t==="|"?t:e}function W8(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:b,table:u,tableCell:d,tableRow:c}};function u(y,_,S,v){return f(p(y,S,v),y.align)}function c(y,_,S,v){const C=g(y,S,v),P=f([C]);return P.slice(0,P.indexOf(`
|
|
46
|
+
`))}function d(y,_,S,v){const C=S.enter("tableCell"),P=S.enter("phrasing"),A=S.containerPhrasing(y,me(F({},v),{before:a,after:a}));return P(),C(),A}function f(y,_){return u8(y,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function p(y,_,S){const v=y.children;let C=-1;const P=[],A=_.enter("table");for(;++C<v.length;)P[C]=g(v[C],_,S);return A(),P}function g(y,_,S){const v=y.children;let C=-1;const P=[],A=_.enter("tableRow");for(;++C<v.length;)P[C]=d(v[C],y,_,S);return A(),P}function b(y,_,S){let v=w_.inlineCode(y,_,S);return S.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function X8(){return{exit:{taskListCheckValueChecked:C_,taskListCheckValueUnchecked:C_,paragraph:Q8}}}function K8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:J8}}}function C_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Q8(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 J8(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=w_.listItem(e,t,n,F(F({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function Z8(){return[OM(),JM(),n8(),j8(),X8()]}function eF(e){return{extensions:[IM(),ZM(e),r8(),W8(e),K8()]}}const tF={tokenize:aF,partial:!0},v_={tokenize:uF,partial:!0},k_={tokenize:lF,partial:!0},N_={tokenize:cF,partial:!0},nF={tokenize:dF,partial:!0},P_={name:"wwwAutolink",tokenize:oF,previous:I_},O_={name:"protocolAutolink",tokenize:sF,previous:R_},ui={name:"emailAutolink",tokenize:iF,previous:L_},Vr={};function rF(){return{text:Vr}}let _o=48;for(;_o<123;)Vr[_o]=ui,_o++,_o===58?_o=65:_o===91&&(_o=97);Vr[43]=ui,Vr[45]=ui,Vr[46]=ui,Vr[95]=ui,Vr[72]=[ui,O_],Vr[104]=[ui,O_],Vr[87]=[ui,P_],Vr[119]=[ui,P_];function iF(e,t,n){const r=this;let o,a;return u;function u(g){return!Tp(g)||!L_.call(r,r.previous)||bp(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return Tp(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(nF,p,f)(g):g===45||g===95||hn(g)?(a=!0,e.consume(g),d):p(g)}function f(g){return e.consume(g),o=!0,d}function p(g){return a&&o&&xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function oF(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!I_.call(r,r.previous)||bp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tF,e.attempt(v_,e.attempt(k_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function sF(e,t,n){const r=this;let o="",a=!1;return u;function u(g){return(g===72||g===104)&&R_.call(r,r.previous)&&!bp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(xn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),a?f:(a=!0,d)):n(g)}function f(g){return g===null||xl(g)||ft(g)||ao(g)||wl(g)?n(g):e.attempt(v_,e.attempt(k_,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function aF(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 uF(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(N_,d,c)(f):f===null||ft(f)||ao(f)||f!==45&&wl(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 lF(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(N_,t,a)(u):u===null||ft(u)||ao(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function cF(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)||ao(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ft(c)||ao(c)?t(c):r(c)}function a(c){return xn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):xn(c)?(e.consume(c),u):n(c)}}function dF(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return hn(a)?n(a):t(a)}}function I_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function R_(e){return!xn(e)}function L_(e){return!(e===47||Tp(e))}function Tp(e){return e===43||e===45||e===46||e===95||hn(e)}function bp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const fF={tokenize:bF,partial:!0};function hF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:EF,continuation:{tokenize:yF},exit:TF}},text:{91:{name:"gfmFootnoteCall",tokenize:gF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pF,resolveTo:mF}}}}function pF(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=gr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function mF(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 gF(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(g){if(a>999||g===93&&!u||g===null||g===91||ft(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(gr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return ft(g)||(u=!0),a++,e.consume(g),g===92?p:f}function p(g){return g===91||g===92||g===93?(e.consume(g),a++,f):f(g)}}function EF(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 S=e.exit("gfmFootnoteDefinitionLabelString");return a=gr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ft(_)||(c=!0),u++,e.consume(_),_===92?g:p}function g(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),rt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function yF(e,t,n){return e.check(Aa,t,e.attempt(fF,t,n))}function TF(e){e.exit("gfmFootnoteDefinition")}function bF(e,t,n){const r=this;return rt(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 _F(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)},g={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",g,c]],y=c.parser.constructs.insideSpan.null;y&&zn(b,b.length,0,Al(y,u.slice(f+1,d),c)),zn(b,b.length,0,[["exit",g,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),zn(u,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let g=0;return b;function b(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const S=ts(f);if(_===126)return g>1?d(_):(u.consume(_),g++,y);if(g<2&&!n)return d(_);const v=u.exit("strikethroughSequenceTemporary"),C=ts(_);return v._open=!C||C===2&&!!S,v._close=!S||S===2&&!!C,c(_)}}}class SF{constructor(){this.map=[]}add(t,n,r){xF(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 xF(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 wF(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 AF(){return{flow:{null:{name:"table",tokenize:CF,resolveAll:vF}}}}function CF(e,t,n){const r=this;let o=0,a=0,u;return c;function c($){let Z=r.events.length-1;for(;Z>-1;){const ue=r.events[Z][1].type;if(ue==="lineEnding"||ue==="linePrefix")Z--;else break}const ce=Z>-1?r.events[Z][1].type:null,he=ce==="tableHead"||ce==="tableRow"?D:d;return he===D&&r.parser.lazy[r.now().line]?n($):he($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):Be($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):et($)?rt(e,p,"whitespace")($):(a+=1,u&&(u=!1,o+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g($)))}function g($){return $===null||$===124||ft($)?(e.exit("data"),p($)):(e.consume($),$===92?b:g)}function b($){return $===92||$===124?(e.consume($),g):g($)}function y($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),u=!1,et($)?rt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):_($))}function _($){return $===45||$===58?v($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),S):V($)}function S($){return et($)?rt(e,v,"whitespace")($):v($)}function v($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),C):$===45?(a+=1,C($)):$===null||Be($)?M($):V($)}function C($){return $===45?(e.enter("tableDelimiterFiller"),P($)):V($)}function P($){return $===45?(e.consume($),P):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A($))}function A($){return et($)?rt(e,M,"whitespace")($):M($)}function M($){return $===124?_($):$===null||Be($)?!u||o!==a?V($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):V($)}function V($){return n($)}function D($){return e.enter("tableRow"),K($)}function K($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),K):$===null||Be($)?(e.exit("tableRow"),t($)):et($)?rt(e,K,"whitespace")($):(e.enter("data"),re($))}function re($){return $===null||$===124||ft($)?(e.exit("data"),K($)):(e.consume($),$===92?Te:re)}function Te($){return $===92||$===124?(e.consume($),re):re($)}}function vF(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,g;const b=new SF;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(D_(b,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,g=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.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],g=mc(b,t,a,o,void 0,g),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],g=mc(b,t,a,o,void 0,g)),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],g=mc(b,t,a,o,n,g)):u[1]!==0&&(g=mc(b,t,u,o,n,g)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&D_(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=wF(t.events,n))}return e}function mc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},ks(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=ks(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=ks(t.events,n[2]),p=ks(t.events,n[3]),g={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,S=n[3]-n[2]-1;e.add(_,S,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return o!==void 0&&(a.end=Object.assign({},ks(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function D_(e,t,n,r,o){const a=[],u=ks(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 ks(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const kF={name:"tasklistCheck",tokenize:PF};function NF(){return{text:{91:kF}}}function PF(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 Be(d)?t(d):et(d)?e.check({tokenize:OF},t,n)(d):n(d)}}function OF(e,t,n){return rt(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function IF(e){return dE([rF(),hF(),_F(e),AF(),NF()])}const RF={};function LF(e){const t=this,n=e||RF,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(IF(n)),a.push(Z8()),u.push(eF(n))}const gc=()=>w.jsx("span",{className:`${j}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),_p=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(ty,{remarkPlugins:[LF],rehypePlugins:[hT],components:{h1:({children:o})=>w.jsx("h1",{className:W(e,`${j}-header h1`),children:o}),h2:({children:o})=>w.jsx("h2",{className:W(e,`${j}-header h2`),children:o}),h3:({children:o})=>w.jsx("h3",{className:W(e,`${j}-header h3`),children:o}),ul:({children:o})=>w.jsx("ul",{className:W(e,`${j}-ul`),children:o}),ol:({children:o})=>w.jsx("ol",{className:W(e,`${j}-ol`),children:o}),li:({children:o})=>w.jsx("li",{className:W(e,`${j}-li`),children:o}),a:({href:o,children:a})=>w.jsx(bT,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>w.jsx("div",{className:W(e,`${j}-table-container`),children:w.jsx("table",{className:W(e,`${j}-table`),children:o})}),thead:({children:o})=>w.jsx("thead",{className:W(e,`${j}-thead`),children:o}),tbody:({children:o})=>w.jsx("tbody",{className:W(e,`${j}-tbody`),children:o}),tr:({children:o})=>w.jsx("tr",{className:W(e,`${j}-tr`),children:o}),th:({children:o})=>w.jsx("th",{className:W(e,`${j}-th`),children:o}),td:({children:o})=>w.jsx("td",{className:W(e,`${j}-td`),children:o}),span:({className:o,children:a})=>o===`${j}-blinking-cursor`?w.jsx(gc,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${j}-blinking-cursor'></span>`:"")}),DF=({globalClassName:e,message:t})=>{const[n,r]=U.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return w.jsxs("div",{children:[w.jsxs("div",{className:W(e,`${j}-progress-message`,"standalone"),children:[w.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","standalone"),children:w.jsx(P1,{})}),w.jsx("p",{className:W(e,`${j}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&w.jsxs(w.Fragment,{children:[w.jsx(bl,{className:W(e,`${j}-thought-context-button`),onClick:c,children:n?w.jsxs(w.Fragment,{children:["Hide ",w.jsx(wk,{})]}):w.jsxs(w.Fragment,{children:["Context ",w.jsx(Ak,{})]})}),n&&w.jsx("div",{className:W(e,`${j}-thought-container`),children:a&&w.jsx("p",{className:W(e,`${j}-progress-thought`),children:t.thought})})]})]})},MF=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?w.jsx(DF,{globalClassName:e,message:t}):w.jsxs("div",{className:W(e,`${j}-progress-message`,"embedded"),title:t.message,children:[w.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","embedded"),children:w.jsx(P1,{})}),w.jsx("i",{className:W(e,`${j}-progress-text`,"embedded"),children:t.message})]}),FF=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return w.jsxs("div",{className:W(e,`${j}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&w.jsxs("div",{className:W(e,`${j}-refined-event-query`,{embedded:!n,standalone:n}),children:[w.jsx("span",{className:W(e,`${j}-message-icon`,`${j}-refined-event-icon`,{embedded:!n,standalone:n}),children:w.jsx(Xo,{role:"img"})}),w.jsx("p",{className:W(e,`${j}-text`,`${j}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),w.jsx(_p,{text:t.message})]})},M_=e=>{var d,f;const{configModule:t}=mt(),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,g)=>p+g.length,0);return{facetFiltersList:u,filterCount:c}},Ec=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>w.jsx("span",{className:W(t,`${j}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),F_=({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 w.jsxs("div",{className:W(e,`${j}-facets`),children:[w.jsx("p",{className:W(e,`${j}-facet-category`),children:c}),w.jsx("p",{className:W(e,`${j}-facet-values`),children:d})]},c)})},nu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>w.jsx("span",{className:W(e,`${j}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),BF=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=M_(t),c=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?w.jsxs("div",{className:W(e,`${j}-user-message standalone`),children:[w.jsxs("div",{className:W(e,`${j}-user-message-row standalone`),children:[d?w.jsx("img",{className:W(e,`${j}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-message-icon standalone`),children:w.jsx(I1,{})}),w.jsx("p",{className:W(e,`${j}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&w.jsx(Ec,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),w.jsx(F_,{globalClassName:e,facetFiltersList:a,message:t}),w.jsx(nu,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):w.jsxs("div",{className:W(e,`${j}-user-message embedded`),children:[w.jsxs("div",{className:W(e,`${j}-user-message-row embedded`),children:[d?w.jsx("img",{className:W(e,`${j}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-message-icon embedded`),children:w.jsx(I1,{})}),w.jsx("p",{className:W(e,`${j}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&w.jsx(Ec,{isWidgetStandalone:!1,filterCount:u})]}),w.jsx(nu,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},UF=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>w.jsxs("div",{className:W(e,`${j}-user-search standalone`),children:[w.jsxs("div",{children:[w.jsxs("div",{className:W(e,`${j}-user-search-query standalone`),children:[d?w.jsx("img",{className:W(e,`${j}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-search-icon standalone`),children:w.jsx(Xo,{})}),w.jsx("p",{className:W(e,`${j}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&w.jsx(Ec,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),w.jsx(F_,{globalClassName:e,facetFiltersList:u,message:a})]}),w.jsx(nu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),HF=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=M_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:g,queryLabel:b}=U.useMemo(()=>{var S,v,C;const _=typeof((S=r==null?void 0:r.clientContext)==null?void 0:S.cimLabel)=="string"?(v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel:r==null?void 0:r.label;switch(o){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(C=r==null?void 0:r.browseParams)==null?void 0:C.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 g?n?w.jsx(UF,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:g,queryLabel:b,facetFiltersList:u,filterCount:c}):w.jsxs("div",{className:W(e,`${j}-user-search embedded`),children:[w.jsxs("div",{className:W(e,`${j}-user-search-query embedded`),children:[f?w.jsx("img",{className:W(e,`${j}-user-search-image embedded`),src:f,alt:b||g,loading:"lazy"}):w.jsx("span",{className:W(e,`${j}-message-icon user-search-icon embedded`),children:w.jsx(Xo,{})}),w.jsx("p",{className:W(e,`${j}-text bold embedded`),children:b||g}),u.length>0&&w.jsx(Ec,{isWidgetStandalone:!1,filterCount:c})]}),w.jsx(nu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},B_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var b;const{isLoading:c,isResponseLoading:d}=Rr(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,g=!!((b=e.request)!=null&&b.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return g?w.jsx(BF,{globalClassName:t,isWidgetStandalone:a,message:e}):w.jsx(HF,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return w.jsx(FF,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return w.jsx(AM,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return w.jsx(_p,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return w.jsx(wM,{message:e,isWidgetStandalone:a});case"display_products":return w.jsx(xM,{message:e,isWidgetStandalone:a});case"progress":return w.jsx(MF,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:w.jsxs(w.Fragment,{children:[w.jsx("p",{className:W(t,`${j}-reset-message`),children:"This conversation has been reset."}),w.jsx("p",{className:W(t,`${j}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},zF=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=mt(),{groupedMessages:a}=Zn(),{entryType:u}=mr();return w.jsxs(w.Fragment,{children:[u==="ask_cim"&&w.jsx(_M,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),w.jsxs("div",{className:W(n,`${j}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>w.jsx("div",{className:`${j}-message-group-child`,children:w.jsx(B_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),w.jsx(nu,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return w.jsx("div",{className:W(n,`${j}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:w.jsx(B_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},jF=({isOpen:e}={})=>{const{messages:t}=Rr(),n=U.useRef(null);return U.useEffect(()=>{n.current&&n.current.scrollIntoView({behavior:"smooth",block:"end"})},[t]),U.useEffect(()=>{e&&n.current&&n.current.scrollIntoView(!0)},[e]),n},$F={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Sp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=jF({isOpen:e});return w.jsxs(w.Fragment,{children:[w.jsx(zF,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&w.jsx("div",{style:F(F({},$F),o),children:w.jsx(gc,{})}),w.jsx("div",{ref:a})]})},U_=()=>{const{globalClassName:e,themeVariables:t}=mt(),{copilot:n,isLoading:r,handleUserInput:o,handleSuggestion:a,resetConversation:u}=Rr();return fp()?n?w.jsxs("div",{className:W(e,`${j}-container`,`${j}-embedded-chat`),style:t,children:[w.jsx("div",{className:W(e,`${j}-message-container`,"embedded"),children:w.jsx(Sp,{isWidgetStandalone:!1,isLoading:r,handleSuggestionClick:a})}),w.jsx(Nh,{componentType:"chat",className:"embedded-chat",isLoading:r,onSubmit:o}),w.jsx("div",{className:W(`${j}-embedded-chat-menu`),children:w.jsxs(dp,{componentType:"chat",children:[w.jsx(o_,{componentType:"chat"}),w.jsx(Ph,{componentType:"chat",onClearChat:u})]})})]}):w.jsx("div",{children:"Loading Copilot..."}):null},[VF,qF]=Eo({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),YF=e=>Wa()(e,["lazyMount","unmountOnExit"]),[GF,ru]=Eo({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),H_=U.forwardRef((e,t)=>{const n=ru(),r=qF(),o=Gh(me(F({},r),{present:n.open})),a=Yt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:w.jsx(mn.div,me(F({},a),{ref:ec(o.ref,t)}))});H_.displayName="DialogBackdrop";const xp=U.forwardRef((e,t)=>{const n=ru(),r=Ga(),o=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(mn.div,me(F({},o),{ref:ec(r.ref,t)}))});xp.displayName="DialogContent";const wp=U.forwardRef((e,t)=>{const n=ru(),r=Yt(n.getDescriptionProps(),e);return w.jsx(mn.div,me(F({},r),{ref:t}))});wp.displayName="DialogDescription";const Ap=U.forwardRef((e,t)=>{const n=ru(),r=Yt(n.getPositionerProps(),e);return Ga().unmounted?null:w.jsx(mn.div,me(F({},r),{ref:t}))});Ap.displayName="DialogPositioner";var WF=yo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),So=WF.build(),z_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},j_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},$_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},vp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},kp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},V_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},yc=e=>e.getById(Cp(e)),XF=e=>e.getById(z_(e)),KF=e=>e.getById(j_(e)),QF=e=>e.getById($_(e)),JF=e=>e.getById(vp(e)),ZF=e=>e.getById(kp(e)),eB=e=>e.getById(V_(e));function tB(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(me(F({},So.trigger.attrs),{dir:a("dir"),id:$_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Cp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(me(F({},So.backdrop.attrs),{dir:a("dir"),hidden:!d,id:j_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(F({},So.positioner.attrs),{dir:a("dir"),id:z_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(me(F({},So.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Cp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:vp(u),"aria-describedby":f.description?kp(u):void 0}))},getTitleProps(){return t.element(me(F({},So.title.attrs),{dir:a("dir"),id:vp(u)}))},getDescriptionProps(){return t.element(me(F({},So.description.attrs),{dir:a("dir"),id:kp(u)}))},getCloseTriggerProps(){return t.button(me(F({},So.closeTrigger.attrs),{dir:a("dir"),id:V_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var nB={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>eB(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return kb(()=>yc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[QF(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 Rb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Ob(()=>yc(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")?Tb(()=>[yc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){qt(()=>{e.set("rendered",{title:!!JF(t),description:!!ZF(t)})})},syncZIndex({scope:e}){qt(()=>{const t=yc(e);if(!t)return;const n=ms(t);[XF(e),KF(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})}}}};Ts()(["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 rB=e=>{const t=U.useId(),{getRootNode:n}=fc(),{dir:r}=cp(),o=F({id:t,getRootNode:n,dir:r},e),a=Zl(nB,o);return tB(a,Vh)},q_=e=>{const[t,c]=XT(e),d=c,{children:n}=d,r=ln(d,["children"]),[o]=YF(t),a=rB(r),u=Gh(Yt({present:a.open},t));return w.jsx(GF,{value:a,children:w.jsx(VF,{value:o,children:w.jsx(YT,{value:u,children:n})})})},Np=U.forwardRef((e,t)=>{const n=ru(),r=Yt(n.getTitleProps(),e);return w.jsx(mn.h2,me(F({},r),{ref:t}))});Np.displayName="DialogTitle";const Y_=e=>{var d;const{children:t,disabled:n}=e,[r,o]=U.useState((d=e.container)==null?void 0:d.current),a=U.useSyncExternalStore(oB,()=>!1,()=>!0),{getRootNode:u}=fc();if(U.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return w.jsx(w.Fragment,{children:t});const c=r!=null?r:iB(u);return w.jsx(w.Fragment,{children:U.Children.map(t,f=>Wo.createPortal(f,c))})},iB=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return mo(n)?n:Fr(t).body},oB=()=>()=>{},sB=({componentType:e,isIcon:t})=>{const{globalClassName:n}=mt(),{dialogPosition:r}=mr(),o=Va(),a=r==="bottom-left",u=()=>{Af(a?"bottom-right":"bottom-left"),o()},c=a?Q5:K5,d=a?"Move right":"Move left";return t?w.jsx(ni,{className:W(n,`${j}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,onClick:u,icon:w.jsx(c,{})}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(c,{}),d]})},G_=()=>{const{headerConfig:e,globalClassName:t,themeVariables:n}=mt(),{mode:r,status:o,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=mr(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:g,resetConversation:b}=Rr(),y=fp(),{isOpen:_}=o||{},S=r==="standalone",v=()=>{Si(!1)},C=U.useMemo(()=>e?R1(e):{},[e]);return y?d?w.jsx(q_,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:w.jsx(Y_,{children:w.jsx(Ap,{className:W(t,`${j}-container`,`${j}-dialog`,a,u&&"full-height"),style:F(F({},n),c&&{width:c}),children:w.jsxs(xp,{className:W(t,`${j}-dialog-content`,{standalone:S,embedded:!S}),children:[w.jsxs("div",{className:W(t,`${j}-dialog-header`,{standalone:S,embedded:!S}),style:C,children:[(e==null?void 0:e.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:W(t,`${j}-dialog-logo`,{standalone:S,embedded:!S}),src:e.logoUrl}),w.jsx(Np,{className:W(t,`${j}-dialog-title`,{standalone:S,embedded:!S}),children:e==null?void 0:e.headerText}),w.jsxs("div",{className:W(t,`${j}-dialog-controls`),children:[w.jsx(o_,{componentType:"dialog",isIcon:!0}),w.jsxs(dp,{componentType:"dialog",children:[w.jsx(sB,{componentType:"dialog"}),w.jsx(i_,{componentType:"dialog"}),w.jsx(Ph,{componentType:"dialog",onClearChat:b})]}),w.jsx(Pf,{className:`dialog ${t}`,onClick:v})]})]}),w.jsx(wp,{className:W(t,`${j}-message-container`,{standalone:S,embedded:!S}),children:w.jsx(Sp,{isWidgetStandalone:S,isLoading:f,isOpen:_,handleSuggestionClick:g})}),w.jsx(Nh,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):w.jsx("div",{children:"Loading Copilot..."}):null},aB=({componentType:e,isIcon:t})=>{const{globalClassName:n}=mt(),{isModalFullscreen:r}=mr(),o=Va(),a=()=>{wf(!r),o()},u=r?Ck:vk,c="Toggle Fullscreen";return t?w.jsx(ni,{ariaLabel:c,title:c,className:W(n,`${j}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),c]})},uB=({componentType:e,isIcon:t})=>{const{globalClassName:n}=mt(),{previousComponentType:r}=mr(),o=Va(),a=()=>{gl(r||"dialog"),o()};return t?w.jsx(ni,{className:W(n,`${j}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Toggle Dialog",onClick:a,icon:w.jsx(Hb,{})}):w.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(Hb,{}),"Show ",r||"dialog"]})},W_=()=>{const{headerConfig:e,globalClassName:t,themeVariables:n}=mt(),{mode:r,status:o,isModalFullscreen:a}=mr(),{copilot:u,isLoading:c,handleUserInput:d,handleSuggestion:f,resetConversation:p}=Rr(),{isOpen:g}=o||{},b=r==="standalone",y=fp(),_=U.useMemo(()=>e?R1(e):{},[e]),S=({open:C})=>{Si(C)},v=()=>{Si(!1)};return y?u?w.jsx(q_,{lazyMount:!0,open:g,onOpenChange:S,children:w.jsx(Y_,{children:w.jsxs("div",{className:W(t,`${j}-modal-container`),style:n,children:[w.jsx(H_,{className:W(t,`${j}-modal-backdrop`)}),w.jsx(Ap,{className:W(t,`${j}-container`,`${j}-modal`,{fullscreen:a,standalone:b,embedded:!b}),children:w.jsxs(xp,{className:W(t,`${j}-modal-content`,{standalone:b,embedded:!b}),children:[w.jsxs("div",{className:W(t,`${j}-modal-header`,{standalone:b,embedded:!b}),style:_,children:[(e==null?void 0:e.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:W(t,`${j}-modal-logo`,{standalone:b,embedded:!b}),src:e==null?void 0:e.logoUrl}),w.jsx(Np,{className:W(t,`${j}-modal-title`,{standalone:b,embedded:!b}),children:e==null?void 0:e.headerText}),w.jsxs("div",{className:W(t,`${j}-modal-controls`),children:[w.jsx(uB,{componentType:"modal",isIcon:!0}),w.jsxs(dp,{componentType:"modal",children:[w.jsx(aB,{componentType:"modal"}),w.jsx(i_,{componentType:"modal"}),w.jsx(Ph,{componentType:"modal",onClearChat:p})]}),w.jsx(Pf,{className:`modal ${t}`,onClick:v})]})]}),w.jsx(wp,{className:W(t,`${j}-message-container`,{standalone:b,embedded:!b}),children:w.jsx(Sp,{isWidgetStandalone:b,isLoading:c,isOpen:g,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),w.jsx(Nh,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):w.jsx("div",{children:"Loading Copilot..."}):null},lB=()=>{const e=mr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(mk,{}):t==="dialog"?w.jsx(G_,{}):t==="modal"?w.jsx(W_,{}):w.jsx(U_,{})},cB=()=>{const{copilot:e}=Zn(),{entryType:t,activePromptsId:n,params:r}=xi(),{setIsInitialized:o,setIsOpen:a,setIsInline:u,setElementId:c,setEntryType:d,setActivePromptsId:f,setParams:p,setPromptsMessage:g,setResponseMessage:b,setIsResponseLoading:y}=g1(),{getCopilotSuggestions:_}=y1();U.useEffect(()=>{const A=M=>{const{property:V,value:D}=M.detail||{};!V||D===void 0||(V==="isOpen"&&a(D),V==="isInline"&&u(D),V==="elementId"&&c(D),V==="entryType"&&d(D),V==="params"&&p(D))};return Lv(A),()=>{Dv(A)}},[a,u,c,d,p]);const S=U.useCallback(A=>{if(!t||!A)return;_(A,t,V=>{f(V.id)})},[t,_,f]);U.useEffect(()=>{!e||!t||!r||S(r)},[e,t,r,S]);const v=U.useCallback(A=>{A.eventSourceId===n&&(g(A),f(A.id),o(!0))},[n,g,f,o]),C=U.useCallback(A=>{(A==null?void 0:A.eventSourceId)===n&&(b(A),y(!1))},[n,b,y]),P=U.useCallback(()=>{o(!0),y(!1)},[o,y]);return U.useEffect(()=>{if(e)return e.on("follow_up",v),e.on("inquiry",C),e.on("error",P),()=>{e.off("follow_up",v),e.off("inquiry",C),e.off("error",P)}},[e,v,C,P]),null},dB=({sendCopilotPrompt:e})=>{const{globalClassName:t}=mt(),{placeholder:n,isResponseLoading:r}=xi(),[o,a]=U.useState(""),u=c=>{const d=o.trim();d&&(c.preventDefault(),e(d),a(""))};return w.jsxs("form",{className:W(t,`${j}-prompts-input-container`),name:`${j}-prompts-form`,onSubmit:u,children:[w.jsx("label",{htmlFor:`${j}-prompts-input`,"aria-label":n||"Ask Copilot",children:w.jsx(eM,{className:W(t,`${j}-prompts-input-icon`)})}),w.jsx("input",{id:`${j}-prompts-input`,className:W(t,`${j}-prompts-input`),name:`${j}-prompts-input`,placeholder:n||"Ask Copilot",type:"text",disabled:r,value:o,onChange:c=>a(c.target.value)}),w.jsx(ni,{className:W(t,`${j}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Xo,{}),disabled:r})]})},fB=({sendCopilotPrompt:e})=>{var c,d;const{globalClassName:t}=mt(),{promptsMessage:n,isResponseLoading:r,isInitialized:o}=xi(),a=f=>()=>{const p=f.displayText.trim();p&&e(p)},u=!!(n!=null&&n.suggestions&&((c=n==null?void 0:n.suggestions)!=null&&c.length));return w.jsxs("div",{className:W(t,`${j}-prompts-button-group`),children:[!o&&w.jsx(gc,{}),o&&u&&((d=n==null?void 0:n.suggestions)==null?void 0:d.map(f=>w.jsx("button",{className:W(t,`${j}-prompts-button`),disabled:r,onClick:a(f),children:f.displayText},f.displayText)))]})},hB=()=>{const{globalClassName:e}=mt(),{isInline:t,userPrompt:n}=xi();return!n||!t?null:w.jsx("div",{className:W(e,`${j}-prompts-user-message-container`),children:w.jsx("p",{className:W(e,`${j}-prompts-user-message`),children:n})})},pB=()=>{const{globalClassName:e,openLinksInNewTab:t}=mt(),{isInline:n,responseMessage:r,isResponseLoading:o}=xi();return!n||!r&&!o?null:o?w.jsx(gc,{}):r?w.jsx("div",{className:W(e,`${j}-prompts-response-container`,`${j}-message-container`),children:w.jsx(_p,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},mB=()=>{const{globalClassName:e,themeVariables:t}=mt(),{connected:n,copilot:r}=Zn(),{handleCopilotRequestAck:o}=Go(),{status:{isOpen:a}}=mr(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p}=xi(),{setActivePromptsId:g,setUserPrompt:b,setResponseMessage:y,setIsResponseLoading:_}=g1(),[S,v]=U.useState(null);U.useEffect(()=>{if(!d||S)return;const P=document.getElementById(d);P&&v(P)},[d,S]);const C=U.useCallback(P=>{if(!r||!f||!p)return;const A=V=>{c?(y(null),b(P),g(V.id),_(!0)):(a||Si(!0),o(V))},M={userPrompt:P,clientContext:F({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(M,A);break;case"search":r.search(F({searchParams:p},M),A);break;case"browse":r.browse(F({browseParams:p},M),A);break;case"pdp":r.productView(F(F({},p),M),A);break}},[r,c,f,p,a,g,y,b,_,o]);return!n||!u||!S?null:Wo.createPortal(w.jsxs("div",{className:W(e,`${j}-prompts-extension-container`),style:t,children:[w.jsx(dB,{sendCopilotPrompt:C}),w.jsx(fB,{sendCopilotPrompt:C}),w.jsxs("div",{className:W(e,`${j}-prompts-extension-messages-container`),children:[w.jsx(hB,{}),w.jsx(pB,{})]})]}),S)},gB=()=>w.jsxs(w.Fragment,{children:[w.jsx(cB,{}),w.jsx(mB,{})]}),Pp=e=>w.jsxs(T1,me(F({},e),{children:[w.jsx(lB,{}),w.jsx(gB,{})]}));var Tc={},X_;function EB(){if(X_)return Tc;X_=1;var e=w1();return Tc.createRoot=e.createRoot,Tc.hydrateRoot=e.hydrateRoot,Tc}var K_=EB();const yB=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=ln(o,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const g of d)if(g.type==="childList"&&g.addedNodes.length)for(const b of g.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Yo(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=K_.createRoot(b))==null||p.render(w.jsx(Pp,F({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Yo(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c};return Object.freeze(Object.defineProperty({__proto__:null,CopilotDialog:G_,CopilotEmbed:U_,CopilotModal:W_,CopilotWidget:Pp,CopilotWidgetProvider:T1,eventHandlers:{search:Gv,browse:Nv,pdp:{setPdpContext:n1,updatePdpProductId:Ov,updatePdpLink:Iv},components:{setEntryType:ga,toggleWidgetOpen:Si,toggleWidgetMinimized:ml,toggleModalFullscreen:wf,setWidgetType:gl,setWidgetDialogPosition:Af,togglePromptsExtensionOpen:i1,togglePromptsExtensionInline:o1,loadPromptsComponent:Hv,getAskCimPrompts:Mv,getSearchPrompts:Fv,getBrowsePrompts:Bv,getProductViewPrompts:Uv},session:zv},injectCopilotWidget:r=>{var o=r,{timeout:e,elementId:t}=o,n=ln(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Yo(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Yo(!0,"warn","Container element not found for id:",t),Yo(!0,"warn","Beginning observation for element"),yB(F({elementId:t,timeout:e},n));return}K_.createRoot(a).render(w.jsx(Pp,F({},n)))},state:()=>Object.freeze({search:Object.freeze(_t.state),browse:Object.freeze(ut.state),pdp:Object.freeze(pr.state),isConnected:Ze.state.connected,isOpen:Ze.isOpen,entryType:Ze.entryType}),useCopilot:Rr},Symbol.toStringTag,{value:"Module"}))}));
|