@cimulate/copilot-widget 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,75 +1,43 @@
1
- (function(we,De){typeof exports=="object"&&typeof module!="undefined"?De(exports):typeof define=="function"&&define.amd?define(["exports"],De):(we=typeof globalThis!="undefined"?globalThis:we||self,De(we["cimulate-copilot-widget"]={}))})(this,function(we){"use strict";var G4=Object.defineProperty,K4=Object.defineProperties;var Q4=Object.getOwnPropertyDescriptors;var ic=Object.getOwnPropertySymbols;var l_=Object.prototype.hasOwnProperty,c_=Object.prototype.propertyIsEnumerable;var Ks=(we,De)=>(De=Symbol[we])?De:Symbol.for("Symbol."+we),X4=we=>{throw TypeError(we)},sc=Math.pow,gp=(we,De,We)=>De in we?G4(we,De,{enumerable:!0,configurable:!0,writable:!0,value:We}):we[De]=We,G=(we,De)=>{for(var We in De||(De={}))l_.call(De,We)&&gp(we,We,De[We]);if(ic)for(var We of ic(De))c_.call(De,We)&&gp(we,We,De[We]);return we},He=(we,De)=>K4(we,Q4(De));var nr=(we,De)=>{var We={};for(var rt in we)l_.call(we,rt)&&De.indexOf(rt)<0&&(We[rt]=we[rt]);if(we!=null&&ic)for(var rt of ic(we))De.indexOf(rt)<0&&c_.call(we,rt)&&(We[rt]=we[rt]);return We};var Me=(we,De,We)=>gp(we,typeof De!="symbol"?De+"":De,We);var jt=(we,De,We)=>new Promise((rt,Et)=>{var ct=Tt=>{try{Lt(We.next(Tt))}catch(un){Et(un)}},ve=Tt=>{try{Lt(We.throw(Tt))}catch(un){Et(un)}},Lt=Tt=>Tt.done?rt(Tt.value):Promise.resolve(Tt.value).then(ct,ve);Lt((We=We.apply(we,De)).next())}),Tr=function(we,De){this[0]=we,this[1]=De},oc=(we,De,We)=>{var rt=(ve,Lt,Tt,un)=>{try{var $i=We[ve](Lt),Qs=(Lt=$i.value)instanceof Tr,uc=$i.done;Promise.resolve(Qs?Lt[0]:Lt).then($n=>Qs?rt(ve==="return"?ve:"next",Lt[1]?{done:$n.done,value:$n.value}:$n,Tt,un):Tt({value:$n,done:uc})).catch($n=>rt("throw",$n,Tt,un))}catch($n){un($n)}},Et=ve=>ct[ve]=Lt=>new Promise((Tt,un)=>rt(ve,Lt,Tt,un)),ct={};return We=We.apply(we,De),ct[Ks("asyncIterator")]=()=>ct,Et("next"),Et("throw"),Et("return"),ct},Ep=we=>{var De=we[Ks("asyncIterator")],We=!1,rt,Et={};return De==null?(De=we[Ks("iterator")](),rt=ct=>Et[ct]=ve=>De[ct](ve)):(De=De.call(we),rt=ct=>Et[ct]=ve=>{if(We){if(We=!1,ct==="throw")throw ve;return ve}return We=!0,{done:!1,value:new Tr(new Promise(Lt=>{var Tt=De[ct](ve);Tt instanceof Object||X4("Object expected"),Lt(Tt)}),1)}}),Et[Ks("iterator")]=()=>Et,rt("next"),"throw"in De?rt("throw"):Et.throw=ct=>{throw ct},"return"in De&&rt("return"),Et},f_=(we,De,We)=>(De=we[Ks("asyncIterator")])?De.call(we):(we=we[Ks("iterator")](),De={},We=(rt,Et)=>(Et=we[rt])&&(De[rt]=ct=>new Promise((ve,Lt,Tt)=>(ct=Et.call(we,ct),Tt=ct.done,Promise.resolve(ct.value).then(un=>ve({value:un,done:Tt}),Lt)))),We("next"),We("return"),De);var De=document.createElement("style");De.textContent=`.cim-widget-button{padding:.5rem;background-color:var(--cim-widget-primary-color, #3182ce);border-radius:4px;border-color:var(--cim-widget-primary-color, #3182ce);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}}.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;background-color:transparent;border:1px solid transparent;border-radius:4px;padding:6px;cursor:pointer;color:#333;font-size:18px;&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-bar{display:flex;align-items:center;justify-content:space-between;padding:1px;border:1px solid var(--cim-widget-border-color);border-radius:4px;font-family:var(--cim-widget-font-family)}.cim-widget-search-input{width:100%;height:100%;margin-left:2px;background-color:transparent;border:none;outline:none}.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-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media (max-width: 576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-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-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media (max-width: 768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-search{display:flex;flex-direction:column}.cim-widget-refined-search-query{display:inline-flex;align-items:center;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.refined-search-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-user-message{display:flex;align-items:center}.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:30%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-text{font-weight:700;margin-bottom:.5rem}.cim-widget-message-icon.user-message-icon{margin-right:.5rem}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex}.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:30%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;padding-top:.5rem;padding-bottom:.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-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{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-left:1rem;padding-right:1rem}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;padding:1rem;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);font-size:.875rem;&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-right{bottom:.5rem;right:.5rem}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;width:100%;margin-bottom:.5rem;gap:8px}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0}@media (576px <= width <= 768px){.cim-widget-dialog{width:50%;border-radius:0}}@media (max-width: 576px){.cim-widget-dialog{height:100%;width:100%;border-radius:0;&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;padding:1rem;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;width:100%;margin-bottom:1rem;gap:8px}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0}@media (max-width: 576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}.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:2rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1.5rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1.2rem}.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 0}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}
2
- /*$vite$:1*/`,document.head.appendChild(De);function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},Et={},ct={exports:{}},ve={};/**
3
- * @license React
4
- * react.production.min.js
5
- *
6
- * Copyright (c) Facebook, Inc. and its affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var Lt;function Tt(){if(Lt)return ve;Lt=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"),u=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function b(O){return O===null||typeof O!="object"?null:(O=y&&O[y]||O["@@iterator"],typeof O=="function"?O:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function P(O,Y,x){this.props=O,this.context=Y,this.refs=k,this.updater=x||T}P.prototype.isReactComponent={},P.prototype.setState=function(O,Y){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,Y,"setState")},P.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function L(){}L.prototype=P.prototype;function H(O,Y,x){this.props=O,this.context=Y,this.refs=k,this.updater=x||T}var $=H.prototype=new L;$.constructor=H,S($,P.prototype),$.isPureReactComponent=!0;var Z=Array.isArray,he=Object.prototype.hasOwnProperty,M={current:null},Ee={key:!0,ref:!0,__self:!0,__source:!0};function ke(O,Y,x){var re,be={},ye=null,Ie=null;if(Y!=null)for(re in Y.ref!==void 0&&(Ie=Y.ref),Y.key!==void 0&&(ye=""+Y.key),Y)he.call(Y,re)&&!Ee.hasOwnProperty(re)&&(be[re]=Y[re]);var Fe=arguments.length-2;if(Fe===1)be.children=x;else if(1<Fe){for(var ze=Array(Fe),Ke=0;Ke<Fe;Ke++)ze[Ke]=arguments[Ke+2];be.children=ze}if(O&&O.defaultProps)for(re in Fe=O.defaultProps,Fe)be[re]===void 0&&(be[re]=Fe[re]);return{$$typeof:e,type:O,key:ye,ref:Ie,props:be,_owner:M.current}}function Ne(O,Y){return{$$typeof:e,type:O.type,key:Y,ref:O.ref,props:O.props,_owner:O._owner}}function U(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function ge(O){var Y={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(x){return Y[x]})}var me=/\/+/g;function pe(O,Y){return typeof O=="object"&&O!==null&&O.key!=null?ge(""+O.key):Y.toString(36)}function le(O,Y,x,re,be){var ye=typeof O;(ye==="undefined"||ye==="boolean")&&(O=null);var Ie=!1;if(O===null)Ie=!0;else switch(ye){case"string":case"number":Ie=!0;break;case"object":switch(O.$$typeof){case e:case t:Ie=!0}}if(Ie)return Ie=O,be=be(Ie),O=re===""?"."+pe(Ie,0):re,Z(be)?(x="",O!=null&&(x=O.replace(me,"$&/")+"/"),le(be,Y,x,"",function(Ke){return Ke})):be!=null&&(U(be)&&(be=Ne(be,x+(!be.key||Ie&&Ie.key===be.key?"":(""+be.key).replace(me,"$&/")+"/")+O)),Y.push(be)),1;if(Ie=0,re=re===""?".":re+":",Z(O))for(var Fe=0;Fe<O.length;Fe++){ye=O[Fe];var ze=re+pe(ye,Fe);Ie+=le(ye,Y,x,ze,be)}else if(ze=b(O),typeof ze=="function")for(O=ze.call(O),Fe=0;!(ye=O.next()).done;)ye=ye.value,ze=re+pe(ye,Fe++),Ie+=le(ye,Y,x,ze,be);else if(ye==="object")throw Y=String(O),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Ie}function _e(O,Y,x){if(O==null)return O;var re=[],be=0;return le(O,re,"","",function(ye){return Y.call(x,ye,be++)}),re}function Pe(O){if(O._status===-1){var Y=O._result;Y=Y(),Y.then(function(x){(O._status===0||O._status===-1)&&(O._status=1,O._result=x)},function(x){(O._status===0||O._status===-1)&&(O._status=2,O._result=x)}),O._status===-1&&(O._status=0,O._result=Y)}if(O._status===1)return O._result.default;throw O._result}var ce={current:null},V={transition:null},ne={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:V,ReactCurrentOwner:M};function C(){throw Error("act(...) is not supported in production builds of React.")}return ve.Children={map:_e,forEach:function(O,Y,x){_e(O,function(){Y.apply(this,arguments)},x)},count:function(O){var Y=0;return _e(O,function(){Y++}),Y},toArray:function(O){return _e(O,function(Y){return Y})||[]},only:function(O){if(!U(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},ve.Component=P,ve.Fragment=n,ve.Profiler=o,ve.PureComponent=H,ve.StrictMode=r,ve.Suspense=d,ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,ve.act=C,ve.cloneElement=function(O,Y,x){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var re=S({},O.props),be=O.key,ye=O.ref,Ie=O._owner;if(Y!=null){if(Y.ref!==void 0&&(ye=Y.ref,Ie=M.current),Y.key!==void 0&&(be=""+Y.key),O.type&&O.type.defaultProps)var Fe=O.type.defaultProps;for(ze in Y)he.call(Y,ze)&&!Ee.hasOwnProperty(ze)&&(re[ze]=Y[ze]===void 0&&Fe!==void 0?Fe[ze]:Y[ze])}var ze=arguments.length-2;if(ze===1)re.children=x;else if(1<ze){Fe=Array(ze);for(var Ke=0;Ke<ze;Ke++)Fe[Ke]=arguments[Ke+2];re.children=Fe}return{$$typeof:e,type:O.type,key:be,ref:ye,props:re,_owner:Ie}},ve.createContext=function(O){return O={$$typeof:l,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:u,_context:O},O.Consumer=O},ve.createElement=ke,ve.createFactory=function(O){var Y=ke.bind(null,O);return Y.type=O,Y},ve.createRef=function(){return{current:null}},ve.forwardRef=function(O){return{$$typeof:c,render:O}},ve.isValidElement=U,ve.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:Pe}},ve.memo=function(O,Y){return{$$typeof:h,type:O,compare:Y===void 0?null:Y}},ve.startTransition=function(O){var Y=V.transition;V.transition={};try{O()}finally{V.transition=Y}},ve.unstable_act=C,ve.useCallback=function(O,Y){return ce.current.useCallback(O,Y)},ve.useContext=function(O){return ce.current.useContext(O)},ve.useDebugValue=function(){},ve.useDeferredValue=function(O){return ce.current.useDeferredValue(O)},ve.useEffect=function(O,Y){return ce.current.useEffect(O,Y)},ve.useId=function(){return ce.current.useId()},ve.useImperativeHandle=function(O,Y,x){return ce.current.useImperativeHandle(O,Y,x)},ve.useInsertionEffect=function(O,Y){return ce.current.useInsertionEffect(O,Y)},ve.useLayoutEffect=function(O,Y){return ce.current.useLayoutEffect(O,Y)},ve.useMemo=function(O,Y){return ce.current.useMemo(O,Y)},ve.useReducer=function(O,Y,x){return ce.current.useReducer(O,Y,x)},ve.useRef=function(O){return ce.current.useRef(O)},ve.useState=function(O){return ce.current.useState(O)},ve.useSyncExternalStore=function(O,Y,x){return ce.current.useSyncExternalStore(O,Y,x)},ve.useTransition=function(){return ce.current.useTransition()},ve.version="18.3.1",ve}var un;function $i(){return un||(un=1,ct.exports=Tt()),ct.exports}/**
11
- * @license React
12
- * react-jsx-runtime.production.min.js
13
- *
14
- * Copyright (c) Facebook, Inc. and its affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var Qs;function uc(){if(Qs)return Et;Qs=1;var e=$i(),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,u={key:!0,ref:!0,__self:!0,__source:!0};function l(c,d,h){var g,y={},b=null,T=null;h!==void 0&&(b=""+h),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(T=d.ref);for(g in d)r.call(d,g)&&!u.hasOwnProperty(g)&&(y[g]=d[g]);if(c&&c.defaultProps)for(g in d=c.defaultProps,d)y[g]===void 0&&(y[g]=d[g]);return{$$typeof:t,type:c,key:b,ref:T,props:y,_owner:o.current}}return Et.Fragment=n,Et.jsx=l,Et.jsxs=l,Et}var $n;function h_(){return $n||($n=1,rt.exports=uc()),rt.exports}var I=h_();const rr=Object.create(null);rr.open="0",rr.close="1",rr.ping="2",rr.pong="3",rr.message="4",rr.upgrade="5",rr.noop="6";const Ou=Object.create(null);Object.keys(rr).forEach(e=>{Ou[rr[e]]=e});const ac={type:"error",data:"parser error"},yp=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Tp=typeof ArrayBuffer=="function",bp=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,lc=({type:e,data:t},n,r)=>yp&&t instanceof Blob?n?r(t):_p(t,r):Tp&&(t instanceof ArrayBuffer||bp(t))?n?r(t):_p(new Blob([t]),r):r(rr[e]+(t||"")),_p=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Sp(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let cc;function p_(e,t){if(yp&&e.data instanceof Blob)return e.data.arrayBuffer().then(Sp).then(t);if(Tp&&(e.data instanceof ArrayBuffer||bp(e.data)))return t(Sp(e.data));lc(e,!1,n=>{cc||(cc=new TextEncoder),t(cc.encode(n))})}const xp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xs=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<xp.length;e++)Xs[xp.charCodeAt(e)]=e;const m_=e=>{let t=e.length*.75,n=e.length,r,o=0,u,l,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),g=new Uint8Array(h);for(r=0;r<n;r+=4)u=Xs[e.charCodeAt(r)],l=Xs[e.charCodeAt(r+1)],c=Xs[e.charCodeAt(r+2)],d=Xs[e.charCodeAt(r+3)],g[o++]=u<<2|l>>4,g[o++]=(l&15)<<4|c>>2,g[o++]=(c&3)<<6|d&63;return h},g_=typeof ArrayBuffer=="function",fc=(e,t)=>{if(typeof e!="string")return{type:"message",data:Cp(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:E_(e.substring(1),t)}:Ou[n]?e.length>1?{type:Ou[n],data:e.substring(1)}:{type:Ou[n]}:ac},E_=(e,t)=>{if(g_){const n=m_(e);return Cp(n,t)}else return{base64:!0,data:e}},Cp=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Ap="",y_=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((u,l)=>{lc(u,!1,c=>{r[l]=c,++o===n&&t(r.join(Ap))})})},T_=(e,t)=>{const n=e.split(Ap),r=[];for(let o=0;o<n.length;o++){const u=fc(n[o],t);if(r.push(u),u.type==="error")break}return r};function b_(){return new TransformStream({transform(e,t){p_(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 u=new DataView(o.buffer);u.setUint8(0,126),u.setUint16(1,r)}else{o=new Uint8Array(9);const u=new DataView(o.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let dc;function Pu(e){return e.reduce((t,n)=>t+n.length,0)}function Ru(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 __(e,t){dc||(dc=new TextDecoder);const n=[];let r=0,o=-1,u=!1;return new TransformStream({transform(l,c){for(n.push(l);;){if(r===0){if(Pu(n)<1)break;const d=Ru(n,1);u=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(Pu(n)<2)break;const d=Ru(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Pu(n)<8)break;const d=Ru(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),g=h.getUint32(0);if(g>Math.pow(2,21)-1){c.enqueue(ac);break}o=g*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Pu(n)<o)break;const d=Ru(n,o);c.enqueue(fc(u?d:dc.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(ac);break}}}})}const kp=4;function wt(e){if(e)return S_(e)}function S_(e){for(var t in wt.prototype)e[t]=wt.prototype[t];return e}wt.prototype.on=wt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},wt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},wt.prototype.off=wt.prototype.removeListener=wt.prototype.removeAllListeners=wt.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},wt.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},wt.prototype.emitReserved=wt.prototype.emit,wt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},wt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Lu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),On=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),x_="arraybuffer";function J4(){}function wp(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const C_=On.setTimeout,A_=On.clearTimeout;function Du(e,t){t.useNativeTimers?(e.setTimeoutFn=C_.bind(On),e.clearTimeoutFn=A_.bind(On)):(e.setTimeoutFn=On.setTimeout.bind(On),e.clearTimeoutFn=On.clearTimeout.bind(On))}const k_=1.33;function w_(e){return typeof e=="string"?v_(e):Math.ceil((e.byteLength||e.size)*k_)}function v_(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 vp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function N_(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function I_(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let u=n[r].split("=");t[decodeURIComponent(u[0])]=decodeURIComponent(u[1])}return t}class O_ extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class hc extends wt{constructor(t){super(),this.writable=!1,Du(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 O_(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=fc(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=N_(t);return n.length?"?"+n:""}}class P_ extends hc{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)};T_(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,y_(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]=vp()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Np=!1;try{Np=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const R_=Np;function L_(){}class D_ extends P_{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,u)=>{this.onError("xhr post error",o,u)})}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 ir extends wt{constructor(t,n,r){super(),this.createRequest=t,Du(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=wp(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=ir.requestsCount++,ir.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=L_,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete ir.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(ir.requestsCount=0,ir.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Ip);else if(typeof addEventListener=="function"){const e="onpagehide"in On?"pagehide":"unload";addEventListener(e,Ip,!1)}}function Ip(){for(let e in ir.requests)ir.requests.hasOwnProperty(e)&&ir.requests[e].abort()}const M_=function(){const e=Op({xdomain:!1});return e&&e.responseType!==null}();class F_ extends D_{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=M_&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ir(Op,this.uri(),t)}}function Op(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||R_))return new XMLHttpRequest}catch(n){}if(!t)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Pp=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class B_ extends hc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Pp?{}:wp(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;lc(r,this.supportsBinary,u=>{try{this.doWrite(r,u)}catch(l){}o&&Lu(()=>{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]=vp()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const pc=On.WebSocket||On.MozWebSocket;class U_ extends B_{createSocket(t,n,r){return Pp?new pc(t,n,r):n?new pc(t,n):new pc(t)}doWrite(t,n){this.ws.send(n)}}class H_ extends hc{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=__(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=b_();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const u=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),u())}).catch(c=>{})};u();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).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&&Lu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const z_={websocket:U_,webtransport:H_,polling:F_},j_=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$_=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mc(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=j_.exec(e||""),u={},l=14;for(;l--;)u[$_[l]]=o[l]||"";return n!=-1&&r!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=V_(u,u.path),u.queryKey=q_(u,u.query),u}function V_(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 q_(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,u){o&&(n[o]=u)}),n}const gc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Mu=[];gc&&addEventListener("offline",()=>{Mu.forEach(e=>e())},!1);class Fr extends wt{constructor(t,n){if(super(),this.binaryType=x_,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=mc(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=mc(n.host).host);Du(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=I_(this.opts.query)),gc&&(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"})},Mu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=kp,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&&Fr.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",Fr.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+=w_(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,Lu(()=>{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 u={type:t,data:n,options:r};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),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(Fr.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(),gc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Mu.indexOf(this._offlineEventListener);r!==-1&&Mu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Fr.protocol=kp;class Y_ extends Fr{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;Fr.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!r)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(g(),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 u(){r||(r=!0,g(),n.close(),n=null)}const l=y=>{const b=new Error("probe error: "+y);b.transport=n.name,u(),this.emitReserved("upgradeError",b)};function c(){l("transport closed")}function d(){l("socket closed")}function h(y){n&&y.name!==n.name&&u()}const g=()=>{n.removeListener("open",o),n.removeListener("error",l),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",o),n.once("error",l),n.once("close",c),this.once("close",d),this.once("upgrading",h),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 W_=class extends Y_{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=>z_[o]).filter(o=>!!o)),super(t,r)}};function G_(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=mc(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 u=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+u+":"+r.port+t,r.href=r.protocol+"://"+u+(n&&n.port===r.port?"":":"+r.port),r}const K_=typeof ArrayBuffer=="function",Q_=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Rp=Object.prototype.toString,X_=typeof Blob=="function"||typeof Blob!="undefined"&&Rp.call(Blob)==="[object BlobConstructor]",J_=typeof File=="function"||typeof File!="undefined"&&Rp.call(File)==="[object FileConstructor]";function Ec(e){return K_&&(e instanceof ArrayBuffer||Q_(e))||X_&&e instanceof Blob||J_&&e instanceof File}function Fu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Fu(e[n]))return!0;return!1}if(Ec(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Fu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Fu(e[n]))return!0;return!1}function Z_(e){const t=[],n=e.data,r=e;return r.data=yc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function yc(e,t){if(!e)return e;if(Ec(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]=yc(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]=yc(e[r],t));return n}return e}function e2(e,t){return e.data=Tc(e.data,t),delete e.attachments,e}function Tc(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]=Tc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Tc(e[n],t));return e}const t2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],n2=5;var Qe;(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"})(Qe||(Qe={}));class r2{constructor(t){this.replacer=t}encode(t){return(t.type===Qe.EVENT||t.type===Qe.ACK)&&Fu(t)?this.encodeAsBinary({type:t.type===Qe.EVENT?Qe.BINARY_EVENT:Qe.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Qe.BINARY_EVENT||t.type===Qe.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=Z_(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Lp(e){return Object.prototype.toString.call(e)==="[object Object]"}class bc extends wt{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Qe.BINARY_EVENT;r||n.type===Qe.BINARY_ACK?(n.type=r?Qe.EVENT:Qe.ACK,this.reconstructor=new i2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ec(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(Qe[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Qe.BINARY_EVENT||r.type===Qe.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(u,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(l)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(bc.isPayloadValid(r.type,u))r.data=u;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Qe.CONNECT:return Lp(n);case Qe.DISCONNECT:return n===void 0;case Qe.CONNECT_ERROR:return typeof n=="string"||Lp(n);case Qe.EVENT:case Qe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&t2.indexOf(n[0])===-1);case Qe.ACK:case Qe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class i2{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=e2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const s2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:bc,Encoder:r2,get PacketType(){return Qe},protocol:n2},Symbol.toStringTag,{value:"Module"}));function Vn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const o2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Dp extends wt{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=[Vn(t,"open",this.onopen.bind(this)),Vn(t,"packet",this.onpacket.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(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,u;if(o2.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 l={type:Qe.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,y=n.pop();this._registerAckCallback(g,y),l.id=g}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&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),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 u=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),l=(...c)=>{this.io.clearTimeoutFn(u),n.apply(this,c)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...n){return new Promise((r,o)=>{const u=(l,c)=>l?o(l):r(c);u.withError=!0,n.push(u),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,...u)=>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,...u)),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:Qe.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 Qe.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 Qe.EVENT:case Qe.BINARY_EVENT:this.onevent(t);break;case Qe.ACK:case Qe.BINARY_ACK:this.onack(t);break;case Qe.DISCONNECT:this.ondisconnect();break;case Qe.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:Qe.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:Qe.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 Vi(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}Vi.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},Vi.prototype.reset=function(){this.attempts=0},Vi.prototype.setMin=function(e){this.ms=e},Vi.prototype.setMax=function(e){this.max=e},Vi.prototype.setJitter=function(e){this.jitter=e};class _c extends wt{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,Du(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 Vi({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||s2;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 W_(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Vn(n,"open",function(){r.onopen(),t&&t()}),u=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},l=Vn(n,"error",u);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),u(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(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Vn(t,"ping",this.onping.bind(this)),Vn(t,"data",this.ondata.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(t,"close",this.onclose.bind(this)),Vn(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){Lu(()=>{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 Dp(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 Js={};function Bu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=G_(e,t.path||"/socket.io"),r=n.source,o=n.id,u=n.path,l=Js[o]&&u in Js[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let d;return c?d=new _c(r,t):(Js[o]||(Js[o]=new _c(r,t)),d=Js[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Bu,{Manager:_c,Socket:Dp,io:Bu,connect:Bu});var u2=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===a2}(t)}(e)},a2=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Zs(e,t){return t.clone!==!1&&t.isMergeableObject(e)?qi((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function l2(e,t,n){return e.concat(t).map(function(r){return Zs(r,n)})}function Mp(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 Fp(e,t){try{return t in e}catch(n){return!1}}function c2(e,t,n){var r={};return n.isMergeableObject(e)&&Mp(e).forEach(function(o){r[o]=Zs(e[o],n)}),Mp(t).forEach(function(o){(function(u,l){return Fp(u,l)&&!(Object.hasOwnProperty.call(u,l)&&Object.propertyIsEnumerable.call(u,l))})(e,o)||(Fp(e,o)&&n.isMergeableObject(t[o])?r[o]=function(u,l){if(!l.customMerge)return qi;var c=l.customMerge(u);return typeof c=="function"?c:qi}(o,n)(e[o],t[o],n):r[o]=Zs(t[o],n))}),r}function qi(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||l2,n.isMergeableObject=n.isMergeableObject||u2,n.cloneUnlessOtherwiseSpecified=Zs;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):c2(e,t,n):Zs(t,n)}qi.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,r){return qi(n,r,t)},{})};var f2=qi;class d2{constructor(t){Object.assign(this,t)}}function nn(e){if(e)return function(t){for(var n in nn.prototype)t[n]=nn.prototype[n];return t}(e)}nn.prototype.on=nn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},nn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},nn.prototype.off=nn.prototype.removeListener=nn.prototype.removeAllListeners=nn.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},nn.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},nn.prototype.emitReserved=nn.prototype.emit,nn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},nn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const h2=typeof ArrayBuffer=="function",Bp=Object.prototype.toString,p2=typeof Blob=="function"||typeof Blob!="undefined"&&Bp.call(Blob)==="[object BlobConstructor]",m2=typeof File=="function"||typeof File!="undefined"&&Bp.call(File)==="[object FileConstructor]";function Sc(e){return h2&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||p2&&e instanceof Blob||m2&&e instanceof File}function Uu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Uu(e[n]))return!0;return!1}if(Sc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Uu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Uu(e[n]))return!0;return!1}function g2(e){const t=[],n=e.data,r=e;return r.data=xc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function xc(e,t){if(!e)return e;if(Sc(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]=xc(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]=xc(e[r],t));return n}return e}function E2(e,t){return e.data=Cc(e.data,t),delete e.attachments,e}function Cc(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]=Cc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Cc(e[n],t));return e}const y2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ht;(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"})(ht||(ht={}));class T2{constructor(t){this.replacer=t}encode(t){return t.type!==ht.EVENT&&t.type!==ht.ACK||!Uu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===ht.EVENT?ht.BINARY_EVENT:ht.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==ht.BINARY_EVENT&&t.type!==ht.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=g2(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Up(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ac extends nn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===ht.BINARY_EVENT;r||n.type===ht.BINARY_ACK?(n.type=r?ht.EVENT:ht.ACK,this.reconstructor=new b2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Sc(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(ht[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ht.BINARY_EVENT||r.type===ht.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(u,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(l)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(!Ac.isPayloadValid(r.type,u))throw new Error("invalid payload");r.data=u}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case ht.CONNECT:return Up(n);case ht.DISCONNECT:return n===void 0;case ht.CONNECT_ERROR:return typeof n=="string"||Up(n);case ht.EVENT:case ht.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&y2.indexOf(n[0])===-1);case ht.ACK:case ht.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class b2{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=E2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Hp=["searchParams.facetFilters","hits","products"],zp=(e,t,n)=>function r(o,u=[]){const l=Object.entries(o).map(([c,d])=>{const h=[...u,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(h.join(".")))?r(d,h):d]});return Array.isArray(o)?l.map(c=>c[1]):Object.fromEntries(l)},jp=e=>e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),_2=zp(e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),e=>e,Hp),S2=zp(jp,jp,Hp),x2={Encoder:class extends T2{encode(e){var t,n;return super.encode(He(G({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],_2(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 Ac{constructor(){super((e,t)=>e==""&&Array.isArray(t)?t.map(n=>n instanceof Object?S2(n):n):t)}}},C2={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class A2{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:u={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=h=>{console.log("[Copilot SDK] Connect Ack:",h),this.socket.auth={[this.sessionIdKey]:h.sessionId}},this.handleDisconnect=h=>{console.warn(`[Copilot SDK] Disconnected: ${h}`),h!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${h}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=h=>{console.error(`[Copilot SDK] Connect error: ${h.message}`);const g=h.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=g==null?void 0:g[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const l=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const d=[C2,u,{parser:x2,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Bu(l,f2.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*sc(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 jt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return jt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return jt(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 jt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}requestSessionInformation(t){return jt(this,null,function*(){return new Promise(n=>{this.socket.emit("session_info",r=>{t&&t(r),n(r)})})})}getConversationEvents(t,n){return jt(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 jt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const u=function(l){return oc(this,null,function*(){const c=[];let d=!1,h=null;const g=yield new Tr(l({emit:y=>{c.push(y),h&&(h(),h=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Tr(new Promise(y=>{h=y}));for(;c.length>0;)yield c.shift()}finally{yield new Tr(g==null?void 0:g())}})}(({emit:l,cancel:c})=>{const d=(h,g)=>{["done","error"].includes(g.name)&&c(),g.eventSourceId==o&&l(g)};return this.socket.onAny(d),()=>jt(this,null,function*(){this.socket.offAny(d)})});return{result:yield new Promise((l,c)=>this.socket.emit(t,n,d=>{d.name==="error"?c(new d2(d)):(o=d==null?void 0:d.id,l(d))})),events:u}})}}var K=$i();const di=We(K);function $p(e,t){return function(){return e.apply(t,arguments)}}const{toString:k2}=Object.prototype,{getPrototypeOf:kc}=Object,{iterator:Hu,toStringTag:Vp}=Symbol,zu=(e=>t=>{const n=k2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),t=>zu(t)===e),ju=e=>t=>typeof t===e,{isArray:Yi}=Array,Wi=ju("undefined");function eo(e){return e!==null&&!Wi(e)&&e.constructor!==null&&!Wi(e.constructor)&&an(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qp=qn("ArrayBuffer");function w2(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qp(e.buffer),t}const v2=ju("string"),an=ju("function"),Yp=ju("number"),to=e=>e!==null&&typeof e=="object",N2=e=>e===!0||e===!1,$u=e=>{if(zu(e)!=="object")return!1;const t=kc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Vp in e)&&!(Hu in e)},I2=e=>{if(!to(e)||eo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},O2=qn("Date"),P2=qn("File"),R2=qn("Blob"),L2=qn("FileList"),D2=e=>to(e)&&an(e.pipe),M2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||an(e.append)&&((t=zu(e))==="formdata"||t==="object"&&an(e.toString)&&e.toString()==="[object FormData]"))},F2=qn("URLSearchParams"),[B2,U2,H2,z2]=["ReadableStream","Request","Response","Headers"].map(qn),j2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function no(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Yi(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(eo(e))return;const u=n?Object.getOwnPropertyNames(e):Object.keys(e),l=u.length;let c;for(r=0;r<l;r++)c=u[r],t.call(null,e[c],c,e)}}function Wp(e,t){if(eo(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 hi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Gp=e=>!Wi(e)&&e!==hi;function wc(){const{caseless:e,skipUndefined:t}=Gp(this)&&this||{},n={},r=(o,u)=>{const l=e&&Wp(n,u)||u;$u(n[l])&&$u(o)?n[l]=wc(n[l],o):$u(o)?n[l]=wc({},o):Yi(o)?n[l]=o.slice():(!t||!Wi(o))&&(n[l]=o)};for(let o=0,u=arguments.length;o<u;o++)arguments[o]&&no(arguments[o],r);return n}const $2=(e,t,n,{allOwnKeys:r}={})=>(no(t,(o,u)=>{n&&an(o)?e[u]=$p(o,n):e[u]=o},{allOwnKeys:r}),e),V2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),q2=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Y2=(e,t,n,r)=>{let o,u,l;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),u=o.length;u-- >0;)l=o[u],(!r||r(l,e,t))&&!c[l]&&(t[l]=e[l],c[l]=!0);e=n!==!1&&kc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},W2=(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},G2=e=>{if(!e)return null;if(Yi(e))return e;let t=e.length;if(!Yp(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},K2=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&kc(Uint8Array)),Q2=(e,t)=>{const r=(e&&e[Hu]).call(e);let o;for(;(o=r.next())&&!o.done;){const u=o.value;t.call(e,u[0],u[1])}},X2=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},J2=qn("HTMLFormElement"),Z2=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Kp=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),eS=qn("RegExp"),Qp=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};no(n,(o,u)=>{let l;(l=t(o,u,e))!==!1&&(r[u]=l||o)}),Object.defineProperties(e,r)},tS=e=>{Qp(e,(t,n)=>{if(an(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(an(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+"'")})}})},nS=(e,t)=>{const n={},r=o=>{o.forEach(u=>{n[u]=!0})};return Yi(e)?r(e):r(String(e).split(t)),n},rS=()=>{},iS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function sS(e){return!!(e&&an(e.append)&&e[Vp]==="FormData"&&e[Hu])}const oS=e=>{const t=new Array(10),n=(r,o)=>{if(to(r)){if(t.indexOf(r)>=0)return;if(eo(r))return r;if(!("toJSON"in r)){t[o]=r;const u=Yi(r)?[]:{};return no(r,(l,c)=>{const d=n(l,o+1);!Wi(d)&&(u[c]=d)}),t[o]=void 0,u}}return r};return n(e,0)},uS=qn("AsyncFunction"),aS=e=>e&&(to(e)||an(e))&&an(e.then)&&an(e.catch),Xp=((e,t)=>e?setImmediate:t?((n,r)=>(hi.addEventListener("message",({source:o,data:u})=>{o===hi&&u===n&&r.length&&r.shift()()},!1),o=>{r.push(o),hi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",an(hi.postMessage)),lS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(hi):typeof process!="undefined"&&process.nextTick||Xp,q={isArray:Yi,isArrayBuffer:qp,isBuffer:eo,isFormData:M2,isArrayBufferView:w2,isString:v2,isNumber:Yp,isBoolean:N2,isObject:to,isPlainObject:$u,isEmptyObject:I2,isReadableStream:B2,isRequest:U2,isResponse:H2,isHeaders:z2,isUndefined:Wi,isDate:O2,isFile:P2,isBlob:R2,isRegExp:eS,isFunction:an,isStream:D2,isURLSearchParams:F2,isTypedArray:K2,isFileList:L2,forEach:no,merge:wc,extend:$2,trim:j2,stripBOM:V2,inherits:q2,toFlatObject:Y2,kindOf:zu,kindOfTest:qn,endsWith:W2,toArray:G2,forEachEntry:Q2,matchAll:X2,isHTMLForm:J2,hasOwnProperty:Kp,hasOwnProp:Kp,reduceDescriptors:Qp,freezeMethods:tS,toObjectSet:nS,toCamelCase:Z2,noop:rS,toFiniteNumber:iS,findKey:Wp,global:hi,isContextDefined:Gp,isSpecCompliantForm:sS,toJSONObject:oS,isAsyncFn:uS,isThenable:aS,setImmediate:Xp,asap:lS,isIterable:e=>e!=null&&an(e[Hu])};function je(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}q.inherits(je,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const Jp=je.prototype,Zp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Zp[e]={value:e}}),Object.defineProperties(je,Zp),Object.defineProperty(Jp,"isAxiosError",{value:!0}),je.from=(e,t,n,r,o,u)=>{const l=Object.create(Jp);q.toFlatObject(e,l,function(g){return g!==Error.prototype},h=>h!=="isAxiosError");const c=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return je.call(l,c,d,n,r,o),e&&l.cause==null&&Object.defineProperty(l,"cause",{value:e,configurable:!0}),l.name=e&&e.name||"Error",u&&Object.assign(l,u),l};const cS=null;function vc(e){return q.isPlainObject(e)||q.isArray(e)}function em(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function tm(e,t,n){return e?e.concat(t).map(function(o,u){return o=em(o),!n&&u?"["+o+"]":o}).join(n?".":""):t}function fS(e){return q.isArray(e)&&!e.some(vc)}const dS=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Vu(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(k,P){return!q.isUndefined(P[k])});const r=n.metaTokens,o=n.visitor||g,u=n.dots,l=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function h(S){if(S===null)return"";if(q.isDate(S))return S.toISOString();if(q.isBoolean(S))return S.toString();if(!d&&q.isBlob(S))throw new je("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(S)||q.isTypedArray(S)?d&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,k,P){let L=S;if(S&&!P&&typeof S=="object"){if(q.endsWith(k,"{}"))k=r?k:k.slice(0,-2),S=JSON.stringify(S);else if(q.isArray(S)&&fS(S)||(q.isFileList(S)||q.endsWith(k,"[]"))&&(L=q.toArray(S)))return k=em(k),L.forEach(function($,Z){!(q.isUndefined($)||$===null)&&t.append(l===!0?tm([k],Z,u):l===null?k:k+"[]",h($))}),!1}return vc(S)?!0:(t.append(tm(P,k,u),h(S)),!1)}const y=[],b=Object.assign(dS,{defaultVisitor:g,convertValue:h,isVisitable:vc});function T(S,k){if(!q.isUndefined(S)){if(y.indexOf(S)!==-1)throw Error("Circular reference detected in "+k.join("."));y.push(S),q.forEach(S,function(L,H){(!(q.isUndefined(L)||L===null)&&o.call(t,L,q.isString(H)?H.trim():H,k,b))===!0&&T(L,k?k.concat(H):[H])}),y.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return T(e),t}function nm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Nc(e,t){this._pairs=[],e&&Vu(e,this,t)}const rm=Nc.prototype;rm.append=function(t,n){this._pairs.push([t,n])},rm.toString=function(t){const n=t?function(r){return t.call(this,r,nm)}:nm;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function hS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function im(e,t,n){if(!t)return e;const r=n&&n.encode||hS;q.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let u;if(o?u=o(t,n):u=q.isURLSearchParams(t)?t.toString():new Nc(t,n).toString(r),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class sm{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 om={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pS={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Nc,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ic=typeof window!="undefined"&&typeof document!="undefined",Oc=typeof navigator=="object"&&navigator||void 0,mS=Ic&&(!Oc||["ReactNative","NativeScript","NS"].indexOf(Oc.product)<0),gS=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ES=Ic&&window.location.href||"http://localhost",Gt=G(G({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ic,hasStandardBrowserEnv:mS,hasStandardBrowserWebWorkerEnv:gS,navigator:Oc,origin:ES},Symbol.toStringTag,{value:"Module"}))),pS);function yS(e,t){return Vu(e,new Gt.classes.URLSearchParams,G({visitor:function(n,r,o,u){return Gt.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},t))}function TS(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function bS(e){const t={},n=Object.keys(e);let r;const o=n.length;let u;for(r=0;r<o;r++)u=n[r],t[u]=e[u];return t}function um(e){function t(n,r,o,u){let l=n[u++];if(l==="__proto__")return!0;const c=Number.isFinite(+l),d=u>=n.length;return l=!l&&q.isArray(o)?o.length:l,d?(q.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!c):((!o[l]||!q.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],u)&&q.isArray(o[l])&&(o[l]=bS(o[l])),!c)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,o)=>{t(TS(r),o,n,0)}),n}return null}function _S(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 ro={transitional:om,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,u=q.isObject(t);if(u&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return o?JSON.stringify(um(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(u){if(r.indexOf("application/x-www-form-urlencoded")>-1)return yS(t,this.formSerializer).toString();if((c=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Vu(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return u||o?(n.setContentType("application/json",!1),_S(t)):t}],transformResponse:[function(t){const n=this.transitional||ro.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(l)throw c.name==="SyntaxError"?je.from(c,je.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Gt.classes.FormData,Blob:Gt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{ro.headers[e]={}});const SS=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"]),xS=e=>{const t={};let n,r,o;return e&&e.split(`
19
- `).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!n||t[n]&&SS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},am=Symbol("internals");function io(e){return e&&String(e).trim().toLowerCase()}function qu(e){return e===!1||e==null?e:q.isArray(e)?e.map(qu):String(e)}function CS(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 AS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Pc(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 kS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function wS(e,t){const n=q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,u,l){return this[r].call(this,t,o,u,l)},configurable:!0})})}let ln=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function u(c,d,h){const g=io(d);if(!g)throw new Error("header name must be a non-empty string");const y=q.findKey(o,g);(!y||o[y]===void 0||h===!0||h===void 0&&o[y]!==!1)&&(o[y||d]=qu(c))}const l=(c,d)=>q.forEach(c,(h,g)=>u(h,g,d));if(q.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(q.isString(t)&&(t=t.trim())&&!AS(t))l(xS(t),n);else if(q.isObject(t)&&q.isIterable(t)){let c={},d,h;for(const g of t){if(!q.isArray(g))throw TypeError("Object iterator must return a key-value pair");c[h=g[0]]=(d=c[h])?q.isArray(d)?[...d,g[1]]:[d,g[1]]:g[1]}l(c,n)}else t!=null&&u(n,t,r);return this}get(t,n){if(t=io(t),t){const r=q.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return CS(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=io(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Pc(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function u(l){if(l=io(l),l){const c=q.findKey(r,l);c&&(!n||Pc(r,r[c],c,n))&&(delete r[c],o=!0)}}return q.isArray(t)?t.forEach(u):u(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const u=n[r];(!t||Pc(this,this[u],u,t,!0))&&(delete this[u],o=!0)}return o}normalize(t){const n=this,r={};return q.forEach(this,(o,u)=>{const l=q.findKey(r,u);if(l){n[l]=qu(o),delete n[u];return}const c=t?kS(u):String(u).trim();c!==u&&delete n[u],n[c]=qu(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(`
20
- `)}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[am]=this[am]={accessors:{}}).accessors,o=this.prototype;function u(l){const c=io(l);r[c]||(wS(o,l),r[c]=!0)}return q.isArray(t)?t.forEach(u):u(t),this}};ln.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(ln.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),q.freezeMethods(ln);function Rc(e,t){const n=this||ro,r=t||n,o=ln.from(r.headers);let u=r.data;return q.forEach(e,function(c){u=c.call(n,u,o.normalize(),t?t.status:void 0)}),o.normalize(),u}function lm(e){return!!(e&&e.__CANCEL__)}function Gi(e,t,n){je.call(this,e==null?"canceled":e,je.ERR_CANCELED,t,n),this.name="CanceledError"}q.inherits(Gi,je,{__CANCEL__:!0});function cm(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new je("Request failed with status code "+n.status,[je.ERR_BAD_REQUEST,je.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function vS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function NS(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,u=0,l;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),g=r[u];l||(l=h),n[o]=d,r[o]=h;let y=u,b=0;for(;y!==o;)b+=n[y++],y=y%e;if(o=(o+1)%e,o===u&&(u=(u+1)%e),h-l<t)return;const T=g&&h-g;return T?Math.round(b*1e3/T):void 0}}function IS(e,t){let n=0,r=1e3/t,o,u;const l=(h,g=Date.now())=>{n=g,o=null,u&&(clearTimeout(u),u=null),e(...h)};return[(...h)=>{const g=Date.now(),y=g-n;y>=r?l(h,g):(o=h,u||(u=setTimeout(()=>{u=null,l(o)},r-y)))},()=>o&&l(o)]}const Yu=(e,t,n=3)=>{let r=0;const o=NS(50,250);return IS(u=>{const l=u.loaded,c=u.lengthComputable?u.total:void 0,d=l-r,h=o(d),g=l<=c;r=l;const y={loaded:l,total:c,progress:c?l/c:void 0,bytes:d,rate:h||void 0,estimated:h&&c&&g?(c-l)/h:void 0,event:u,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(y)},n)},fm=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},dm=e=>(...t)=>q.asap(()=>e(...t)),OS=Gt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Gt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Gt.origin),Gt.navigator&&/(msie|trident)/i.test(Gt.navigator.userAgent)):()=>!0,PS=Gt.hasStandardBrowserEnv?{write(e,t,n,r,o,u){const l=[e+"="+encodeURIComponent(t)];q.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),q.isString(r)&&l.push("path="+r),q.isString(o)&&l.push("domain="+o),u===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function RS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function LS(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function hm(e,t,n){let r=!RS(t);return e&&(r||n==!1)?LS(e,t):t}const pm=e=>e instanceof ln?G({},e):e;function pi(e,t){t=t||{};const n={};function r(h,g,y,b){return q.isPlainObject(h)&&q.isPlainObject(g)?q.merge.call({caseless:b},h,g):q.isPlainObject(g)?q.merge({},g):q.isArray(g)?g.slice():g}function o(h,g,y,b){if(q.isUndefined(g)){if(!q.isUndefined(h))return r(void 0,h,y,b)}else return r(h,g,y,b)}function u(h,g){if(!q.isUndefined(g))return r(void 0,g)}function l(h,g){if(q.isUndefined(g)){if(!q.isUndefined(h))return r(void 0,h)}else return r(void 0,g)}function c(h,g,y){if(y in t)return r(h,g);if(y in e)return r(void 0,h)}const d={url:u,method:u,data:u,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(h,g,y)=>o(pm(h),pm(g),y,!0)};return q.forEach(Object.keys(G(G({},e),t)),function(g){const y=d[g]||o,b=y(e[g],t[g],g);q.isUndefined(b)&&y!==c||(n[g]=b)}),n}const mm=e=>{const t=pi({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:u,headers:l,auth:c}=t;if(t.headers=l=ln.from(l),t.url=im(hm(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),q.isFormData(n)){if(Gt.hasStandardBrowserEnv||Gt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(q.isFunction(n.getHeaders)){const d=n.getHeaders(),h=["content-type","content-length"];Object.entries(d).forEach(([g,y])=>{h.includes(g.toLowerCase())&&l.set(g,y)})}}if(Gt.hasStandardBrowserEnv&&(r&&q.isFunction(r)&&(r=r(t)),r||r!==!1&&OS(t.url))){const d=o&&u&&PS.read(u);d&&l.set(o,d)}return t},DS=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=mm(e);let u=o.data;const l=ln.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=o,g,y,b,T,S;function k(){T&&T(),S&&S(),o.cancelToken&&o.cancelToken.unsubscribe(g),o.signal&&o.signal.removeEventListener("abort",g)}let P=new XMLHttpRequest;P.open(o.method.toUpperCase(),o.url,!0),P.timeout=o.timeout;function L(){if(!P)return;const $=ln.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),he={data:!c||c==="text"||c==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:$,config:e,request:P};cm(function(Ee){n(Ee),k()},function(Ee){r(Ee),k()},he),P=null}"onloadend"in P?P.onloadend=L:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(L)},P.onabort=function(){P&&(r(new je("Request aborted",je.ECONNABORTED,e,P)),P=null)},P.onerror=function(Z){const he=Z&&Z.message?Z.message:"Network Error",M=new je(he,je.ERR_NETWORK,e,P);M.event=Z||null,r(M),P=null},P.ontimeout=function(){let Z=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const he=o.transitional||om;o.timeoutErrorMessage&&(Z=o.timeoutErrorMessage),r(new je(Z,he.clarifyTimeoutError?je.ETIMEDOUT:je.ECONNABORTED,e,P)),P=null},u===void 0&&l.setContentType(null),"setRequestHeader"in P&&q.forEach(l.toJSON(),function(Z,he){P.setRequestHeader(he,Z)}),q.isUndefined(o.withCredentials)||(P.withCredentials=!!o.withCredentials),c&&c!=="json"&&(P.responseType=o.responseType),h&&([b,S]=Yu(h,!0),P.addEventListener("progress",b)),d&&P.upload&&([y,T]=Yu(d),P.upload.addEventListener("progress",y),P.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(g=$=>{P&&(r(!$||$.type?new Gi(null,e,P):$),P.abort(),P=null)},o.cancelToken&&o.cancelToken.subscribe(g),o.signal&&(o.signal.aborted?g():o.signal.addEventListener("abort",g)));const H=vS(o.url);if(H&&Gt.protocols.indexOf(H)===-1){r(new je("Unsupported protocol "+H+":",je.ERR_BAD_REQUEST,e));return}P.send(u||null)})},MS=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const u=function(h){if(!o){o=!0,c();const g=h instanceof Error?h:this.reason;r.abort(g instanceof je?g:new Gi(g instanceof Error?g.message:g))}};let l=t&&setTimeout(()=>{l=null,u(new je(`timeout ${t} of ms exceeded`,je.ETIMEDOUT))},t);const c=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(u):h.removeEventListener("abort",u)}),e=null)};e.forEach(h=>h.addEventListener("abort",u));const{signal:d}=r;return d.unsubscribe=()=>q.asap(c),d}},FS=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},BS=function(e,t){return oc(this,null,function*(){try{for(var n=f_(US(e)),r,o,u;r=!(o=yield new Tr(n.next())).done;r=!1){const l=o.value;yield*Ep(FS(l,t))}}catch(o){u=[o]}finally{try{r&&(o=n.return)&&(yield new Tr(o.call(n)))}finally{if(u)throw u[0]}}})},US=function(e){return oc(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Ep(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Tr(t.read());if(n)break;yield r}}finally{yield new Tr(t.cancel())}})},gm=(e,t,n,r)=>{const o=BS(e,t);let u=0,l,c=h=>{l||(l=!0,r&&r(h))};return new ReadableStream({pull(h){return jt(this,null,function*(){try{const{done:g,value:y}=yield o.next();if(g){c(),h.close();return}let b=y.byteLength;if(n){let T=u+=b;n(T)}h.enqueue(new Uint8Array(y))}catch(g){throw c(g),g}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})},Em=64*1024,{isFunction:Wu}=q,HS=(({Request:e,Response:t})=>({Request:e,Response:t}))(q.global),{ReadableStream:ym,TextEncoder:Tm}=q.global,bm=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},zS=e=>{e=q.merge.call({skipUndefined:!0},HS,e);const{fetch:t,Request:n,Response:r}=e,o=t?Wu(t):typeof fetch=="function",u=Wu(n),l=Wu(r);if(!o)return!1;const c=o&&Wu(ym),d=o&&(typeof Tm=="function"?(S=>k=>S.encode(k))(new Tm):S=>jt(null,null,function*(){return new Uint8Array(yield new n(S).arrayBuffer())})),h=u&&c&&bm(()=>{let S=!1;const k=new n(Gt.origin,{body:new ym,method:"POST",get duplex(){return S=!0,"half"}}).headers.has("Content-Type");return S&&!k}),g=l&&c&&bm(()=>q.isReadableStream(new r("").body)),y={stream:g&&(S=>S.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!y[S]&&(y[S]=(k,P)=>{let L=k&&k[S];if(L)return L.call(k);throw new je(`Response type '${S}' is not supported`,je.ERR_NOT_SUPPORT,P)})});const b=S=>jt(null,null,function*(){if(S==null)return 0;if(q.isBlob(S))return S.size;if(q.isSpecCompliantForm(S))return(yield new n(Gt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(q.isArrayBufferView(S)||q.isArrayBuffer(S))return S.byteLength;if(q.isURLSearchParams(S)&&(S=S+""),q.isString(S))return(yield d(S)).byteLength}),T=(S,k)=>jt(null,null,function*(){const P=q.toFiniteNumber(S.getContentLength());return P==null?b(k):P});return S=>jt(null,null,function*(){let{url:k,method:P,data:L,signal:H,cancelToken:$,timeout:Z,onDownloadProgress:he,onUploadProgress:M,responseType:Ee,headers:ke,withCredentials:Ne="same-origin",fetchOptions:U}=mm(S),ge=t||fetch;Ee=Ee?(Ee+"").toLowerCase():"text";let me=MS([H,$&&$.toAbortSignal()],Z),pe=null;const le=me&&me.unsubscribe&&(()=>{me.unsubscribe()});let _e;try{if(M&&h&&P!=="get"&&P!=="head"&&(_e=yield T(ke,L))!==0){let O=new n(k,{method:"POST",body:L,duplex:"half"}),Y;if(q.isFormData(L)&&(Y=O.headers.get("content-type"))&&ke.setContentType(Y),O.body){const[x,re]=fm(_e,Yu(dm(M)));L=gm(O.body,Em,x,re)}}q.isString(Ne)||(Ne=Ne?"include":"omit");const Pe=u&&"credentials"in n.prototype,ce=He(G({},U),{signal:me,method:P.toUpperCase(),headers:ke.normalize().toJSON(),body:L,duplex:"half",credentials:Pe?Ne:void 0});pe=u&&new n(k,ce);let V=yield u?ge(pe,U):ge(k,ce);const ne=g&&(Ee==="stream"||Ee==="response");if(g&&(he||ne&&le)){const O={};["status","statusText","headers"].forEach(be=>{O[be]=V[be]});const Y=q.toFiniteNumber(V.headers.get("content-length")),[x,re]=he&&fm(Y,Yu(dm(he),!0))||[];V=new r(gm(V.body,Em,x,()=>{re&&re(),le&&le()}),O)}Ee=Ee||"text";let C=yield y[q.findKey(y,Ee)||"text"](V,S);return!ne&&le&&le(),yield new Promise((O,Y)=>{cm(O,Y,{data:C,headers:ln.from(V.headers),status:V.status,statusText:V.statusText,config:S,request:pe})})}catch(Pe){throw le&&le(),Pe&&Pe.name==="TypeError"&&/Load failed|fetch/i.test(Pe.message)?Object.assign(new je("Network Error",je.ERR_NETWORK,S,pe),{cause:Pe.cause||Pe}):je.from(Pe,Pe&&Pe.code,S,pe)}})},jS=new Map,_m=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,u=[r,o,n];let l=u.length,c=l,d,h,g=jS;for(;c--;)d=u[c],h=g.get(d),h===void 0&&g.set(d,h=c?new Map:zS(t)),g=h;return h};_m();const Lc={http:cS,xhr:DS,fetch:{get:_m}};q.forEach(Lc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const Sm=e=>`- ${e}`,$S=e=>q.isFunction(e)||e===null||e===!1,xm={getAdapter:(e,t)=>{e=q.isArray(e)?e:[e];const{length:n}=e;let r,o;const u={};for(let l=0;l<n;l++){r=e[l];let c;if(o=r,!$S(r)&&(o=Lc[(c=String(r)).toLowerCase()],o===void 0))throw new je(`Unknown adapter '${c}'`);if(o&&(q.isFunction(o)||(o=o.get(t))))break;u[c||"#"+l]=o}if(!o){const l=Object.entries(u).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?l.length>1?`since :
21
- `+l.map(Sm).join(`
22
- `):" "+Sm(l[0]):"as no adapter specified";throw new je("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o},adapters:Lc};function Dc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gi(null,e)}function Cm(e){return Dc(e),e.headers=ln.from(e.headers),e.data=Rc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xm.getAdapter(e.adapter||ro.adapter,e)(e).then(function(r){return Dc(e),r.data=Rc.call(e,e.transformResponse,r),r.headers=ln.from(r.headers),r},function(r){return lm(r)||(Dc(e),r&&r.response&&(r.response.data=Rc.call(e,e.transformResponse,r.response),r.response.headers=ln.from(r.response.headers))),Promise.reject(r)})}const Am="1.12.2",Gu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const km={};Gu.transitional=function(t,n,r){function o(u,l){return"[Axios v"+Am+"] Transitional option '"+u+"'"+l+(r?". "+r:"")}return(u,l,c)=>{if(t===!1)throw new je(o(l," has been removed"+(n?" in "+n:"")),je.ERR_DEPRECATED);return n&&!km[l]&&(km[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(u,l,c):!0}},Gu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function VS(e,t,n){if(typeof e!="object")throw new je("options must be an object",je.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const u=r[o],l=t[u];if(l){const c=e[u],d=c===void 0||l(c,u,e);if(d!==!0)throw new je("option "+u+" must be "+d,je.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new je("Unknown option "+u,je.ERR_BAD_OPTION)}}const Ku={assertOptions:VS,validators:Gu},sr=Ku.validators;let mi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new sm,response:new sm}}request(t,n){return jt(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 u=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?u&&!String(r.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(r.stack+=`
23
- `+u):r.stack=u}catch(l){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=pi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:u}=n;r!==void 0&&Ku.assertOptions(r,{silentJSONParsing:sr.transitional(sr.boolean),forcedJSONParsing:sr.transitional(sr.boolean),clarifyTimeoutError:sr.transitional(sr.boolean)},!1),o!=null&&(q.isFunction(o)?n.paramsSerializer={serialize:o}:Ku.assertOptions(o,{encode:sr.function,serialize:sr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ku.assertOptions(n,{baseUrl:sr.spelling("baseURL"),withXsrfToken:sr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=u&&q.merge(u.common,u[n.method]);u&&q.forEach(["delete","get","head","post","put","patch","common"],S=>{delete u[S]}),n.headers=ln.concat(l,u);const c=[];let d=!0;this.interceptors.request.forEach(function(k){typeof k.runWhen=="function"&&k.runWhen(n)===!1||(d=d&&k.synchronous,c.unshift(k.fulfilled,k.rejected))});const h=[];this.interceptors.response.forEach(function(k){h.push(k.fulfilled,k.rejected)});let g,y=0,b;if(!d){const S=[Cm.bind(this),void 0];for(S.unshift(...c),S.push(...h),b=S.length,g=Promise.resolve(n);y<b;)g=g.then(S[y++],S[y++]);return g}b=c.length;let T=n;for(;y<b;){const S=c[y++],k=c[y++];try{T=S(T)}catch(P){k.call(this,P);break}}try{g=Cm.call(this,T)}catch(S){return Promise.reject(S)}for(y=0,b=h.length;y<b;)g=g.then(h[y++],h[y++]);return g}getUri(t){t=pi(this.defaults,t);const n=hm(t.baseURL,t.url,t.allowAbsoluteUrls);return im(n,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){mi.prototype[t]=function(n,r){return this.request(pi(r||{},{method:t,url:n,data:(r||{}).data}))}}),q.forEach(["post","put","patch"],function(t){function n(r){return function(u,l,c){return this.request(pi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:u,data:l}))}}mi.prototype[t]=n(),mi.prototype[t+"Form"]=n(!0)});let qS=class d_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(o=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](o);r._listeners=null}),this.promise.then=o=>{let u;const l=new Promise(c=>{r.subscribe(c),u=c}).then(o);return l.cancel=function(){r.unsubscribe(u)},l},t(function(u,l,c){r.reason||(r.reason=new Gi(u,l,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 d_(function(o){t=o}),cancel:t}}};function YS(e){return function(n){return e.apply(null,n)}}function WS(e){return q.isObject(e)&&e.isAxiosError===!0}const Mc={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};Object.entries(Mc).forEach(([e,t])=>{Mc[t]=e});function wm(e){const t=new mi(e),n=$p(mi.prototype.request,t);return q.extend(n,mi.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return wm(pi(e,o))},n}const bt=wm(ro);bt.Axios=mi,bt.CanceledError=Gi,bt.CancelToken=qS,bt.isCancel=lm,bt.VERSION=Am,bt.toFormData=Vu,bt.AxiosError=je,bt.Cancel=bt.CanceledError,bt.all=function(t){return Promise.all(t)},bt.spread=YS,bt.isAxiosError=WS,bt.mergeConfig=pi,bt.AxiosHeaders=ln,bt.formToJSON=e=>um(q.isHTMLForm(e)?new FormData(e):e),bt.getAdapter=xm.getAdapter,bt.HttpStatusCode=Mc,bt.default=bt;const{Axios:sD,AxiosError:oD,CanceledError:uD,isCancel:aD,CancelToken:lD,VERSION:cD,all:fD,Cancel:dD,isAxiosError:hD,spread:pD,toFormData:mD,AxiosHeaders:gD,HttpStatusCode:ED,formToJSON:yD,getAdapter:TD,mergeConfig:bD}=bt;class vm{constructor(t,n,r=!1){Me(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Me(this,"CIMULATE_SEARCH_API_PATH","api/v1");Me(this,"baseApiUrl");Me(this,"headers",{});Me(this,"fetchConfig",()=>jt(this,null,function*(){try{const t=yield bt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));if(t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");t?this.headers[this.CIMULATE_API_HEADER]=t:n&&(this.headers.Authorization=`Bearer ${n}`),this.baseApiUrl=r?"https://staging.search.cimulate.ai":"https://prod.search.cimulate.ai"}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}const GS=K.createContext(void 0),KS=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=K.useMemo(()=>new vm(e,t,n),[e,t,n]);return I.jsx(GS.Provider,{value:o,children:r})};var Nm=Symbol.for("immer-nothing"),Im=Symbol.for("immer-draftable"),tt=Symbol.for("immer-state");function Pn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ki=Object.getPrototypeOf;function Qi(e){return!!e&&!!e[tt]}function br(e){var t;return e?Om(e)||Array.isArray(e)||!!e[Im]||!!((t=e.constructor)!=null&&t[Im])||Xu(e)||Ju(e):!1}var QS=Object.prototype.constructor.toString();function Om(e){if(!e||typeof e!="object")return!1;const t=Ki(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)===QS}function so(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[tt];return t?t.type_:Array.isArray(e)?1:Xu(e)?2:Ju(e)?3:0}function Fc(e,t){return Qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pm(e,t,n){const r=Qu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function XS(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Xu(e){return e instanceof Map}function Ju(e){return e instanceof Set}function Dt(e){return e.copy_||e.base_}function Bc(e,t){if(Xu(e))return new Map(e);if(Ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Om(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[tt];let o=Reflect.ownKeys(r);for(let u=0;u<o.length;u++){const l=o[u],c=r[l];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[l]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[l]})}return Object.create(Ki(e),r)}else{const r=Ki(e);if(r!==null&&n)return G({},e);const o=Object.create(r);return Object.assign(o,e)}}function Uc(e,t=!1){return Zu(e)||Qi(e)||!br(e)||(Qu(e)>1&&(e.set=e.add=e.clear=e.delete=JS),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Uc(r,!0))),e}function JS(){Pn(2)}function Zu(e){return Object.isFrozen(e)}var Hc={};function gi(e){const t=Hc[e];return t||Pn(0,e),t}function ZS(e,t){Hc[e]||(Hc[e]=t)}var oo;function ea(){return oo}function ex(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Rm(e,t){t&&(gi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zc(e){jc(e),e.drafts_.forEach(tx),e.drafts_=null}function jc(e){e===oo&&(oo=e.parent_)}function Lm(e){return oo=ex(oo,e)}function tx(e){const t=e[tt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Dm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[tt].modified_&&(zc(t),Pn(4)),br(e)&&(e=ta(t,e),t.parent_||na(t,e)),t.patches_&&gi("Patches").generateReplacementPatches_(n[tt].base_,e,t.patches_,t.inversePatches_)):e=ta(t,n,[]),zc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Nm?e:void 0}function ta(e,t,n){if(Zu(t))return t;const r=t[tt];if(!r)return so(t,(o,u)=>Mm(e,r,t,o,u,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return na(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let u=o,l=!1;r.type_===3&&(u=new Set(o),o.clear(),l=!0),so(u,(c,d)=>Mm(e,r,o,c,d,n,l)),na(e,o,!1),n&&e.patches_&&gi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Mm(e,t,n,r,o,u,l){if(Qi(o)){const c=u&&t&&t.type_!==3&&!Fc(t.assigned_,r)?u.concat(r):void 0,d=ta(e,o,c);if(Pm(n,r,d),Qi(d))e.canAutoFreeze_=!1;else return}else l&&n.add(o);if(br(o)&&!Zu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ta(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&na(e,o)}}function na(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Uc(t,n)}function nx(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ea(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,u=$c;n&&(o=[r],u=uo);const{revoke:l,proxy:c}=Proxy.revocable(o,u);return r.draft_=c,r.revoke_=l,c}var $c={get(e,t){if(t===tt)return e;const n=Dt(e);if(!Fc(n,t))return rx(e,n,t);const r=n[t];return e.finalized_||!br(r)?r:r===Vc(e.base_,t)?(qc(e),e.copy_[t]=ao(r,e)):r},has(e,t){return t in Dt(e)},ownKeys(e){return Reflect.ownKeys(Dt(e))},set(e,t,n){const r=Fm(Dt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Vc(Dt(e),t),u=o==null?void 0:o[tt];if(u&&u.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(XS(n,o)&&(n!==void 0||Fc(e.base_,t)))return!0;qc(e),_r(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Vc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,qc(e),_r(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Dt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Pn(11)},getPrototypeOf(e){return Ki(e.base_)},setPrototypeOf(){Pn(12)}},uo={};so($c,(e,t)=>{uo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),uo.deleteProperty=function(e,t){return uo.set.call(this,e,t,void 0)},uo.set=function(e,t,n){return $c.set.call(this,e[0],t,n,e[0])};function Vc(e,t){const n=e[tt];return(n?Dt(n):e)[t]}function rx(e,t,n){var o;const r=Fm(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Fm(e,t){if(!(t in e))return;let n=Ki(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ki(n)}}function _r(e){e.modified_||(e.modified_=!0,e.parent_&&_r(e.parent_))}function qc(e){e.copy_||(e.copy_=Bc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ix=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const u=n;n=t;const l=this;return function(d=u,...h){return l.produce(d,g=>n.call(this,g,...h))}}typeof n!="function"&&Pn(6),r!==void 0&&typeof r!="function"&&Pn(7);let o;if(br(t)){const u=Lm(this),l=ao(t,void 0);let c=!0;try{o=n(l),c=!1}finally{c?zc(u):jc(u)}return Rm(u,r),Dm(o,u)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Nm&&(o=void 0),this.autoFreeze_&&Uc(o,!0),r){const u=[],l=[];gi("Patches").generateReplacementPatches_(t,o,u,l),r(u,l)}return o}else Pn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(l,...c)=>this.produceWithPatches(l,d=>t(d,...c));let r,o;return[this.produce(t,n,(l,c)=>{r=l,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){br(e)||Pn(8),Qi(e)&&(e=sx(e));const t=Lm(this),n=ao(e,void 0);return n[tt].isManual_=!0,jc(t),n}finishDraft(e,t){const n=e&&e[tt];(!n||!n.isManual_)&&Pn(9);const{scope_:r}=n;return Rm(r,t),Dm(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=gi("Patches").applyPatches_;return Qi(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ao(e,t){const n=Xu(e)?gi("MapSet").proxyMap_(e,t):Ju(e)?gi("MapSet").proxySet_(e,t):nx(e,t);return(t?t.scope_:ea()).drafts_.push(n),n}function sx(e){return Qi(e)||Pn(10,e),Bm(e)}function Bm(e){if(!br(e)||Zu(e))return e;const t=e[tt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Bc(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Bc(e,!0);return so(n,(r,o)=>{Pm(n,r,Bm(o))}),t&&(t.finalized_=!1),n}function ox(){class e extends Map{constructor(d,h){super(),this[tt]={type_:2,parent_:h,scope_:h?h.scope_:ea(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Dt(this[tt]).size}has(d){return Dt(this[tt]).has(d)}set(d,h){const g=this[tt];return l(g),(!Dt(g).has(d)||Dt(g).get(d)!==h)&&(n(g),_r(g),g.assigned_.set(d,!0),g.copy_.set(d,h),g.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const h=this[tt];return l(h),n(h),_r(h),h.base_.has(d)?h.assigned_.set(d,!1):h.assigned_.delete(d),h.copy_.delete(d),!0}clear(){const d=this[tt];l(d),Dt(d).size&&(n(d),_r(d),d.assigned_=new Map,so(d.base_,h=>{d.assigned_.set(h,!1)}),d.copy_.clear())}forEach(d,h){const g=this[tt];Dt(g).forEach((y,b,T)=>{d.call(h,this.get(b),b,this)})}get(d){const h=this[tt];l(h);const g=Dt(h).get(d);if(h.finalized_||!br(g)||g!==h.base_.get(d))return g;const y=ao(g,h);return n(h),h.copy_.set(d,y),y}keys(){return Dt(this[tt]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const h=d.next();return h.done?h:{done:!1,value:this.get(h.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const h=d.next();if(h.done)return h;const g=this.get(h.value);return{done:!1,value:[h.value,g]}}}}[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,h){super(),this[tt]={type_:3,parent_:h,scope_:h?h.scope_:ea(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Dt(this[tt]).size}has(d){const h=this[tt];return l(h),h.copy_?!!(h.copy_.has(d)||h.drafts_.has(d)&&h.copy_.has(h.drafts_.get(d))):h.base_.has(d)}add(d){const h=this[tt];return l(h),this.has(d)||(u(h),_r(h),h.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const h=this[tt];return l(h),u(h),_r(h),h.copy_.delete(d)||(h.drafts_.has(d)?h.copy_.delete(h.drafts_.get(d)):!1)}clear(){const d=this[tt];l(d),Dt(d).size&&(u(d),_r(d),d.copy_.clear())}values(){const d=this[tt];return l(d),u(d),d.copy_.values()}entries(){const d=this[tt];return l(d),u(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,h){const g=this.values();let y=g.next();for(;!y.done;)d.call(h,y.value,y.value,this),y=g.next()}}function o(c,d){return new r(c,d)}function u(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(br(d)){const h=ao(d,c);c.drafts_.set(d,h),c.copy_.add(h)}else c.copy_.add(d)}))}function l(c){c.revoked_&&Pn(3,JSON.stringify(Dt(c)))}ZS("MapSet",{proxyMap_:t,proxySet_:o})}var _n=new ix,ux=_n.produce;_n.produceWithPatches.bind(_n),_n.setAutoFreeze.bind(_n),_n.setUseStrictShallowCopy.bind(_n),_n.applyPatches.bind(_n),_n.createDraft.bind(_n),_n.finishDraft.bind(_n);function ax(e,t,n){var r=K.useMemo(function(){return ux(e)},[e]);return K.useReducer(r,t,n)}const Um={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"},cn={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"},Hm={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set},ra="cimulate",Yc=`${ra}:pdp-update`,Wc=`${ra}:browse-update`,Gc=`${ra}:search-update`,Kc=`${ra}:ui-state-update`,Sr=G({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed"},Um),lx={"browse-context":Sr.CONTEXT_UPDATED,categoryId:Sr.CATEGORY_ID_CHANGED,page:Sr.PAGE_CHANGED,pageSize:Sr.PAGE_SIZE_CHANGED,includeFacets:Sr.FACET_FILTERS_CHANGED,facetFilters:Sr.FACET_FILTERS_CHANGED,rangeFilters:Sr.RANGE_FILTERS_CHANGED,catalogSegment:Sr.CATALOG_SEGMENT_CHANGED,pricebooks:Sr.PRICEBOOKS_CHANGED},xr=G({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},Um),cx={"search-context":xr.SEARCH_CONTEXT_UPDATED,query:xr.QUERY_CHANGED,page:xr.PAGE_CHANGED,pageSize:xr.PAGE_SIZE_CHANGED,includeFacets:xr.FACET_FILTERS_CHANGED,facetFilters:xr.FACET_FILTERS_CHANGED,rangeFilters:xr.RANGE_FILTERS_CHANGED,catalogSegment:xr.CATALOG_SEGMENT_CHANGED,pricebooks:xr.PRICEBOOKS_CHANGED},te="cim-widget",Xi=`--${te}`,Ei={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},fx=(e=Ei)=>({[`${Xi}-primary-color`]:e.primaryColor||Ei.primaryColor,[`${Xi}-secondary-color`]:e.secondaryColor||Ei.secondaryColor,[`${Xi}-font-color`]:e.fontColor||Ei.fontColor,[`${Xi}-font-family`]:e.fontFamily||Ei.fontFamily,[`${Xi}-background-color`]:e.backgroundColor||Ei.backgroundColor,[`${Xi}-border-color`]:e.borderColor||Ei.borderColor}),zm=K.createContext(null),jm=K.createContext(null);class dx{constructor(t,n,r=!1){Me(this,"apiService");Me(this,"config",null);Me(this,"getConfig",()=>jt(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}}));Me(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Me(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Me(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Me(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Me(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Me(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Me(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Me(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Me(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Me(this,"getProductField",t=>this.config?this.config[t]:"");Me(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new vm(t,n,r)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ji=(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 hx{constructor(t=!1){Me(this,"isDevelopment");Me(this,"_log",(t,n,...r)=>{Ji(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 $m=K.createContext(null),px=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",searchPlaceholder:r,searchButtonLabel:o,apiKey:u,apiToken:l,theme:c,isDevelopment:d,children:h})=>{const g=K.useMemo(()=>new dx(u,l,d),[u,l,d]),y=K.useMemo(()=>new hx(d),[d]);K.useEffect(()=>{g.config||g.getConfig()},[g]);const b=K.useMemo(()=>fx(c),[c]),T=K.useMemo(()=>({configModule:g,logoUrl:e,headerText:t,globalClassName:n,themeVariables:b,logger:y,searchPlaceholder:r,searchButtonLabel:o}),[g,e,t,n,r,o,y,b]);return I.jsx($m.Provider,{value:T,children:h})},or=()=>{const e=K.useContext($m);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},mx=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=or(),o=K.useCallback(b=>{n({type:cn.SET_COPILOT,payload:b})},[n]),u=K.useCallback(b=>{n({type:cn.SET_CONNECTED,payload:b})},[n]),l=K.useCallback(()=>{n({type:cn.RESET_COPILOT,payload:{}})},[n]),c=K.useCallback(()=>{n({type:cn.RESET_STATE,payload:{}})},[n]),d=K.useCallback(b=>{r==null||r.log(`${b.name} event received`,b),n({type:cn.ADD_MESSAGE,payload:b}),e==null||e(b)},[e,r,n]),h=K.useCallback(b=>{n({type:cn.ADD_LOADING_MESSAGE,payload:b})},[n]),g=K.useCallback(b=>{n({type:cn.REMOVE_LOADING_MESSAGE,payload:b})},[n]),y=K.useMemo(()=>({setCopilot:o,setConnected:u,resetCopilot:l,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:h,removeLoadingMessage:g}),[o,u,l,c,d,h,g]);return I.jsx(jm.Provider,{value:y,children:t})};ox();const gx=(e,t)=>{const{type:n,payload:r}=t;if(n===cn.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const u=e.groupedMessages.findIndex(l=>l.eventSourceId===o.eventSourceId);if(u!==-1){let l=e.groupedMessages[u].messages;l||(l=[]);const c=l.findIndex(d=>d.id===o.id);if(c!==-1){l[c]=o;return}l.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 cn.RESET_STATE:return Hm;case cn.RESET_COPILOT:e.copilot=null;break;case cn.SET_COPILOT:e.copilot=r;break;case cn.SET_CONNECTED:e.connected=r;break;case cn.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case cn.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break}},Ex=({onCopilotEvent:e,children:t})=>{const[n,r]=ax(gx,Hm);return I.jsx(zm.Provider,{value:n,children:I.jsx(mx,{onCopilotEvent:e,dispatch:r,children:t})})};var yx=function(e){K.useEffect(e,[])};const Vm=e=>{window.addEventListener(Gc,e)},qm=e=>{window.removeEventListener(Gc,e)},Tx=(e,t,n)=>{const r=new CustomEvent(Gc,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Ym=e=>{window.addEventListener(Wc,e)},Wm=e=>{window.removeEventListener(Wc,e)},bx=(e,t,n)=>{const r=new CustomEvent(Wc,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Gm=e=>{window.addEventListener(Yc,e)},Km=e=>{window.removeEventListener(Yc,e)},Qm=(e,t,n)=>{const r=new CustomEvent(Yc,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class _x{constructor(){Me(this,"initialParams",{categoryId:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Me(this,"categoryIdProxy");Me(this,"facetFiltersProxy");Me(this,"rangeFiltersProxy");Me(this,"catalogSegmentProxy");Me(this,"pricebooksProxy");Me(this,"_fullGet",(t,n)=>Reflect.get(t,n));Me(this,"_fullSet",(t,n,r)=>{const o=lx[n];return bx(o,n,r),Reflect.set(t,n,r)});this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=new Proxy({facetFilters:this.initialParams.facetFilters},{get:this._fullGet,set:this._fullSet}),this.rangeFiltersProxy=new Proxy({rangeFilters:this.initialParams.rangeFilters},{get:this._fullGet,set:this._fullSet}),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=new Proxy({pricebooks:this.initialParams.pricebooks},{get:this._fullGet,set:this._fullSet})}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}}const _t=new _x,Zi={categoryId:_t.categoryId,facetFilters:_t.facetFilters,rangeFilters:_t.rangeFilters,catalogSegment:_t.catalogSegment,pricebooks:_t.pricebooks},Xm=K.createContext(Zi),Sx=({children:e})=>{const[t,n]=K.useState(Zi.categoryId),[r,o]=K.useState(Zi.facetFilters),[u,l]=K.useState(Zi.rangeFilters),[c,d]=K.useState(Zi.catalogSegment),[h,g]=K.useState(Zi.pricebooks);K.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="categoryId"&&n(T.value),(T==null?void 0:T.property)==="facetFilters"&&o(T.value),(T==null?void 0:T.property)==="rangeFilters"&&l(T.value),(T==null?void 0:T.property)==="catalogSegment"&&d(T.value),(T==null?void 0:T.property)==="pricebooks"&&g(T.value)};return Ym(b),()=>{Wm(b)}},[]);const y=K.useMemo(()=>({categoryId:t,facetFilters:r,rangeFilters:u,catalogSegment:c,pricebooks:h}),[t,r,u,c,h]);return I.jsx(Xm.Provider,{value:y,children:e})},xx=()=>{const e=K.useContext(Xm);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Jm=(e,t)=>{t.facetFiltersProxy.facetFilters=e},Zm=(e,t,n)=>{var u;const r=G({},n.facetFiltersProxy.facetFilters||{});if(!!((u=r[e])!=null&&u.includes(t))){const l=r[e].filter(c=>c!==t);l.length>0?r[e]=l:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];n.facetFiltersProxy.facetFilters=r},e0=(e,t)=>{t.rangeFiltersProxy.rangeFilters=[...e]},t0=({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 u=[...n.rangeFiltersProxy.rangeFilters||[]],l=u.findIndex(c=>c.field===e);if(l!==-1){u[l]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=u;return}u.push({field:e,min:r,max:o}),n.rangeFiltersProxy.rangeFilters=u},n0=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},r0=(e,t)=>{t.pricebooksProxy.pricebooks=e},Cx=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:e=>{if(!e||!e.query)throw new Error("Search context must include a query");"facetFilters"in e&&(St.facetFiltersProxy.facetFilters=e.facetFilters||{}),"rangeFilters"in e&&(St.rangeFiltersProxy.rangeFilters=e.rangeFilters||[]),"catalogSegment"in e&&(St.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&(St.pricebooksProxy.pricebooks=e.pricebooks||null),St.queryProxy.query=e.query},updateCatalogSegment:e=>{n0(e,St)},updateFacetFilter:(e,t)=>{Zm(e,t,St)},updateFacetFilters:e=>{Jm(e,St)},updatePricebooks:e=>{r0(e,St)},updateRangeFilter:({field:e,value:t})=>{t0({field:e,value:t},St)},updateRangeFilters:e=>{e0(e,St)},updateSearchQuery:e=>{St.queryProxy.query=e}},Symbol.toStringTag,{value:"Module"})),Ax=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:e=>{if(!e||!e.categoryId)throw new Error("Browse context must include a categoryId");"facetFilters"in e&&(_t.facetFiltersProxy.facetFilters=e.facetFilters||{}),"rangeFilters"in e&&(_t.rangeFiltersProxy.rangeFilters=e.rangeFilters||[]),"catalogSegment"in e&&(_t.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&(_t.pricebooksProxy.pricebooks=e.pricebooks||null),_t.categoryIdProxy.categoryId=e.categoryId},updateBrowseCategoryId:e=>{_t.categoryIdProxy.categoryId=e},updateCatalogSegment:e=>{n0(e,_t)},updateFacetFilter:(e,t)=>{Zm(e,t,_t)},updateFacetFilters:e=>{Jm(e,_t)},updatePricebooks:e=>{r0(e,_t)},updateRangeFilter:({field:e,value:t})=>{t0({field:e,value:t},_t)},updateRangeFilters:e=>{e0(e,_t)}},Symbol.toStringTag,{value:"Module"}));class kx{constructor(){Me(this,"initialParams",{productId:"",pdpLink:""});Me(this,"proxy");Me(this,"_fullGet",(t,n)=>Reflect.get(t,n));Me(this,"_fullSet",(t,n,r)=>(Qm(n,r),Reflect.set(t,n,r)));Me(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}}const es=new kx,wx=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");es.updateProxy(e),Qm("pdp-context",e)},vx=e=>{es.proxy.productId=e},Nx=e=>{es.proxy.pdpLink=e};class Ix{constructor(){Me(this,"initialState",{mode:"embedded",status:{type:"dialog",isOpen:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});Me(this,"modeProxy");Me(this,"statusProxy");Me(this,"dialogProxy");Me(this,"modalProxy",{isFullscreen:!1});Me(this,"_fullGet",(t,n)=>Reflect.get(t,n));Me(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return Rx(n,r),Reflect.set(t,n,r)});this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get type(){return this.statusProxy.type}get position(){return this.dialogProxy.position}}const $t=new Ix,Ox=e=>{window.addEventListener(Kc,e)},Px=e=>{window.removeEventListener(Kc,e)},Rx=(e,t)=>{const n=new CustomEvent(Kc,{detail:{property:e,value:t}});window.dispatchEvent(n)},lo=e=>{if(typeof e!="boolean"){$t.statusProxy.isOpen=!$t.statusProxy.isOpen;return}$t.statusProxy.isOpen=e},i0=e=>{$t.modalProxy.isFullscreen=e},Qc=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);$t.statusProxy.type=e,e==="dialog"||e==="chat"?$t.modeProxy.mode="embedded":$t.modeProxy.mode="standalone"},s0=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(", ")}.`);$t.dialogProxy.position=e};class Lx{constructor(){Me(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Me(this,"queryProxy");Me(this,"facetFiltersProxy");Me(this,"rangeFiltersProxy");Me(this,"catalogSegmentProxy");Me(this,"pricebooksProxy");Me(this,"_fullGet",(t,n)=>Reflect.get(t,n));Me(this,"_fullSet",(t,n,r)=>{const o=cx[n];return Tx(o,n,r),Reflect.set(t,n,r)});this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=new Proxy({facetFilters:this.initialParams.facetFilters},{get:this._fullGet,set:this._fullSet}),this.rangeFiltersProxy=new Proxy({rangeFilters:this.initialParams.rangeFilters},{get:this._fullGet,set:this._fullSet}),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=new Proxy({pricebooks:this.initialParams.pricebooks},{get:this._fullGet,set:this._fullSet})}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}}const St=new Lx,ts={searchQuery:St.query,facetFilters:St.facetFilters,rangeFilters:St.rangeFilters,catalogSegment:St.catalogSegment,pricebooks:St.pricebooks},o0=K.createContext(ts),Dx=({children:e})=>{const[t,n]=K.useState(ts.searchQuery),[r,o]=K.useState(ts.facetFilters),[u,l]=K.useState(ts.rangeFilters),[c,d]=K.useState(ts.catalogSegment),[h,g]=K.useState(ts.pricebooks);K.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&n(T.value),(T==null?void 0:T.property)==="facetFilters"&&o(T.value),(T==null?void 0:T.property)==="rangeFilters"&&l(T.value),(T==null?void 0:T.property)==="catalogSegment"&&d(T.value),(T==null?void 0:T.property)==="pricebooks"&&g(T.value)};return Vm(b),()=>{qm(b)}},[]);const y=K.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:u,catalogSegment:c,pricebooks:h}),[t,r,u,c,h]);return I.jsx(o0.Provider,{value:y,children:e})},Mx=()=>{const e=K.useContext(o0);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},Fx=()=>{const e=K.useContext(jm);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},u0=()=>{const e=K.useContext(zm);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},a0=K.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{}}),Bx=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:u,children:l})=>{const{logger:c}=or(),O=Mx(),{searchQuery:d}=O,h=nr(O,["searchQuery"]),Y=xx(),{categoryId:g}=Y,y=nr(Y,["categoryId"]),{setCopilot:b,setConnected:T,resetCopilot:S,addCopilotEvent:k,addLoadingMessage:P,removeLoadingMessage:L}=Fx(),{copilot:H,messages:$,groupedMessages:Z,loadingMessages:he}=u0(),M=K.useRef(!1),Ee=K.useRef(!1),ke=K.useMemo(()=>he.size>0,[he]),Ne=K.useCallback(x=>he.has(x),[he]),U=K.useCallback(x=>{k(x),P(x.id)},[k,P]),ge=K.useCallback(x=>{const re=He(G({},x),{id:x.inquiryLinkId||x.id});k(re)},[k]),me=K.useCallback(x=>{k(x),u==null||u(x)},[k,u]),pe=K.useCallback(x=>{x.on("connect_ack",re=>{o==null||o(re),T(!0)}),x.on("follow_up",k),x.on("inquiry",ge),x.on("partial_inquiry",ge),x.on("display_products",k),x.on("progress",k),x.on("refined_search",me),x.on("done",re=>{L(re.eventSourceId)}),x.on("error",re=>{k(re),L(re.eventSourceId)}),x.onDisconnect(re=>{const be=["io server disconnect","transport error","server shutting down"];if(c==null||c.log("Connection disconnected with reason: ",re),!be.includes(re)){T(!1);return}c==null||c.log("De-registering event listeners");const ye=new Date().toISOString();k({name:"error",message:"Connection was lost. Please try again.",createdAt:ye,id:`error-${ye}`,sessionId:"session"}),x.off()})},[c,T,L,ge,me,k,o]);yx(()=>{let x;n?x=n:x=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const re={baseUrl:x};e?re.apiKey=e:t&&(re.apiToken=t);const be=new A2(re);return be.connect(),pe(be),b(be),()=>{be.disconnect(),be.off(),S()}});const le=K.useCallback(({query:x,facetFilters:re,rangeFilters:be,catalogSegment:ye,pricebooks:Ie,userPrompt:Fe,isUserAction:ze})=>{if(!H){c==null||c.error("Copilot is not initialized");return}if(!x)return;const Ke={searchParams:{query:x}};Fe&&(Ke.userPrompt=Fe),re&&Object.keys(re).length>0&&(Ke.searchParams.facetFilters=re),be&&be.length>0&&(Ke.searchParams.rangeFilters=be),ye&&(Ke.searchParams.catalogSegment=ye),Ie&&(Ke.searchParams.pricebooks=Ie);const Bt=!M.current;H.search(Ke,Ct=>{const It=G({},Ct);Bt&&(It.isInitial=Bt,It.isUserAction=!0),ze&&(It.isUserAction=ze),M.current=!0,U(It)})},[c,U,H]),_e=K.useCallback(({categoryId:x,facetFilters:re,rangeFilters:be,catalogSegment:ye,pricebooks:Ie,userPrompt:Fe,isUserAction:ze})=>{if(!H){c==null||c.error("Copilot is not initialized");return}if(!x)return;const Ke={browseParams:{categoryId:x}};Fe&&(Ke.userPrompt=Fe),re&&Object.keys(re).length>0&&(Ke.browseParams.facetFilters=re),be&&be.length>0&&(Ke.browseParams.rangeFilters=be),ye&&(Ke.browseParams.catalogSegment=ye),Ie&&(Ke.browseParams.pricebooks=Ie);const Bt=!Ee.current;H.browse(Ke,Ct=>{const It=G({},Ct);Bt&&(It.isInitial=Bt,It.isUserAction=!0),ze&&(It.isUserAction=ze),M.current=!0,U(It)})},[c,U,H]),Pe=K.useCallback(({productId:x,pdpLink:re,userPrompt:be,isUserAction:ye})=>{if(!H){c==null||c.error("Copilot is not initialized");return}if(!x)return;const Ie={productId:x};be&&(Ie.userPrompt=be),re&&(Ie.pdpLink=re),H.productView(Ie,Fe=>{const ze=G({},Fe);ye&&(ze.isUserAction=ye),U(ze)})},[c,H,U]),ce=K.useCallback(x=>{if(!H)return;const re={eventId:x,reason:"User cancelled the request"};H.cancelRequest(re,be=>{k(be),L(x)})},[k,L,H]),V=K.useCallback(x=>{!x||!d||le(He(G({query:d},h),{userPrompt:x}))},[d,h,le]),ne=K.useCallback((x,re)=>{var Fe,Ke;const ye=x.params.userPrompt||"";if(!ye)return;const Ie=$.find(Ct=>Ct.id===re);if(Ie){if(Ie.name==="copilot_search"){const ze=((Fe=Ie.request)==null?void 0:Fe.searchParams)||{},{query:Ct}=ze,It=nr(ze,["query"]);Ct&&le(He(G(G({query:Ct||d},h),It),{userPrompt:ye}));return}if(Ie.name==="copilot_browse"){const Bt=((Ke=Ie.request)==null?void 0:Ke.browseParams)||{},{categoryId:Ct}=Bt,It=nr(Bt,["categoryId"]);if(Ct){_e(He(G(G({categoryId:Ct||g},y),It),{userPrompt:ye}));return}}if(Ie.name==="product_view"){const Ct=Ie.request;Ct!=null&&Ct.productId&&Pe(He(G({},Ct),{userPrompt:ye}))}}},[d,h,g,y,$,le,_e,Pe]),C=K.useMemo(()=>({copilot:H,messages:$,groupedMessages:Z,isLoading:ke,isResponseLoading:Ne,handleSearch:le,handleBrowse:_e,handlePdp:Pe,handleUserInput:V,handleSuggestion:ne,handleCancel:ce}),[H,$,Z,ke,Ne,le,_e,Pe,V,ne,ce]);return I.jsx(a0.Provider,{value:C,children:l})},yi=()=>{const e=K.useContext(a0);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},Ux=()=>{const{copilot:e,handleSearch:t,handleBrowse:n,handlePdp:r}=yi(),o=K.useCallback(({query:c,isUserAction:d})=>{if(!e||!c)return;const{facetFilters:h}=St.facetFiltersProxy,{rangeFilters:g}=St.rangeFiltersProxy,{catalogSegment:y}=St.catalogSegmentProxy,{pricebooks:b}=St.pricebooksProxy,T={query:c};h&&Object.keys(h).length>0&&(T.facetFilters=h),g&&g.length>0&&(T.rangeFilters=g),y&&(T.catalogSegment=y),b&&(T.pricebooks=b),t(He(G({},T),{isUserAction:d}))},[e,t]),u=K.useCallback(({categoryId:c,isUserAction:d})=>{if(!e||!c)return;const{facetFilters:h}=_t.facetFiltersProxy,{rangeFilters:g}=_t.rangeFiltersProxy,{catalogSegment:y}=_t.catalogSegmentProxy,{pricebooks:b}=_t.pricebooksProxy,T={categoryId:c};h&&Object.keys(h).length>0&&(T.facetFilters=h),g&&g.length>0&&(T.rangeFilters=g),y&&(T.catalogSegment=y),b&&(T.pricebooks=b),n(He(G({},T),{isUserAction:d}))},[e,n]),l=K.useCallback(({productId:c,isUserAction:d})=>{if(!e||!c)return;const h={productId:c,pdpLink:es.pdpLink,isUserAction:d};r(G({},h))},[e,r]);return K.useEffect(()=>{const c=({detail:d})=>{(d==null?void 0:d.property)==="query"&&o({query:d.value,isUserAction:!0})};return Vm(c),()=>{qm(c)}},[o]),K.useEffect(()=>{const c=({detail:d})=>{if((d==null?void 0:d.property)==="pdp-context"){const h=d.value;l({productId:h.productId,isUserAction:!0});return}(d==null?void 0:d.property)==="productId"&&l({productId:d.value,isUserAction:!0})};return Gm(c),()=>{Km(c)}},[l]),K.useEffect(()=>{const c=({detail:d})=>{(d==null?void 0:d.property)==="categoryId"&&u({categoryId:d.value,isUserAction:!0})};return Ym(c),()=>{Wm(c)}},[u]),null},Hx=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onCopilotEvent:u,onRefinedSearch:l,children:c})=>I.jsx(Ex,{onCopilotEvent:u,children:I.jsxs(Bx,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:l,children:[I.jsx(Ux,{}),c]})}),Xc={productId:es.proxy.productId,pdpLink:es.proxy.pdpLink},zx=K.createContext(Xc),jx=({children:e})=>{const[t,n]=K.useState(Xc.productId),[r,o]=K.useState(Xc.pdpLink);K.useEffect(()=>{const l=({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 Gm(l),()=>{Km(l)}},[]);const u=K.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return I.jsx(zx.Provider,{value:u,children:e})},l0=K.createContext({mode:$t.modeProxy.mode,status:$t.statusProxy,dialogPosition:$t.dialogProxy.position,isModalFullscreen:$t.modalProxy.isFullscreen}),$x=({componentType:e,children:t})=>{const[n,r]=K.useState($t.modeProxy.mode),[o,u]=K.useState({type:e||$t.statusProxy.type,isOpen:$t.statusProxy.isOpen}),[l,c]=K.useState($t.dialogProxy.position),[d,h]=K.useState($t.modalProxy.isFullscreen);K.useEffect(()=>{const y=b=>{const{property:T,value:S}=b.detail||{};if(!(!T||S===void 0)){if(T==="mode"){r(S);return}if(T==="isOpen"){u(k=>He(G({},k),{isOpen:S}));return}if(T==="type"){u(k=>He(G({},k),{type:S}));return}if(T==="position"){c(S);return}if(T==="isFullscreen"){h(S);return}}};return Ox(y),()=>{Px(y)}},[]);const g=K.useMemo(()=>({mode:n,status:o,dialogPosition:l,isModalFullscreen:d}),[n,o,l,d]);return I.jsx(l0.Provider,{value:g,children:t})},c0=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:u,globalClassName:l,isDevelopment:c=!1,componentType:d,searchPlaceholder:h,searchButtonLabel:g,onConnect:y,onCopilotEvent:b,onRefinedSearch:T,children:S})=>I.jsx(px,{apiKey:e,logoUrl:r,headerText:o,theme:u,globalClassName:l,searchPlaceholder:h,searchButtonLabel:g,isDevelopment:c,children:I.jsx(KS,{apiKey:e,apiToken:t,isDevelopment:c,children:I.jsx(jx,{children:I.jsx(Sx,{children:I.jsx(Dx,{children:I.jsx($x,{componentType:d,children:I.jsx(Hx,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:c,onConnect:y,onCopilotEvent:b,onRefinedSearch:T,children:S})})})})})})}),ia=()=>{const e=K.useContext(l0);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};function f0(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=f0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ae(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=f0(e))&&(r&&(r+=" "),r+=t);return r}var d0={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},h0=di.createContext&&di.createContext(d0),Vx=["attr","size","title"];function qx(e,t){if(e==null)return{};var n=Yx(e,t),r,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(o=0;o<u.length;o++)r=u[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yx(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 sa(){return sa=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},sa.apply(this,arguments)}function p0(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 oa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p0(Object(n),!0).forEach(function(r){Wx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wx(e,t,n){return t=Gx(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gx(e){var t=Kx(e,"string");return typeof t=="symbol"?t:t+""}function Kx(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 m0(e){return e&&e.map((t,n)=>di.createElement(t.tag,oa({key:n},t.attr),m0(t.child)))}function Sn(e){return t=>di.createElement(Qx,sa({attr:oa({},e.attr)},t),m0(e.child))}function Qx(e){var t=n=>{var{attr:r,size:o,title:u}=e,l=qx(e,Vx),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),di.createElement("svg",sa({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,l,{className:d,style:oa(oa({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),u&&di.createElement("title",null,u),e.children)};return h0!==void 0?di.createElement(h0.Consumer,null,n=>t(n)):t(d0)}function g0(e){return Sn({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 ua(e){return Sn({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 Xx(e){return Sn({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 E0(e){return Sn({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 Jx(e){return Sn({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 Zx(e){return Sn({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 eC(e){return Sn({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 tC(e){return Sn({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)}const Jc=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>I.jsx("button",{className:ae(`${te}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),co=({className:e,icon:t,type:n="button",ariaLabel:r,disabled:o=!1,onClick:u})=>I.jsx("button",{className:ae(e,`${te}-icon-button`),type:n,"aria-label":r,onClick:u,disabled:o,children:t}),nC=({className:e,searchButtonLabel:t,globalClassName:n,componentType:r,isLoading:o})=>t?I.jsx(Jc,{className:ae(n,r,e),type:"submit",disabled:o,children:t}):I.jsx(co,{className:ae(n,r,e),type:"submit",disabled:o,ariaLabel:"Search Copilot",icon:I.jsx(ua,{})}),Zc=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o}=u0(),{globalClassName:u,searchPlaceholder:l,searchButtonLabel:c}=or(),d=K.useRef(null),h=b=>{var S;b.preventDefault();const T=(((S=d.current)==null?void 0:S.value)||"").trim();T&&(r(T),d.current.value="")},g=!!o||!1,y=g?"connected":"disconnected";return I.jsxs("form",{className:ae(u,e,n,`${te}-search-bar`),name:`${te}-search-form`,onSubmit:h,children:[I.jsx("span",{role:"status",className:ae(`${te}-connection-status-icon`,y)}),I.jsx("input",{className:ae(u,e,n,`${te}-search-input`),type:"text",ref:d,placeholder:l,name:`${te}-user-input`}),I.jsx(nC,{searchButtonLabel:c,globalClassName:u,componentType:n,isLoading:t||!g})]})},rC=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r}=or();if(!n)return null;const o=n.getName(t),u=n.getBrand(t),l=n.getPriceDisplay(t),c=n.getRelativePdp(t),d=n.getPdp(t),h=n.getImage(t),g=c&&typeof c=="string"?new URL(c,window.location.origin).href:d;return I.jsxs("div",{className:ae(r,`${te}-product-tile`,{embedded:!e,standalone:e}),children:[I.jsx("img",{className:ae(r,`${te}-product-tile-image`,{embedded:!e,standalone:e}),src:`${h}`,alt:`${o}`,loading:"lazy"}),I.jsxs("div",{className:ae(r,`${te}-product-tile-details`,{embedded:!e,standalone:e}),children:[I.jsxs("div",{className:ae(r,`${te}-product-tile-content`),children:[u&&I.jsx("p",{className:`${te}-product-tile-brand`,children:u}),g?I.jsxs("a",{"aria-label":`Go to product page for ${o}`,className:ae(r,`${te}-product-tile-pdp`),href:`${g}`,target:"_blank",rel:"noopener noreferrer",children:[o," ",I.jsx("span",{className:ae(r,`${te}-product-tile-pdp-arrow`),children:"→"})]}):I.jsx("p",{className:ae(r,`${te}-product-tile-name`),title:o,children:o})]}),I.jsx("div",{className:ae(r,`${te}-product-tile-footer`),children:I.jsx("p",{className:ae(r,`${te}-product-tile-price`),children:l})})]})]})},iC=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=or(),o=t;return n?I.jsxs("div",{className:ae(r,`${te}-display-products widget-message`),children:[I.jsx("p",{children:o.message}),o.products&&o.products.length>0&&I.jsx("div",{className:ae(r,`${te}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(u=>{const l=n.getPid(u);return I.jsx(rC,{isWidgetStandalone:e,product:u},`${l}`)})})]}):null},sC=({globalClassName:e,message:t,isWidgetStandalone:n})=>I.jsx("div",{className:ae(e,`${te}-error-message`,{standalone:n,embedded:!n}),children:I.jsxs("p",{className:ae(e,`${te}-error-message-text`,{standalone:n,embedded:!n}),children:[I.jsx(Xx,{})," ",t.message||"An error occurred while processing your request."]})});function oC(e){return Sn({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 y0=({className:e,onClick:t,disabled:n=!1})=>I.jsx("button",{"aria-label":"Close",className:ae(e,`${te}-close-button`),disabled:n,onClick:t,children:I.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:I.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"})})}),uC=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:u})=>I.jsx("div",{className:ae(e,`${te}-suggestion-container standalone`),children:o.map(l=>I.jsxs(Jc,{disabled:r,className:ae(e,`${te}-suggestion-button standalone`),onClick:()=>u(l,n||t),children:[I.jsx(oC,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",l.displayText]},l.displayText))}),aC=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=yi();return I.jsxs("div",{className:ae(e,`${te}-follow-up`),children:[I.jsx("p",{className:ae(e,`${te}-text`),children:t.message}),n&&I.jsx(uC,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&I.jsx("div",{className:ae(e,`${te}-suggestion-container embedded`),children:t.suggestions.map(u=>I.jsx("button",{disabled:o,className:ae(e,`${te}-suggestion-button embedded`),onClick:()=>r(u,t.eventSourceId||t.id),children:u.displayText},u.displayText))})]})};function FD(){}function BD(){}function T0(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,u=!1;for(;!u;){r===-1&&(r=n.length,u=!0);const l=n.slice(o,r).trim();(l||!u)&&t.push(l),o=r+1,r=n.indexOf(",",o)}return t}function b0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const lC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fC={};function _0(e,t){return(fC.jsx?cC:lC).test(e)}const dC=/[ \t\n\f\r]/g;function hC(e){return typeof e=="object"?e.type==="text"?S0(e.value):!1:S0(e)}function S0(e){return e.replace(dC,"")===""}let fo=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};fo.prototype.normal={},fo.prototype.property={},fo.prototype.space=void 0;function x0(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new fo(n,r,t)}function ho(e){return e.toLowerCase()}let fn=class{constructor(t,n){this.attribute=n,this.property=t}};fn.prototype.attribute="",fn.prototype.booleanish=!1,fn.prototype.boolean=!1,fn.prototype.commaOrSpaceSeparated=!1,fn.prototype.commaSeparated=!1,fn.prototype.defined=!1,fn.prototype.mustUseProperty=!1,fn.prototype.number=!1,fn.prototype.overloadedBoolean=!1,fn.prototype.property="",fn.prototype.spaceSeparated=!1,fn.prototype.space=void 0;let pC=0;const Ve=Ti(),vt=Ti(),ef=Ti(),oe=Ti(),st=Ti(),ns=Ti(),xn=Ti();function Ti(){return sc(2,++pC)}const tf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ve,booleanish:vt,commaOrSpaceSeparated:xn,commaSeparated:ns,number:oe,overloadedBoolean:ef,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),nf=Object.keys(tf);let rf=class extends fn{constructor(t,n,r,o){let u=-1;if(super(t,n),C0(this,"space",o),typeof r=="number")for(;++u<nf.length;){const l=nf[u];C0(this,nf[u],(r&tf[l])===tf[l])}}};rf.prototype.defined=!0;function C0(e,t,n){n&&(e[t]=n)}function rs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const u=new rf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[ho(r)]=r,n[ho(u.attribute)]=r}return new fo(t,n,e.space)}const A0=rs({properties:{ariaActiveDescendant:null,ariaAtomic:vt,ariaAutoComplete:null,ariaBusy:vt,ariaChecked:vt,ariaColCount:oe,ariaColIndex:oe,ariaColSpan:oe,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:vt,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:vt,ariaFlowTo:st,ariaGrabbed:vt,ariaHasPopup:null,ariaHidden:vt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:oe,ariaLive:null,ariaModal:vt,ariaMultiLine:vt,ariaMultiSelectable:vt,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:oe,ariaPressed:vt,ariaReadOnly:vt,ariaRelevant:null,ariaRequired:vt,ariaRoleDescription:st,ariaRowCount:oe,ariaRowIndex:oe,ariaRowSpan:oe,ariaSelected:vt,ariaSetSize:oe,ariaSort:null,ariaValueMax:oe,ariaValueMin:oe,ariaValueNow:oe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function k0(e,t){return t in e?e[t]:t}function w0(e,t){return k0(e,t.toLowerCase())}const mC=rs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ns,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:st,autoFocus:Ve,autoPlay:Ve,blocking:st,capture:null,charSet:null,checked:Ve,cite:null,className:st,cols:oe,colSpan:null,content:null,contentEditable:vt,controls:Ve,controlsList:st,coords:oe|ns,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ve,defer:Ve,dir:null,dirName:null,disabled:Ve,download:ef,draggable:vt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ve,formTarget:null,headers:st,height:oe,hidden:ef,high:oe,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:st,itemRef:st,itemScope:Ve,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ve,low:oe,manifest:null,max:null,maxLength:oe,media:null,method:null,min:null,minLength:oe,multiple:Ve,muted:Ve,name:null,nonce:null,noModule:Ve,noValidate:Ve,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ve,optimum:oe,pattern:null,ping:st,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:st,required:Ve,reversed:Ve,rows:oe,rowSpan:oe,sandbox:st,scope:null,scoped:Ve,seamless:Ve,selected:Ve,shadowRootClonable:Ve,shadowRootDelegatesFocus:Ve,shadowRootMode:null,shape:null,size:oe,sizes:null,slot:null,span:oe,spellCheck:vt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:oe,step:null,style:null,tabIndex:oe,target:null,title:null,translate:null,type:null,typeMustMatch:Ve,useMap:null,value:vt,width:oe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:oe,borderColor:null,bottomMargin:oe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ve,declare:Ve,event:null,face:null,frame:null,frameBorder:null,hSpace:oe,leftMargin:oe,link:null,longDesc:null,lowSrc:null,marginHeight:oe,marginWidth:oe,noResize:Ve,noHref:Ve,noShade:Ve,noWrap:Ve,object:null,profile:null,prompt:null,rev:null,rightMargin:oe,rules:null,scheme:null,scrolling:vt,standby:null,summary:null,text:null,topMargin:oe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:oe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ve,disableRemotePlayback:Ve,prefix:null,property:null,results:oe,security:null,unselectable:null},space:"html",transform:w0}),gC=rs({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:xn,accentHeight:oe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:oe,amplitude:oe,arabicForm:null,ascent:oe,attributeName:null,attributeType:null,azimuth:oe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:oe,by:null,calcMode:null,capHeight:oe,className:st,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:oe,diffuseConstant:oe,direction:null,display:null,dur:null,divisor:oe,dominantBaseline:null,download:Ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:oe,enableBackground:null,end:null,event:null,exponent:oe,externalResourcesRequired:null,fill:null,fillOpacity:oe,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:ns,g2:ns,glyphName:ns,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:oe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:oe,horizOriginX:oe,horizOriginY:oe,id:null,ideographic:oe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:oe,k:oe,k1:oe,k2:oe,k3:oe,k4:oe,kernelMatrix:xn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:oe,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:oe,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:oe,overlineThickness:oe,paintOrder:null,panose1:null,path:null,pathLength:oe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:oe,pointsAtY:oe,pointsAtZ:oe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xn,rev:xn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xn,requiredFeatures:xn,requiredFonts:xn,requiredFormats:xn,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:oe,specularExponent:oe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:oe,strikethroughThickness:oe,string:null,stroke:null,strokeDashArray:xn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:oe,strokeOpacity:oe,strokeWidth:null,style:null,surfaceScale:oe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xn,tabIndex:oe,tableValues:null,target:null,targetX:oe,targetY:oe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:oe,underlineThickness:oe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:oe,values:null,vAlphabetic:oe,vMathematical:oe,vectorEffect:null,vHanging:oe,vIdeographic:oe,version:null,vertAdvY:oe,vertOriginX:oe,vertOriginY:oe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:oe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:k0}),v0=rs({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()}}),N0=rs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:w0}),I0=rs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),EC={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"},yC=/[A-Z]/g,O0=/-[a-z]/g,TC=/^data[-\w.:]+$/i;function sf(e,t){const n=ho(t);let r=t,o=fn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&TC.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(O0,_C);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!O0.test(u)){let l=u.replace(yC,bC);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=rf}return new o(r,t)}function bC(e){return"-"+e.toLowerCase()}function _C(e){return e.charAt(1).toUpperCase()}const aa=x0([A0,mC,v0,N0,I0],"html"),is=x0([A0,gC,v0,N0,I0],"svg");function P0(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function R0(e){return e.join(" ").trim()}var ss={},of,L0;function SC(){if(L0)return of;L0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
24
- `,h="/",g="*",y="",b="comment",T="declaration";of=function(k,P){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];P=P||{};var L=1,H=1;function $(pe){var le=pe.match(t);le&&(L+=le.length);var _e=pe.lastIndexOf(d);H=~_e?pe.length-_e:H+pe.length}function Z(){var pe={line:L,column:H};return function(le){return le.position=new he(pe),ke(),le}}function he(pe){this.start=pe,this.end={line:L,column:H},this.source=P.source}he.prototype.content=k;function M(pe){var le=new Error(P.source+":"+L+":"+H+": "+pe);if(le.reason=pe,le.filename=P.source,le.line=L,le.column=H,le.source=k,!P.silent)throw le}function Ee(pe){var le=pe.exec(k);if(le){var _e=le[0];return $(_e),k=k.slice(_e.length),le}}function ke(){Ee(n)}function Ne(pe){var le;for(pe=pe||[];le=U();)le!==!1&&pe.push(le);return pe}function U(){var pe=Z();if(!(h!=k.charAt(0)||g!=k.charAt(1))){for(var le=2;y!=k.charAt(le)&&(g!=k.charAt(le)||h!=k.charAt(le+1));)++le;if(le+=2,y===k.charAt(le-1))return M("End of comment missing");var _e=k.slice(2,le-2);return H+=2,$(_e),k=k.slice(le),H+=2,pe({type:b,comment:_e})}}function ge(){var pe=Z(),le=Ee(r);if(le){if(U(),!Ee(o))return M("property missing ':'");var _e=Ee(u),Pe=pe({type:T,property:S(le[0].replace(e,y)),value:_e?S(_e[0].replace(e,y)):y});return Ee(l),Pe}}function me(){var pe=[];Ne(pe);for(var le;le=ge();)le!==!1&&(pe.push(le),Ne(pe));return pe}return ke(),me()};function S(k){return k?k.replace(c,y):y}return of}var D0;function xC(){if(D0)return ss;D0=1;var e=ss&&ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=n;var t=e(SC());function n(r,o){var u=null;if(!r||typeof r!="string")return u;var l=(0,t.default)(r),c=typeof o=="function";return l.forEach(function(d){if(d.type==="declaration"){var h=d.property,g=d.value;c?o(h,g,d):g&&(u=u||{},u[h]=g)}}),u}return ss}var po={},M0;function CC(){if(M0)return po;M0=1,Object.defineProperty(po,"__esModule",{value:!0}),po.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(h){return!h||n.test(h)||e.test(h)},l=function(h,g){return g.toUpperCase()},c=function(h,g){return"".concat(g,"-")},d=function(h,g){return g===void 0&&(g={}),u(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,l))};return po.camelCase=d,po}var mo,F0;function AC(){if(F0)return mo;F0=1;var e=mo&&mo.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(xC()),n=CC();function r(o,u){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(l[(0,n.camelCase)(c,u)]=d)}),l}return r.default=r,mo=r,mo}var kC=AC();const wC=We(kC),la=B0("end"),ur=B0("start");function B0(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 vC(e){const t=ur(e),n=la(e);if(t&&n)return{start:t,end:n}}function go(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?U0(e.position):"start"in e||"end"in e?U0(e):"line"in e||"column"in e?uf(e):""}function uf(e){return H0(e&&e.line)+":"+H0(e&&e.column)}function U0(e){return uf(e&&e.start)+"-"+uf(e&&e.end)}function H0(e){return e&&typeof e=="number"?e:1}class Kt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",u={},l=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u=G({},n)),typeof t=="string"?o=t:!u.cause&&t&&(l=!0,o=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?u.ruleId=r:(u.source=r.slice(0,d),u.ruleId=r.slice(d+1))}if(!u.place&&u.ancestors&&u.ancestors){const d=u.ancestors[u.ancestors.length-1];d&&(u.place=d.position)}const c=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.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=go(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=l&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual,this.expected,this.note,this.url}}Kt.prototype.file="",Kt.prototype.name="",Kt.prototype.reason="",Kt.prototype.message="",Kt.prototype.stack="",Kt.prototype.column=void 0,Kt.prototype.line=void 0,Kt.prototype.ancestors=void 0,Kt.prototype.cause=void 0,Kt.prototype.fatal=void 0,Kt.prototype.place=void 0,Kt.prototype.ruleId=void 0,Kt.prototype.source=void 0;const af={}.hasOwnProperty,NC=new Map,IC=/[A-Z]/g,OC=new Set(["table","tbody","thead","tfoot","tr"]),PC=new Set(["td","th"]),z0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function RC(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=zC(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=HC(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"?is:aa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=j0(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function j0(e,t,n){if(t.type==="element")return LC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return DC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return FC(e,t,n);if(t.type==="mdxjsEsm")return MC(e,t);if(t.type==="root")return BC(e,t,n);if(t.type==="text")return UC(e,t)}function LC(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=is,e.schema=o),e.ancestors.push(t);const u=V0(e,t.tagName,!1),l=jC(e,t);let c=cf(e,t);return OC.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!hC(d):!0})),$0(e,l,u,t),lf(l,c),e.ancestors.pop(),e.schema=r,e.create(t,u,l,n)}function DC(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)}Eo(e,t.position)}function MC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Eo(e,t.position)}function FC(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=is,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:V0(e,t.name,!0),l=$C(e,t),c=cf(e,t);return $0(e,l,u,t),lf(l,c),e.ancestors.pop(),e.schema=r,e.create(t,u,l,n)}function BC(e,t,n){const r={};return lf(r,cf(e,t)),e.create(t,e.Fragment,r,n)}function UC(e,t){return t.value}function $0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function lf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function HC(e,t,n){return r;function r(o,u,l,c){const h=Array.isArray(l.children)?n:t;return c?h(u,l,c):h(u,l)}}function zC(e,t){return n;function n(r,o,u,l){const c=Array.isArray(u.children),d=ur(r);return t(o,u,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function jC(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&af.call(t.properties,o)){const u=VC(e,o,t.properties[o]);if(u){const[l,c]=u;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&PC.has(t.tagName)?r=c:n[l]=c}}if(r){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function $C(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const u=r.data.estree.body[0];u.type;const l=u.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Eo(e,t.position);else{const o=r.name;let u;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,u=e.evaluater.evaluateExpression(c.expression)}else Eo(e,t.position);else u=r.value===null?!0:r.value;n[o]=u}return n}function cf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:NC;for(;++r<t.children.length;){const u=t.children[r];let l;if(e.passKeys){const d=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(d){const h=o.get(d)||0;l=d+"-"+h,o.set(d,h+1)}}const c=j0(e,u,l);c!==void 0&&n.push(c)}return n}function VC(e,t,n){const r=sf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?b0(n):R0(n)),r.property==="style"){let o=typeof n=="object"?n:qC(e,String(n));return e.stylePropertyNameCase==="css"&&(o=YC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?EC[r.property]||r.property:r.attribute,n]}}function qC(e,t){try{return wC(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Kt("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=z0+"#cannot-parse-style-attribute",o}}function V0(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let u=-1,l;for(;++u<o.length;){const c=_0(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(u&&c.type==="Literal"),optional:!1}:c}r=l}else r=_0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return af.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Eo(e)}function Eo(e,t){const n=new Kt("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=z0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function YC(e){const t={};let n;for(n in e)af.call(e,n)&&(t[WC(n)]=e[n]);return t}function WC(e){let t=e.replace(IC,GC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function GC(e){return"-"+e.toLowerCase()}const ff={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},KC={};function df(e,t){const n=KC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return q0(e,r,o)}function q0(e,t,n){if(QC(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 Y0(e.children,t,n)}return Array.isArray(e)?Y0(e,t,n):""}function Y0(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=q0(e[o],t,n);return r.join("")}function QC(e){return!!(e&&typeof e=="object")}const W0=document.createElement("i");function hf(e){const t="&"+e+";";W0.innerHTML=t;const n=W0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Cn(e,t,n,r){const o=e.length;let u=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);u<r.length;)l=r.slice(u,u+1e4),l.unshift(t,0),e.splice(...l),u+=1e4,t+=1e4}function Rn(e,t){return e.length>0?(Cn(e,e.length,0,t),e):t}const G0={}.hasOwnProperty;function K0(e){const t={};let n=-1;for(;++n<e.length;)XC(t,e[n]);return t}function XC(e,t){let n;for(n in t){const o=(G0.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let l;if(u)for(l in u){G0.call(o,l)||(o[l]=[]);const c=u[l];JC(o[l],Array.isArray(c)?c:c?[c]:[])}}}function JC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Cn(e,0,0,r)}function Q0(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 Yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const rn=Br(/[A-Za-z]/),Qt=Br(/[\dA-Za-z]/),ZC=Br(/[#-'*+\--9=?A-Z^-~]/);function ca(e){return e!==null&&(e<32||e===127)}const pf=Br(/\d/),eA=Br(/[\dA-Fa-f]/),tA=Br(/[!-/:-@[-`{-~]/);function Oe(e){return e!==null&&e<-2}function it(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const fa=Br(new RegExp("\\p{P}|\\p{S}","u")),bi=Br(/\s/);function Br(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function os(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&Qt(e.charCodeAt(n+1))&&Qt(e.charCodeAt(n+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(l=String.fromCharCode(u));else if(u>55295&&u<57344){const c=e.charCodeAt(n+1);u<56320&&c>56319&&c<57344?(l=String.fromCharCode(u,c),o=1):l="�"}else l=String.fromCharCode(u);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let u=0;return l;function l(d){return Ge(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ge(d)&&u++<o?(e.consume(d),c):(e.exit(n),t(d))}}const nA={tokenize:rA};function rA(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"),Xe(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),u(c)}function u(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Oe(c)?(e.consume(c),e.exit("chunkText"),u):(e.consume(c),l)}}const iA={tokenize:sA},X0={tokenize:oA};function sA(e){const t=this,n=[];let r=0,o,u,l;return c;function c($){if(r<n.length){const Z=n[r];return t.containerState=Z[1],e.attempt(Z[0].continuation,d,h)($)}return h($)}function d($){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&H();const Z=t.events.length;let he=Z,M;for(;he--;)if(t.events[he][0]==="exit"&&t.events[he][1].type==="chunkFlow"){M=t.events[he][1].end;break}L(r);let Ee=Z;for(;Ee<t.events.length;)t.events[Ee][1].end=G({},M),Ee++;return Cn(t.events,he+1,0,t.events.slice(Z)),t.events.length=Ee,h($)}return c($)}function h($){if(r===n.length){if(!o)return b($);if(o.currentConstruct&&o.currentConstruct.concrete)return S($);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(X0,g,y)($)}function g($){return o&&H(),L(r),b($)}function y($){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,S($)}function b($){return t.containerState={},e.attempt(X0,T,S)($)}function T($){return r++,n.push([t.currentConstruct,t.containerState]),b($)}function S($){if($===null){o&&H(),L(0),e.consume($);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),k($)}function k($){if($===null){P(e.exit("chunkFlow"),!0),L(0),e.consume($);return}return Oe($)?(e.consume($),P(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume($),k)}function P($,Z){const he=t.sliceStream($);if(Z&&he.push(null),$.previous=u,u&&(u.next=$),u=$,o.defineSkip($.start),o.write(he),t.parser.lazy[$.start.line]){let M=o.events.length;for(;M--;)if(o.events[M][1].start.offset<l&&(!o.events[M][1].end||o.events[M][1].end.offset>l))return;const Ee=t.events.length;let ke=Ee,Ne,U;for(;ke--;)if(t.events[ke][0]==="exit"&&t.events[ke][1].type==="chunkFlow"){if(Ne){U=t.events[ke][1].end;break}Ne=!0}for(L(r),M=Ee;M<t.events.length;)t.events[M][1].end=G({},U),M++;Cn(t.events,ke+1,0,t.events.slice(Ee)),t.events.length=M}}function L($){let Z=n.length;for(;Z-- >$;){const he=n[Z];t.containerState=he[1],he[0].exit.call(t,e)}n.length=$}function H(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function oA(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function us(e){if(e===null||it(e)||bi(e))return 1;if(fa(e))return 2}function da(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!r.includes(u)&&(t=u(t,n),r.push(u))}return t}const mf={name:"attention",resolveAll:uA,tokenize:aA};function uA(e,t){let n=-1,r,o,u,l,c,d,h,g;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 y=G({},e[r][1].end),b=G({},e[n][1].start);J0(y,-d),J0(b,d),l={type:d>1?"strongSequence":"emphasisSequence",start:y,end:G({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:G({},e[n][1].start),end:b},u={type:d>1?"strongText":"emphasisText",start:G({},e[r][1].end),end:G({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:G({},l.start),end:G({},c.end)},e[r][1].end=G({},l.start),e[n][1].start=G({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Rn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Rn(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",u,t]]),h=Rn(h,da(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Rn(h,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,h=Rn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,Cn(e,r-1,n-r+3,h),n=r+h.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function aA(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=us(r);let u;return l;function l(d){return u=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===u)return e.consume(d),c;const h=e.exit("attentionSequence"),g=us(d),y=!g||g===2&&o||n.includes(d),b=!o||o===2&&g||n.includes(r);return h._open=!!(u===42?y:y&&(o||!b)),h._close=!!(u===42?b:b&&(g||!y)),t(d)}}function J0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const lA={name:"autolink",tokenize:cA};function cA(e,t,n){let r=0;return o;function o(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(T){return rn(T)?(e.consume(T),l):T===64?n(T):h(T)}function l(T){return T===43||T===45||T===46||Qt(T)?(r=1,c(T)):h(T)}function c(T){return T===58?(e.consume(T),r=0,d):(T===43||T===45||T===46||Qt(T))&&r++<32?(e.consume(T),c):(r=0,h(T))}function d(T){return T===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):T===null||T===32||T===60||ca(T)?n(T):(e.consume(T),d)}function h(T){return T===64?(e.consume(T),g):ZC(T)?(e.consume(T),h):n(T)}function g(T){return Qt(T)?y(T):n(T)}function y(T){return T===46?(e.consume(T),r=0,g):T===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):b(T)}function b(T){if((T===45||Qt(T))&&r++<63){const S=T===45?b:y;return e.consume(T),S}return n(T)}}const yo={partial:!0,tokenize:fA};function fA(e,t,n){return r;function r(u){return Ge(u)?Xe(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Oe(u)?t(u):n(u)}}const Z0={continuation:{tokenize:hA},exit:pA,name:"blockQuote",tokenize:dA};function dA(e,t,n){const r=this;return o;function o(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),u}return n(l)}function u(l){return Ge(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function hA(e,t,n){const r=this;return o;function o(l){return Ge(l)?Xe(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):u(l)}function u(l){return e.attempt(Z0,t,n)(l)}}function pA(e){e.exit("blockQuote")}const eg={name:"characterEscape",tokenize:mA};function mA(e,t,n){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return tA(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const tg={name:"characterReference",tokenize:gA};function gA(e,t,n){const r=this;let o=0,u,l;return c;function c(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,l=Qt,g(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,l=eA,g):(e.enter("characterReferenceValue"),u=7,l=pf,g(y))}function g(y){if(y===59&&o){const b=e.exit("characterReferenceValue");return l===Qt&&!hf(r.sliceSerialize(b))?n(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(y)&&o++<u?(e.consume(y),g):n(y)}}const ng={partial:!0,tokenize:yA},rg={concrete:!0,name:"codeFenced",tokenize:EA};function EA(e,t,n){const r=this,o={partial:!0,tokenize:he};let u=0,l=0,c;return d;function d(M){return h(M)}function h(M){const Ee=r.events[r.events.length-1];return u=Ee&&Ee[1].type==="linePrefix"?Ee[2].sliceSerialize(Ee[1],!0).length:0,c=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(M)}function g(M){return M===c?(l++,e.consume(M),g):l<3?n(M):(e.exit("codeFencedFenceSequence"),Ge(M)?Xe(e,y,"whitespace")(M):y(M))}function y(M){return M===null||Oe(M)?(e.exit("codeFencedFence"),r.interrupt?t(M):e.check(ng,k,Z)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(M))}function b(M){return M===null||Oe(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(M)):Ge(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,T,"whitespace")(M)):M===96&&M===c?n(M):(e.consume(M),b)}function T(M){return M===null||Oe(M)?y(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(M))}function S(M){return M===null||Oe(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(M)):M===96&&M===c?n(M):(e.consume(M),S)}function k(M){return e.attempt(o,Z,P)(M)}function P(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),L}function L(M){return u>0&&Ge(M)?Xe(e,H,"linePrefix",u+1)(M):H(M)}function H(M){return M===null||Oe(M)?e.check(ng,k,Z)(M):(e.enter("codeFlowValue"),$(M))}function $(M){return M===null||Oe(M)?(e.exit("codeFlowValue"),H(M)):(e.consume(M),$)}function Z(M){return e.exit("codeFenced"),t(M)}function he(M,Ee,ke){let Ne=0;return U;function U(_e){return M.enter("lineEnding"),M.consume(_e),M.exit("lineEnding"),ge}function ge(_e){return M.enter("codeFencedFence"),Ge(_e)?Xe(M,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_e):me(_e)}function me(_e){return _e===c?(M.enter("codeFencedFenceSequence"),pe(_e)):ke(_e)}function pe(_e){return _e===c?(Ne++,M.consume(_e),pe):Ne>=l?(M.exit("codeFencedFenceSequence"),Ge(_e)?Xe(M,le,"whitespace")(_e):le(_e)):ke(_e)}function le(_e){return _e===null||Oe(_e)?(M.exit("codeFencedFence"),Ee(_e)):ke(_e)}}}function yA(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u)}function u(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const gf={name:"codeIndented",tokenize:bA},TA={partial:!0,tokenize:_A};function bA(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Xe(e,u,"linePrefix",5)(h)}function u(h){const g=r.events[r.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):Oe(h)?e.attempt(TA,l,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Oe(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function _A(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):Oe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):Xe(e,u,"linePrefix",5)(l)}function u(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):Oe(l)?o(l):n(l)}}const SA={name:"codeText",previous:CA,resolve:xA,tokenize:AA};function xA(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 CA(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function AA(e,t,n){let r=0,o,u;return l;function l(y){return e.enter("codeText"),e.enter("codeTextSequence"),c(y)}function c(y){return y===96?(e.consume(y),r++,c):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?n(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(u=e.enter("codeTextSequence"),o=0,g(y)):Oe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||Oe(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),h)}function g(y){return y===96?(e.consume(y),o++,g):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(u.type="codeTextData",h(y))}}class kA{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 u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&To(this.left,r),u.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),To(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),To(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);To(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);To(this.left,n.reverse())}}}function To(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 ig(e){const t={};let n=-1,r,o,u,l,c,d,h;const g=new kA(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(r=g.get(n),n&&r[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,u=0,u<d.length&&d[u][1].type==="lineEndingBlank"&&(u+=2),u<d.length&&d[u][1].type==="content"))for(;++u<d.length&&d[u][1].type!=="content";)d[u][1].type==="chunkText"&&(d[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,wA(g,n)),n=t[n],h=!0);else if(r[1]._container){for(u=n,o=void 0;u--;)if(l=g.get(u),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=u);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end=G({},g.get(o)[1].start),c=g.slice(o,n),c.unshift(r),g.splice(o,n-o+1,c))}}return Cn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function wA(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const u=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],h={};let g,y,b=-1,T=n,S=0,k=0;const P=[k];for(;T;){for(;e.get(++o)[1]!==T;);u.push(o),T._tokenizer||(g=r.sliceStream(T),T.next||g.push(null),y&&l.defineSkip(T.start),T._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(g),T._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),y=T,T=T.next}for(T=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&&(k=b+1,P.push(k),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(l.events=[],T?(T._tokenizer=void 0,T.previous=void 0):P.pop(),b=P.length;b--;){const L=c.slice(P[b],P[b+1]),H=u.pop();d.push([H,H+L.length-1]),e.splice(H,2,L)}for(d.reverse(),b=-1;++b<d.length;)h[S+d[b][0]]=S+d[b][1],S+=d[b][1]-d[b][0]-1;return h}const vA={resolve:IA,tokenize:OA},NA={partial:!0,tokenize:PA};function IA(e){return ig(e),e}function OA(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?u(c):Oe(c)?e.check(NA,l,u)(c):(e.consume(c),o)}function u(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function PA(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Xe(e,u,"linePrefix")}function u(l){if(l===null||Oe(l))return n(l);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(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function sg(e,t,n,r,o,u,l,c,d){const h=d||Number.POSITIVE_INFINITY;let g=0;return y;function y(L){return L===60?(e.enter(r),e.enter(o),e.enter(u),e.consume(L),e.exit(u),b):L===null||L===32||L===41||ca(L)?n(L):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),k(L))}function b(L){return L===62?(e.enter(u),e.consume(L),e.exit(u),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),T(L))}function T(L){return L===62?(e.exit("chunkString"),e.exit(c),b(L)):L===null||L===60||Oe(L)?n(L):(e.consume(L),L===92?S:T)}function S(L){return L===60||L===62||L===92?(e.consume(L),T):T(L)}function k(L){return!g&&(L===null||L===41||it(L))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(L)):g<h&&L===40?(e.consume(L),g++,k):L===41?(e.consume(L),g--,k):L===null||L===32||L===40||ca(L)?n(L):(e.consume(L),L===92?P:k)}function P(L){return L===40||L===41||L===92?(e.consume(L),k):k(L)}}function og(e,t,n,r,o,u){const l=this;let c=0,d;return h;function h(T){return e.enter(r),e.enter(o),e.consume(T),e.exit(o),e.enter(u),g}function g(T){return c>999||T===null||T===91||T===93&&!d||T===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(T):T===93?(e.exit(u),e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):Oe(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),y(T))}function y(T){return T===null||T===91||T===93||Oe(T)||c++>999?(e.exit("chunkString"),g(T)):(e.consume(T),d||(d=!Ge(T)),T===92?b:y)}function b(T){return T===91||T===92||T===93?(e.consume(T),c++,y):y(T)}}function ug(e,t,n,r,o,u){let l;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),l=b===40?41:b,d):n(b)}function d(b){return b===l?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(u),h(b))}function h(b){return b===l?(e.exit(u),d(l)):b===null?n(b):Oe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Xe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===l||b===null||Oe(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?y:g)}function y(b){return b===l||b===92?(e.consume(b),g):g(b)}}function bo(e,t){let n;return r;function r(o){return Oe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ge(o)?Xe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const RA={name:"definition",tokenize:DA},LA={partial:!0,tokenize:MA};function DA(e,t,n){const r=this;let o;return u;function u(T){return e.enter("definition"),l(T)}function l(T){return og.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function c(T){return o=Yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),d):n(T)}function d(T){return it(T)?bo(e,h)(T):h(T)}function h(T){return sg(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function g(T){return e.attempt(LA,y,y)(T)}function y(T){return Ge(T)?Xe(e,b,"whitespace")(T):b(T)}function b(T){return T===null||Oe(T)?(e.exit("definition"),r.parser.defined.push(o),t(T)):n(T)}}function MA(e,t,n){return r;function r(c){return it(c)?bo(e,o)(c):n(c)}function o(c){return ug(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function u(c){return Ge(c)?Xe(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Oe(c)?t(c):n(c)}}const FA={name:"hardBreakEscape",tokenize:BA};function BA(e,t,n){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return Oe(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const UA={name:"headingAtx",resolve:HA,tokenize:zA};function HA(e,t){let n=e.length-2,r=3,o,u;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},u={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Cn(e,r,n-r+1,[["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t]])),e}function zA(e,t,n){let r=0;return o;function o(g){return e.enter("atxHeading"),u(g)}function u(g){return e.enter("atxHeadingSequence"),l(g)}function l(g){return g===35&&r++<6?(e.consume(g),l):g===null||it(g)?(e.exit("atxHeadingSequence"),c(g)):n(g)}function c(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||Oe(g)?(e.exit("atxHeading"),t(g)):Ge(g)?Xe(e,c,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),c(g))}function h(g){return g===null||g===35||it(g)?(e.exit("atxHeadingText"),c(g)):(e.consume(g),h)}}const jA=["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"],ag=["pre","script","style","textarea"],$A={concrete:!0,name:"htmlFlow",resolveTo:YA,tokenize:WA},VA={partial:!0,tokenize:KA},qA={partial:!0,tokenize:GA};function YA(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 WA(e,t,n){const r=this;let o,u,l,c,d;return h;function h(x){return g(x)}function g(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),y}function y(x){return x===33?(e.consume(x),b):x===47?(e.consume(x),u=!0,k):x===63?(e.consume(x),o=3,r.interrupt?t:C):rn(x)?(e.consume(x),l=String.fromCharCode(x),P):n(x)}function b(x){return x===45?(e.consume(x),o=2,T):x===91?(e.consume(x),o=5,c=0,S):rn(x)?(e.consume(x),o=4,r.interrupt?t:C):n(x)}function T(x){return x===45?(e.consume(x),r.interrupt?t:C):n(x)}function S(x){const re="CDATA[";return x===re.charCodeAt(c++)?(e.consume(x),c===re.length?r.interrupt?t:me:S):n(x)}function k(x){return rn(x)?(e.consume(x),l=String.fromCharCode(x),P):n(x)}function P(x){if(x===null||x===47||x===62||it(x)){const re=x===47,be=l.toLowerCase();return!re&&!u&&ag.includes(be)?(o=1,r.interrupt?t(x):me(x)):jA.includes(l.toLowerCase())?(o=6,re?(e.consume(x),L):r.interrupt?t(x):me(x)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):u?H(x):$(x))}return x===45||Qt(x)?(e.consume(x),l+=String.fromCharCode(x),P):n(x)}function L(x){return x===62?(e.consume(x),r.interrupt?t:me):n(x)}function H(x){return Ge(x)?(e.consume(x),H):U(x)}function $(x){return x===47?(e.consume(x),U):x===58||x===95||rn(x)?(e.consume(x),Z):Ge(x)?(e.consume(x),$):U(x)}function Z(x){return x===45||x===46||x===58||x===95||Qt(x)?(e.consume(x),Z):he(x)}function he(x){return x===61?(e.consume(x),M):Ge(x)?(e.consume(x),he):$(x)}function M(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),d=x,Ee):Ge(x)?(e.consume(x),M):ke(x)}function Ee(x){return x===d?(e.consume(x),d=null,Ne):x===null||Oe(x)?n(x):(e.consume(x),Ee)}function ke(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||it(x)?he(x):(e.consume(x),ke)}function Ne(x){return x===47||x===62||Ge(x)?$(x):n(x)}function U(x){return x===62?(e.consume(x),ge):n(x)}function ge(x){return x===null||Oe(x)?me(x):Ge(x)?(e.consume(x),ge):n(x)}function me(x){return x===45&&o===2?(e.consume(x),Pe):x===60&&o===1?(e.consume(x),ce):x===62&&o===4?(e.consume(x),O):x===63&&o===3?(e.consume(x),C):x===93&&o===5?(e.consume(x),ne):Oe(x)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(VA,Y,pe)(x)):x===null||Oe(x)?(e.exit("htmlFlowData"),pe(x)):(e.consume(x),me)}function pe(x){return e.check(qA,le,Y)(x)}function le(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),_e}function _e(x){return x===null||Oe(x)?pe(x):(e.enter("htmlFlowData"),me(x))}function Pe(x){return x===45?(e.consume(x),C):me(x)}function ce(x){return x===47?(e.consume(x),l="",V):me(x)}function V(x){if(x===62){const re=l.toLowerCase();return ag.includes(re)?(e.consume(x),O):me(x)}return rn(x)&&l.length<8?(e.consume(x),l+=String.fromCharCode(x),V):me(x)}function ne(x){return x===93?(e.consume(x),C):me(x)}function C(x){return x===62?(e.consume(x),O):x===45&&o===2?(e.consume(x),C):me(x)}function O(x){return x===null||Oe(x)?(e.exit("htmlFlowData"),Y(x)):(e.consume(x),O)}function Y(x){return e.exit("htmlFlow"),t(x)}}function GA(e,t,n){const r=this;return o;function o(l){return Oe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u):n(l)}function u(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function KA(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(yo,t,n)}}const QA={name:"htmlText",tokenize:XA};function XA(e,t,n){const r=this;let o,u,l;return c;function c(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),h):C===47?(e.consume(C),he):C===63?(e.consume(C),$):rn(C)?(e.consume(C),ke):n(C)}function h(C){return C===45?(e.consume(C),g):C===91?(e.consume(C),u=0,S):rn(C)?(e.consume(C),H):n(C)}function g(C){return C===45?(e.consume(C),T):n(C)}function y(C){return C===null?n(C):C===45?(e.consume(C),b):Oe(C)?(l=y,ce(C)):(e.consume(C),y)}function b(C){return C===45?(e.consume(C),T):y(C)}function T(C){return C===62?Pe(C):C===45?b(C):y(C)}function S(C){const O="CDATA[";return C===O.charCodeAt(u++)?(e.consume(C),u===O.length?k:S):n(C)}function k(C){return C===null?n(C):C===93?(e.consume(C),P):Oe(C)?(l=k,ce(C)):(e.consume(C),k)}function P(C){return C===93?(e.consume(C),L):k(C)}function L(C){return C===62?Pe(C):C===93?(e.consume(C),L):k(C)}function H(C){return C===null||C===62?Pe(C):Oe(C)?(l=H,ce(C)):(e.consume(C),H)}function $(C){return C===null?n(C):C===63?(e.consume(C),Z):Oe(C)?(l=$,ce(C)):(e.consume(C),$)}function Z(C){return C===62?Pe(C):$(C)}function he(C){return rn(C)?(e.consume(C),M):n(C)}function M(C){return C===45||Qt(C)?(e.consume(C),M):Ee(C)}function Ee(C){return Oe(C)?(l=Ee,ce(C)):Ge(C)?(e.consume(C),Ee):Pe(C)}function ke(C){return C===45||Qt(C)?(e.consume(C),ke):C===47||C===62||it(C)?Ne(C):n(C)}function Ne(C){return C===47?(e.consume(C),Pe):C===58||C===95||rn(C)?(e.consume(C),U):Oe(C)?(l=Ne,ce(C)):Ge(C)?(e.consume(C),Ne):Pe(C)}function U(C){return C===45||C===46||C===58||C===95||Qt(C)?(e.consume(C),U):ge(C)}function ge(C){return C===61?(e.consume(C),me):Oe(C)?(l=ge,ce(C)):Ge(C)?(e.consume(C),ge):Ne(C)}function me(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),o=C,pe):Oe(C)?(l=me,ce(C)):Ge(C)?(e.consume(C),me):(e.consume(C),le)}function pe(C){return C===o?(e.consume(C),o=void 0,_e):C===null?n(C):Oe(C)?(l=pe,ce(C)):(e.consume(C),pe)}function le(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||it(C)?Ne(C):(e.consume(C),le)}function _e(C){return C===47||C===62||it(C)?Ne(C):n(C)}function Pe(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function ce(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),V}function V(C){return Ge(C)?Xe(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):ne(C)}function ne(C){return e.enter("htmlTextData"),l(C)}}const Ef={name:"labelEnd",resolveAll:tk,resolveTo:nk,tokenize:rk},JA={tokenize:ik},ZA={tokenize:sk},ek={tokenize:ok};function tk(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&&Cn(e,0,e.length,n),e}function nk(e,t){let n=e.length,r=0,o,u,l,c;for(;n--;)if(o=e[n][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[u][1].type==="labelLink"?"link":"image",start:G({},e[u][1].start),end:G({},e[e.length-1][1].end)},h={type:"label",start:G({},e[u][1].start),end:G({},e[l][1].end)},g={type:"labelText",start:G({},e[u+r+2][1].end),end:G({},e[l-2][1].start)};return c=[["enter",d,t],["enter",h,t]],c=Rn(c,e.slice(u+1,u+r+3)),c=Rn(c,[["enter",g,t]]),c=Rn(c,da(t.parser.constructs.insideSpan.null,e.slice(u+r+4,l-3),t)),c=Rn(c,[["exit",g,t],e[l-2],e[l-1],["exit",h,t]]),c=Rn(c,e.slice(l+1)),c=Rn(c,[["exit",d,t]]),Cn(e,u,e.length,c),e}function rk(e,t,n){const r=this;let o=r.events.length,u,l;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){u=r.events[o][1];break}return c;function c(b){return u?u._inactive?y(b):(l=r.parser.defined.includes(Yn(r.sliceSerialize({start:u.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(JA,g,l?g:y)(b):b===91?e.attempt(ZA,g,l?h:y)(b):l?g(b):y(b)}function h(b){return e.attempt(ek,g,y)(b)}function g(b){return t(b)}function y(b){return u._balanced=!0,n(b)}}function ik(e,t,n){return r;function r(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return it(y)?bo(e,u)(y):u(y)}function u(y){return y===41?g(y):sg(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function l(y){return it(y)?bo(e,d)(y):g(y)}function c(y){return n(y)}function d(y){return y===34||y===39||y===40?ug(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function h(y){return it(y)?bo(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):n(y)}}function sk(e,t,n){const r=this;return o;function o(c){return og.call(r,e,u,l,"reference","referenceMarker","referenceString")(c)}function u(c){return r.parser.defined.includes(Yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function ok(e,t,n){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const uk={name:"labelStartImage",resolveAll:Ef.resolveAll,tokenize:ak};function ak(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),u}function u(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const lk={name:"labelStartLink",resolveAll:Ef.resolveAll,tokenize:ck};function ck(e,t,n){const r=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),u}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const yf={name:"lineEnding",tokenize:fk};function fk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const ha={name:"thematicBreak",tokenize:dk};function dk(e,t,n){let r=0,o;return u;function u(h){return e.enter("thematicBreak"),l(h)}function l(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Oe(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ge(h)?Xe(e,c,"whitespace")(h):c(h))}}const dn={continuation:{tokenize:gk},exit:yk,name:"list",tokenize:mk},hk={partial:!0,tokenize:Tk},pk={partial:!0,tokenize:Ek};function mk(e,t,n){const r=this,o=r.events[r.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return c;function c(T){const S=r.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||T===r.containerState.marker:pf(T)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(ha,n,h)(T):h(T);if(!r.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(T)}return n(T)}function d(T){return pf(T)&&++l<10?(e.consume(T),d):(!r.interrupt||l<2)&&(r.containerState.marker?T===r.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),h(T)):n(T)}function h(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||T,e.check(yo,r.interrupt?n:g,e.attempt(hk,b,y))}function g(T){return r.containerState.initialBlankLine=!0,u++,b(T)}function y(T){return Ge(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),b):n(T)}function b(T){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function gk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(yo,o,u);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(c)}function u(c){return r.containerState.furtherBlankLines||!Ge(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(pk,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Ek(e,t,n){const r=this;return Xe(e,o,"listItemIndent",r.containerState.size+1);function o(u){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(u):n(u)}}function yk(e){e.exit(this.containerState.type)}function Tk(e,t,n){const r=this;return Xe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const l=r.events[r.events.length-1];return!Ge(u)&&l&&l[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const lg={name:"setextUnderline",resolveTo:bk,tokenize:_k};function bk(e,t){let n=e.length,r,o,u;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),!u&&e[n][1].type==="definition"&&(u=n);const l={type:"setextHeading",start:G({},e[r][1].start),end:G({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",l,t]),e.splice(u+1,0,["exit",e[r][1],t]),e[r][1].end=G({},e[u][1].end)):e[r][1]=l,e.push(["exit",l,t]),e}function _k(e,t,n){const r=this;let o;return u;function u(h){let g=r.events.length,y;for(;g--;)if(r.events[g][1].type!=="lineEnding"&&r.events[g][1].type!=="linePrefix"&&r.events[g][1].type!=="content"){y=r.events[g][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||y)?(e.enter("setextHeadingLine"),o=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ge(h)?Xe(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Oe(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Sk={tokenize:xk};function xk(e){const t=this,n=e.attempt(yo,r,e.attempt(this.parser.constructs.flowInitial,o,Xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(vA,o)),"linePrefix")));return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ck={resolveAll:fg()},Ak=cg("string"),kk=cg("text");function cg(e){return{resolveAll:fg(e==="text"?wk:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],u=n.attempt(o,l,c);return l;function l(g){return h(g)?u(g):c(g)}function c(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),d}function d(g){return h(g)?(n.exit("data"),u(g)):(n.consume(g),d)}function h(g){if(g===null)return!0;const y=o[g];let b=-1;if(y)for(;++b<y.length;){const T=y[b];if(!T.previous||T.previous.call(r,r.previous))return!0}return!1}}}function fg(e){return t;function t(n,r){let o=-1,u;for(;++o<=n.length;)u===void 0?n[o]&&n[o][1].type==="data"&&(u=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==u+2&&(n[u][1].end=n[o-1][1].end,n.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(n,r):n}}function wk(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 u=o.length,l=-1,c=0,d;for(;u--;){const h=o[u];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(h===-2)d=!0,c++;else if(h!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?l:r.start._bufferIndex+l,_index:r.start._index+u,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:G({},r.end)};r.end=G({},h.start),r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const vk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:RA},disable:{null:[]},document:{42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:Z0},flow:{35:UA,42:ha,45:[lg,ha],60:$A,61:lg,95:ha,96:rg,126:rg},flowInitial:{[-2]:gf,[-1]:gf,32:gf},insideSpan:{null:[mf,Ck]},string:{38:tg,92:eg},text:{[-5]:yf,[-4]:yf,[-3]:yf,33:uk,38:tg,42:mf,60:[lA,QA],91:lk,92:[FA,eg],93:Ef,95:mf,96:SA}},Symbol.toStringTag,{value:"Module"}));function Nk(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={},u=[];let l=[],c=[];const d={attempt:Ee(he),check:Ee(M),consume:H,enter:$,exit:Z,interrupt:Ee(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:T,write:y};let g=t.tokenize.call(h,d);return t.resolveAll&&u.push(t),h;function y(ge){return l=Rn(l,ge),P(),l[l.length-1]!==null?[]:(ke(t,0),h.events=da(u,h.events,h),h.events)}function b(ge,me){return Ok(T(ge),me)}function T(ge){return Ik(l,ge)}function S(){const{_bufferIndex:ge,_index:me,line:pe,column:le,offset:_e}=r;return{_bufferIndex:ge,_index:me,line:pe,column:le,offset:_e}}function k(ge){o[ge.line]=ge.column,U()}function P(){let ge;for(;r._index<l.length;){const me=l[r._index];if(typeof me=="string")for(ge=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ge&&r._bufferIndex<me.length;)L(me.charCodeAt(r._bufferIndex));else L(me)}}function L(ge){g=g(ge)}function H(ge){Oe(ge)?(r.line++,r.column=1,r.offset+=ge===-3?2:1,U()):ge!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=ge}function $(ge,me){const pe=me||{};return pe.type=ge,pe.start=S(),h.events.push(["enter",pe,h]),c.push(pe),pe}function Z(ge){const me=c.pop();return me.end=S(),h.events.push(["exit",me,h]),me}function he(ge,me){ke(ge,me.from)}function M(ge,me){me.restore()}function Ee(ge,me){return pe;function pe(le,_e,Pe){let ce,V,ne,C;return Array.isArray(le)?Y(le):"tokenize"in le?Y([le]):O(le);function O(ye){return Ie;function Ie(Fe){const ze=Fe!==null&&ye[Fe],Ke=Fe!==null&&ye.null,Bt=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(Ke)?Ke:Ke?[Ke]:[]];return Y(Bt)(Fe)}}function Y(ye){return ce=ye,V=0,ye.length===0?Pe:x(ye[V])}function x(ye){return Ie;function Ie(Fe){return C=Ne(),ne=ye,ye.partial||(h.currentConstruct=ye),ye.name&&h.parser.constructs.disable.null.includes(ye.name)?be():ye.tokenize.call(me?Object.assign(Object.create(h),me):h,d,re,be)(Fe)}}function re(ye){return ge(ne,C),_e}function be(ye){return C.restore(),++V<ce.length?x(ce[V]):Pe}}}function ke(ge,me){ge.resolveAll&&!u.includes(ge)&&u.push(ge),ge.resolve&&Cn(h.events,me,h.events.length-me,ge.resolve(h.events.slice(me),h)),ge.resolveTo&&(h.events=ge.resolveTo(h.events,h))}function Ne(){const ge=S(),me=h.previous,pe=h.currentConstruct,le=h.events.length,_e=Array.from(c);return{from:le,restore:Pe};function Pe(){r=ge,h.previous=me,h.currentConstruct=pe,h.events.length=le,c=_e,U()}}function U(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function Ik(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,u=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,u)];else{if(l=e.slice(n,o),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}u>0&&l.push(e[o].slice(0,u))}return l}function Ok(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const u=e[n];let l;if(typeof u=="string")l=u;else switch(u){case-5:{l="\r";break}case-4:{l=`
25
- `;break}case-3:{l=`\r
26
- `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(u)}o=u===-2,r.push(l)}return r.join("")}function Pk(e){const r={constructs:K0([vk,...(e||{}).extensions||[]]),content:o(nA),defined:[],document:o(iA),flow:o(Sk),lazy:{},string:o(Ak),text:o(kk)};return r;function o(u){return l;function l(c){return Nk(r,u,c)}}}function Rk(e){for(;!ig(e););return e}const dg=/[\0\t\n\r]/g;function Lk(){let e=1,t="",n=!0,r;return o;function o(u,l,c){const d=[];let h,g,y,b,T;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(l||void 0).decode(u)),y=0,t="",n&&(u.charCodeAt(0)===65279&&y++,n=void 0);y<u.length;){if(dg.lastIndex=y,h=dg.exec(u),b=h&&h.index!==void 0?h.index:u.length,T=u.charCodeAt(b),!h){t=u.slice(y);break}if(T===10&&y===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),y<b&&(d.push(u.slice(y,b)),e+=b-y),T){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}y=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Dk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Mk(e){return e.replace(Dk,Fk)}function Fk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),u=o===120||o===88;return Q0(n.slice(u?2:1),u?16:10)}return hf(n)||e}const hg={}.hasOwnProperty;function Bk(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Uk(n)(Rk(Pk(n).document().write(Lk()(e,t,!0))))}function Uk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Cs),autolinkProtocol:Ne,autolinkEmail:Ne,atxHeading:u(Yo),blockQuote:u(Ke),characterEscape:Ne,characterReference:Ne,codeFenced:u(Bt),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(Bt,l),codeText:u(Ct,l),codeTextData:Ne,data:Ne,codeFlowValue:Ne,definition:u(It),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(qo),hardBreakEscape:u(Wo),hardBreakTrailing:u(Wo),htmlFlow:u(xs,l),htmlFlowData:Ne,htmlText:u(xs,l),htmlTextData:Ne,image:u(Wa),label:l,link:u(Cs),listItem:u(qr),listItemValue:b,listOrdered:u(Vr,y),listUnordered:u(Vr),paragraph:u(Go),reference:x,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(Yo),strong:u(Ga),thematicBreak:u(Qa)},exit:{atxHeading:d(),atxHeadingSequence:he,autolink:d(),autolinkEmail:ze,autolinkProtocol:Fe,blockQuote:d(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:ye,characterReference:Ie,codeFenced:d(P),codeFencedFence:k,codeFencedFenceInfo:T,codeFencedFenceMeta:S,codeFlowValue:U,codeIndented:d(L),codeText:d(_e),codeTextData:U,data:U,definition:d(),definitionDestinationString:Z,definitionLabelString:H,definitionTitleString:$,emphasis:d(),hardBreakEscape:d(me),hardBreakTrailing:d(me),htmlFlow:d(pe),htmlFlowData:U,htmlText:d(le),htmlTextData:U,image:d(ce),label:ne,labelText:V,lineEnding:ge,link:d(Pe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:re,resourceDestinationString:C,resourceTitleString:O,resource:Y,setextHeading:d(ke),setextHeadingLineSequence:Ee,setextHeadingText:M,strong:d(),thematicBreak:d()}};pg(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Q){let de={type:"root",children:[]};const Be={stack:[de],tokenStack:[],config:t,enter:c,exit:h,buffer:l,resume:g,data:n},Ye=[];let Je=-1;for(;++Je<Q.length;)if(Q[Je][1].type==="listOrdered"||Q[Je][1].type==="listUnordered")if(Q[Je][0]==="enter")Ye.push(Je);else{const Vt=Ye.pop();Je=o(Q,Vt,Je)}for(Je=-1;++Je<Q.length;){const Vt=t[Q[Je][0]];hg.call(Vt,Q[Je][1].type)&&Vt[Q[Je][1].type].call(Object.assign({sliceSerialize:Q[Je][2].sliceSerialize},Be),Q[Je][1])}if(Be.tokenStack.length>0){const Vt=Be.tokenStack[Be.tokenStack.length-1];(Vt[1]||mg).call(Be,void 0,Vt[0])}for(de.position={start:Ur(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:Ur(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<t.transforms.length;)de=t.transforms[Je](de)||de;return de}function o(Q,de,Be){let Ye=de-1,Je=-1,Vt=!1,vr,Mn,Yr,Ni;for(;++Ye<=Be;){const qt=Q[Ye];switch(qt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{qt[0]==="enter"?Je++:Je--,Ni=void 0;break}case"lineEndingBlank":{qt[0]==="enter"&&(vr&&!Ni&&!Je&&!Yr&&(Yr=Ye),Ni=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ni=void 0}if(!Je&&qt[0]==="enter"&&qt[1].type==="listItemPrefix"||Je===-1&&qt[0]==="exit"&&(qt[1].type==="listUnordered"||qt[1].type==="listOrdered")){if(vr){let hr=Ye;for(Mn=void 0;hr--;){const kn=Q[hr];if(kn[1].type==="lineEnding"||kn[1].type==="lineEndingBlank"){if(kn[0]==="exit")continue;Mn&&(Q[Mn][1].type="lineEndingBlank",Vt=!0),kn[1].type="lineEnding",Mn=hr}else if(!(kn[1].type==="linePrefix"||kn[1].type==="blockQuotePrefix"||kn[1].type==="blockQuotePrefixWhitespace"||kn[1].type==="blockQuoteMarker"||kn[1].type==="listItemIndent"))break}Yr&&(!Mn||Yr<Mn)&&(vr._spread=!0),vr.end=Object.assign({},Mn?Q[Mn][1].start:qt[1].end),Q.splice(Mn||Ye,0,["exit",vr,qt[2]]),Ye++,Be++}if(qt[1].type==="listItemPrefix"){const hr={type:"listItem",_spread:!1,start:Object.assign({},qt[1].start),end:void 0};vr=hr,Q.splice(Ye,0,["enter",hr,qt[2]]),Ye++,Be++,Yr=void 0,Ni=!0}}}return Q[de][1]._spread=Vt,Be}function u(Q,de){return Be;function Be(Ye){c.call(this,Q(Ye),Ye),de&&de.call(this,Ye)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(Q,de,Be){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([de,Be||void 0]),Q.position={start:Ur(de.start),end:void 0}}function d(Q){return de;function de(Be){Q&&Q.call(this,Be),h.call(this,Be)}}function h(Q,de){const Be=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==Q.type&&(de?de.call(this,Q,Ye[0]):(Ye[1]||mg).call(this,Q,Ye[0]));else throw new Error("Cannot close `"+Q.type+"` ("+go({start:Q.start,end:Q.end})+"): it’s not open");Be.position.end=Ur(Q.end)}function g(){return df(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(Q){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function T(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.lang=Q}function S(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.meta=Q}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function P(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function L(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q.replace(/(\r?\n|\r)$/g,"")}function H(Q){const de=this.resume(),Be=this.stack[this.stack.length-1];Be.label=de,Be.identifier=Yn(this.sliceSerialize(Q)).toLowerCase()}function $(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.title=Q}function Z(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.url=Q}function he(Q){const de=this.stack[this.stack.length-1];if(!de.depth){const Be=this.sliceSerialize(Q).length;de.depth=Be}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function Ee(Q){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function ke(){this.data.setextHeadingSlurpLineEnding=void 0}function Ne(Q){const Be=this.stack[this.stack.length-1].children;let Ye=Be[Be.length-1];(!Ye||Ye.type!=="text")&&(Ye=Ka(),Ye.position={start:Ur(Q.start),end:void 0},Be.push(Ye)),this.stack.push(Ye)}function U(Q){const de=this.stack.pop();de.value+=this.sliceSerialize(Q),de.position.end=Ur(Q.end)}function ge(Q){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=de.children[de.children.length-1];Be.position.end=Ur(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(de.type)&&(Ne.call(this,Q),U.call(this,Q))}function me(){this.data.atHardBreak=!0}function pe(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q}function le(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q}function _e(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q}function Pe(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=de,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function ce(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=de,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function V(Q){const de=this.sliceSerialize(Q),Be=this.stack[this.stack.length-2];Be.label=Mk(de),Be.identifier=Yn(de).toLowerCase()}function ne(){const Q=this.stack[this.stack.length-1],de=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const Ye=Q.children;Be.children=Ye}else Be.alt=de}function C(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.url=Q}function O(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.title=Q}function Y(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function re(Q){const de=this.resume(),Be=this.stack[this.stack.length-1];Be.label=de,Be.identifier=Yn(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function be(Q){this.data.characterReferenceType=Q.type}function ye(Q){const de=this.sliceSerialize(Q),Be=this.data.characterReferenceType;let Ye;Be?(Ye=Q0(de,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=hf(de);const Je=this.stack[this.stack.length-1];Je.value+=Ye}function Ie(Q){const de=this.stack.pop();de.position.end=Ur(Q.end)}function Fe(Q){U.call(this,Q);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(Q)}function ze(Q){U.call(this,Q);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(Q)}function Ke(){return{type:"blockquote",children:[]}}function Bt(){return{type:"code",lang:null,meta:null,value:""}}function Ct(){return{type:"inlineCode",value:""}}function It(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function qo(){return{type:"emphasis",children:[]}}function Yo(){return{type:"heading",depth:0,children:[]}}function Wo(){return{type:"break"}}function xs(){return{type:"html",value:""}}function Wa(){return{type:"image",title:null,url:"",alt:null}}function Cs(){return{type:"link",title:null,url:"",children:[]}}function Vr(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function qr(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Go(){return{type:"paragraph",children:[]}}function Ga(){return{type:"strong",children:[]}}function Ka(){return{type:"text",value:""}}function Qa(){return{type:"thematicBreak"}}}function Ur(e){return{line:e.line,column:e.column,offset:e.offset}}function pg(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?pg(e,r):Hk(e,r)}}function Hk(e,t){let n;for(n in t)if(hg.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 mg(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+go({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+go({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+go({start:t.start,end:t.end})+") is still open")}function zk(e){const t=this;t.parser=n;function n(r){return Bk(r,He(G(G({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function jk(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 $k(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
- `}]}function Vk(e,t){const n=t.value?t.value+`
28
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function qk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=os(r.toLowerCase()),u=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=u+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(l)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function Gk(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 Kk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function gg(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),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function Qk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gg(e,t);const o={src:os(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,u),e.applyData(t,u)}function Xk(e,t){const n={src:os(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 Jk(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 Zk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gg(e,t);const o={href:os(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function ew(e,t){const n={href:os(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 tw(e,t,n){const r=e.all(t),o=n?nw(n):Eg(t),u={},l=[];if(typeof t.checked=="boolean"){const g=r[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},r.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const g=r[c];(o||c!==0||g.type!=="element"||g.tagName!=="p")&&l.push({type:"text",value:`
29
- `}),g.type==="element"&&g.tagName==="p"&&!o?l.push(...g.children):l.push(g)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
30
- `});const h={type:"element",tagName:"li",properties:u,children:l};return e.patch(t,h),e.applyData(t,h)}function nw(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=Eg(n[r])}return t}function Eg(e){const t=e.spread;return t==null?e.children.length>1:t}function rw(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 l=r[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,u),e.applyData(t,u)}function iw(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sw(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ow(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uw(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=ur(t.children[1]),d=la(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),o.push(l)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function aw(e,t,n){const r=n?n.children:void 0,u=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const y=t.children[d],b={},T=l?l[d]:void 0;T&&(b.align=T);let S={type:"element",tagName:u,properties:b,children:[]};y&&(S.children=e.all(y),e.patch(y,S),S=e.applyData(y,S)),h.push(S)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,g),e.applyData(t,g)}function lw(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const yg=9,Tg=32;function cw(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const u=[];for(;r;)u.push(bg(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return u.push(bg(t.slice(o),o>0,!1)),u.join("")}function bg(e,t,n){let r=0,o=e.length;if(t){let u=e.codePointAt(r);for(;u===yg||u===Tg;)r++,u=e.codePointAt(r)}if(n){let u=e.codePointAt(o-1);for(;u===yg||u===Tg;)o--,u=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function fw(e,t){const n={type:"text",value:cw(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function dw(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const hw={blockquote:jk,break:$k,code:Vk,delete:qk,emphasis:Yk,footnoteReference:Wk,heading:Gk,html:Kk,imageReference:Qk,image:Xk,inlineCode:Jk,linkReference:Zk,link:ew,listItem:tw,list:rw,paragraph:iw,root:sw,strong:ow,table:uw,tableCell:lw,tableRow:aw,text:fw,thematicBreak:dw,toml:pa,yaml:pa,definition:pa,footnoteDefinition:pa};function pa(){}const _g=-1,ma=0,_o=1,ga=2,Tf=3,bf=4,_f=5,Sf=6,Sg=7,xg=8,Cg=typeof self=="object"?self:globalThis,pw=(e,t)=>{const n=(o,u)=>(e.set(u,o),o),r=o=>{if(e.has(o))return e.get(o);const[u,l]=t[o];switch(u){case ma:case _g:return n(l,o);case _o:{const c=n([],o);for(const d of l)c.push(r(d));return c}case ga:{const c=n({},o);for(const[d,h]of l)c[r(d)]=r(h);return c}case Tf:return n(new Date(l),o);case bf:{const{source:c,flags:d}=l;return n(new RegExp(c,d),o)}case _f:{const c=n(new Map,o);for(const[d,h]of l)c.set(r(d),r(h));return c}case Sf:{const c=n(new Set,o);for(const d of l)c.add(r(d));return c}case Sg:{const{name:c,message:d}=l;return n(new Cg[c](d),o)}case xg:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new Cg[u](l),o)};return r},Ag=e=>pw(new Map,e)(0),as="",{toString:mw}={},{keys:gw}=Object,So=e=>{const t=typeof e;if(t!=="object"||!e)return[ma,t];const n=mw.call(e).slice(8,-1);switch(n){case"Array":return[_o,as];case"Object":return[ga,as];case"Date":return[Tf,as];case"RegExp":return[bf,as];case"Map":return[_f,as];case"Set":return[Sf,as];case"DataView":return[_o,n]}return n.includes("Array")?[_o,n]:n.includes("Error")?[Sg,n]:[ga,n]},Ea=([e,t])=>e===ma&&(t==="function"||t==="symbol"),Ew=(e,t,n,r)=>{const o=(l,c)=>{const d=r.push(l)-1;return n.set(c,d),d},u=l=>{if(n.has(l))return n.get(l);let[c,d]=So(l);switch(c){case ma:{let g=l;switch(d){case"bigint":c=xg,g=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return o([_g],l)}return o([c,g],l)}case _o:{if(d){let b=l;return d==="DataView"?b=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(l)),o([d,[...b]],l)}const g=[],y=o([c,g],l);for(const b of l)g.push(u(b));return y}case ga:{if(d)switch(d){case"BigInt":return o([d,l.toString()],l);case"Boolean":case"Number":case"String":return o([d,l.valueOf()],l)}if(t&&"toJSON"in l)return u(l.toJSON());const g=[],y=o([c,g],l);for(const b of gw(l))(e||!Ea(So(l[b])))&&g.push([u(b),u(l[b])]);return y}case Tf:return o([c,l.toISOString()],l);case bf:{const{source:g,flags:y}=l;return o([c,{source:g,flags:y}],l)}case _f:{const g=[],y=o([c,g],l);for(const[b,T]of l)(e||!(Ea(So(b))||Ea(So(T))))&&g.push([u(b),u(T)]);return y}case Sf:{const g=[],y=o([c,g],l);for(const b of l)(e||!Ea(So(b)))&&g.push(u(b));return y}}const{message:h}=l;return o([c,{name:d,message:h}],l)};return u},kg=(e,{json:t,lossy:n}={})=>{const r=[];return Ew(!(t||n),!!t,new Map,r)(e),r},ls=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ag(kg(e,t)):structuredClone(e):(e,t)=>Ag(kg(e,t));function yw(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 Tw(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function bw(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||yw,r=e.options.footnoteBackLabel||Tw,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const g=e.all(h),y=String(h.identifier).toUpperCase(),b=os(y.toLowerCase());let T=0;const S=[],k=e.footnoteCounts.get(y);for(;k!==void 0&&++T<=k;){S.length>0&&S.push({type:"text",value:" "});let H=typeof n=="string"?n:n(d,T);typeof H=="string"&&(H={type:"text",value:H}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(T>1?"-"+T:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,T),className:["data-footnote-backref"]},children:Array.isArray(H)?H:[H]})}const P=g[g.length-1];if(P&&P.type==="element"&&P.tagName==="p"){const H=P.children[P.children.length-1];H&&H.type==="text"?H.value+=" ":P.children.push({type:"text",value:" "}),P.children.push(...S)}else g.push(...S);const L={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(g,!0)};e.patch(h,L),c.push(L)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:He(G({},ls(l)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
1
+ (function(Ie,Me){typeof exports=="object"&&typeof module!="undefined"?Me(exports):typeof define=="function"&&define.amd?define(["exports"],Me):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Me(Ie["cimulate-copilot-widget"]={}))})(this,function(Ie){"use strict";var qM=Object.defineProperty,YM=Object.defineProperties;var WM=Object.getOwnPropertyDescriptors;var Yc=Object.getOwnPropertySymbols;var sx=Object.prototype.hasOwnProperty,ox=Object.prototype.propertyIsEnumerable;var Co=(Ie,Me)=>(Me=Symbol[Ie])?Me:Symbol.for("Symbol."+Ie),GM=Ie=>{throw TypeError(Ie)},Wc=Math.pow,km=(Ie,Me,Ge)=>Me in Ie?qM(Ie,Me,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Me]=Ge,U=(Ie,Me)=>{for(var Ge in Me||(Me={}))sx.call(Me,Ge)&&km(Ie,Ge,Me[Ge]);if(Yc)for(var Ge of Yc(Me))ox.call(Me,Ge)&&km(Ie,Ge,Me[Ge]);return Ie},Te=(Ie,Me)=>YM(Ie,WM(Me));var Yt=(Ie,Me)=>{var Ge={};for(var it in Ie)sx.call(Ie,it)&&Me.indexOf(it)<0&&(Ge[it]=Ie[it]);if(Ie!=null&&Yc)for(var it of Yc(Ie))Me.indexOf(it)<0&&ox.call(Ie,it)&&(Ge[it]=Ie[it]);return Ge};var Be=(Ie,Me,Ge)=>km(Ie,typeof Me!="symbol"?Me+"":Me,Ge);var nt=(Ie,Me,Ge)=>new Promise((it,Tt)=>{var ft=xt=>{try{Ft(Ge.next(xt))}catch(dn){Tt(dn)}},Pe=xt=>{try{Ft(Ge.throw(xt))}catch(dn){Tt(dn)}},Ft=xt=>xt.done?it(xt.value):Promise.resolve(xt.value).then(ft,Pe);Ft((Ge=Ge.apply(Ie,Me)).next())}),Rr=function(Ie,Me){this[0]=Ie,this[1]=Me},Gc=(Ie,Me,Ge)=>{var it=(Pe,Ft,xt,dn)=>{try{var ls=Ge[Pe](Ft),Ao=(Ft=ls.value)instanceof Rr,Kc=ls.done;Promise.resolve(Ao?Ft[0]:Ft).then(Xn=>Ao?it(Pe==="return"?Pe:"next",Ft[1]?{done:Xn.done,value:Xn.value}:Xn,xt,dn):xt({value:Xn,done:Kc})).catch(Xn=>it("throw",Xn,xt,dn))}catch(Xn){dn(Xn)}},Tt=Pe=>ft[Pe]=Ft=>new Promise((xt,dn)=>it(Pe,Ft,xt,dn)),ft={};return Ge=Ge.apply(Ie,Me),ft[Co("asyncIterator")]=()=>ft,Tt("next"),Tt("throw"),Tt("return"),ft},Nm=Ie=>{var Me=Ie[Co("asyncIterator")],Ge=!1,it,Tt={};return Me==null?(Me=Ie[Co("iterator")](),it=ft=>Tt[ft]=Pe=>Me[ft](Pe)):(Me=Me.call(Ie),it=ft=>Tt[ft]=Pe=>{if(Ge){if(Ge=!1,ft==="throw")throw Pe;return Pe}return Ge=!0,{done:!1,value:new Rr(new Promise(Ft=>{var xt=Me[ft](Pe);xt instanceof Object||GM("Object expected"),Ft(xt)}),1)}}),Tt[Co("iterator")]=()=>Tt,it("next"),"throw"in Me?it("throw"):Tt.throw=ft=>{throw ft},"return"in Me&&it("return"),Tt},ux=(Ie,Me,Ge)=>(Me=Ie[Co("asyncIterator")])?Me.call(Ie):(Ie=Ie[Co("iterator")](),Me={},Ge=(it,Tt)=>(Tt=Ie[it])&&(Me[it]=ft=>new Promise((Pe,Ft,xt)=>(ft=Tt.call(Ie,ft),xt=ft.done,Promise.resolve(ft.value).then(dn=>Pe({value:dn,done:xt}),Ft)))),Ge("next"),Ge("return"),Me);var Me=document.createElement("style");Me.textContent=`.cim-widget-button{padding:.5rem;background-color:var(--cim-widget-primary-color, #3182ce);border-radius:4px;border-color:var(--cim-widget-primary-color, #3182ce);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}}.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;background-color:transparent;border:1px solid transparent;border-radius:4px;padding:6px;cursor:pointer;color:#333;font-size:18px;&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-bar{display:flex;align-items:center;justify-content:space-between;padding:1px;border:1px solid var(--cim-widget-border-color);border-radius:4px;font-family:var(--cim-widget-font-family)}.cim-widget-search-input{width:100%;height:100%;margin-left:2px;background-color:transparent;border:none;outline:none}.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-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:130px;background:#fff;padding:.25rem 0;border-radius:.5rem;border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;background-color:#fff;border:1px solid transparent;border-radius:4px;padding:6px;cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;svg{font-size:.75rem}}.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-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media (max-width: 576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media (max-width: 768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-search{display:flex;flex-direction:column}.cim-widget-refined-search-query{display:inline-flex;align-items:center;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.refined-search-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-user-message{display:flex;align-items:center}.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:30%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-text{font-weight:700;margin-bottom:.5rem}.cim-widget-message-icon.user-message-icon{margin-right:.5rem}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex}.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:30%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:1rem;margin-bottom:1rem;border-radius:8px;&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:8px;border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.chat{border:1px solid var(--cim-widget-border-color)}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;padding:1rem;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);font-size:.875rem;&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-right{bottom:.5rem;right:.5rem}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;width:100%;margin-bottom:.5rem;gap:8px}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0}@media (576px <= width <= 768px){.cim-widget-dialog{width:50%;border-radius:0}}@media (max-width: 576px){.cim-widget-dialog{height:100%;width:100%;border-radius:0;&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;padding:1rem;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;width:100%;margin-bottom:1rem;gap:8px}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0}@media (max-width: 576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}.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:2rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1.5rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1.2rem}.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 0}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}
2
+ /*$vite$:1*/`,document.head.appendChild(Me);function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var it={exports:{}},Tt={},ft={exports:{}},Pe={};var Ft;function xt(){if(Ft)return Pe;Ft=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"),u=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),E=Symbol.iterator;function b(R){return R===null||typeof R!="object"?null:(R=E&&R[E]||R["@@iterator"],typeof R=="function"?R:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function C(R,K,k){this.props=R,this.context=K,this.refs=S,this.updater=k||T}C.prototype.isReactComponent={},C.prototype.setState=function(R,K){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,K,"setState")},C.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function I(){}I.prototype=C.prototype;function B(R,K,k){this.props=R,this.context=K,this.refs=S,this.updater=k||T}var L=B.prototype=new I;L.constructor=B,_(L,C.prototype),L.isPureReactComponent=!0;var q=Array.isArray,X=Object.prototype.hasOwnProperty,F={current:null},ee={key:!0,ref:!0,__self:!0,__source:!0};function be(R,K,k){var _e,Ue={},ie=null,xe=null;if(K!=null)for(_e in K.ref!==void 0&&(xe=K.ref),K.key!==void 0&&(ie=""+K.key),K)X.call(K,_e)&&!ee.hasOwnProperty(_e)&&(Ue[_e]=K[_e]);var Ne=arguments.length-2;if(Ne===1)Ue.children=k;else if(1<Ne){for(var Fe=Array(Ne),Ye=0;Ye<Ne;Ye++)Fe[Ye]=arguments[Ye+2];Ue.children=Fe}if(R&&R.defaultProps)for(_e in Ne=R.defaultProps,Ne)Ue[_e]===void 0&&(Ue[_e]=Ne[_e]);return{$$typeof:e,type:R,key:ie,ref:xe,props:Ue,_owner:F.current}}function we(R,K){return{$$typeof:e,type:R.type,key:K,ref:R.ref,props:R.props,_owner:R._owner}}function H(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function ae(R){var K={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(k){return K[k]})}var he=/\/+/g;function fe(R,K){return typeof R=="object"&&R!==null&&R.key!=null?ae(""+R.key):K.toString(36)}function de(R,K,k,_e,Ue){var ie=typeof R;(ie==="undefined"||ie==="boolean")&&(R=null);var xe=!1;if(R===null)xe=!0;else switch(ie){case"string":case"number":xe=!0;break;case"object":switch(R.$$typeof){case e:case t:xe=!0}}if(xe)return xe=R,Ue=Ue(xe),R=_e===""?"."+fe(xe,0):_e,q(Ue)?(k="",R!=null&&(k=R.replace(he,"$&/")+"/"),de(Ue,K,k,"",function(Ye){return Ye})):Ue!=null&&(H(Ue)&&(Ue=we(Ue,k+(!Ue.key||xe&&xe.key===Ue.key?"":(""+Ue.key).replace(he,"$&/")+"/")+R)),K.push(Ue)),1;if(xe=0,_e=_e===""?".":_e+":",q(R))for(var Ne=0;Ne<R.length;Ne++){ie=R[Ne];var Fe=_e+fe(ie,Ne);xe+=de(ie,K,k,Fe,Ue)}else if(Fe=b(R),typeof Fe=="function")for(R=Fe.call(R),Ne=0;!(ie=R.next()).done;)ie=ie.value,Fe=_e+fe(ie,Ne++),xe+=de(ie,K,k,Fe,Ue);else if(ie==="object")throw K=String(R),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return xe}function ye(R,K,k){if(R==null)return R;var _e=[],Ue=0;return de(R,_e,"","",function(ie){return K.call(k,ie,Ue++)}),_e}function Ce(R){if(R._status===-1){var K=R._result;K=K(),K.then(function(k){(R._status===0||R._status===-1)&&(R._status=1,R._result=k)},function(k){(R._status===0||R._status===-1)&&(R._status=2,R._result=k)}),R._status===-1&&(R._status=0,R._result=K)}if(R._status===1)return R._result.default;throw R._result}var oe={current:null},$={transition:null},te={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:$,ReactCurrentOwner:F};function w(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:ye,forEach:function(R,K,k){ye(R,function(){K.apply(this,arguments)},k)},count:function(R){var K=0;return ye(R,function(){K++}),K},toArray:function(R){return ye(R,function(K){return K})||[]},only:function(R){if(!H(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},Pe.Component=C,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=B,Pe.StrictMode=r,Pe.Suspense=f,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,Pe.act=w,Pe.cloneElement=function(R,K,k){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var _e=_({},R.props),Ue=R.key,ie=R.ref,xe=R._owner;if(K!=null){if(K.ref!==void 0&&(ie=K.ref,xe=F.current),K.key!==void 0&&(Ue=""+K.key),R.type&&R.type.defaultProps)var Ne=R.type.defaultProps;for(Fe in K)X.call(K,Fe)&&!ee.hasOwnProperty(Fe)&&(_e[Fe]=K[Fe]===void 0&&Ne!==void 0?Ne[Fe]:K[Fe])}var Fe=arguments.length-2;if(Fe===1)_e.children=k;else if(1<Fe){Ne=Array(Fe);for(var Ye=0;Ye<Fe;Ye++)Ne[Ye]=arguments[Ye+2];_e.children=Ne}return{$$typeof:e,type:R.type,key:Ue,ref:ie,props:_e,_owner:xe}},Pe.createContext=function(R){return R={$$typeof:a,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:u,_context:R},R.Consumer=R},Pe.createElement=be,Pe.createFactory=function(R){var K=be.bind(null,R);return K.type=R,K},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(R){return{$$typeof:c,render:R}},Pe.isValidElement=H,Pe.lazy=function(R){return{$$typeof:m,_payload:{_status:-1,_result:R},_init:Ce}},Pe.memo=function(R,K){return{$$typeof:h,type:R,compare:K===void 0?null:K}},Pe.startTransition=function(R){var K=$.transition;$.transition={};try{R()}finally{$.transition=K}},Pe.unstable_act=w,Pe.useCallback=function(R,K){return oe.current.useCallback(R,K)},Pe.useContext=function(R){return oe.current.useContext(R)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(R){return oe.current.useDeferredValue(R)},Pe.useEffect=function(R,K){return oe.current.useEffect(R,K)},Pe.useId=function(){return oe.current.useId()},Pe.useImperativeHandle=function(R,K,k){return oe.current.useImperativeHandle(R,K,k)},Pe.useInsertionEffect=function(R,K){return oe.current.useInsertionEffect(R,K)},Pe.useLayoutEffect=function(R,K){return oe.current.useLayoutEffect(R,K)},Pe.useMemo=function(R,K){return oe.current.useMemo(R,K)},Pe.useReducer=function(R,K,k){return oe.current.useReducer(R,K,k)},Pe.useRef=function(R){return oe.current.useRef(R)},Pe.useState=function(R){return oe.current.useState(R)},Pe.useSyncExternalStore=function(R,K,k){return oe.current.useSyncExternalStore(R,K,k)},Pe.useTransition=function(){return oe.current.useTransition()},Pe.version="18.3.1",Pe}var dn;function ls(){return dn||(dn=1,ft.exports=xt()),ft.exports}var Ao;function Kc(){if(Ao)return Tt;Ao=1;var e=ls(),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,u={key:!0,ref:!0,__self:!0,__source:!0};function a(c,f,h){var m,E={},b=null,T=null;h!==void 0&&(b=""+h),f.key!==void 0&&(b=""+f.key),f.ref!==void 0&&(T=f.ref);for(m in f)r.call(f,m)&&!u.hasOwnProperty(m)&&(E[m]=f[m]);if(c&&c.defaultProps)for(m in f=c.defaultProps,f)E[m]===void 0&&(E[m]=f[m]);return{$$typeof:t,type:c,key:b,ref:T,props:E,_owner:o.current}}return Tt.Fragment=n,Tt.jsx=a,Tt.jsxs=a,Tt}var Xn;function cx(){return Xn||(Xn=1,it.exports=Kc()),it.exports}var O=cx();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 oa=Object.create(null);Object.keys(pr).forEach(e=>{oa[pr[e]]=e});const Qc={type:"error",data:"parser error"},Om=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Im=typeof ArrayBuffer=="function",Pm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Xc=({type:e,data:t},n,r)=>Om&&t instanceof Blob?n?r(t):Rm(t,r):Im&&(t instanceof ArrayBuffer||Pm(t))?n?r(t):Rm(new Blob([t]),r):r(pr[e]+(t||"")),Rm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Lm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Jc;function fx(e,t){if(Om&&e.data instanceof Blob)return e.data.arrayBuffer().then(Lm).then(t);if(Im&&(e.data instanceof ArrayBuffer||Pm(e.data)))return t(Lm(e.data));Xc(e,!1,n=>{Jc||(Jc=new TextEncoder),t(Jc.encode(n))})}const Dm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Dm.length;e++)vo[Dm.charCodeAt(e)]=e;const dx=e=>{let t=e.length*.75,n=e.length,r,o=0,u,a,c,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),m=new Uint8Array(h);for(r=0;r<n;r+=4)u=vo[e.charCodeAt(r)],a=vo[e.charCodeAt(r+1)],c=vo[e.charCodeAt(r+2)],f=vo[e.charCodeAt(r+3)],m[o++]=u<<2|a>>4,m[o++]=(a&15)<<4|c>>2,m[o++]=(c&3)<<6|f&63;return h},hx=typeof ArrayBuffer=="function",Zc=(e,t)=>{if(typeof e!="string")return{type:"message",data:Mm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:px(e.substring(1),t)}:oa[n]?e.length>1?{type:oa[n],data:e.substring(1)}:{type:oa[n]}:Qc},px=(e,t)=>{if(hx){const n=dx(e);return Mm(n,t)}else return{base64:!0,data:e}},Mm=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Fm="",mx=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((u,a)=>{Xc(u,!1,c=>{r[a]=c,++o===n&&t(r.join(Fm))})})},gx=(e,t)=>{const n=e.split(Fm),r=[];for(let o=0;o<n.length;o++){const u=Zc(n[o],t);if(r.push(u),u.type==="error")break}return r};function Ex(){return new TransformStream({transform(e,t){fx(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 u=new DataView(o.buffer);u.setUint8(0,126),u.setUint16(1,r)}else{o=new Uint8Array(9);const u=new DataView(o.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let ef;function ua(e){return e.reduce((t,n)=>t+n.length,0)}function aa(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 yx(e,t){ef||(ef=new TextDecoder);const n=[];let r=0,o=-1,u=!1;return new TransformStream({transform(a,c){for(n.push(a);;){if(r===0){if(ua(n)<1)break;const f=aa(n,1);u=(f[0]&128)===128,o=f[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(ua(n)<2)break;const f=aa(n,2);o=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),r=3}else if(r===2){if(ua(n)<8)break;const f=aa(n,8),h=new DataView(f.buffer,f.byteOffset,f.length),m=h.getUint32(0);if(m>Math.pow(2,21)-1){c.enqueue(Qc);break}o=m*Math.pow(2,32)+h.getUint32(4),r=3}else{if(ua(n)<o)break;const f=aa(n,o);c.enqueue(Zc(u?f:ef.decode(f),t)),r=0}if(o===0||o>e){c.enqueue(Qc);break}}}})}const Bm=4;function Nt(e){if(e)return Tx(e)}function Tx(e){for(var t in Nt.prototype)e[t]=Nt.prototype[t];return e}Nt.prototype.on=Nt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Nt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Nt.prototype.off=Nt.prototype.removeListener=Nt.prototype.removeAllListeners=Nt.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},Nt.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},Nt.prototype.emitReserved=Nt.prototype.emit,Nt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Nt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const la=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Bn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),bx="arraybuffer";function KM(){}function Um(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const _x=Bn.setTimeout,xx=Bn.clearTimeout;function ca(e,t){t.useNativeTimers?(e.setTimeoutFn=_x.bind(Bn),e.clearTimeoutFn=xx.bind(Bn)):(e.setTimeoutFn=Bn.setTimeout.bind(Bn),e.clearTimeoutFn=Bn.clearTimeout.bind(Bn))}const Sx=1.33;function wx(e){return typeof e=="string"?Cx(e):Math.ceil((e.byteLength||e.size)*Sx)}function Cx(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 Hm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ax(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function vx(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let u=n[r].split("=");t[decodeURIComponent(u[0])]=decodeURIComponent(u[1])}return t}class kx extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class tf extends Nt{constructor(t){super(),this.writable=!1,ca(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 kx(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=Zc(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Ax(t);return n.length?"?"+n:""}}class Nx extends tf{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)};gx(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,mx(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]=Hm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let zm=!1;try{zm=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const Ox=zm;function Ix(){}class Px extends Nx{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,u)=>{this.onError("xhr post error",o,u)})}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 mr extends Nt{constructor(t,n,r){super(),this.createRequest=t,ca(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=Um(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=mr.requestsCount++,mr.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=Ix,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete mr.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(mr.requestsCount=0,mr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",jm);else if(typeof addEventListener=="function"){const e="onpagehide"in Bn?"pagehide":"unload";addEventListener(e,jm,!1)}}function jm(){for(let e in mr.requests)mr.requests.hasOwnProperty(e)&&mr.requests[e].abort()}const Rx=function(){const e=$m({xdomain:!1});return e&&e.responseType!==null}();class Lx extends Px{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Rx&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new mr($m,this.uri(),t)}}function $m(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||Ox))return new XMLHttpRequest}catch(n){}if(!t)try{return new Bn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Vm=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Dx extends tf{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Vm?{}:Um(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;Xc(r,this.supportsBinary,u=>{try{this.doWrite(r,u)}catch(a){}o&&la(()=>{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]=Hm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const nf=Bn.WebSocket||Bn.MozWebSocket;class Mx extends Dx{createSocket(t,n,r){return Vm?new nf(t,n,r):n?new nf(t,n):new nf(t)}doWrite(t,n){this.ws.send(n)}}class Fx extends tf{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=yx(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Ex();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const u=()=>{r.read().then(({done:c,value:f})=>{c||(this.onPacket(f),u())}).catch(c=>{})};u();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).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&&la(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Bx={websocket:Mx,webtransport:Fx,polling:Lx},Ux=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Hx=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function rf(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=Ux.exec(e||""),u={},a=14;for(;a--;)u[Hx[a]]=o[a]||"";return n!=-1&&r!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=zx(u,u.path),u.queryKey=jx(u,u.query),u}function zx(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 jx(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,u){o&&(n[o]=u)}),n}const sf=typeof addEventListener=="function"&&typeof removeEventListener=="function",fa=[];sf&&addEventListener("offline",()=>{fa.forEach(e=>e())},!1);class ei extends Nt{constructor(t,n){if(super(),this.binaryType=bx,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=rf(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=rf(n.host).host);ca(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=vx(this.opts.query)),sf&&(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"})},fa.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Bm,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&&ei.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",ei.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+=wx(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,la(()=>{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 u={type:t,data:n,options:r};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),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(ei.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(),sf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=fa.indexOf(this._offlineEventListener);r!==-1&&fa.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ei.protocol=Bm;class $x extends ei{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;ei.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",E=>{if(!r)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ei.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(m(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function u(){r||(r=!0,m(),n.close(),n=null)}const a=E=>{const b=new Error("probe error: "+E);b.transport=n.name,u(),this.emitReserved("upgradeError",b)};function c(){a("transport closed")}function f(){a("socket closed")}function h(E){n&&E.name!==n.name&&u()}const m=()=>{n.removeListener("open",o),n.removeListener("error",a),n.removeListener("close",c),this.off("close",f),this.off("upgrading",h)};n.once("open",o),n.once("error",a),n.once("close",c),this.once("close",f),this.once("upgrading",h),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 Vx=class extends $x{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=>Bx[o]).filter(o=>!!o)),super(t,r)}};function qx(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=rf(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 u=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+u+":"+r.port+t,r.href=r.protocol+"://"+u+(n&&n.port===r.port?"":":"+r.port),r}const Yx=typeof ArrayBuffer=="function",Wx=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,qm=Object.prototype.toString,Gx=typeof Blob=="function"||typeof Blob!="undefined"&&qm.call(Blob)==="[object BlobConstructor]",Kx=typeof File=="function"||typeof File!="undefined"&&qm.call(File)==="[object FileConstructor]";function of(e){return Yx&&(e instanceof ArrayBuffer||Wx(e))||Gx&&e instanceof Blob||Kx&&e instanceof File}function da(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(da(e[n]))return!0;return!1}if(of(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return da(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&da(e[n]))return!0;return!1}function Qx(e){const t=[],n=e.data,r=e;return r.data=uf(n,t),r.attachments=t.length,{packet:r,buffers:t}}function uf(e,t){if(!e)return e;if(of(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]=uf(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]=uf(e[r],t));return n}return e}function Xx(e,t){return e.data=af(e.data,t),delete e.attachments,e}function af(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]=af(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=af(e[n],t));return e}const Jx=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Zx=5;var Qe;(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"})(Qe||(Qe={}));class eS{constructor(t){this.replacer=t}encode(t){return(t.type===Qe.EVENT||t.type===Qe.ACK)&&da(t)?this.encodeAsBinary({type:t.type===Qe.EVENT?Qe.BINARY_EVENT:Qe.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Qe.BINARY_EVENT||t.type===Qe.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=Qx(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Ym(e){return Object.prototype.toString.call(e)==="[object Object]"}class lf extends Nt{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Qe.BINARY_EVENT;r||n.type===Qe.BINARY_ACK?(n.type=r?Qe.EVENT:Qe.ACK,this.reconstructor=new tS(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(of(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(Qe[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Qe.BINARY_EVENT||r.type===Qe.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(u,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(lf.isPayloadValid(r.type,u))r.data=u;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Qe.CONNECT:return Ym(n);case Qe.DISCONNECT:return n===void 0;case Qe.CONNECT_ERROR:return typeof n=="string"||Ym(n);case Qe.EVENT:case Qe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Jx.indexOf(n[0])===-1);case Qe.ACK:case Qe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class tS{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=Xx(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const nS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:lf,Encoder:eS,get PacketType(){return Qe},protocol:Zx},Symbol.toStringTag,{value:"Module"}));function Jn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const rS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Wm extends Nt{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=[Jn(t,"open",this.onopen.bind(this)),Jn(t,"packet",this.onpacket.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(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,u;if(rS.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 a={type:Qe.EVENT,data:n};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,E=n.pop();this._registerAckCallback(m,E),a.id=m}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!c||(f?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),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 u=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),a=(...c)=>{this.io.clearTimeoutFn(u),n.apply(this,c)};a.withError=!0,this.acks[t]=a}emitWithAck(t,...n){return new Promise((r,o)=>{const u=(a,c)=>a?o(a):r(c);u.withError=!0,n.push(u),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,...u)=>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,...u)),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:Qe.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 Qe.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 Qe.EVENT:case Qe.BINARY_EVENT:this.onevent(t);break;case Qe.ACK:case Qe.BINARY_ACK:this.onack(t);break;case Qe.DISCONNECT:this.ondisconnect();break;case Qe.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:Qe.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:Qe.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 cs(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}cs.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},cs.prototype.reset=function(){this.attempts=0},cs.prototype.setMin=function(e){this.ms=e},cs.prototype.setMax=function(e){this.max=e},cs.prototype.setJitter=function(e){this.jitter=e};class cf extends Nt{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,ca(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 cs({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||nS;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 Vx(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Jn(n,"open",function(){r.onopen(),t&&t()}),u=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},a=Jn(n,"error",u);if(this._timeout!==!1){const c=this._timeout,f=this.setTimeoutFn(()=>{o(),u(new Error("timeout")),n.close()},c);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(o),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Jn(t,"ping",this.onping.bind(this)),Jn(t,"data",this.ondata.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(t,"close",this.onclose.bind(this)),Jn(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){la(()=>{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 Wm(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 ko={};function ha(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=qx(e,t.path||"/socket.io"),r=n.source,o=n.id,u=n.path,a=ko[o]&&u in ko[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let f;return c?f=new cf(r,t):(ko[o]||(ko[o]=new cf(r,t)),f=ko[o]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(ha,{Manager:cf,Socket:Wm,io:ha,connect:ha});var iS=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===sS}(t)}(e)},sS=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function No(e,t){return t.clone!==!1&&t.isMergeableObject(e)?fs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function oS(e,t,n){return e.concat(t).map(function(r){return No(r,n)})}function Gm(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 Km(e,t){try{return t in e}catch(n){return!1}}function uS(e,t,n){var r={};return n.isMergeableObject(e)&&Gm(e).forEach(function(o){r[o]=No(e[o],n)}),Gm(t).forEach(function(o){(function(u,a){return Km(u,a)&&!(Object.hasOwnProperty.call(u,a)&&Object.propertyIsEnumerable.call(u,a))})(e,o)||(Km(e,o)&&n.isMergeableObject(t[o])?r[o]=function(u,a){if(!a.customMerge)return fs;var c=a.customMerge(u);return typeof c=="function"?c:fs}(o,n)(e[o],t[o],n):r[o]=No(t[o],n))}),r}function fs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||oS,n.isMergeableObject=n.isMergeableObject||iS,n.cloneUnlessOtherwiseSpecified=No;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):uS(e,t,n):No(t,n)}fs.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,r){return fs(n,r,t)},{})};var aS=fs;class lS{constructor(t){Object.assign(this,t)}}function un(e){if(e)return function(t){for(var n in un.prototype)t[n]=un.prototype[n];return t}(e)}un.prototype.on=un.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},un.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},un.prototype.off=un.prototype.removeListener=un.prototype.removeAllListeners=un.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},un.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},un.prototype.emitReserved=un.prototype.emit,un.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},un.prototype.hasListeners=function(e){return!!this.listeners(e).length};const cS=typeof ArrayBuffer=="function",Qm=Object.prototype.toString,fS=typeof Blob=="function"||typeof Blob!="undefined"&&Qm.call(Blob)==="[object BlobConstructor]",dS=typeof File=="function"||typeof File!="undefined"&&Qm.call(File)==="[object FileConstructor]";function ff(e){return cS&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||fS&&e instanceof Blob||dS&&e instanceof File}function pa(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(pa(e[n]))return!0;return!1}if(ff(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return pa(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&pa(e[n]))return!0;return!1}function hS(e){const t=[],n=e.data,r=e;return r.data=df(n,t),r.attachments=t.length,{packet:r,buffers:t}}function df(e,t){if(!e)return e;if(ff(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]=df(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]=df(e[r],t));return n}return e}function pS(e,t){return e.data=hf(e.data,t),delete e.attachments,e}function hf(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]=hf(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=hf(e[n],t));return e}const mS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var mt;(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"})(mt||(mt={}));class gS{constructor(t){this.replacer=t}encode(t){return t.type!==mt.EVENT&&t.type!==mt.ACK||!pa(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===mt.EVENT?mt.BINARY_EVENT:mt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==mt.BINARY_EVENT&&t.type!==mt.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=hS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Xm(e){return Object.prototype.toString.call(e)==="[object Object]"}class pf extends un{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===mt.BINARY_EVENT;r||n.type===mt.BINARY_ACK?(n.type=r?mt.EVENT:mt.ACK,this.reconstructor=new ES(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!ff(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(mt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===mt.BINARY_EVENT||r.type===mt.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(u,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(!pf.isPayloadValid(r.type,u))throw new Error("invalid payload");r.data=u}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case mt.CONNECT:return Xm(n);case mt.DISCONNECT:return n===void 0;case mt.CONNECT_ERROR:return typeof n=="string"||Xm(n);case mt.EVENT:case mt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&mS.indexOf(n[0])===-1);case mt.ACK:case mt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ES{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=pS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Jm=["searchParams.facetFilters","hits","products"],Zm=(e,t,n)=>function r(o,u=[]){const a=Object.entries(o).map(([c,f])=>{const h=[...u,t(c)];return[e(c),f instanceof Object&&!(n!=null&&n.includes(h.join(".")))?r(f,h):f]});return Array.isArray(o)?a.map(c=>c[1]):Object.fromEntries(a)},e0=e=>e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),yS=Zm(e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),e=>e,Jm),TS=Zm(e0,e0,Jm),bS={Encoder:class extends gS{encode(e){var t,n;return super.encode(Te(U({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],yS(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 pf{constructor(){super((e,t)=>e==""&&Array.isArray(t)?t.map(n=>n instanceof Object?TS(n):n):t)}}},_S={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class xS{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:u={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=h=>{console.log("[Copilot SDK] Connect Ack:",h),this.socket.auth={[this.sessionIdKey]:h.sessionId}},this.handleDisconnect=h=>{console.warn(`[Copilot SDK] Disconnected: ${h}`),h!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${h}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=h=>{console.error(`[Copilot SDK] Connect error: ${h.message}`);const m=h.message.match(/['"]error['"]:\s*['"](\w+)['"]/),E=m==null?void 0:m[1];E&&["InvalidApiKey","InvalidToken","BadRequest"].includes(E)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const a=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const f=[_S,u,{parser:bS,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=ha(a,aS.all(f))}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*Wc(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 nt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return nt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return nt(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 nt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}requestSessionInformation(t){return nt(this,null,function*(){return new Promise(n=>{this.socket.emit("session_info",r=>{t&&t(r),n(r)})})})}getConversationEvents(t,n){return nt(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 nt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const u=function(a){return Gc(this,null,function*(){const c=[];let f=!1,h=null;const m=yield new Rr(a({emit:E=>{c.push(E),h&&(h(),h=null)},cancel:()=>{f=!0}}));try{for(;!f;)c.length>0?yield c.shift():yield new Rr(new Promise(E=>{h=E}));for(;c.length>0;)yield c.shift()}finally{yield new Rr(m==null?void 0:m())}})}(({emit:a,cancel:c})=>{const f=(h,m)=>{["done","error"].includes(m.name)&&c(),m.eventSourceId==o&&a(m)};return this.socket.onAny(f),()=>nt(this,null,function*(){this.socket.offAny(f)})});return{result:yield new Promise((a,c)=>this.socket.emit(t,n,f=>{f.name==="error"?c(new lS(f)):(o=f==null?void 0:f.id,a(f))})),events:u}})}}var G=ls();const Pi=Ge(G);function t0(e,t){return function(){return e.apply(t,arguments)}}const{toString:SS}=Object.prototype,{getPrototypeOf:mf}=Object,{iterator:ma,toStringTag:n0}=Symbol,ga=(e=>t=>{const n=SS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zn=e=>(e=e.toLowerCase(),t=>ga(t)===e),Ea=e=>t=>typeof t===e,{isArray:ds}=Array,hs=Ea("undefined");function Oo(e){return e!==null&&!hs(e)&&e.constructor!==null&&!hs(e.constructor)&&hn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const r0=Zn("ArrayBuffer");function wS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&r0(e.buffer),t}const CS=Ea("string"),hn=Ea("function"),i0=Ea("number"),Io=e=>e!==null&&typeof e=="object",AS=e=>e===!0||e===!1,ya=e=>{if(ga(e)!=="object")return!1;const t=mf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(n0 in e)&&!(ma in e)},vS=e=>{if(!Io(e)||Oo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},kS=Zn("Date"),NS=Zn("File"),OS=Zn("Blob"),IS=Zn("FileList"),PS=e=>Io(e)&&hn(e.pipe),RS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||hn(e.append)&&((t=ga(e))==="formdata"||t==="object"&&hn(e.toString)&&e.toString()==="[object FormData]"))},LS=Zn("URLSearchParams"),[DS,MS,FS,BS]=["ReadableStream","Request","Response","Headers"].map(Zn),US=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Po(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),ds(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Oo(e))return;const u=n?Object.getOwnPropertyNames(e):Object.keys(e),a=u.length;let c;for(r=0;r<a;r++)c=u[r],t.call(null,e[c],c,e)}}function s0(e,t){if(Oo(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 Ri=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,o0=e=>!hs(e)&&e!==Ri;function gf(){const{caseless:e,skipUndefined:t}=o0(this)&&this||{},n={},r=(o,u)=>{const a=e&&s0(n,u)||u;ya(n[a])&&ya(o)?n[a]=gf(n[a],o):ya(o)?n[a]=gf({},o):ds(o)?n[a]=o.slice():(!t||!hs(o))&&(n[a]=o)};for(let o=0,u=arguments.length;o<u;o++)arguments[o]&&Po(arguments[o],r);return n}const HS=(e,t,n,{allOwnKeys:r}={})=>(Po(t,(o,u)=>{n&&hn(o)?e[u]=t0(o,n):e[u]=o},{allOwnKeys:r}),e),zS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),jS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},$S=(e,t,n,r)=>{let o,u,a;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),u=o.length;u-- >0;)a=o[u],(!r||r(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&mf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},VS=(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},qS=e=>{if(!e)return null;if(ds(e))return e;let t=e.length;if(!i0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},YS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&mf(Uint8Array)),WS=(e,t)=>{const r=(e&&e[ma]).call(e);let o;for(;(o=r.next())&&!o.done;){const u=o.value;t.call(e,u[0],u[1])}},GS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},KS=Zn("HTMLFormElement"),QS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),u0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),XS=Zn("RegExp"),a0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Po(n,(o,u)=>{let a;(a=t(o,u,e))!==!1&&(r[u]=a||o)}),Object.defineProperties(e,r)},JS=e=>{a0(e,(t,n)=>{if(hn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(hn(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+"'")})}})},ZS=(e,t)=>{const n={},r=o=>{o.forEach(u=>{n[u]=!0})};return ds(e)?r(e):r(String(e).split(t)),n},ew=()=>{},tw=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function nw(e){return!!(e&&hn(e.append)&&e[n0]==="FormData"&&e[ma])}const rw=e=>{const t=new Array(10),n=(r,o)=>{if(Io(r)){if(t.indexOf(r)>=0)return;if(Oo(r))return r;if(!("toJSON"in r)){t[o]=r;const u=ds(r)?[]:{};return Po(r,(a,c)=>{const f=n(a,o+1);!hs(f)&&(u[c]=f)}),t[o]=void 0,u}}return r};return n(e,0)},iw=Zn("AsyncFunction"),sw=e=>e&&(Io(e)||hn(e))&&hn(e.then)&&hn(e.catch),l0=((e,t)=>e?setImmediate:t?((n,r)=>(Ri.addEventListener("message",({source:o,data:u})=>{o===Ri&&u===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Ri.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",hn(Ri.postMessage)),ow=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Ri):typeof process!="undefined"&&process.nextTick||l0,W={isArray:ds,isArrayBuffer:r0,isBuffer:Oo,isFormData:RS,isArrayBufferView:wS,isString:CS,isNumber:i0,isBoolean:AS,isObject:Io,isPlainObject:ya,isEmptyObject:vS,isReadableStream:DS,isRequest:MS,isResponse:FS,isHeaders:BS,isUndefined:hs,isDate:kS,isFile:NS,isBlob:OS,isRegExp:XS,isFunction:hn,isStream:PS,isURLSearchParams:LS,isTypedArray:YS,isFileList:IS,forEach:Po,merge:gf,extend:HS,trim:US,stripBOM:zS,inherits:jS,toFlatObject:$S,kindOf:ga,kindOfTest:Zn,endsWith:VS,toArray:qS,forEachEntry:WS,matchAll:GS,isHTMLForm:KS,hasOwnProperty:u0,hasOwnProp:u0,reduceDescriptors:a0,freezeMethods:JS,toObjectSet:ZS,toCamelCase:QS,noop:ew,toFiniteNumber:tw,findKey:s0,global:Ri,isContextDefined:o0,isSpecCompliantForm:nw,toJSONObject:rw,isAsyncFn:iw,isThenable:sw,setImmediate:l0,asap:ow,isIterable:e=>e!=null&&hn(e[ma])};function je(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}W.inherits(je,Error,{toJSON:function(){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:W.toJSONObject(this.config),code:this.code,status:this.status}}});const c0=je.prototype,f0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{f0[e]={value:e}}),Object.defineProperties(je,f0),Object.defineProperty(c0,"isAxiosError",{value:!0}),je.from=(e,t,n,r,o,u)=>{const a=Object.create(c0);W.toFlatObject(e,a,function(m){return m!==Error.prototype},h=>h!=="isAxiosError");const c=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return je.call(a,c,f,n,r,o),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",u&&Object.assign(a,u),a};const uw=null;function Ef(e){return W.isPlainObject(e)||W.isArray(e)}function d0(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function h0(e,t,n){return e?e.concat(t).map(function(o,u){return o=d0(o),!n&&u?"["+o+"]":o}).join(n?".":""):t}function aw(e){return W.isArray(e)&&!e.some(Ef)}const lw=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function Ta(e,t,n){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,C){return!W.isUndefined(C[S])});const r=n.metaTokens,o=n.visitor||m,u=n.dots,a=n.indexes,f=(n.Blob||typeof Blob!="undefined"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(o))throw new TypeError("visitor must be a function");function h(_){if(_===null)return"";if(W.isDate(_))return _.toISOString();if(W.isBoolean(_))return _.toString();if(!f&&W.isBlob(_))throw new je("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(_)||W.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,S,C){let I=_;if(_&&!C&&typeof _=="object"){if(W.endsWith(S,"{}"))S=r?S:S.slice(0,-2),_=JSON.stringify(_);else if(W.isArray(_)&&aw(_)||(W.isFileList(_)||W.endsWith(S,"[]"))&&(I=W.toArray(_)))return S=d0(S),I.forEach(function(L,q){!(W.isUndefined(L)||L===null)&&t.append(a===!0?h0([S],q,u):a===null?S:S+"[]",h(L))}),!1}return Ef(_)?!0:(t.append(h0(C,S,u),h(_)),!1)}const E=[],b=Object.assign(lw,{defaultVisitor:m,convertValue:h,isVisitable:Ef});function T(_,S){if(!W.isUndefined(_)){if(E.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));E.push(_),W.forEach(_,function(I,B){(!(W.isUndefined(I)||I===null)&&o.call(t,I,W.isString(B)?B.trim():B,S,b))===!0&&T(I,S?S.concat(B):[B])}),E.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return T(e),t}function p0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function yf(e,t){this._pairs=[],e&&Ta(e,this,t)}const m0=yf.prototype;m0.append=function(t,n){this._pairs.push([t,n])},m0.toString=function(t){const n=t?function(r){return t.call(this,r,p0)}:p0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function cw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function g0(e,t,n){if(!t)return e;const r=n&&n.encode||cw;W.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let u;if(o?u=o(t,n):u=W.isURLSearchParams(t)?t.toString():new yf(t,n).toString(r),u){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class E0{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){W.forEach(this.handlers,function(r){r!==null&&t(r)})}}const y0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fw={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:yf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Tf=typeof window!="undefined"&&typeof document!="undefined",bf=typeof navigator=="object"&&navigator||void 0,dw=Tf&&(!bf||["ReactNative","NativeScript","NS"].indexOf(bf.product)<0),hw=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",pw=Tf&&window.location.href||"http://localhost",Xt=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Tf,hasStandardBrowserEnv:dw,hasStandardBrowserWebWorkerEnv:hw,navigator:bf,origin:pw},Symbol.toStringTag,{value:"Module"}))),fw);function mw(e,t){return Ta(e,new Xt.classes.URLSearchParams,U({visitor:function(n,r,o,u){return Xt.isNode&&W.isBuffer(n)?(this.append(r,n.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},t))}function gw(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ew(e){const t={},n=Object.keys(e);let r;const o=n.length;let u;for(r=0;r<o;r++)u=n[r],t[u]=e[u];return t}function T0(e){function t(n,r,o,u){let a=n[u++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),f=u>=n.length;return a=!a&&W.isArray(o)?o.length:a,f?(W.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!c):((!o[a]||!W.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],u)&&W.isArray(o[a])&&(o[a]=Ew(o[a])),!c)}if(W.isFormData(e)&&W.isFunction(e.entries)){const n={};return W.forEachEntry(e,(r,o)=>{t(gw(r),o,n,0)}),n}return null}function yw(e,t,n){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ro={transitional:y0,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,u=W.isObject(t);if(u&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return o?JSON.stringify(T0(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(u){if(r.indexOf("application/x-www-form-urlencoded")>-1)return mw(t,this.formSerializer).toString();if((c=W.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Ta(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return u||o?(n.setContentType("application/json",!1),yw(t)):t}],transformResponse:[function(t){const n=this.transitional||Ro.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(a)throw c.name==="SyntaxError"?je.from(c,je.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xt.classes.FormData,Blob:Xt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{Ro.headers[e]={}});const Tw=W.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"]),bw=e=>{const t={};let n,r,o;return e&&e.split(`
3
+ `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Tw[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},b0=Symbol("internals");function Lo(e){return e&&String(e).trim().toLowerCase()}function ba(e){return e===!1||e==null?e:W.isArray(e)?e.map(ba):String(e)}function _w(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 xw=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function _f(e,t,n,r,o){if(W.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!W.isString(t)){if(W.isString(r))return t.indexOf(r)!==-1;if(W.isRegExp(r))return r.test(t)}}function Sw(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ww(e,t){const n=W.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,u,a){return this[r].call(this,t,o,u,a)},configurable:!0})})}let pn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function u(c,f,h){const m=Lo(f);if(!m)throw new Error("header name must be a non-empty string");const E=W.findKey(o,m);(!E||o[E]===void 0||h===!0||h===void 0&&o[E]!==!1)&&(o[E||f]=ba(c))}const a=(c,f)=>W.forEach(c,(h,m)=>u(h,m,f));if(W.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(W.isString(t)&&(t=t.trim())&&!xw(t))a(bw(t),n);else if(W.isObject(t)&&W.isIterable(t)){let c={},f,h;for(const m of t){if(!W.isArray(m))throw TypeError("Object iterator must return a key-value pair");c[h=m[0]]=(f=c[h])?W.isArray(f)?[...f,m[1]]:[f,m[1]]:m[1]}a(c,n)}else t!=null&&u(n,t,r);return this}get(t,n){if(t=Lo(t),t){const r=W.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return _w(o);if(W.isFunction(n))return n.call(this,o,r);if(W.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Lo(t),t){const r=W.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||_f(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function u(a){if(a=Lo(a),a){const c=W.findKey(r,a);c&&(!n||_f(r,r[c],c,n))&&(delete r[c],o=!0)}}return W.isArray(t)?t.forEach(u):u(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const u=n[r];(!t||_f(this,this[u],u,t,!0))&&(delete this[u],o=!0)}return o}normalize(t){const n=this,r={};return W.forEach(this,(o,u)=>{const a=W.findKey(r,u);if(a){n[a]=ba(o),delete n[u];return}const c=t?Sw(u):String(u).trim();c!==u&&delete n[u],n[c]=ba(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return W.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&W.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[b0]=this[b0]={accessors:{}}).accessors,o=this.prototype;function u(a){const c=Lo(a);r[c]||(ww(o,a),r[c]=!0)}return W.isArray(t)?t.forEach(u):u(t),this}};pn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(pn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),W.freezeMethods(pn);function xf(e,t){const n=this||Ro,r=t||n,o=pn.from(r.headers);let u=r.data;return W.forEach(e,function(c){u=c.call(n,u,o.normalize(),t?t.status:void 0)}),o.normalize(),u}function _0(e){return!!(e&&e.__CANCEL__)}function ps(e,t,n){je.call(this,e==null?"canceled":e,je.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(ps,je,{__CANCEL__:!0});function x0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new je("Request failed with status code "+n.status,[je.ERR_BAD_REQUEST,je.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Cw(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Aw(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,u=0,a;return t=t!==void 0?t:1e3,function(f){const h=Date.now(),m=r[u];a||(a=h),n[o]=f,r[o]=h;let E=u,b=0;for(;E!==o;)b+=n[E++],E=E%e;if(o=(o+1)%e,o===u&&(u=(u+1)%e),h-a<t)return;const T=m&&h-m;return T?Math.round(b*1e3/T):void 0}}function vw(e,t){let n=0,r=1e3/t,o,u;const a=(h,m=Date.now())=>{n=m,o=null,u&&(clearTimeout(u),u=null),e(...h)};return[(...h)=>{const m=Date.now(),E=m-n;E>=r?a(h,m):(o=h,u||(u=setTimeout(()=>{u=null,a(o)},r-E)))},()=>o&&a(o)]}const _a=(e,t,n=3)=>{let r=0;const o=Aw(50,250);return vw(u=>{const a=u.loaded,c=u.lengthComputable?u.total:void 0,f=a-r,h=o(f),m=a<=c;r=a;const E={loaded:a,total:c,progress:c?a/c:void 0,bytes:f,rate:h||void 0,estimated:h&&c&&m?(c-a)/h:void 0,event:u,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},S0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},w0=e=>(...t)=>W.asap(()=>e(...t)),kw=Xt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Xt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Xt.origin),Xt.navigator&&/(msie|trident)/i.test(Xt.navigator.userAgent)):()=>!0,Nw=Xt.hasStandardBrowserEnv?{write(e,t,n,r,o,u){const a=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),W.isString(r)&&a.push("path="+r),W.isString(o)&&a.push("domain="+o),u===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ow(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Iw(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function C0(e,t,n){let r=!Ow(t);return e&&(r||n==!1)?Iw(e,t):t}const A0=e=>e instanceof pn?U({},e):e;function Li(e,t){t=t||{};const n={};function r(h,m,E,b){return W.isPlainObject(h)&&W.isPlainObject(m)?W.merge.call({caseless:b},h,m):W.isPlainObject(m)?W.merge({},m):W.isArray(m)?m.slice():m}function o(h,m,E,b){if(W.isUndefined(m)){if(!W.isUndefined(h))return r(void 0,h,E,b)}else return r(h,m,E,b)}function u(h,m){if(!W.isUndefined(m))return r(void 0,m)}function a(h,m){if(W.isUndefined(m)){if(!W.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function c(h,m,E){if(E in t)return r(h,m);if(E in e)return r(void 0,h)}const f={url:u,method:u,data:u,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(h,m,E)=>o(A0(h),A0(m),E,!0)};return W.forEach(Object.keys(U(U({},e),t)),function(m){const E=f[m]||o,b=E(e[m],t[m],m);W.isUndefined(b)&&E!==c||(n[m]=b)}),n}const v0=e=>{const t=Li({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:u,headers:a,auth:c}=t;if(t.headers=a=pn.from(a),t.url=g0(C0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),W.isFormData(n)){if(Xt.hasStandardBrowserEnv||Xt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(W.isFunction(n.getHeaders)){const f=n.getHeaders(),h=["content-type","content-length"];Object.entries(f).forEach(([m,E])=>{h.includes(m.toLowerCase())&&a.set(m,E)})}}if(Xt.hasStandardBrowserEnv&&(r&&W.isFunction(r)&&(r=r(t)),r||r!==!1&&kw(t.url))){const f=o&&u&&Nw.read(u);f&&a.set(o,f)}return t},Pw=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=v0(e);let u=o.data;const a=pn.from(o.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:h}=o,m,E,b,T,_;function S(){T&&T(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(m),o.signal&&o.signal.removeEventListener("abort",m)}let C=new XMLHttpRequest;C.open(o.method.toUpperCase(),o.url,!0),C.timeout=o.timeout;function I(){if(!C)return;const L=pn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),X={data:!c||c==="text"||c==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:L,config:e,request:C};x0(function(ee){n(ee),S()},function(ee){r(ee),S()},X),C=null}"onloadend"in C?C.onloadend=I:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(I)},C.onabort=function(){C&&(r(new je("Request aborted",je.ECONNABORTED,e,C)),C=null)},C.onerror=function(q){const X=q&&q.message?q.message:"Network Error",F=new je(X,je.ERR_NETWORK,e,C);F.event=q||null,r(F),C=null},C.ontimeout=function(){let q=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const X=o.transitional||y0;o.timeoutErrorMessage&&(q=o.timeoutErrorMessage),r(new je(q,X.clarifyTimeoutError?je.ETIMEDOUT:je.ECONNABORTED,e,C)),C=null},u===void 0&&a.setContentType(null),"setRequestHeader"in C&&W.forEach(a.toJSON(),function(q,X){C.setRequestHeader(X,q)}),W.isUndefined(o.withCredentials)||(C.withCredentials=!!o.withCredentials),c&&c!=="json"&&(C.responseType=o.responseType),h&&([b,_]=_a(h,!0),C.addEventListener("progress",b)),f&&C.upload&&([E,T]=_a(f),C.upload.addEventListener("progress",E),C.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(m=L=>{C&&(r(!L||L.type?new ps(null,e,C):L),C.abort(),C=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const B=Cw(o.url);if(B&&Xt.protocols.indexOf(B)===-1){r(new je("Unsupported protocol "+B+":",je.ERR_BAD_REQUEST,e));return}C.send(u||null)})},Rw=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const u=function(h){if(!o){o=!0,c();const m=h instanceof Error?h:this.reason;r.abort(m instanceof je?m:new ps(m instanceof Error?m.message:m))}};let a=t&&setTimeout(()=>{a=null,u(new je(`timeout ${t} of ms exceeded`,je.ETIMEDOUT))},t);const c=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(u):h.removeEventListener("abort",u)}),e=null)};e.forEach(h=>h.addEventListener("abort",u));const{signal:f}=r;return f.unsubscribe=()=>W.asap(c),f}},Lw=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},Dw=function(e,t){return Gc(this,null,function*(){try{for(var n=ux(Mw(e)),r,o,u;r=!(o=yield new Rr(n.next())).done;r=!1){const a=o.value;yield*Nm(Lw(a,t))}}catch(o){u=[o]}finally{try{r&&(o=n.return)&&(yield new Rr(o.call(n)))}finally{if(u)throw u[0]}}})},Mw=function(e){return Gc(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Nm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Rr(t.read());if(n)break;yield r}}finally{yield new Rr(t.cancel())}})},k0=(e,t,n,r)=>{const o=Dw(e,t);let u=0,a,c=h=>{a||(a=!0,r&&r(h))};return new ReadableStream({pull(h){return nt(this,null,function*(){try{const{done:m,value:E}=yield o.next();if(m){c(),h.close();return}let b=E.byteLength;if(n){let T=u+=b;n(T)}h.enqueue(new Uint8Array(E))}catch(m){throw c(m),m}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})},N0=64*1024,{isFunction:xa}=W,Fw=(({Request:e,Response:t})=>({Request:e,Response:t}))(W.global),{ReadableStream:O0,TextEncoder:I0}=W.global,P0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Bw=e=>{e=W.merge.call({skipUndefined:!0},Fw,e);const{fetch:t,Request:n,Response:r}=e,o=t?xa(t):typeof fetch=="function",u=xa(n),a=xa(r);if(!o)return!1;const c=o&&xa(O0),f=o&&(typeof I0=="function"?(_=>S=>_.encode(S))(new I0):_=>nt(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),h=u&&c&&P0(()=>{let _=!1;const S=new n(Xt.origin,{body:new O0,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!S}),m=a&&c&&P0(()=>W.isReadableStream(new r("").body)),E={stream:m&&(_=>_.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!E[_]&&(E[_]=(S,C)=>{let I=S&&S[_];if(I)return I.call(S);throw new je(`Response type '${_}' is not supported`,je.ERR_NOT_SUPPORT,C)})});const b=_=>nt(null,null,function*(){if(_==null)return 0;if(W.isBlob(_))return _.size;if(W.isSpecCompliantForm(_))return(yield new n(Xt.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(W.isArrayBufferView(_)||W.isArrayBuffer(_))return _.byteLength;if(W.isURLSearchParams(_)&&(_=_+""),W.isString(_))return(yield f(_)).byteLength}),T=(_,S)=>nt(null,null,function*(){const C=W.toFiniteNumber(_.getContentLength());return C==null?b(S):C});return _=>nt(null,null,function*(){let{url:S,method:C,data:I,signal:B,cancelToken:L,timeout:q,onDownloadProgress:X,onUploadProgress:F,responseType:ee,headers:be,withCredentials:we="same-origin",fetchOptions:H}=v0(_),ae=t||fetch;ee=ee?(ee+"").toLowerCase():"text";let he=Rw([B,L&&L.toAbortSignal()],q),fe=null;const de=he&&he.unsubscribe&&(()=>{he.unsubscribe()});let ye;try{if(F&&h&&C!=="get"&&C!=="head"&&(ye=yield T(be,I))!==0){let R=new n(S,{method:"POST",body:I,duplex:"half"}),K;if(W.isFormData(I)&&(K=R.headers.get("content-type"))&&be.setContentType(K),R.body){const[k,_e]=S0(ye,_a(w0(F)));I=k0(R.body,N0,k,_e)}}W.isString(we)||(we=we?"include":"omit");const Ce=u&&"credentials"in n.prototype,oe=Te(U({},H),{signal:he,method:C.toUpperCase(),headers:be.normalize().toJSON(),body:I,duplex:"half",credentials:Ce?we:void 0});fe=u&&new n(S,oe);let $=yield u?ae(fe,H):ae(S,oe);const te=m&&(ee==="stream"||ee==="response");if(m&&(X||te&&de)){const R={};["status","statusText","headers"].forEach(Ue=>{R[Ue]=$[Ue]});const K=W.toFiniteNumber($.headers.get("content-length")),[k,_e]=X&&S0(K,_a(w0(X),!0))||[];$=new r(k0($.body,N0,k,()=>{_e&&_e(),de&&de()}),R)}ee=ee||"text";let w=yield E[W.findKey(E,ee)||"text"]($,_);return!te&&de&&de(),yield new Promise((R,K)=>{x0(R,K,{data:w,headers:pn.from($.headers),status:$.status,statusText:$.statusText,config:_,request:fe})})}catch(Ce){throw de&&de(),Ce&&Ce.name==="TypeError"&&/Load failed|fetch/i.test(Ce.message)?Object.assign(new je("Network Error",je.ERR_NETWORK,_,fe),{cause:Ce.cause||Ce}):je.from(Ce,Ce&&Ce.code,_,fe)}})},Uw=new Map,R0=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,u=[r,o,n];let a=u.length,c=a,f,h,m=Uw;for(;c--;)f=u[c],h=m.get(f),h===void 0&&m.set(f,h=c?new Map:Bw(t)),m=h;return h};R0();const Sf={http:uw,xhr:Pw,fetch:{get:R0}};W.forEach(Sf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const L0=e=>`- ${e}`,Hw=e=>W.isFunction(e)||e===null||e===!1,D0={getAdapter:(e,t)=>{e=W.isArray(e)?e:[e];const{length:n}=e;let r,o;const u={};for(let a=0;a<n;a++){r=e[a];let c;if(o=r,!Hw(r)&&(o=Sf[(c=String(r)).toLowerCase()],o===void 0))throw new je(`Unknown adapter '${c}'`);if(o&&(W.isFunction(o)||(o=o.get(t))))break;u[c||"#"+a]=o}if(!o){const a=Object.entries(u).map(([f,h])=>`adapter ${f} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?a.length>1?`since :
5
+ `+a.map(L0).join(`
6
+ `):" "+L0(a[0]):"as no adapter specified";throw new je("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o},adapters:Sf};function wf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ps(null,e)}function M0(e){return wf(e),e.headers=pn.from(e.headers),e.data=xf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),D0.getAdapter(e.adapter||Ro.adapter,e)(e).then(function(r){return wf(e),r.data=xf.call(e,e.transformResponse,r),r.headers=pn.from(r.headers),r},function(r){return _0(r)||(wf(e),r&&r.response&&(r.response.data=xf.call(e,e.transformResponse,r.response),r.response.headers=pn.from(r.response.headers))),Promise.reject(r)})}const F0="1.12.2",Sa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Sa[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const B0={};Sa.transitional=function(t,n,r){function o(u,a){return"[Axios v"+F0+"] Transitional option '"+u+"'"+a+(r?". "+r:"")}return(u,a,c)=>{if(t===!1)throw new je(o(a," has been removed"+(n?" in "+n:"")),je.ERR_DEPRECATED);return n&&!B0[a]&&(B0[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(u,a,c):!0}},Sa.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function zw(e,t,n){if(typeof e!="object")throw new je("options must be an object",je.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const u=r[o],a=t[u];if(a){const c=e[u],f=c===void 0||a(c,u,e);if(f!==!0)throw new je("option "+u+" must be "+f,je.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new je("Unknown option "+u,je.ERR_BAD_OPTION)}}const wa={assertOptions:zw,validators:Sa},gr=wa.validators;let Di=class{constructor(t){this.defaults=t||{},this.interceptors={request:new E0,response:new E0}}request(t,n){return nt(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 u=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?u&&!String(r.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
+ `+u):r.stack=u}catch(a){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Li(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:u}=n;r!==void 0&&wa.assertOptions(r,{silentJSONParsing:gr.transitional(gr.boolean),forcedJSONParsing:gr.transitional(gr.boolean),clarifyTimeoutError:gr.transitional(gr.boolean)},!1),o!=null&&(W.isFunction(o)?n.paramsSerializer={serialize:o}:wa.assertOptions(o,{encode:gr.function,serialize:gr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),wa.assertOptions(n,{baseUrl:gr.spelling("baseURL"),withXsrfToken:gr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=u&&W.merge(u.common,u[n.method]);u&&W.forEach(["delete","get","head","post","put","patch","common"],_=>{delete u[_]}),n.headers=pn.concat(a,u);const c=[];let f=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(f=f&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let m,E=0,b;if(!f){const _=[M0.bind(this),void 0];for(_.unshift(...c),_.push(...h),b=_.length,m=Promise.resolve(n);E<b;)m=m.then(_[E++],_[E++]);return m}b=c.length;let T=n;for(;E<b;){const _=c[E++],S=c[E++];try{T=_(T)}catch(C){S.call(this,C);break}}try{m=M0.call(this,T)}catch(_){return Promise.reject(_)}for(E=0,b=h.length;E<b;)m=m.then(h[E++],h[E++]);return m}getUri(t){t=Li(this.defaults,t);const n=C0(t.baseURL,t.url,t.allowAbsoluteUrls);return g0(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Di.prototype[t]=function(n,r){return this.request(Li(r||{},{method:t,url:n,data:(r||{}).data}))}}),W.forEach(["post","put","patch"],function(t){function n(r){return function(u,a,c){return this.request(Li(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:u,data:a}))}}Di.prototype[t]=n(),Di.prototype[t+"Form"]=n(!0)});let jw=class ax{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(o=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](o);r._listeners=null}),this.promise.then=o=>{let u;const a=new Promise(c=>{r.subscribe(c),u=c}).then(o);return a.cancel=function(){r.unsubscribe(u)},a},t(function(u,a,c){r.reason||(r.reason=new ps(u,a,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 ax(function(o){t=o}),cancel:t}}};function $w(e){return function(n){return e.apply(null,n)}}function Vw(e){return W.isObject(e)&&e.isAxiosError===!0}const Cf={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};Object.entries(Cf).forEach(([e,t])=>{Cf[t]=e});function U0(e){const t=new Di(e),n=t0(Di.prototype.request,t);return W.extend(n,Di.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return U0(Li(e,o))},n}const St=U0(Ro);St.Axios=Di,St.CanceledError=ps,St.CancelToken=jw,St.isCancel=_0,St.VERSION=F0,St.toFormData=Ta,St.AxiosError=je,St.Cancel=St.CanceledError,St.all=function(t){return Promise.all(t)},St.spread=$w,St.isAxiosError=Vw,St.mergeConfig=Li,St.AxiosHeaders=pn,St.formToJSON=e=>T0(W.isHTMLForm(e)?new FormData(e):e),St.getAdapter=D0.getAdapter,St.HttpStatusCode=Cf,St.default=St;const{Axios:nF,AxiosError:rF,CanceledError:iF,isCancel:sF,CancelToken:oF,VERSION:uF,all:aF,Cancel:lF,isAxiosError:cF,spread:fF,toFormData:dF,AxiosHeaders:hF,HttpStatusCode:pF,formToJSON:mF,getAdapter:gF,mergeConfig:EF}=St;class H0{constructor(t,n,r=!1){Be(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Be(this,"CIMULATE_SEARCH_API_PATH","api/v1");Be(this,"baseApiUrl");Be(this,"headers",{});Be(this,"fetchConfig",()=>nt(this,null,function*(){try{const t=yield St.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));if(t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");t?this.headers[this.CIMULATE_API_HEADER]=t:n&&(this.headers.Authorization=`Bearer ${n}`),this.baseApiUrl=r?"https://staging.search.cimulate.ai":"https://prod.search.cimulate.ai"}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}const qw=G.createContext(void 0),Yw=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=G.useMemo(()=>new H0(e,t,n),[e,t,n]);return O.jsx(qw.Provider,{value:o,children:r})};var z0=Symbol.for("immer-nothing"),j0=Symbol.for("immer-draftable"),tt=Symbol.for("immer-state");function Un(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ms=Object.getPrototypeOf;function gs(e){return!!e&&!!e[tt]}function Lr(e){var t;return e?$0(e)||Array.isArray(e)||!!e[j0]||!!((t=e.constructor)!=null&&t[j0])||Aa(e)||va(e):!1}var Ww=Object.prototype.constructor.toString();function $0(e){if(!e||typeof e!="object")return!1;const t=ms(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)===Ww}function Do(e,t){Ca(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ca(e){const t=e[tt];return t?t.type_:Array.isArray(e)?1:Aa(e)?2:va(e)?3:0}function Af(e,t){return Ca(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function V0(e,t,n){const r=Ca(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Gw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Aa(e){return e instanceof Map}function va(e){return e instanceof Set}function Bt(e){return e.copy_||e.base_}function vf(e,t){if(Aa(e))return new Map(e);if(va(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=$0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[tt];let o=Reflect.ownKeys(r);for(let u=0;u<o.length;u++){const a=o[u],c=r[a];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[a]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[a]})}return Object.create(ms(e),r)}else{const r=ms(e);if(r!==null&&n)return U({},e);const o=Object.create(r);return Object.assign(o,e)}}function kf(e,t=!1){return ka(e)||gs(e)||!Lr(e)||(Ca(e)>1&&(e.set=e.add=e.clear=e.delete=Kw),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>kf(r,!0))),e}function Kw(){Un(2)}function ka(e){return Object.isFrozen(e)}var Nf={};function Mi(e){const t=Nf[e];return t||Un(0,e),t}function Qw(e,t){Nf[e]||(Nf[e]=t)}var Mo;function Na(){return Mo}function Xw(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function q0(e,t){t&&(Mi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Of(e){If(e),e.drafts_.forEach(Jw),e.drafts_=null}function If(e){e===Mo&&(Mo=e.parent_)}function Y0(e){return Mo=Xw(Mo,e)}function Jw(e){const t=e[tt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function W0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[tt].modified_&&(Of(t),Un(4)),Lr(e)&&(e=Oa(t,e),t.parent_||Ia(t,e)),t.patches_&&Mi("Patches").generateReplacementPatches_(n[tt].base_,e,t.patches_,t.inversePatches_)):e=Oa(t,n,[]),Of(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==z0?e:void 0}function Oa(e,t,n){if(ka(t))return t;const r=t[tt];if(!r)return Do(t,(o,u)=>G0(e,r,t,o,u,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ia(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let u=o,a=!1;r.type_===3&&(u=new Set(o),o.clear(),a=!0),Do(u,(c,f)=>G0(e,r,o,c,f,n,a)),Ia(e,o,!1),n&&e.patches_&&Mi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function G0(e,t,n,r,o,u,a){if(gs(o)){const c=u&&t&&t.type_!==3&&!Af(t.assigned_,r)?u.concat(r):void 0,f=Oa(e,o,c);if(V0(n,r,f),gs(f))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(Lr(o)&&!ka(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Oa(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ia(e,o)}}function Ia(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&kf(t,n)}function Zw(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Na(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,u=Pf;n&&(o=[r],u=Fo);const{revoke:a,proxy:c}=Proxy.revocable(o,u);return r.draft_=c,r.revoke_=a,c}var Pf={get(e,t){if(t===tt)return e;const n=Bt(e);if(!Af(n,t))return eC(e,n,t);const r=n[t];return e.finalized_||!Lr(r)?r:r===Rf(e.base_,t)?(Lf(e),e.copy_[t]=Bo(r,e)):r},has(e,t){return t in Bt(e)},ownKeys(e){return Reflect.ownKeys(Bt(e))},set(e,t,n){const r=K0(Bt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Rf(Bt(e),t),u=o==null?void 0:o[tt];if(u&&u.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Gw(n,o)&&(n!==void 0||Af(e.base_,t)))return!0;Lf(e),Dr(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 Rf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Lf(e),Dr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Bt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Un(11)},getPrototypeOf(e){return ms(e.base_)},setPrototypeOf(){Un(12)}},Fo={};Do(Pf,(e,t)=>{Fo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Fo.deleteProperty=function(e,t){return Fo.set.call(this,e,t,void 0)},Fo.set=function(e,t,n){return Pf.set.call(this,e[0],t,n,e[0])};function Rf(e,t){const n=e[tt];return(n?Bt(n):e)[t]}function eC(e,t,n){var o;const r=K0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function K0(e,t){if(!(t in e))return;let n=ms(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ms(n)}}function Dr(e){e.modified_||(e.modified_=!0,e.parent_&&Dr(e.parent_))}function Lf(e){e.copy_||(e.copy_=vf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var tC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const u=n;n=t;const a=this;return function(f=u,...h){return a.produce(f,m=>n.call(this,m,...h))}}typeof n!="function"&&Un(6),r!==void 0&&typeof r!="function"&&Un(7);let o;if(Lr(t)){const u=Y0(this),a=Bo(t,void 0);let c=!0;try{o=n(a),c=!1}finally{c?Of(u):If(u)}return q0(u,r),W0(o,u)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===z0&&(o=void 0),this.autoFreeze_&&kf(o,!0),r){const u=[],a=[];Mi("Patches").generateReplacementPatches_(t,o,u,a),r(u,a)}return o}else Un(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,f=>t(f,...c));let r,o;return[this.produce(t,n,(a,c)=>{r=a,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){Lr(e)||Un(8),gs(e)&&(e=nC(e));const t=Y0(this),n=Bo(e,void 0);return n[tt].isManual_=!0,If(t),n}finishDraft(e,t){const n=e&&e[tt];(!n||!n.isManual_)&&Un(9);const{scope_:r}=n;return q0(r,t),W0(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=Mi("Patches").applyPatches_;return gs(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Bo(e,t){const n=Aa(e)?Mi("MapSet").proxyMap_(e,t):va(e)?Mi("MapSet").proxySet_(e,t):Zw(e,t);return(t?t.scope_:Na()).drafts_.push(n),n}function nC(e){return gs(e)||Un(10,e),Q0(e)}function Q0(e){if(!Lr(e)||ka(e))return e;const t=e[tt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=vf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=vf(e,!0);return Do(n,(r,o)=>{V0(n,r,Q0(o))}),t&&(t.finalized_=!1),n}function rC(){class e extends Map{constructor(f,h){super(),this[tt]={type_:2,parent_:h,scope_:h?h.scope_:Na(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:f,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Bt(this[tt]).size}has(f){return Bt(this[tt]).has(f)}set(f,h){const m=this[tt];return a(m),(!Bt(m).has(f)||Bt(m).get(f)!==h)&&(n(m),Dr(m),m.assigned_.set(f,!0),m.copy_.set(f,h),m.assigned_.set(f,!0)),this}delete(f){if(!this.has(f))return!1;const h=this[tt];return a(h),n(h),Dr(h),h.base_.has(f)?h.assigned_.set(f,!1):h.assigned_.delete(f),h.copy_.delete(f),!0}clear(){const f=this[tt];a(f),Bt(f).size&&(n(f),Dr(f),f.assigned_=new Map,Do(f.base_,h=>{f.assigned_.set(h,!1)}),f.copy_.clear())}forEach(f,h){const m=this[tt];Bt(m).forEach((E,b,T)=>{f.call(h,this.get(b),b,this)})}get(f){const h=this[tt];a(h);const m=Bt(h).get(f);if(h.finalized_||!Lr(m)||m!==h.base_.get(f))return m;const E=Bo(m,h);return n(h),h.copy_.set(f,E),E}keys(){return Bt(this[tt]).keys()}values(){const f=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const h=f.next();return h.done?h:{done:!1,value:this.get(h.value)}}}}entries(){const f=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const h=f.next();if(h.done)return h;const m=this.get(h.value);return{done:!1,value:[h.value,m]}}}}[Symbol.iterator](){return this.entries()}}function t(c,f){return new e(c,f)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(f,h){super(),this[tt]={type_:3,parent_:h,scope_:h?h.scope_:Na(),modified_:!1,finalized_:!1,copy_:void 0,base_:f,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Bt(this[tt]).size}has(f){const h=this[tt];return a(h),h.copy_?!!(h.copy_.has(f)||h.drafts_.has(f)&&h.copy_.has(h.drafts_.get(f))):h.base_.has(f)}add(f){const h=this[tt];return a(h),this.has(f)||(u(h),Dr(h),h.copy_.add(f)),this}delete(f){if(!this.has(f))return!1;const h=this[tt];return a(h),u(h),Dr(h),h.copy_.delete(f)||(h.drafts_.has(f)?h.copy_.delete(h.drafts_.get(f)):!1)}clear(){const f=this[tt];a(f),Bt(f).size&&(u(f),Dr(f),f.copy_.clear())}values(){const f=this[tt];return a(f),u(f),f.copy_.values()}entries(){const f=this[tt];return a(f),u(f),f.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(f,h){const m=this.values();let E=m.next();for(;!E.done;)f.call(h,E.value,E.value,this),E=m.next()}}function o(c,f){return new r(c,f)}function u(c){c.copy_||(c.copy_=new Set,c.base_.forEach(f=>{if(Lr(f)){const h=Bo(f,c);c.drafts_.set(f,h),c.copy_.add(h)}else c.copy_.add(f)}))}function a(c){c.revoked_&&Un(3,JSON.stringify(Bt(c)))}Qw("MapSet",{proxyMap_:t,proxySet_:o})}var vn=new tC,iC=vn.produce;vn.produceWithPatches.bind(vn),vn.setAutoFreeze.bind(vn),vn.setUseStrictShallowCopy.bind(vn),vn.applyPatches.bind(vn),vn.createDraft.bind(vn),vn.finishDraft.bind(vn);function sC(e,t,n){var r=G.useMemo(function(){return iC(e)},[e]);return G.useReducer(r,t,n)}const X0={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},mn={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"},Pa={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set},Uo="cimulate",Df=`${Uo}:pdp-update`,Mf=`${Uo}:browse-update`,Ff=`${Uo}:search-update`,Bf=`${Uo}:ui-state-update`,Uf=`${Uo}:session-state`,Mr=U({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed"},X0),oC={"browse-context":Mr.CONTEXT_UPDATED,categoryId:Mr.CATEGORY_ID_CHANGED,page:Mr.PAGE_CHANGED,pageSize:Mr.PAGE_SIZE_CHANGED,includeFacets:Mr.FACET_FILTERS_CHANGED,facetFilters:Mr.FACET_FILTERS_CHANGED,rangeFilters:Mr.RANGE_FILTERS_CHANGED,catalogSegment:Mr.CATALOG_SEGMENT_CHANGED,pricebooks:Mr.PRICEBOOKS_CHANGED},Fr=U({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},X0),uC={"search-context":Fr.SEARCH_CONTEXT_UPDATED,query:Fr.QUERY_CHANGED,page:Fr.PAGE_CHANGED,pageSize:Fr.PAGE_SIZE_CHANGED,includeFacets:Fr.FACET_FILTERS_CHANGED,facetFilters:Fr.FACET_FILTERS_CHANGED,rangeFilters:Fr.RANGE_FILTERS_CHANGED,catalogSegment:Fr.CATALOG_SEGMENT_CHANGED,pricebooks:Fr.PRICEBOOKS_CHANGED},Z="cim-widget",Es=`--${Z}`,Fi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},aC=(e=Fi)=>({[`${Es}-primary-color`]:e.primaryColor||Fi.primaryColor,[`${Es}-secondary-color`]:e.secondaryColor||Fi.secondaryColor,[`${Es}-font-color`]:e.fontColor||Fi.fontColor,[`${Es}-font-family`]:e.fontFamily||Fi.fontFamily,[`${Es}-background-color`]:e.backgroundColor||Fi.backgroundColor,[`${Es}-border-color`]:e.borderColor||Fi.borderColor}),J0={RESET_CONVERSATION:"reset-conversation"},Z0=G.createContext(null),eg=G.createContext(null);class lC{constructor(t,n,r=!1){Be(this,"apiService");Be(this,"config",null);Be(this,"getConfig",()=>nt(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}}));Be(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Be(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Be(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Be(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Be(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Be(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Be(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Be(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Be(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Be(this,"getProductField",t=>this.config?this.config[t]:"");Be(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new H0(t,n,r)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const ys=(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 cC{constructor(t=!1){Be(this,"isDevelopment");Be(this,"_log",(t,n,...r)=>{ys(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 tg=G.createContext(null),fC=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",searchPlaceholder:r,searchButtonLabel:o,resetConversationMessage:u="What products would you like to explore today?",apiKey:a,apiToken:c,theme:f,isDevelopment:h,children:m})=>{const E=G.useMemo(()=>new lC(a,c,h),[a,c,h]),b=G.useMemo(()=>new cC(h),[h]);G.useEffect(()=>{E.config||E.getConfig()},[E]);const T=G.useMemo(()=>aC(f),[f]),_=G.useMemo(()=>({configModule:E,logoUrl:e,headerText:t,globalClassName:n,themeVariables:T,logger:b,searchPlaceholder:r,searchButtonLabel:o,resetConversationMessage:u}),[E,e,t,n,r,o,u,b,T]);return O.jsx(tg.Provider,{value:_,children:m})},er=()=>{const e=G.useContext(tg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},dC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=er(),o=G.useCallback(b=>{n({type:mn.SET_COPILOT,payload:b})},[n]),u=G.useCallback(b=>{n({type:mn.SET_CONNECTED,payload:b})},[n]),a=G.useCallback(()=>{n({type:mn.RESET_COPILOT,payload:{}})},[n]),c=G.useCallback(()=>{n({type:mn.RESET_STATE,payload:{}})},[n]),f=G.useCallback(b=>{r==null||r.log(`${b.name} event received`,b),n({type:mn.ADD_MESSAGE,payload:b}),e==null||e(b)},[e,r,n]),h=G.useCallback(b=>{n({type:mn.ADD_LOADING_MESSAGE,payload:b})},[n]),m=G.useCallback(b=>{n({type:mn.REMOVE_LOADING_MESSAGE,payload:b})},[n]),E=G.useMemo(()=>({setCopilot:o,setConnected:u,resetCopilot:a,resetCopilotState:c,addCopilotEvent:f,addLoadingMessage:h,removeLoadingMessage:m}),[o,u,a,c,f,h,m]);return O.jsx(eg.Provider,{value:E,children:t})};rC();const hC=(e,t)=>{const{type:n,payload:r}=t;if(n===mn.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const u=e.groupedMessages.findIndex(a=>a.eventSourceId===o.eventSourceId);if(u!==-1){let a=e.groupedMessages[u].messages;a||(a=[]);const c=a.findIndex(f=>f.id===o.id);if(c!==-1){a[c]=o;return}a.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 mn.RESET_STATE:e.messages=Pa.messages,e.groupedMessages=Pa.groupedMessages,e.loadingMessages=Pa.loadingMessages;break;case mn.RESET_COPILOT:e.copilot=null;break;case mn.SET_COPILOT:e.copilot=r;break;case mn.SET_CONNECTED:e.connected=r;break;case mn.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case mn.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break}},pC=({onCopilotEvent:e,children:t})=>{const[n,r]=sC(hC,Pa);return O.jsx(Z0.Provider,{value:n,children:O.jsx(dC,{onCopilotEvent:e,dispatch:r,children:t})})};function mC(){var e=G.useRef(!0);return e.current?(e.current=!1,!0):e.current}var gC=function(e){G.useEffect(e,[])},EC=function(e,t){return e===t};function yC(e,t){t===void 0&&(t=EC);var n=G.useRef(),r=G.useRef(e),o=mC();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}const ng=e=>{window.addEventListener(Ff,e)},rg=e=>{window.removeEventListener(Ff,e)},TC=(e,t,n)=>{const r=new CustomEvent(Ff,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},ig=e=>{window.addEventListener(Mf,e)},sg=e=>{window.removeEventListener(Mf,e)},bC=(e,t,n)=>{const r=new CustomEvent(Mf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},og=e=>{window.addEventListener(Df,e)},ug=e=>{window.removeEventListener(Df,e)},ag=(e,t,n)=>{const r=new CustomEvent(Df,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},_C=e=>{window.addEventListener(Uf,e)},xC=e=>{window.removeEventListener(Uf,e)},SC=(e,t,n)=>{const r=new CustomEvent(Uf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class wC{constructor(){Be(this,"initialParams",{categoryId:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Be(this,"categoryIdProxy");Be(this,"facetFiltersProxy");Be(this,"rangeFiltersProxy");Be(this,"catalogSegmentProxy");Be(this,"pricebooksProxy");Be(this,"_fullGet",(t,n)=>Reflect.get(t,n));Be(this,"_fullSet",(t,n,r)=>{const o=oC[n];return bC(o,n,r),Reflect.set(t,n,r)});this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=new Proxy({facetFilters:this.initialParams.facetFilters},{get:this._fullGet,set:this._fullSet}),this.rangeFiltersProxy=new Proxy({rangeFilters:this.initialParams.rangeFilters},{get:this._fullGet,set:this._fullSet}),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=new Proxy({pricebooks:this.initialParams.pricebooks},{get:this._fullGet,set:this._fullSet})}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}}const wt=new wC,Ts={categoryId:wt.categoryId,facetFilters:wt.facetFilters,rangeFilters:wt.rangeFilters,catalogSegment:wt.catalogSegment,pricebooks:wt.pricebooks},lg=G.createContext(Ts),CC=({children:e})=>{const[t,n]=G.useState(Ts.categoryId),[r,o]=G.useState(Ts.facetFilters),[u,a]=G.useState(Ts.rangeFilters),[c,f]=G.useState(Ts.catalogSegment),[h,m]=G.useState(Ts.pricebooks);G.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="categoryId"&&n(T.value),(T==null?void 0:T.property)==="facetFilters"&&o(T.value),(T==null?void 0:T.property)==="rangeFilters"&&a(T.value),(T==null?void 0:T.property)==="catalogSegment"&&f(T.value),(T==null?void 0:T.property)==="pricebooks"&&m(T.value)};return ig(b),()=>{sg(b)}},[]);const E=G.useMemo(()=>({categoryId:t,facetFilters:r,rangeFilters:u,catalogSegment:c,pricebooks:h}),[t,r,u,c,h]);return O.jsx(lg.Provider,{value:E,children:e})},AC=()=>{const e=G.useContext(lg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},cg=(e,t)=>{t.facetFiltersProxy.facetFilters=e},fg=(e,t,n)=>{var u;const r=U({},n.facetFiltersProxy.facetFilters||{});if(!!((u=r[e])!=null&&u.includes(t))){const a=r[e].filter(c=>c!==t);a.length>0?r[e]=a:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];n.facetFiltersProxy.facetFilters=r},dg=(e,t)=>{t.rangeFiltersProxy.rangeFilters=[...e]},hg=({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 u=[...n.rangeFiltersProxy.rangeFilters||[]],a=u.findIndex(c=>c.field===e);if(a!==-1){u[a]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=u;return}u.push({field:e,min:r,max:o}),n.rangeFiltersProxy.rangeFilters=u},pg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},mg=(e,t)=>{t.pricebooksProxy.pricebooks=e},vC=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:e=>{if(!e||!e.query)throw new Error("Search context must include a query");"facetFilters"in e&&(Ct.facetFiltersProxy.facetFilters=e.facetFilters||{}),"rangeFilters"in e&&(Ct.rangeFiltersProxy.rangeFilters=e.rangeFilters||[]),"catalogSegment"in e&&(Ct.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&(Ct.pricebooksProxy.pricebooks=e.pricebooks||null),Ct.queryProxy.query=e.query},updateCatalogSegment:e=>{pg(e,Ct)},updateFacetFilter:(e,t)=>{fg(e,t,Ct)},updateFacetFilters:e=>{cg(e,Ct)},updatePricebooks:e=>{mg(e,Ct)},updateRangeFilter:({field:e,value:t})=>{hg({field:e,value:t},Ct)},updateRangeFilters:e=>{dg(e,Ct)},updateSearchQuery:e=>{Ct.queryProxy.query=e}},Symbol.toStringTag,{value:"Module"})),kC=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:e=>{if(!e||!e.categoryId)throw new Error("Browse context must include a categoryId");"facetFilters"in e&&(wt.facetFiltersProxy.facetFilters=e.facetFilters||{}),"rangeFilters"in e&&(wt.rangeFiltersProxy.rangeFilters=e.rangeFilters||[]),"catalogSegment"in e&&(wt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&(wt.pricebooksProxy.pricebooks=e.pricebooks||null),wt.categoryIdProxy.categoryId=e.categoryId},updateBrowseCategoryId:e=>{wt.categoryIdProxy.categoryId=e},updateCatalogSegment:e=>{pg(e,wt)},updateFacetFilter:(e,t)=>{fg(e,t,wt)},updateFacetFilters:e=>{cg(e,wt)},updatePricebooks:e=>{mg(e,wt)},updateRangeFilter:({field:e,value:t})=>{hg({field:e,value:t},wt)},updateRangeFilters:e=>{dg(e,wt)}},Symbol.toStringTag,{value:"Module"}));class NC{constructor(){Be(this,"initialParams",{productId:"",pdpLink:""});Be(this,"proxy");Be(this,"_fullGet",(t,n)=>Reflect.get(t,n));Be(this,"_fullSet",(t,n,r)=>(ag(n,r),Reflect.set(t,n,r)));Be(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}}const bs=new NC,OC=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");bs.updateProxy(e),ag("pdp-context",e)},IC=e=>{bs.proxy.productId=e},PC=e=>{bs.proxy.pdpLink=e},RC=()=>{SC("resetConversation",!0,J0.RESET_CONVERSATION)};class LC{constructor(){Be(this,"initialState",{mode:"embedded",status:{type:"dialog",isOpen:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});Be(this,"modeProxy");Be(this,"statusProxy");Be(this,"dialogProxy");Be(this,"modalProxy",{isFullscreen:!1});Be(this,"_fullGet",(t,n)=>Reflect.get(t,n));Be(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return FC(n,r),Reflect.set(t,n,r)});this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get type(){return this.statusProxy.type}get position(){return this.dialogProxy.position}}const Ut=new LC,DC=e=>{window.addEventListener(Bf,e)},MC=e=>{window.removeEventListener(Bf,e)},FC=(e,t)=>{const n=new CustomEvent(Bf,{detail:{property:e,value:t}});window.dispatchEvent(n)},Ra=e=>{if(typeof e!="boolean"){Ut.statusProxy.isOpen=!Ut.statusProxy.isOpen;return}Ut.statusProxy.isOpen=e},gg=e=>{Ut.modalProxy.isFullscreen=e},Hf=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Ut.statusProxy.type=e,e==="dialog"||e==="chat"?Ut.modeProxy.mode="embedded":Ut.modeProxy.mode="standalone"},Eg=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(", ")}.`);Ut.dialogProxy.position=e};class BC{constructor(){Be(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Be(this,"queryProxy");Be(this,"facetFiltersProxy");Be(this,"rangeFiltersProxy");Be(this,"catalogSegmentProxy");Be(this,"pricebooksProxy");Be(this,"_fullGet",(t,n)=>Reflect.get(t,n));Be(this,"_fullSet",(t,n,r)=>{const o=uC[n];return TC(o,n,r),Reflect.set(t,n,r)});this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=new Proxy({facetFilters:this.initialParams.facetFilters},{get:this._fullGet,set:this._fullSet}),this.rangeFiltersProxy=new Proxy({rangeFilters:this.initialParams.rangeFilters},{get:this._fullGet,set:this._fullSet}),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=new Proxy({pricebooks:this.initialParams.pricebooks},{get:this._fullGet,set:this._fullSet})}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}}const Ct=new BC,_s={searchQuery:Ct.query,facetFilters:Ct.facetFilters,rangeFilters:Ct.rangeFilters,catalogSegment:Ct.catalogSegment,pricebooks:Ct.pricebooks},yg=G.createContext(_s),UC=({children:e})=>{const[t,n]=G.useState(_s.searchQuery),[r,o]=G.useState(_s.facetFilters),[u,a]=G.useState(_s.rangeFilters),[c,f]=G.useState(_s.catalogSegment),[h,m]=G.useState(_s.pricebooks);G.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&n(T.value),(T==null?void 0:T.property)==="facetFilters"&&o(T.value),(T==null?void 0:T.property)==="rangeFilters"&&a(T.value),(T==null?void 0:T.property)==="catalogSegment"&&f(T.value),(T==null?void 0:T.property)==="pricebooks"&&m(T.value)};return ng(b),()=>{rg(b)}},[]);const E=G.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:u,catalogSegment:c,pricebooks:h}),[t,r,u,c,h]);return O.jsx(yg.Provider,{value:E,children:e})},HC=()=>{const e=G.useContext(yg);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},zC=()=>{const e=G.useContext(eg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Tg=()=>{const e=G.useContext(Z0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},bg=G.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{}}),jC=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:u,children:a})=>{const{logger:c}=er(),_e=HC(),{searchQuery:f}=_e,h=Yt(_e,["searchQuery"]),Ue=AC(),{categoryId:m}=Ue,E=Yt(Ue,["categoryId"]),{setCopilot:b,setConnected:T,resetCopilot:_,resetCopilotState:S,addCopilotEvent:C,addLoadingMessage:I,removeLoadingMessage:B}=zC(),{copilot:L,messages:q,groupedMessages:X,loadingMessages:F}=Tg(),ee=G.useRef(!1),be=G.useRef(!1),we=G.useMemo(()=>F.size>0,[F]),H=G.useCallback(ie=>F.has(ie),[F]),ae=G.useCallback(ie=>{C(ie),I(ie.id)},[C,I]),he=G.useCallback(ie=>{const xe=Te(U({},ie),{id:ie.inquiryLinkId||ie.id});C(xe)},[C]),fe=G.useCallback(ie=>{C(ie),u==null||u(ie)},[C,u]),de=G.useCallback(ie=>{L&&L.requestSessionInformation(xe=>{ie(xe)})},[L]),ye=G.useCallback(ie=>{ie.on("connect_ack",xe=>{o==null||o(xe),T(!0)}),ie.on("follow_up",C),ie.on("inquiry",he),ie.on("partial_inquiry",he),ie.on("display_products",C),ie.on("progress",C),ie.on("refined_search",fe),ie.on("done",xe=>{B(xe.eventSourceId)}),ie.on("error",xe=>{C(xe),B(xe.eventSourceId)}),ie.onDisconnect(xe=>{const Ne=["io server disconnect","transport error","server shutting down"];if(c==null||c.log("Connection disconnected with reason: ",xe),!Ne.includes(xe)){T(!1);return}c==null||c.log("De-registering event listeners");const Fe=new Date().toISOString();C({name:"error",message:"Connection was lost. Please try again.",createdAt:Fe,id:`error-${Fe}`,sessionId:"session"}),ie.off()})},[c,T,B,he,fe,C,o]);gC(()=>{let ie;n?ie=n:ie=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const xe={baseUrl:ie};e?xe.apiKey=e:t&&(xe.apiToken=t);const Ne=new xS(xe);return Ne.connect(),ye(Ne),b(Ne),Ne.requestSessionInformation(Fe=>{c==null||c.log("Session Information: ",Fe)}),()=>{Ne.disconnect(),Ne.off(),_()}});const Ce=G.useCallback(({query:ie,facetFilters:xe,rangeFilters:Ne,catalogSegment:Fe,pricebooks:Ye,userPrompt:Pt,isUserAction:tn})=>{if(!L){c==null||c.error("Copilot is not initialized");return}if(!ie)return;const gt={searchParams:{query:ie}};Pt&&(gt.userPrompt=Pt),xe&&Object.keys(xe).length>0&&(gt.searchParams.facetFilters=xe),Ne&&Ne.length>0&&(gt.searchParams.rangeFilters=Ne),Fe&&(gt.searchParams.catalogSegment=Fe),Ye&&(gt.searchParams.pricebooks=Ye);const _n=!ee.current;L.search(gt,bt=>{const Lt=U({},bt);_n&&(Lt.isInitial=_n,Lt.isUserAction=!0),tn&&(Lt.isUserAction=tn),ee.current=!0,ae(Lt)})},[c,ae,L]),oe=G.useCallback(({categoryId:ie,facetFilters:xe,rangeFilters:Ne,catalogSegment:Fe,pricebooks:Ye,userPrompt:Pt,isUserAction:tn})=>{if(!L){c==null||c.error("Copilot is not initialized");return}if(!ie)return;const gt={browseParams:{categoryId:ie}};Pt&&(gt.userPrompt=Pt),xe&&Object.keys(xe).length>0&&(gt.browseParams.facetFilters=xe),Ne&&Ne.length>0&&(gt.browseParams.rangeFilters=Ne),Fe&&(gt.browseParams.catalogSegment=Fe),Ye&&(gt.browseParams.pricebooks=Ye);const _n=!be.current;L.browse(gt,bt=>{const Lt=U({},bt);_n&&(Lt.isInitial=_n,Lt.isUserAction=!0),tn&&(Lt.isUserAction=tn),ee.current=!0,ae(Lt)})},[c,ae,L]),$=G.useCallback(({productId:ie,pdpLink:xe,userPrompt:Ne,isUserAction:Fe})=>{if(!L){c==null||c.error("Copilot is not initialized");return}if(!ie)return;const Ye={productId:ie};Ne&&(Ye.userPrompt=Ne),xe&&(Ye.pdpLink=xe),L.productView(Ye,Pt=>{const tn=U({},Pt);Fe&&(tn.isUserAction=Fe),ae(tn)})},[c,L,ae]),te=G.useCallback(ie=>{if(!L)return;const xe={eventId:ie,reason:"User cancelled the request"};L.cancelRequest(xe,Ne=>{C(Ne),B(ie)})},[C,B,L]),w=G.useCallback(()=>{L&&L.conversationReset({},ie=>{S(),C(ie),L.requestSessionInformation(xe=>{c==null||c.log("Session Information: ",xe)})})},[L,c,C,S]),R=G.useCallback(ie=>{!ie||!f||Ce(Te(U({query:f},h),{userPrompt:ie}))},[f,h,Ce]),K=G.useCallback((ie,xe)=>{var Pt,gt;const Fe=ie.params.userPrompt||"";if(!Fe)return;const Ye=q.find(bt=>bt.id===xe);if(Ye){if(Ye.name==="copilot_search"){const tn=((Pt=Ye.request)==null?void 0:Pt.searchParams)||{},{query:bt}=tn,Lt=Yt(tn,["query"]);bt&&Ce(Te(U(U({query:bt||f},h),Lt),{userPrompt:Fe}));return}if(Ye.name==="copilot_browse"){const _n=((gt=Ye.request)==null?void 0:gt.browseParams)||{},{categoryId:bt}=_n,Lt=Yt(_n,["categoryId"]);if(bt){oe(Te(U(U({categoryId:bt||m},E),Lt),{userPrompt:Fe}));return}}if(Ye.name==="product_view"){const bt=Ye.request;bt!=null&&bt.productId&&$(Te(U({},bt),{userPrompt:Fe}))}}},[f,h,m,E,q,Ce,oe,$]),k=G.useMemo(()=>({copilot:L,messages:q,groupedMessages:X,isLoading:we,isResponseLoading:H,handleSearch:Ce,handleBrowse:oe,handlePdp:$,handleUserInput:R,handleSuggestion:K,handleCancel:te,resetConversation:w,getSessionInformation:de}),[L,q,X,we,H,Ce,oe,$,R,K,te,w,de]);return O.jsx(bg.Provider,{value:k,children:a})},ti=()=>{const e=G.useContext(bg);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},$C=()=>{const{copilot:e,handleSearch:t,handleBrowse:n,handlePdp:r,resetConversation:o}=ti(),u=G.useCallback(({query:f,isUserAction:h})=>{if(!e||!f)return;const{facetFilters:m}=Ct.facetFiltersProxy,{rangeFilters:E}=Ct.rangeFiltersProxy,{catalogSegment:b}=Ct.catalogSegmentProxy,{pricebooks:T}=Ct.pricebooksProxy,_={query:f};m&&Object.keys(m).length>0&&(_.facetFilters=m),E&&E.length>0&&(_.rangeFilters=E),b&&(_.catalogSegment=b),T&&(_.pricebooks=T),t(Te(U({},_),{isUserAction:h}))},[e,t]),a=G.useCallback(({categoryId:f,isUserAction:h})=>{if(!e||!f)return;const{facetFilters:m}=wt.facetFiltersProxy,{rangeFilters:E}=wt.rangeFiltersProxy,{catalogSegment:b}=wt.catalogSegmentProxy,{pricebooks:T}=wt.pricebooksProxy,_={categoryId:f};m&&Object.keys(m).length>0&&(_.facetFilters=m),E&&E.length>0&&(_.rangeFilters=E),b&&(_.catalogSegment=b),T&&(_.pricebooks=T),n(Te(U({},_),{isUserAction:h}))},[e,n]),c=G.useCallback(({productId:f,isUserAction:h})=>{if(!e||!f)return;const m={productId:f,pdpLink:bs.pdpLink,isUserAction:h};r(U({},m))},[e,r]);return G.useEffect(()=>{const f=({detail:h})=>{(h==null?void 0:h.property)==="query"&&u({query:h.value,isUserAction:!0})};return ng(f),()=>{rg(f)}},[u]),G.useEffect(()=>{const f=({detail:h})=>{if((h==null?void 0:h.property)==="pdp-context"){const m=h.value;c({productId:m.productId,isUserAction:!0});return}(h==null?void 0:h.property)==="productId"&&c({productId:h.value,isUserAction:!0})};return og(f),()=>{ug(f)}},[c]),G.useEffect(()=>{const f=({detail:h})=>{(h==null?void 0:h.property)==="categoryId"&&a({categoryId:h.value,isUserAction:!0})};return ig(f),()=>{sg(f)}},[a]),G.useEffect(()=>{const f=({detail:h})=>{(h==null?void 0:h.event)==J0.RESET_CONVERSATION&&o()};return _C(f),()=>{xC(f)}},[o]),null},VC=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onCopilotEvent:u,onRefinedSearch:a,children:c})=>O.jsx(pC,{onCopilotEvent:u,children:O.jsxs(jC,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,children:[O.jsx($C,{}),c]})}),zf={productId:bs.proxy.productId,pdpLink:bs.proxy.pdpLink},qC=G.createContext(zf),YC=({children:e})=>{const[t,n]=G.useState(zf.productId),[r,o]=G.useState(zf.pdpLink);G.useEffect(()=>{const a=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const f=c.value;n(f.productId),o(f.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&o(c.value)};return og(a),()=>{ug(a)}},[]);const u=G.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return O.jsx(qC.Provider,{value:u,children:e})},_g=G.createContext({mode:Ut.modeProxy.mode,status:Ut.statusProxy,dialogPosition:Ut.dialogProxy.position,isModalFullscreen:Ut.modalProxy.isFullscreen,previousComponentType:Ut.statusProxy.type}),WC=({componentType:e,children:t})=>{const[n,r]=G.useState(Ut.modeProxy.mode),[o,u]=G.useState({type:e||Ut.statusProxy.type,isOpen:Ut.statusProxy.isOpen}),[a,c]=G.useState(Ut.dialogProxy.position),[f,h]=G.useState(Ut.modalProxy.isFullscreen),m=yC(o.type);G.useEffect(()=>{const b=T=>{const{property:_,value:S}=T.detail||{};if(!(!_||S===void 0)){if(_==="mode"){r(S);return}if(_==="isOpen"){u(C=>Te(U({},C),{isOpen:S}));return}if(_==="type"){u(C=>Te(U({},C),{type:S}));return}if(_==="position"){c(S);return}if(_==="isFullscreen"){h(S);return}}};return DC(b),()=>{MC(b)}},[]);const E=G.useMemo(()=>({mode:n,status:o,previousComponentType:m||"dialog",dialogPosition:a,isModalFullscreen:f}),[n,o,m,a,f]);return O.jsx(_g.Provider,{value:E,children:t})},xg=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:u,globalClassName:a,isDevelopment:c=!1,componentType:f,searchPlaceholder:h,searchButtonLabel:m,resetConversationMessage:E,onConnect:b,onCopilotEvent:T,onRefinedSearch:_,children:S})=>O.jsx(fC,{apiKey:e,logoUrl:r,headerText:o,theme:u,globalClassName:a,searchPlaceholder:h,searchButtonLabel:m,resetConversationMessage:E,isDevelopment:c,children:O.jsx(Yw,{apiKey:e,apiToken:t,isDevelopment:c,children:O.jsx(YC,{children:O.jsx(CC,{children:O.jsx(UC,{children:O.jsx(WC,{componentType:f,children:O.jsx(VC,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:c,onConnect:b,onCopilotEvent:T,onRefinedSearch:_,children:S})})})})})})}),Ho=()=>{const e=G.useContext(_g);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};function Sg(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=Sg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ue(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sg(e))&&(r&&(r+=" "),r+=t);return r}var wg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Cg=Pi.createContext&&Pi.createContext(wg),GC=["attr","size","title"];function KC(e,t){if(e==null)return{};var n=QC(e,t),r,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(o=0;o<u.length;o++)r=u[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QC(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 La(){return La=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},La.apply(this,arguments)}function Ag(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 Da(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ag(Object(n),!0).forEach(function(r){XC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ag(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XC(e,t,n){return t=JC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JC(e){var t=ZC(e,"string");return typeof t=="symbol"?t:t+""}function ZC(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 vg(e){return e&&e.map((t,n)=>Pi.createElement(t.tag,Da({key:n},t.attr),vg(t.child)))}function an(e){return t=>Pi.createElement(eA,La({attr:Da({},e.attr)},t),vg(e.child))}function eA(e){var t=n=>{var{attr:r,size:o,title:u}=e,a=KC(e,GC),c=o||n.size||"1em",f;return n.className&&(f=n.className),e.className&&(f=(f?f+" ":"")+e.className),Pi.createElement("svg",La({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:f,style:Da(Da({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),u&&Pi.createElement("title",null,u),e.children)};return Cg!==void 0?Pi.createElement(Cg.Consumer,null,n=>t(n)):t(wg)}function kg(e){return an({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 Ma(e){return an({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 tA(e){return an({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 Ng(e){return an({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 nA(e){return an({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 rA(e){return an({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 iA(e){return an({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 sA(e){return an({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)}const jf=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>O.jsx("button",{className:ue(`${Z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Fa=({className:e,icon:t,type:n="button",ariaLabel:r,disabled:o=!1,onClick:u})=>O.jsx("button",{className:ue(e,`${Z}-icon-button`),type:n,"aria-label":r,onClick:u,disabled:o,children:t}),oA=({className:e,searchButtonLabel:t,globalClassName:n,componentType:r,isLoading:o})=>t?O.jsx(jf,{className:ue(n,r,e),type:"submit",disabled:o,children:t}):O.jsx(Fa,{className:ue(n,r,e),type:"submit",disabled:o,ariaLabel:"Search Copilot",icon:O.jsx(Ma,{})}),$f=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o}=Tg(),{globalClassName:u,searchPlaceholder:a,searchButtonLabel:c}=er(),f=G.useRef(null),h=b=>{var _;b.preventDefault();const T=(((_=f.current)==null?void 0:_.value)||"").trim();T&&(r(T),f.current.value="")},m=!!o||!1,E=m?"connected":"disconnected";return O.jsxs("form",{className:ue(u,e,n,`${Z}-search-bar`),name:`${Z}-search-form`,onSubmit:h,children:[O.jsx("span",{role:"status",className:ue(`${Z}-connection-status-icon`,E)}),O.jsx("input",{className:ue(u,e,n,`${Z}-search-input`),type:"text",ref:f,placeholder:a,name:`${Z}-user-input`}),O.jsx(oA,{searchButtonLabel:c,globalClassName:u,componentType:n,isLoading:t||!m})]})};function uA(e){return e==null?[]:Array.isArray(e)?e:[e]}var aA=e=>e!=null&&typeof e=="object",Ba=e=>typeof e=="string",xs=e=>typeof e=="function",lA=e=>e==null,cA=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),fA=e=>Object.prototype.toString.call(e),Og=Function.prototype.toString,dA=Og.call(Object),hA=e=>{if(!aA(e)||fA(e)!="[object Object]"||gA(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=cA(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Og.call(n)==dA},pA=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,mA=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,gA=e=>pA(e)||mA(e),EA=e=>e(),yA=()=>{},Vf=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function qf(e){if(!hA(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]=qf(o))}return n}function Yf(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function TA(e,t){if(e==null)throw new Error(t())}var bA=Object.defineProperty,_A=(e,t,n)=>t in e?bA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wf=(e,t,n)=>_A(e,typeof t!="symbol"?t+"":t,n),Ig=()=>{},Ua=e=>typeof e=="object"&&e!==null,xA=e=>e?"":void 0,SA=e=>e?"true":void 0,wA=1,CA=9,AA=11,Ht=e=>Ua(e)&&e.nodeType===wA&&typeof e.nodeName=="string",Ha=e=>Ua(e)&&e.nodeType===CA,vA=e=>Ua(e)&&e===e.window,Pg=e=>Ht(e)?e.localName||"":"#document";function kA(e){return["html","body","#document"].includes(Pg(e))}var NA=e=>Ua(e)&&e.nodeType!==void 0,Bi=e=>NA(e)&&e.nodeType===AA&&"host"in e,OA=e=>Ht(e)&&e.localName==="input",IA=e=>Ht(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function zo(e){if(!e)return!1;const t=e.getRootNode();return ws(t)===e}var PA=/(textarea|select)/;function RA(e){if(e==null||!Ht(e))return!1;try{return OA(e)&&e.selectionStart!=null||PA.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function za(e,t){var r;if(!e||!t||!Ht(e)||!Ht(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Bi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Er(e){var t;return Ha(e)?e:vA(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function LA(e){return Er(e).documentElement}function Ss(e){var t,n,r;return Bi(e)?Ss(e.host):Ha(e)?(t=e.defaultView)!=null?t:window:Ht(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ws(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 DA(e){if(Pg(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bi(e)&&e.host||LA(e);return Bi(t)?t.host:t}function Gf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Ha(t)||Bi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Kf=new WeakMap;function ja(e){return Kf.has(e)||Kf.set(e,Ss(e).getComputedStyle(e)),Kf.get(e)}var Qf=new Set(["menu","listbox","dialog","grid","tree","region"]),MA=e=>Qf.has(e),Rg=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Lg(e,t){const n=new Set,r=Gf(e),o=u=>{const a=u.querySelectorAll("[aria-controls]");for(const c of a){if(c.getAttribute("aria-expanded")!=="true")continue;const f=Rg(c);for(const h of f){if(!h||n.has(h))continue;n.add(h);const m=r.getElementById(h);if(m){const E=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";if(E&&MA(E)&&!b&&(m===t||m.contains(t)||o(m)))return!0}}}return!1};return o(e)}function Dg(e,t){const n=Gf(e),r=new Set,o=u=>{const a=u.querySelectorAll("[aria-controls]");for(const c of a){if(c.getAttribute("aria-expanded")!=="true")continue;const f=Rg(c);for(const h of f){if(!h||r.has(h))continue;r.add(h);const m=n.getElementById(h);if(m){const E=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";E&&Qf.has(E)&&!b&&(t(m),o(m))}}}};o(e)}function FA(e){const t=new Set;return Dg(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function BA(e){const t=e.getAttribute("role");return!!(t&&Qf.has(t))}function UA(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function HA(e){var t;return UA(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function zA(e){if(!e.id)return!1;const t=Gf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&BA(e))}var Xf=()=>typeof document!="undefined";function jA(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Jf=e=>Xf()&&e.test(jA()),$A=e=>Xf()&&e.test(navigator.vendor),Mg=()=>Xf()&&!!navigator.maxTouchPoints,VA=()=>Jf(/^iPhone/i),qA=()=>Jf(/^iPad/i)||Zf()&&navigator.maxTouchPoints>1,Fg=()=>VA()||qA(),YA=()=>Zf()||Fg(),Zf=()=>Jf(/^Mac/i),WA=()=>YA()&&$A(/apple/i);function GA(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 Br(e){var n;const t=GA(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var KA=e=>e.button===0,QA=e=>e.button===2||Zf()&&e.ctrlKey&&e.button===0,tr=(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)}},Bg=e=>Ht(e)&&e.tagName==="IFRAME",XA=/^(audio|video|details)$/;function Ug(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var JA=e=>!Number.isNaN(Ug(e)),ZA=e=>Ug(e)<0;function ev(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 Hg(e,t,n){const r=[...e],o=[...e],u=new Set,a=new Map;e.forEach((f,h)=>a.set(f,h));let c=0;for(;c<o.length;){const f=o[c++];if(!f||u.has(f))continue;u.add(f);const h=ev(f,t);if(h){const m=Array.from(h.querySelectorAll($a)).filter(n),E=a.get(f);if(E!==void 0){const b=E+1;r.splice(b,0,...m),m.forEach((T,_)=>{a.set(T,b+_)});for(let T=b+m.length;T<r.length;T++)a.set(r[T],T)}else{const b=r.length;r.push(...m),m.forEach((T,_)=>{a.set(T,b+_)})}o.push(...m)}}return r}var $a="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",zg=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll($a));(n==!0||n=="if-empty"&&o.length===0)&&Ht(e)&&Ur(e)&&o.unshift(e);const a=[];for(const c of o)if(Ur(c)){if(Bg(c)&&c.contentDocument){const f=c.contentDocument.body;a.push(...zg(f,{getShadowRoot:r}));continue}a.push(c)}return r?Hg(a,r,Ur):a};function Ur(e){return!Ht(e)||e.closest("[inert]")?!1:e.matches($a)&&IA(e)}function jo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll($a));n&&Ui(e)&&o.unshift(e);const u=[];for(const a of o)if(Ui(a)){if(Bg(a)&&a.contentDocument){const c=a.contentDocument.body;u.push(...jo(c,{getShadowRoot:r}));continue}u.push(a)}if(r){const a=Hg(u,r,Ui);return!a.length&&n?o:a}return!u.length&&n?o:u}function Ui(e){return Ht(e)&&e.tabIndex>0?!0:Ur(e)&&!ZA(e)}function tv(e,t={}){const n=jo(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function nv(e,t={}){const{current:n,getShadowRoot:r}=t,o=jo(e,{getShadowRoot:r}),u=(e==null?void 0:e.ownerDocument)||document,a=n!=null?n:ws(u);if(!a)return null;const c=o.indexOf(a);return o[c+1]||null}function $o(e){return e.tabIndex<0&&(XA.test(e.localName)||RA(e))&&!JA(e)?0:e.tabIndex}function jg(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let u=null;if(u||(u=typeof n=="function"?n():n),u||(u=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!u){const a=jo(t);u=r?a.filter(r)[0]:a[0]}return u||t||void 0}var rv=class lx{constructor(){Wf(this,"id",null),Wf(this,"fn_cleanup"),Wf(this,"cleanup",()=>{this.cancel()})}static create(){return new lx}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 gn(e){const t=rv.create();return t.request(e),t.cleanup}function iv(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 ed(e){const t=DA(e);return kA(t)?Er(t).body:Ht(t)&&uv(t)?t:ed(t)}var sv=/auto|scroll|overlay|hidden|clip/,ov=new Set(["inline","contents"]);function uv(e){const t=Ss(e),{overflow:n,overflowX:r,overflowY:o,display:u}=t.getComputedStyle(e);return sv.test(n+o+r)&&!ov.has(u)}function av(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:u}=t,a=(e==null?void 0:e.ownerDocument)||document,c=a.body;function f(h){if(h.key!=="Tab")return;let m=null;const[E,b]=tv(e,{includeContainer:!0,getShadowRoot:u}),T=nv(c,{current:n,getShadowRoot:u}),_=!E&&!b;h.shiftKey&&zo(T)?(o==null||o(),m=b):h.shiftKey&&(zo(E)||_)?m=n:!h.shiftKey&&zo(n)?(o==null||o(),m=E):!h.shiftKey&&(zo(b)||_)&&(m=T),m&&(h.preventDefault(),typeof r=="function"?r(m):m.focus())}return tr(a,"keydown",f,!0)}function lv(e,t){const c=t,{defer:n,triggerElement:r}=c,o=Yt(c,["defer","triggerElement"]),u=n?gn:f=>f(),a=[];return a.push(u(()=>{const f=typeof e=="function"?e():e,h=typeof r=="function"?r():r;a.push(av(f,U({triggerElement:h},o)))})),()=>{a.forEach(f=>f==null?void 0:f())}}function Va(e,t){if(!e)return Ig;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 cv(e,t,n){if(!e)return Ig;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 fv(e,t,n){const{signal:r}=t;return[new Promise((a,c)=>{const f=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(f),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(f),a(h))}).catch(h=>{r.aborted||(clearTimeout(f),c(h))})}),()=>t.abort()]}function dv(e,t){const{timeout:n,rootNode:r}=t,o=Ss(r),u=Er(r),a=new o.AbortController;return fv(new Promise(c=>{const f=e();if(f){c(f);return}const h=new o.MutationObserver(()=>{const m=e();m&&m.isConnected&&(h.disconnect(),c(m))});h.observe(u.body,{childList:!0,subtree:!0})}),a,n)}var hv=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),pv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,$g=e=>{const t={};let n;for(;n=pv.exec(e);)t[n[1]]=n[2];return t},mv=(e,t)=>{if(Ba(e)){if(Ba(t))return`${e};${t}`;e=$g(e)}else Ba(t)&&(t=$g(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function nr(...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]=Vf(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=hv(t[o],n[o]);continue}if(o==="style"){t[o]=mv(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 LF(e){return e}var Cs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Cs||{}),td="__init__";function gv(e){const t=()=>{var a,c;return(c=(a=e.getRootNode)==null?void 0:a.call(e))!=null?c:document},n=()=>Er(t()),r=()=>{var a;return(a=n().defaultView)!=null?a:window},o=()=>ws(t()),u=a=>t().getElementById(a);return Te(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:zo,getById:u})}var nd={exports:{}},En={},rd={exports:{}},id={};var Vg;function Ev(){return Vg||(Vg=1,function(e){function t($,te){var w=$.length;$.push(te);e:for(;0<w;){var R=w-1>>>1,K=$[R];if(0<o(K,te))$[R]=te,$[w]=K,w=R;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var te=$[0],w=$.pop();if(w!==te){$[0]=w;e:for(var R=0,K=$.length,k=K>>>1;R<k;){var _e=2*(R+1)-1,Ue=$[_e],ie=_e+1,xe=$[ie];if(0>o(Ue,w))ie<K&&0>o(xe,Ue)?($[R]=xe,$[ie]=w,R=ie):($[R]=Ue,$[_e]=w,R=_e);else if(ie<K&&0>o(xe,w))$[R]=xe,$[ie]=w,R=ie;else break e}}return te}function o($,te){var w=$.sortIndex-te.sortIndex;return w!==0?w:$.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var f=[],h=[],m=1,E=null,b=3,T=!1,_=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L($){for(var te=n(h);te!==null;){if(te.callback===null)r(h);else if(te.startTime<=$)r(h),te.sortIndex=te.expirationTime,t(f,te);else break;te=n(h)}}function q($){if(S=!1,L($),!_)if(n(f)!==null)_=!0,Ce(X);else{var te=n(h);te!==null&&oe(q,te.startTime-$)}}function X($,te){_=!1,S&&(S=!1,I(be),be=-1),T=!0;var w=b;try{for(L(te),E=n(f);E!==null&&(!(E.expirationTime>te)||$&&!ae());){var R=E.callback;if(typeof R=="function"){E.callback=null,b=E.priorityLevel;var K=R(E.expirationTime<=te);te=e.unstable_now(),typeof K=="function"?E.callback=K:E===n(f)&&r(f),L(te)}else r(f);E=n(f)}if(E!==null)var k=!0;else{var _e=n(h);_e!==null&&oe(q,_e.startTime-te),k=!1}return k}finally{E=null,b=w,T=!1}}var F=!1,ee=null,be=-1,we=5,H=-1;function ae(){return!(e.unstable_now()-H<we)}function he(){if(ee!==null){var $=e.unstable_now();H=$;var te=!0;try{te=ee(!0,$)}finally{te?fe():(F=!1,ee=null)}}else F=!1}var fe;if(typeof B=="function")fe=function(){B(he)};else if(typeof MessageChannel!="undefined"){var de=new MessageChannel,ye=de.port2;de.port1.onmessage=he,fe=function(){ye.postMessage(null)}}else fe=function(){C(he,0)};function Ce($){ee=$,F||(F=!0,fe())}function oe($,te){be=C(function(){$(e.unstable_now())},te)}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($){$.callback=null},e.unstable_continueExecution=function(){_||T||(_=!0,Ce(X))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):we=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function($){switch(b){case 1:case 2:case 3:var te=3;break;default:te=b}var w=b;b=te;try{return $()}finally{b=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,te){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var w=b;b=$;try{return te()}finally{b=w}},e.unstable_scheduleCallback=function($,te,w){var R=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?R+w:R):w=R,$){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=w+K,$={id:m++,callback:te,priorityLevel:$,startTime:w,expirationTime:K,sortIndex:-1},w>R?($.sortIndex=w,t(h,$),n(f)===null&&$===n(h)&&(S?(I(be),be=-1):S=!0,oe(q,w-R))):($.sortIndex=K,t(f,$),_||T||(_=!0,Ce(X))),$},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function($){var te=b;return function(){var w=b;b=te;try{return $.apply(this,arguments)}finally{b=w}}}}(id)),id}var qg;function yv(){return qg||(qg=1,rd.exports=Ev()),rd.exports}var Yg;function Tv(){if(Yg)return En;Yg=1;var e=ls(),t=yv();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 u(i,s){a(i,s),a(i+"Capture",s)}function a(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"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},E={};function b(i){return f.call(E,i)?!0:f.call(m,i)?!1:h.test(i)?E[i]=!0:(m[i]=!0,!1)}function T(i,s,l,d){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return d?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,s,l,d){if(s===null||typeof s=="undefined"||T(i,s,l,d))return!0;if(d)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,d,g,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){C[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];C[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){C[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){C[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){C[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){C[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){C[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){C[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){C[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var I=/[\-:]([a-z])/g;function B(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(I,B);C[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(I,B);C[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(I,B);C[s]=new S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){C[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){C[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function L(i,s,l,d){var g=C.hasOwnProperty(s)?C[s]:null;(g!==null?g.type!==0:d||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,g,d)&&(l=null),d||g===null?b(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):g.mustUseProperty?i[g.propertyName]=l===null?g.type===3?!1:"":l:(s=g.attributeName,d=g.attributeNamespace,l===null?i.removeAttribute(s):(g=g.type,l=g===3||g===4&&l===!0?"":""+l,d?i.setAttributeNS(d,s,l):i.setAttribute(s,l))))}var q=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),F=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),be=Symbol.for("react.strict_mode"),we=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),ae=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),ye=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),$=Symbol.iterator;function te(i){return i===null||typeof i!="object"?null:(i=$&&i[$]||i["@@iterator"],typeof i=="function"?i:null)}var w=Object.assign,R;function K(i){if(R===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);R=s&&s[1]||""}return`
8
+ `+R+i}var k=!1;function _e(i,s){if(!i||k)return"";k=!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(Y){var d=Y}Reflect.construct(i,[],s)}else{try{s.call()}catch(Y){d=Y}i.call(s.prototype)}else{try{throw Error()}catch(Y){d=Y}i()}}catch(Y){if(Y&&d&&typeof Y.stack=="string"){for(var g=Y.stack.split(`
9
+ `),y=d.stack.split(`
10
+ `),x=g.length-1,N=y.length-1;1<=x&&0<=N&&g[x]!==y[N];)N--;for(;1<=x&&0<=N;x--,N--)if(g[x]!==y[N]){if(x!==1||N!==1)do if(x--,N--,0>N||g[x]!==y[N]){var D=`
11
+ `+g[x].replace(" at new "," at ");return i.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",i.displayName)),D}while(1<=x&&0<=N);break}}}finally{k=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?K(i):""}function Ue(i){switch(i.tag){case 5:return K(i.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function ie(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 ee:return"Fragment";case F:return"Portal";case we:return"Profiler";case be:return"StrictMode";case fe:return"Suspense";case de:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ae:return(i.displayName||"Context")+".Consumer";case H:return(i._context.displayName||"Context")+".Provider";case he:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ye:return s=i.displayName||null,s!==null?s:ie(i.type)||"Memo";case Ce:s=i._payload,i=i._init;try{return ie(i(s))}catch(l){}}return null}function xe(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 ie(s);case 8:return s===be?"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 Ne(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Fe(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Ye(i){var s=Fe(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),d=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var g=l.get,y=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){d=""+x,y.call(this,x)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return d},setValue:function(x){d=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Pt(i){i._valueTracker||(i._valueTracker=Ye(i))}function tn(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),d="";return i&&(d=Fe(i)?i.checked?"true":"false":i.value),i=d,i!==l?(s.setValue(i),!0):!1}function gt(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 _n(i,s){var l=s.checked;return w({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function bt(i,s){var l=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;l=Ne(s.value!=null?s.value:l),i._wrapperState={initialChecked:d,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Lt(i,s){s=s.checked,s!=null&&L(i,"checked",s,!1)}function Js(i,s){Lt(i,s);var l=Ne(s.value),d=s.type;if(l!=null)d==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(d==="submit"||d==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Zs(i,s.type,l):s.hasOwnProperty("defaultValue")&&Zs(i,s.type,Ne(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Dl(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var d=s.type;if(!(d!=="submit"&&d!=="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 Zs(i,s,l){(s!=="number"||gt(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var ci=Array.isArray;function fi(i,s,l,d){if(i=i.options,s){s={};for(var g=0;g<l.length;g++)s["$"+l[g]]=!0;for(l=0;l<i.length;l++)g=s.hasOwnProperty("$"+i[l].value),i[l].selected!==g&&(i[l].selected=g),g&&d&&(i[l].defaultSelected=!0)}else{for(l=""+Ne(l),s=null,g=0;g<i.length;g++){if(i[g].value===l){i[g].selected=!0,d&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function Su(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return w({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Ml(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(ci(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ne(l)}}function Fl(i,s){var l=Ne(s.value),d=Ne(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),d!=null&&(i.defaultValue=""+d)}function Bl(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function J(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ee(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?J(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var He,We=function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,d,g){MSApp.execUnsafeLocalFunction(function(){return i(s,l,d,g)})}:i}(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(He=He||document.createElement("div"),He.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=He.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Je(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Wt={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},qr=["Webkit","ms","Moz","O"];Object.keys(Wt).forEach(function(i){qr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Wt[s]=Wt[i]})});function Vn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Wt.hasOwnProperty(i)&&Wt[i]?(""+s).trim():s+"px"}function di(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var d=l.indexOf("--")===0,g=Vn(l,s[l],d);l==="float"&&(l="cssFloat"),d?i.setProperty(l,g):i[l]=g}}var Ki=w({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 Gt(i,s){if(s){if(Ki[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 vr(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 Rn=null;function $h(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Vh=null,eo=null,to=null;function xb(i){if(i=qu(i)){if(typeof Vh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=uc(s),Vh(i.stateNode,i.type,s))}}function Sb(i){eo?to?to.push(i):to=[i]:eo=i}function wb(){if(eo){var i=eo,s=to;if(to=eo=null,xb(i),s)for(i=0;i<s.length;i++)xb(s[i])}}function Cb(i,s){return i(s)}function Ab(){}var qh=!1;function vb(i,s,l){if(qh)return i(s,l);qh=!0;try{return Cb(i,s,l)}finally{qh=!1,(eo!==null||to!==null)&&(Ab(),wb())}}function wu(i,s){var l=i.stateNode;if(l===null)return null;var d=uc(l);if(d===null)return null;l=d[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":(d=!d.disabled)||(i=i.type,d=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!d;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var Yh=!1;if(c)try{var Cu={};Object.defineProperty(Cu,"passive",{get:function(){Yh=!0}}),window.addEventListener("test",Cu,Cu),window.removeEventListener("test",Cu,Cu)}catch(i){Yh=!1}function X5(i,s,l,d,g,y,x,N,D){var Y=Array.prototype.slice.call(arguments,3);try{s.apply(l,Y)}catch(se){this.onError(se)}}var Au=!1,Ul=null,Hl=!1,Wh=null,J5={onError:function(i){Au=!0,Ul=i}};function Z5(i,s,l,d,g,y,x,N,D){Au=!1,Ul=null,X5.apply(J5,arguments)}function e8(i,s,l,d,g,y,x,N,D){if(Z5.apply(this,arguments),Au){if(Au){var Y=Ul;Au=!1,Ul=null}else throw Error(n(198));Hl||(Hl=!0,Wh=Y)}}function Qi(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 kb(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 Nb(i){if(Qi(i)!==i)throw Error(n(188))}function t8(i){var s=i.alternate;if(!s){if(s=Qi(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,d=s;;){var g=l.return;if(g===null)break;var y=g.alternate;if(y===null){if(d=g.return,d!==null){l=d;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===l)return Nb(g),i;if(y===d)return Nb(g),s;y=y.sibling}throw Error(n(188))}if(l.return!==d.return)l=g,d=y;else{for(var x=!1,N=g.child;N;){if(N===l){x=!0,l=g,d=y;break}if(N===d){x=!0,d=g,l=y;break}N=N.sibling}if(!x){for(N=y.child;N;){if(N===l){x=!0,l=y,d=g;break}if(N===d){x=!0,d=y,l=g;break}N=N.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==d)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function Ob(i){return i=t8(i),i!==null?Ib(i):null}function Ib(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Ib(i);if(s!==null)return s;i=i.sibling}return null}var Pb=t.unstable_scheduleCallback,Rb=t.unstable_cancelCallback,n8=t.unstable_shouldYield,r8=t.unstable_requestPaint,vt=t.unstable_now,i8=t.unstable_getCurrentPriorityLevel,Gh=t.unstable_ImmediatePriority,Lb=t.unstable_UserBlockingPriority,zl=t.unstable_NormalPriority,s8=t.unstable_LowPriority,Db=t.unstable_IdlePriority,jl=null,kr=null;function o8(i){if(kr&&typeof kr.onCommitFiberRoot=="function")try{kr.onCommitFiberRoot(jl,i,void 0,(i.current.flags&128)===128)}catch(s){}}var ur=Math.clz32?Math.clz32:l8,u8=Math.log,a8=Math.LN2;function l8(i){return i>>>=0,i===0?32:31-(u8(i)/a8|0)|0}var $l=64,Vl=4194304;function vu(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 ql(i,s){var l=i.pendingLanes;if(l===0)return 0;var d=0,g=i.suspendedLanes,y=i.pingedLanes,x=l&268435455;if(x!==0){var N=x&~g;N!==0?d=vu(N):(y&=x,y!==0&&(d=vu(y)))}else x=l&~g,x!==0?d=vu(x):y!==0&&(d=vu(y));if(d===0)return 0;if(s!==0&&s!==d&&(s&g)===0&&(g=d&-d,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((d&4)!==0&&(d|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=d;0<s;)l=31-ur(s),g=1<<l,d|=i[l],s&=~g;return d}function c8(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 f8(i,s){for(var l=i.suspendedLanes,d=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var x=31-ur(y),N=1<<x,D=g[x];D===-1?((N&l)===0||(N&d)!==0)&&(g[x]=c8(N,s)):D<=s&&(i.expiredLanes|=N),y&=~N}}function Kh(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Mb(){var i=$l;return $l<<=1,($l&4194240)===0&&($l=64),i}function Qh(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function ku(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-ur(s),i[s]=l}function d8(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 d=i.eventTimes;for(i=i.expirationTimes;0<l;){var g=31-ur(l),y=1<<g;s[g]=0,d[g]=-1,i[g]=-1,l&=~y}}function Xh(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var d=31-ur(l),g=1<<d;g&s|i[d]&s&&(i[d]|=s),l&=~g}}var rt=0;function Fb(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Bb,Jh,Ub,Hb,zb,Zh=!1,Yl=[],hi=null,pi=null,mi=null,Nu=new Map,Ou=new Map,gi=[],h8="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 jb(i,s){switch(i){case"focusin":case"focusout":hi=null;break;case"dragenter":case"dragleave":pi=null;break;case"mouseover":case"mouseout":mi=null;break;case"pointerover":case"pointerout":Nu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ou.delete(s.pointerId)}}function Iu(i,s,l,d,g,y){return i===null||i.nativeEvent!==y?(i={blockedOn:s,domEventName:l,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},s!==null&&(s=qu(s),s!==null&&Jh(s)),i):(i.eventSystemFlags|=d,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function p8(i,s,l,d,g){switch(s){case"focusin":return hi=Iu(hi,i,s,l,d,g),!0;case"dragenter":return pi=Iu(pi,i,s,l,d,g),!0;case"mouseover":return mi=Iu(mi,i,s,l,d,g),!0;case"pointerover":var y=g.pointerId;return Nu.set(y,Iu(Nu.get(y)||null,i,s,l,d,g)),!0;case"gotpointercapture":return y=g.pointerId,Ou.set(y,Iu(Ou.get(y)||null,i,s,l,d,g)),!0}return!1}function $b(i){var s=Xi(i.target);if(s!==null){var l=Qi(s);if(l!==null){if(s=l.tag,s===13){if(s=kb(l),s!==null){i.blockedOn=s,zb(i.priority,function(){Ub(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 Wl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=tp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var d=new l.constructor(l.type,l);Rn=d,l.target.dispatchEvent(d),Rn=null}else return s=qu(l),s!==null&&Jh(s),i.blockedOn=l,!1;s.shift()}return!0}function Vb(i,s,l){Wl(i)&&l.delete(s)}function m8(){Zh=!1,hi!==null&&Wl(hi)&&(hi=null),pi!==null&&Wl(pi)&&(pi=null),mi!==null&&Wl(mi)&&(mi=null),Nu.forEach(Vb),Ou.forEach(Vb)}function Pu(i,s){i.blockedOn===s&&(i.blockedOn=null,Zh||(Zh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,m8)))}function Ru(i){function s(g){return Pu(g,i)}if(0<Yl.length){Pu(Yl[0],i);for(var l=1;l<Yl.length;l++){var d=Yl[l];d.blockedOn===i&&(d.blockedOn=null)}}for(hi!==null&&Pu(hi,i),pi!==null&&Pu(pi,i),mi!==null&&Pu(mi,i),Nu.forEach(s),Ou.forEach(s),l=0;l<gi.length;l++)d=gi[l],d.blockedOn===i&&(d.blockedOn=null);for(;0<gi.length&&(l=gi[0],l.blockedOn===null);)$b(l),l.blockedOn===null&&gi.shift()}var no=q.ReactCurrentBatchConfig,Gl=!0;function g8(i,s,l,d){var g=rt,y=no.transition;no.transition=null;try{rt=1,ep(i,s,l,d)}finally{rt=g,no.transition=y}}function E8(i,s,l,d){var g=rt,y=no.transition;no.transition=null;try{rt=4,ep(i,s,l,d)}finally{rt=g,no.transition=y}}function ep(i,s,l,d){if(Gl){var g=tp(i,s,l,d);if(g===null)yp(i,s,d,Kl,l),jb(i,d);else if(p8(g,i,s,l,d))d.stopPropagation();else if(jb(i,d),s&4&&-1<h8.indexOf(i)){for(;g!==null;){var y=qu(g);if(y!==null&&Bb(y),y=tp(i,s,l,d),y===null&&yp(i,s,d,Kl,l),y===g)break;g=y}g!==null&&d.stopPropagation()}else yp(i,s,d,null,l)}}var Kl=null;function tp(i,s,l,d){if(Kl=null,i=$h(d),i=Xi(i),i!==null)if(s=Qi(i),s===null)i=null;else if(l=s.tag,l===13){if(i=kb(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 Kl=i,null}function qb(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(i8()){case Gh:return 1;case Lb:return 4;case zl:case s8:return 16;case Db:return 536870912;default:return 16}default:return 16}}var Ei=null,np=null,Ql=null;function Yb(){if(Ql)return Ql;var i,s=np,l=s.length,d,g="value"in Ei?Ei.value:Ei.textContent,y=g.length;for(i=0;i<l&&s[i]===g[i];i++);var x=l-i;for(d=1;d<=x&&s[l-d]===g[y-d];d++);return Ql=g.slice(i,1<d?1-d:void 0)}function Xl(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 Jl(){return!0}function Wb(){return!1}function Ln(i){function s(l,d,g,y,x){this._reactName=l,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var N in i)i.hasOwnProperty(N)&&(l=i[N],this[N]=l?l(y):y[N]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Jl:Wb,this.isPropagationStopped=Wb,this}return w(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=Jl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Jl)},persist:function(){},isPersistent:Jl}),s}var ro={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rp=Ln(ro),Lu=w({},ro,{view:0,detail:0}),y8=Ln(Lu),ip,sp,Du,Zl=w({},Lu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:up,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!==Du&&(Du&&i.type==="mousemove"?(ip=i.screenX-Du.screenX,sp=i.screenY-Du.screenY):sp=ip=0,Du=i),ip)},movementY:function(i){return"movementY"in i?i.movementY:sp}}),Gb=Ln(Zl),T8=w({},Zl,{dataTransfer:0}),b8=Ln(T8),_8=w({},Lu,{relatedTarget:0}),op=Ln(_8),x8=w({},ro,{animationName:0,elapsedTime:0,pseudoElement:0}),S8=Ln(x8),w8=w({},ro,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),C8=Ln(w8),A8=w({},ro,{data:0}),Kb=Ln(A8),v8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},k8={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"},N8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function O8(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=N8[i])?!!s[i]:!1}function up(){return O8}var I8=w({},Lu,{key:function(i){if(i.key){var s=v8[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Xl(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?k8[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:up,charCode:function(i){return i.type==="keypress"?Xl(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Xl(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),P8=Ln(I8),R8=w({},Zl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qb=Ln(R8),L8=w({},Lu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:up}),D8=Ln(L8),M8=w({},ro,{propertyName:0,elapsedTime:0,pseudoElement:0}),F8=Ln(M8),B8=w({},Zl,{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}),U8=Ln(B8),H8=[9,13,27,32],ap=c&&"CompositionEvent"in window,Mu=null;c&&"documentMode"in document&&(Mu=document.documentMode);var z8=c&&"TextEvent"in window&&!Mu,Xb=c&&(!ap||Mu&&8<Mu&&11>=Mu),Jb=" ",Zb=!1;function e_(i,s){switch(i){case"keyup":return H8.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function t_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var io=!1;function j8(i,s){switch(i){case"compositionend":return t_(s);case"keypress":return s.which!==32?null:(Zb=!0,Jb);case"textInput":return i=s.data,i===Jb&&Zb?null:i;default:return null}}function $8(i,s){if(io)return i==="compositionend"||!ap&&e_(i,s)?(i=Yb(),Ql=np=Ei=null,io=!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 Xb&&s.locale!=="ko"?null:s.data;default:return null}}var V8={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 n_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!V8[i.type]:s==="textarea"}function r_(i,s,l,d){Sb(d),s=ic(s,"onChange"),0<s.length&&(l=new rp("onChange","change",null,l,d),i.push({event:l,listeners:s}))}var Fu=null,Bu=null;function q8(i){__(i,0)}function ec(i){var s=lo(i);if(tn(s))return i}function Y8(i,s){if(i==="change")return s}var i_=!1;if(c){var lp;if(c){var cp="oninput"in document;if(!cp){var s_=document.createElement("div");s_.setAttribute("oninput","return;"),cp=typeof s_.oninput=="function"}lp=cp}else lp=!1;i_=lp&&(!document.documentMode||9<document.documentMode)}function o_(){Fu&&(Fu.detachEvent("onpropertychange",u_),Bu=Fu=null)}function u_(i){if(i.propertyName==="value"&&ec(Bu)){var s=[];r_(s,Bu,i,$h(i)),vb(q8,s)}}function W8(i,s,l){i==="focusin"?(o_(),Fu=s,Bu=l,Fu.attachEvent("onpropertychange",u_)):i==="focusout"&&o_()}function G8(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return ec(Bu)}function K8(i,s){if(i==="click")return ec(s)}function Q8(i,s){if(i==="input"||i==="change")return ec(s)}function X8(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var ar=typeof Object.is=="function"?Object.is:X8;function Uu(i,s){if(ar(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),d=Object.keys(s);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var g=l[d];if(!f.call(s,g)||!ar(i[g],s[g]))return!1}return!0}function a_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function l_(i,s){var l=a_(i);i=0;for(var d;l;){if(l.nodeType===3){if(d=i+l.textContent.length,i<=s&&d>=s)return{node:l,offset:s-i};i=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=a_(l)}}function c_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?c_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function f_(){for(var i=window,s=gt();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(d){l=!1}if(l)i=s.contentWindow;else break;s=gt(i.document)}return s}function fp(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 J8(i){var s=f_(),l=i.focusedElem,d=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&c_(l.ownerDocument.documentElement,l)){if(d!==null&&fp(l)){if(s=d.start,i=d.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=l.textContent.length,y=Math.min(d.start,g);d=d.end===void 0?y:Math.min(d.end,g),!i.extend&&y>d&&(g=d,d=y,y=g),g=l_(l,y);var x=l_(l,d);g&&x&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),y>d?(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 Z8=c&&"documentMode"in document&&11>=document.documentMode,so=null,dp=null,Hu=null,hp=!1;function d_(i,s,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;hp||so==null||so!==gt(d)||(d=so,"selectionStart"in d&&fp(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Hu&&Uu(Hu,d)||(Hu=d,d=ic(dp,"onSelect"),0<d.length&&(s=new rp("onSelect","select",null,s,l),i.push({event:s,listeners:d}),s.target=so)))}function tc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var oo={animationend:tc("Animation","AnimationEnd"),animationiteration:tc("Animation","AnimationIteration"),animationstart:tc("Animation","AnimationStart"),transitionend:tc("Transition","TransitionEnd")},pp={},h_={};c&&(h_=document.createElement("div").style,"AnimationEvent"in window||(delete oo.animationend.animation,delete oo.animationiteration.animation,delete oo.animationstart.animation),"TransitionEvent"in window||delete oo.transitionend.transition);function nc(i){if(pp[i])return pp[i];if(!oo[i])return i;var s=oo[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in h_)return pp[i]=s[l];return i}var p_=nc("animationend"),m_=nc("animationiteration"),g_=nc("animationstart"),E_=nc("transitionend"),y_=new Map,T_="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 yi(i,s){y_.set(i,s),u(s,[i])}for(var mp=0;mp<T_.length;mp++){var gp=T_[mp],eM=gp.toLowerCase(),tM=gp[0].toUpperCase()+gp.slice(1);yi(eM,"on"+tM)}yi(p_,"onAnimationEnd"),yi(m_,"onAnimationIteration"),yi(g_,"onAnimationStart"),yi("dblclick","onDoubleClick"),yi("focusin","onFocus"),yi("focusout","onBlur"),yi(E_,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zu="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(" "),nM=new Set("cancel close invalid load scroll toggle".split(" ").concat(zu));function b_(i,s,l){var d=i.type||"unknown-event";i.currentTarget=l,e8(d,s,void 0,i),i.currentTarget=null}function __(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var d=i[l],g=d.event;d=d.listeners;e:{var y=void 0;if(s)for(var x=d.length-1;0<=x;x--){var N=d[x],D=N.instance,Y=N.currentTarget;if(N=N.listener,D!==y&&g.isPropagationStopped())break e;b_(g,N,Y),y=D}else for(x=0;x<d.length;x++){if(N=d[x],D=N.instance,Y=N.currentTarget,N=N.listener,D!==y&&g.isPropagationStopped())break e;b_(g,N,Y),y=D}}}if(Hl)throw i=Wh,Hl=!1,Wh=null,i}function lt(i,s){var l=s[wp];l===void 0&&(l=s[wp]=new Set);var d=i+"__bubble";l.has(d)||(x_(s,i,2,!1),l.add(d))}function Ep(i,s,l){var d=0;s&&(d|=4),x_(l,i,d,s)}var rc="_reactListening"+Math.random().toString(36).slice(2);function ju(i){if(!i[rc]){i[rc]=!0,r.forEach(function(l){l!=="selectionchange"&&(nM.has(l)||Ep(l,!1,i),Ep(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[rc]||(s[rc]=!0,Ep("selectionchange",!1,s))}}function x_(i,s,l,d){switch(qb(s)){case 1:var g=g8;break;case 4:g=E8;break;default:g=ep}l=g.bind(null,s,l,i),g=void 0,!Yh||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?i.addEventListener(s,l,{capture:!0,passive:g}):i.addEventListener(s,l,!0):g!==void 0?i.addEventListener(s,l,{passive:g}):i.addEventListener(s,l,!1)}function yp(i,s,l,d,g){var y=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var x=d.tag;if(x===3||x===4){var N=d.stateNode.containerInfo;if(N===g||N.nodeType===8&&N.parentNode===g)break;if(x===4)for(x=d.return;x!==null;){var D=x.tag;if((D===3||D===4)&&(D=x.stateNode.containerInfo,D===g||D.nodeType===8&&D.parentNode===g))return;x=x.return}for(;N!==null;){if(x=Xi(N),x===null)return;if(D=x.tag,D===5||D===6){d=y=x;continue e}N=N.parentNode}}d=d.return}vb(function(){var Y=y,se=$h(l),ce=[];e:{var ne=y_.get(i);if(ne!==void 0){var Se=rp,ve=i;switch(i){case"keypress":if(Xl(l)===0)break e;case"keydown":case"keyup":Se=P8;break;case"focusin":ve="focus",Se=op;break;case"focusout":ve="blur",Se=op;break;case"beforeblur":case"afterblur":Se=op;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":Se=Gb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Se=b8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Se=D8;break;case p_:case m_:case g_:Se=S8;break;case E_:Se=F8;break;case"scroll":Se=y8;break;case"wheel":Se=U8;break;case"copy":case"cut":case"paste":Se=C8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Se=Qb}var ke=(s&4)!==0,kt=!ke&&i==="scroll",z=ke?ne!==null?ne+"Capture":null:ne;ke=[];for(var M=Y,V;M!==null;){V=M;var ge=V.stateNode;if(V.tag===5&&ge!==null&&(V=ge,z!==null&&(ge=wu(M,z),ge!=null&&ke.push($u(M,ge,V)))),kt)break;M=M.return}0<ke.length&&(ne=new Se(ne,ve,null,l,se),ce.push({event:ne,listeners:ke}))}}if((s&7)===0){e:{if(ne=i==="mouseover"||i==="pointerover",Se=i==="mouseout"||i==="pointerout",ne&&l!==Rn&&(ve=l.relatedTarget||l.fromElement)&&(Xi(ve)||ve[Yr]))break e;if((Se||ne)&&(ne=se.window===se?se:(ne=se.ownerDocument)?ne.defaultView||ne.parentWindow:window,Se?(ve=l.relatedTarget||l.toElement,Se=Y,ve=ve?Xi(ve):null,ve!==null&&(kt=Qi(ve),ve!==kt||ve.tag!==5&&ve.tag!==6)&&(ve=null)):(Se=null,ve=Y),Se!==ve)){if(ke=Gb,ge="onMouseLeave",z="onMouseEnter",M="mouse",(i==="pointerout"||i==="pointerover")&&(ke=Qb,ge="onPointerLeave",z="onPointerEnter",M="pointer"),kt=Se==null?ne:lo(Se),V=ve==null?ne:lo(ve),ne=new ke(ge,M+"leave",Se,l,se),ne.target=kt,ne.relatedTarget=V,ge=null,Xi(se)===Y&&(ke=new ke(z,M+"enter",ve,l,se),ke.target=V,ke.relatedTarget=kt,ge=ke),kt=ge,Se&&ve)t:{for(ke=Se,z=ve,M=0,V=ke;V;V=uo(V))M++;for(V=0,ge=z;ge;ge=uo(ge))V++;for(;0<M-V;)ke=uo(ke),M--;for(;0<V-M;)z=uo(z),V--;for(;M--;){if(ke===z||z!==null&&ke===z.alternate)break t;ke=uo(ke),z=uo(z)}ke=null}else ke=null;Se!==null&&S_(ce,ne,Se,ke,!1),ve!==null&&kt!==null&&S_(ce,kt,ve,ke,!0)}}e:{if(ne=Y?lo(Y):window,Se=ne.nodeName&&ne.nodeName.toLowerCase(),Se==="select"||Se==="input"&&ne.type==="file")var Oe=Y8;else if(n_(ne))if(i_)Oe=Q8;else{Oe=G8;var Le=W8}else(Se=ne.nodeName)&&Se.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(Oe=K8);if(Oe&&(Oe=Oe(i,Y))){r_(ce,Oe,l,se);break e}Le&&Le(i,ne,Y),i==="focusout"&&(Le=ne._wrapperState)&&Le.controlled&&ne.type==="number"&&Zs(ne,"number",ne.value)}switch(Le=Y?lo(Y):window,i){case"focusin":(n_(Le)||Le.contentEditable==="true")&&(so=Le,dp=Y,Hu=null);break;case"focusout":Hu=dp=so=null;break;case"mousedown":hp=!0;break;case"contextmenu":case"mouseup":case"dragend":hp=!1,d_(ce,l,se);break;case"selectionchange":if(Z8)break;case"keydown":case"keyup":d_(ce,l,se)}var De;if(ap)e:{switch(i){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else io?e_(i,l)&&(ze="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&(Xb&&l.locale!=="ko"&&(io||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&io&&(De=Yb()):(Ei=se,np="value"in Ei?Ei.value:Ei.textContent,io=!0)),Le=ic(Y,ze),0<Le.length&&(ze=new Kb(ze,i,null,l,se),ce.push({event:ze,listeners:Le}),De?ze.data=De:(De=t_(l),De!==null&&(ze.data=De)))),(De=z8?j8(i,l):$8(i,l))&&(Y=ic(Y,"onBeforeInput"),0<Y.length&&(se=new Kb("onBeforeInput","beforeinput",null,l,se),ce.push({event:se,listeners:Y}),se.data=De))}__(ce,s)})}function $u(i,s,l){return{instance:i,listener:s,currentTarget:l}}function ic(i,s){for(var l=s+"Capture",d=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=wu(i,l),y!=null&&d.unshift($u(i,y,g)),y=wu(i,s),y!=null&&d.push($u(i,y,g))),i=i.return}return d}function uo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function S_(i,s,l,d,g){for(var y=s._reactName,x=[];l!==null&&l!==d;){var N=l,D=N.alternate,Y=N.stateNode;if(D!==null&&D===d)break;N.tag===5&&Y!==null&&(N=Y,g?(D=wu(l,y),D!=null&&x.unshift($u(l,D,N))):g||(D=wu(l,y),D!=null&&x.push($u(l,D,N)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var rM=/\r\n?/g,iM=/\u0000|\uFFFD/g;function w_(i){return(typeof i=="string"?i:""+i).replace(rM,`
12
+ `).replace(iM,"")}function sc(i,s,l){if(s=w_(s),w_(i)!==s&&l)throw Error(n(425))}function oc(){}var Tp=null,bp=null;function _p(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 xp=typeof setTimeout=="function"?setTimeout:void 0,sM=typeof clearTimeout=="function"?clearTimeout:void 0,C_=typeof Promise=="function"?Promise:void 0,oM=typeof queueMicrotask=="function"?queueMicrotask:typeof C_!="undefined"?function(i){return C_.resolve(null).then(i).catch(uM)}:xp;function uM(i){setTimeout(function(){throw i})}function Sp(i,s){var l=s,d=0;do{var g=l.nextSibling;if(i.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(d===0){i.removeChild(g),Ru(s);return}d--}else l!=="$"&&l!=="$?"&&l!=="$!"||d++;l=g}while(l);Ru(s)}function Ti(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 A_(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 ao=Math.random().toString(36).slice(2),Nr="__reactFiber$"+ao,Vu="__reactProps$"+ao,Yr="__reactContainer$"+ao,wp="__reactEvents$"+ao,aM="__reactListeners$"+ao,lM="__reactHandles$"+ao;function Xi(i){var s=i[Nr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Yr]||l[Nr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=A_(i);i!==null;){if(l=i[Nr])return l;i=A_(i)}return s}i=l,l=i.parentNode}return null}function qu(i){return i=i[Nr]||i[Yr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function lo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function uc(i){return i[Vu]||null}var Cp=[],co=-1;function bi(i){return{current:i}}function ct(i){0>co||(i.current=Cp[co],Cp[co]=null,co--)}function at(i,s){co++,Cp[co]=i.current,i.current=s}var _i={},nn=bi(_i),xn=bi(!1),Ji=_i;function fo(i,s){var l=i.type.contextTypes;if(!l)return _i;var d=i.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===s)return d.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in l)g[y]=s[y];return d&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function Sn(i){return i=i.childContextTypes,i!=null}function ac(){ct(xn),ct(nn)}function v_(i,s,l){if(nn.current!==_i)throw Error(n(168));at(nn,s),at(xn,l)}function k_(i,s,l){var d=i.stateNode;if(s=s.childContextTypes,typeof d.getChildContext!="function")return l;d=d.getChildContext();for(var g in d)if(!(g in s))throw Error(n(108,xe(i)||"Unknown",g));return w({},l,d)}function lc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||_i,Ji=nn.current,at(nn,i),at(xn,xn.current),!0}function N_(i,s,l){var d=i.stateNode;if(!d)throw Error(n(169));l?(i=k_(i,s,Ji),d.__reactInternalMemoizedMergedChildContext=i,ct(xn),ct(nn),at(nn,i)):ct(xn),at(xn,l)}var Wr=null,cc=!1,Ap=!1;function O_(i){Wr===null?Wr=[i]:Wr.push(i)}function cM(i){cc=!0,O_(i)}function xi(){if(!Ap&&Wr!==null){Ap=!0;var i=0,s=rt;try{var l=Wr;for(rt=1;i<l.length;i++){var d=l[i];do d=d(!0);while(d!==null)}Wr=null,cc=!1}catch(g){throw Wr!==null&&(Wr=Wr.slice(i+1)),Pb(Gh,xi),g}finally{rt=s,Ap=!1}}return null}var ho=[],po=0,fc=null,dc=0,qn=[],Yn=0,Zi=null,Gr=1,Kr="";function es(i,s){ho[po++]=dc,ho[po++]=fc,fc=i,dc=s}function I_(i,s,l){qn[Yn++]=Gr,qn[Yn++]=Kr,qn[Yn++]=Zi,Zi=i;var d=Gr;i=Kr;var g=32-ur(d)-1;d&=~(1<<g),l+=1;var y=32-ur(s)+g;if(30<y){var x=g-g%5;y=(d&(1<<x)-1).toString(32),d>>=x,g-=x,Gr=1<<32-ur(s)+g|l<<g|d,Kr=y+i}else Gr=1<<y|l<<g|d,Kr=i}function vp(i){i.return!==null&&(es(i,1),I_(i,1,0))}function kp(i){for(;i===fc;)fc=ho[--po],ho[po]=null,dc=ho[--po],ho[po]=null;for(;i===Zi;)Zi=qn[--Yn],qn[Yn]=null,Kr=qn[--Yn],qn[Yn]=null,Gr=qn[--Yn],qn[Yn]=null}var Dn=null,Mn=null,pt=!1,lr=null;function P_(i,s){var l=Qn(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 R_(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,Dn=i,Mn=Ti(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Dn=i,Mn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=Zi!==null?{id:Gr,overflow:Kr}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=Qn(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Dn=i,Mn=null,!0):!1;default:return!1}}function Np(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Op(i){if(pt){var s=Mn;if(s){var l=s;if(!R_(i,s)){if(Np(i))throw Error(n(418));s=Ti(l.nextSibling);var d=Dn;s&&R_(i,s)?P_(d,l):(i.flags=i.flags&-4097|2,pt=!1,Dn=i)}}else{if(Np(i))throw Error(n(418));i.flags=i.flags&-4097|2,pt=!1,Dn=i}}}function L_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Dn=i}function hc(i){if(i!==Dn)return!1;if(!pt)return L_(i),pt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!_p(i.type,i.memoizedProps)),s&&(s=Mn)){if(Np(i))throw D_(),Error(n(418));for(;s;)P_(i,s),s=Ti(s.nextSibling)}if(L_(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){Mn=Ti(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Mn=null}}else Mn=Dn?Ti(i.stateNode.nextSibling):null;return!0}function D_(){for(var i=Mn;i;)i=Ti(i.nextSibling)}function mo(){Mn=Dn=null,pt=!1}function Ip(i){lr===null?lr=[i]:lr.push(i)}var fM=q.ReactCurrentBatchConfig;function Yu(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 d=l.stateNode}if(!d)throw Error(n(147,i));var g=d,y=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(x){var N=g.refs;x===null?delete N[y]:N[y]=x},s._stringRef=y,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function pc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function M_(i){var s=i._init;return s(i._payload)}function F_(i){function s(z,M){if(i){var V=z.deletions;V===null?(z.deletions=[M],z.flags|=16):V.push(M)}}function l(z,M){if(!i)return null;for(;M!==null;)s(z,M),M=M.sibling;return null}function d(z,M){for(z=new Map;M!==null;)M.key!==null?z.set(M.key,M):z.set(M.index,M),M=M.sibling;return z}function g(z,M){return z=Oi(z,M),z.index=0,z.sibling=null,z}function y(z,M,V){return z.index=V,i?(V=z.alternate,V!==null?(V=V.index,V<M?(z.flags|=2,M):V):(z.flags|=2,M)):(z.flags|=1048576,M)}function x(z){return i&&z.alternate===null&&(z.flags|=2),z}function N(z,M,V,ge){return M===null||M.tag!==6?(M=xm(V,z.mode,ge),M.return=z,M):(M=g(M,V),M.return=z,M)}function D(z,M,V,ge){var Oe=V.type;return Oe===ee?se(z,M,V.props.children,ge,V.key):M!==null&&(M.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Ce&&M_(Oe)===M.type)?(ge=g(M,V.props),ge.ref=Yu(z,M,V),ge.return=z,ge):(ge=Bc(V.type,V.key,V.props,null,z.mode,ge),ge.ref=Yu(z,M,V),ge.return=z,ge)}function Y(z,M,V,ge){return M===null||M.tag!==4||M.stateNode.containerInfo!==V.containerInfo||M.stateNode.implementation!==V.implementation?(M=Sm(V,z.mode,ge),M.return=z,M):(M=g(M,V.children||[]),M.return=z,M)}function se(z,M,V,ge,Oe){return M===null||M.tag!==7?(M=as(V,z.mode,ge,Oe),M.return=z,M):(M=g(M,V),M.return=z,M)}function ce(z,M,V){if(typeof M=="string"&&M!==""||typeof M=="number")return M=xm(""+M,z.mode,V),M.return=z,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case X:return V=Bc(M.type,M.key,M.props,null,z.mode,V),V.ref=Yu(z,null,M),V.return=z,V;case F:return M=Sm(M,z.mode,V),M.return=z,M;case Ce:var ge=M._init;return ce(z,ge(M._payload),V)}if(ci(M)||te(M))return M=as(M,z.mode,V,null),M.return=z,M;pc(z,M)}return null}function ne(z,M,V,ge){var Oe=M!==null?M.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Oe!==null?null:N(z,M,""+V,ge);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case X:return V.key===Oe?D(z,M,V,ge):null;case F:return V.key===Oe?Y(z,M,V,ge):null;case Ce:return Oe=V._init,ne(z,M,Oe(V._payload),ge)}if(ci(V)||te(V))return Oe!==null?null:se(z,M,V,ge,null);pc(z,V)}return null}function Se(z,M,V,ge,Oe){if(typeof ge=="string"&&ge!==""||typeof ge=="number")return z=z.get(V)||null,N(M,z,""+ge,Oe);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case X:return z=z.get(ge.key===null?V:ge.key)||null,D(M,z,ge,Oe);case F:return z=z.get(ge.key===null?V:ge.key)||null,Y(M,z,ge,Oe);case Ce:var Le=ge._init;return Se(z,M,V,Le(ge._payload),Oe)}if(ci(ge)||te(ge))return z=z.get(V)||null,se(M,z,ge,Oe,null);pc(M,ge)}return null}function ve(z,M,V,ge){for(var Oe=null,Le=null,De=M,ze=M=0,qt=null;De!==null&&ze<V.length;ze++){De.index>ze?(qt=De,De=null):qt=De.sibling;var et=ne(z,De,V[ze],ge);if(et===null){De===null&&(De=qt);break}i&&De&&et.alternate===null&&s(z,De),M=y(et,M,ze),Le===null?Oe=et:Le.sibling=et,Le=et,De=qt}if(ze===V.length)return l(z,De),pt&&es(z,ze),Oe;if(De===null){for(;ze<V.length;ze++)De=ce(z,V[ze],ge),De!==null&&(M=y(De,M,ze),Le===null?Oe=De:Le.sibling=De,Le=De);return pt&&es(z,ze),Oe}for(De=d(z,De);ze<V.length;ze++)qt=Se(De,z,ze,V[ze],ge),qt!==null&&(i&&qt.alternate!==null&&De.delete(qt.key===null?ze:qt.key),M=y(qt,M,ze),Le===null?Oe=qt:Le.sibling=qt,Le=qt);return i&&De.forEach(function(Ii){return s(z,Ii)}),pt&&es(z,ze),Oe}function ke(z,M,V,ge){var Oe=te(V);if(typeof Oe!="function")throw Error(n(150));if(V=Oe.call(V),V==null)throw Error(n(151));for(var Le=Oe=null,De=M,ze=M=0,qt=null,et=V.next();De!==null&&!et.done;ze++,et=V.next()){De.index>ze?(qt=De,De=null):qt=De.sibling;var Ii=ne(z,De,et.value,ge);if(Ii===null){De===null&&(De=qt);break}i&&De&&Ii.alternate===null&&s(z,De),M=y(Ii,M,ze),Le===null?Oe=Ii:Le.sibling=Ii,Le=Ii,De=qt}if(et.done)return l(z,De),pt&&es(z,ze),Oe;if(De===null){for(;!et.done;ze++,et=V.next())et=ce(z,et.value,ge),et!==null&&(M=y(et,M,ze),Le===null?Oe=et:Le.sibling=et,Le=et);return pt&&es(z,ze),Oe}for(De=d(z,De);!et.done;ze++,et=V.next())et=Se(De,z,ze,et.value,ge),et!==null&&(i&&et.alternate!==null&&De.delete(et.key===null?ze:et.key),M=y(et,M,ze),Le===null?Oe=et:Le.sibling=et,Le=et);return i&&De.forEach(function(VM){return s(z,VM)}),pt&&es(z,ze),Oe}function kt(z,M,V,ge){if(typeof V=="object"&&V!==null&&V.type===ee&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case X:e:{for(var Oe=V.key,Le=M;Le!==null;){if(Le.key===Oe){if(Oe=V.type,Oe===ee){if(Le.tag===7){l(z,Le.sibling),M=g(Le,V.props.children),M.return=z,z=M;break e}}else if(Le.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Ce&&M_(Oe)===Le.type){l(z,Le.sibling),M=g(Le,V.props),M.ref=Yu(z,Le,V),M.return=z,z=M;break e}l(z,Le);break}else s(z,Le);Le=Le.sibling}V.type===ee?(M=as(V.props.children,z.mode,ge,V.key),M.return=z,z=M):(ge=Bc(V.type,V.key,V.props,null,z.mode,ge),ge.ref=Yu(z,M,V),ge.return=z,z=ge)}return x(z);case F:e:{for(Le=V.key;M!==null;){if(M.key===Le)if(M.tag===4&&M.stateNode.containerInfo===V.containerInfo&&M.stateNode.implementation===V.implementation){l(z,M.sibling),M=g(M,V.children||[]),M.return=z,z=M;break e}else{l(z,M);break}else s(z,M);M=M.sibling}M=Sm(V,z.mode,ge),M.return=z,z=M}return x(z);case Ce:return Le=V._init,kt(z,M,Le(V._payload),ge)}if(ci(V))return ve(z,M,V,ge);if(te(V))return ke(z,M,V,ge);pc(z,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,M!==null&&M.tag===6?(l(z,M.sibling),M=g(M,V),M.return=z,z=M):(l(z,M),M=xm(V,z.mode,ge),M.return=z,z=M),x(z)):l(z,M)}return kt}var go=F_(!0),B_=F_(!1),mc=bi(null),gc=null,Eo=null,Pp=null;function Rp(){Pp=Eo=gc=null}function Lp(i){var s=mc.current;ct(mc),i._currentValue=s}function Dp(i,s,l){for(;i!==null;){var d=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),i===l)break;i=i.return}}function yo(i,s){gc=i,Pp=Eo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(wn=!0),i.firstContext=null)}function Wn(i){var s=i._currentValue;if(Pp!==i)if(i={context:i,memoizedValue:s,next:null},Eo===null){if(gc===null)throw Error(n(308));Eo=i,gc.dependencies={lanes:0,firstContext:i}}else Eo=Eo.next=i;return s}var ts=null;function Mp(i){ts===null?ts=[i]:ts.push(i)}function U_(i,s,l,d){var g=s.interleaved;return g===null?(l.next=l,Mp(s)):(l.next=g.next,g.next=l),s.interleaved=l,Qr(i,d)}function Qr(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 Si=!1;function Fp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function H_(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 Xr(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function wi(i,s,l){var d=i.updateQueue;if(d===null)return null;if(d=d.shared,(Ze&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,Qr(i,l)}return g=d.interleaved,g===null?(s.next=s,Mp(d)):(s.next=g.next,g.next=s),d.interleaved=s,Qr(i,l)}function Ec(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var d=s.lanes;d&=i.pendingLanes,l|=d,s.lanes=l,Xh(i,l)}}function z_(i,s){var l=i.updateQueue,d=i.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var g=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?g=y=x:y=y.next=x,l=l.next}while(l!==null);y===null?g=y=s:y=y.next=s}else g=y=s;l={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,effects:d.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function yc(i,s,l,d){var g=i.updateQueue;Si=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,N=g.shared.pending;if(N!==null){g.shared.pending=null;var D=N,Y=D.next;D.next=null,x===null?y=Y:x.next=Y,x=D;var se=i.alternate;se!==null&&(se=se.updateQueue,N=se.lastBaseUpdate,N!==x&&(N===null?se.firstBaseUpdate=Y:N.next=Y,se.lastBaseUpdate=D))}if(y!==null){var ce=g.baseState;x=0,se=Y=D=null,N=y;do{var ne=N.lane,Se=N.eventTime;if((d&ne)===ne){se!==null&&(se=se.next={eventTime:Se,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var ve=i,ke=N;switch(ne=s,Se=l,ke.tag){case 1:if(ve=ke.payload,typeof ve=="function"){ce=ve.call(Se,ce,ne);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=ke.payload,ne=typeof ve=="function"?ve.call(Se,ce,ne):ve,ne==null)break e;ce=w({},ce,ne);break e;case 2:Si=!0}}N.callback!==null&&N.lane!==0&&(i.flags|=64,ne=g.effects,ne===null?g.effects=[N]:ne.push(N))}else Se={eventTime:Se,lane:ne,tag:N.tag,payload:N.payload,callback:N.callback,next:null},se===null?(Y=se=Se,D=ce):se=se.next=Se,x|=ne;if(N=N.next,N===null){if(N=g.shared.pending,N===null)break;ne=N,N=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);if(se===null&&(D=ce),g.baseState=D,g.firstBaseUpdate=Y,g.lastBaseUpdate=se,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);is|=x,i.lanes=x,i.memoizedState=ce}}function j_(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var d=i[s],g=d.callback;if(g!==null){if(d.callback=null,d=l,typeof g!="function")throw Error(n(191,g));g.call(d)}}}var Wu={},Or=bi(Wu),Gu=bi(Wu),Ku=bi(Wu);function ns(i){if(i===Wu)throw Error(n(174));return i}function Bp(i,s){switch(at(Ku,s),at(Gu,i),at(Or,Wu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Ee(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=Ee(s,i)}ct(Or),at(Or,s)}function To(){ct(Or),ct(Gu),ct(Ku)}function $_(i){ns(Ku.current);var s=ns(Or.current),l=Ee(s,i.type);s!==l&&(at(Gu,i),at(Or,l))}function Up(i){Gu.current===i&&(ct(Or),ct(Gu))}var Et=bi(0);function Tc(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 Hp=[];function zp(){for(var i=0;i<Hp.length;i++)Hp[i]._workInProgressVersionPrimary=null;Hp.length=0}var bc=q.ReactCurrentDispatcher,jp=q.ReactCurrentBatchConfig,rs=0,yt=null,Dt=null,$t=null,_c=!1,Qu=!1,Xu=0,dM=0;function rn(){throw Error(n(321))}function $p(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!ar(i[l],s[l]))return!1;return!0}function Vp(i,s,l,d,g,y){if(rs=y,yt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,bc.current=i===null||i.memoizedState===null?gM:EM,i=l(d,g),Qu){y=0;do{if(Qu=!1,Xu=0,25<=y)throw Error(n(301));y+=1,$t=Dt=null,s.updateQueue=null,bc.current=yM,i=l(d,g)}while(Qu)}if(bc.current=wc,s=Dt!==null&&Dt.next!==null,rs=0,$t=Dt=yt=null,_c=!1,s)throw Error(n(300));return i}function qp(){var i=Xu!==0;return Xu=0,i}function Ir(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?yt.memoizedState=$t=i:$t=$t.next=i,$t}function Gn(){if(Dt===null){var i=yt.alternate;i=i!==null?i.memoizedState:null}else i=Dt.next;var s=$t===null?yt.memoizedState:$t.next;if(s!==null)$t=s,Dt=i;else{if(i===null)throw Error(n(310));Dt=i,i={memoizedState:Dt.memoizedState,baseState:Dt.baseState,baseQueue:Dt.baseQueue,queue:Dt.queue,next:null},$t===null?yt.memoizedState=$t=i:$t=$t.next=i}return $t}function Ju(i,s){return typeof s=="function"?s(i):s}function Yp(i){var s=Gn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var d=Dt,g=d.baseQueue,y=l.pending;if(y!==null){if(g!==null){var x=g.next;g.next=y.next,y.next=x}d.baseQueue=g=y,l.pending=null}if(g!==null){y=g.next,d=d.baseState;var N=x=null,D=null,Y=y;do{var se=Y.lane;if((rs&se)===se)D!==null&&(D=D.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),d=Y.hasEagerState?Y.eagerState:i(d,Y.action);else{var ce={lane:se,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};D===null?(N=D=ce,x=d):D=D.next=ce,yt.lanes|=se,is|=se}Y=Y.next}while(Y!==null&&Y!==y);D===null?x=d:D.next=N,ar(d,s.memoizedState)||(wn=!0),s.memoizedState=d,s.baseState=x,s.baseQueue=D,l.lastRenderedState=d}if(i=l.interleaved,i!==null){g=i;do y=g.lane,yt.lanes|=y,is|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Wp(i){var s=Gn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var d=l.dispatch,g=l.pending,y=s.memoizedState;if(g!==null){l.pending=null;var x=g=g.next;do y=i(y,x.action),x=x.next;while(x!==g);ar(y,s.memoizedState)||(wn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,d]}function V_(){}function q_(i,s){var l=yt,d=Gn(),g=s(),y=!ar(d.memoizedState,g);if(y&&(d.memoizedState=g,wn=!0),d=d.queue,Gp(G_.bind(null,l,d,i),[i]),d.getSnapshot!==s||y||$t!==null&&$t.memoizedState.tag&1){if(l.flags|=2048,Zu(9,W_.bind(null,l,d,g,s),void 0,null),Vt===null)throw Error(n(349));(rs&30)!==0||Y_(l,s,g)}return g}function Y_(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=yt.updateQueue,s===null?(s={lastEffect:null,stores:null},yt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function W_(i,s,l,d){s.value=l,s.getSnapshot=d,K_(s)&&Q_(i)}function G_(i,s,l){return l(function(){K_(s)&&Q_(i)})}function K_(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!ar(i,l)}catch(d){return!0}}function Q_(i){var s=Qr(i,1);s!==null&&hr(s,i,1,-1)}function X_(i){var s=Ir();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ju,lastRenderedState:i},s.queue=i,i=i.dispatch=mM.bind(null,yt,i),[s.memoizedState,i]}function Zu(i,s,l,d){return i={tag:i,create:s,destroy:l,deps:d,next:null},s=yt.updateQueue,s===null?(s={lastEffect:null,stores:null},yt.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(d=l.next,l.next=i,i.next=d,s.lastEffect=i)),i}function J_(){return Gn().memoizedState}function xc(i,s,l,d){var g=Ir();yt.flags|=i,g.memoizedState=Zu(1|s,l,void 0,d===void 0?null:d)}function Sc(i,s,l,d){var g=Gn();d=d===void 0?null:d;var y=void 0;if(Dt!==null){var x=Dt.memoizedState;if(y=x.destroy,d!==null&&$p(d,x.deps)){g.memoizedState=Zu(s,l,y,d);return}}yt.flags|=i,g.memoizedState=Zu(1|s,l,y,d)}function Z_(i,s){return xc(8390656,8,i,s)}function Gp(i,s){return Sc(2048,8,i,s)}function e2(i,s){return Sc(4,2,i,s)}function t2(i,s){return Sc(4,4,i,s)}function n2(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 r2(i,s,l){return l=l!=null?l.concat([i]):null,Sc(4,4,n2.bind(null,s,i),l)}function Kp(){}function i2(i,s){var l=Gn();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&$p(s,d[1])?d[0]:(l.memoizedState=[i,s],i)}function s2(i,s){var l=Gn();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&$p(s,d[1])?d[0]:(i=i(),l.memoizedState=[i,s],i)}function o2(i,s,l){return(rs&21)===0?(i.baseState&&(i.baseState=!1,wn=!0),i.memoizedState=l):(ar(l,s)||(l=Mb(),yt.lanes|=l,is|=l,i.baseState=!0),s)}function hM(i,s){var l=rt;rt=l!==0&&4>l?l:4,i(!0);var d=jp.transition;jp.transition={};try{i(!1),s()}finally{rt=l,jp.transition=d}}function u2(){return Gn().memoizedState}function pM(i,s,l){var d=ki(i);if(l={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null},a2(i))l2(s,l);else if(l=U_(i,s,l,d),l!==null){var g=fn();hr(l,i,d,g),c2(l,s,d)}}function mM(i,s,l){var d=ki(i),g={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null};if(a2(i))l2(s,g);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var x=s.lastRenderedState,N=y(x,l);if(g.hasEagerState=!0,g.eagerState=N,ar(N,x)){var D=s.interleaved;D===null?(g.next=g,Mp(s)):(g.next=D.next,D.next=g),s.interleaved=g;return}}catch(Y){}finally{}l=U_(i,s,g,d),l!==null&&(g=fn(),hr(l,i,d,g),c2(l,s,d))}}function a2(i){var s=i.alternate;return i===yt||s!==null&&s===yt}function l2(i,s){Qu=_c=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function c2(i,s,l){if((l&4194240)!==0){var d=s.lanes;d&=i.pendingLanes,l|=d,s.lanes=l,Xh(i,l)}}var wc={readContext:Wn,useCallback:rn,useContext:rn,useEffect:rn,useImperativeHandle:rn,useInsertionEffect:rn,useLayoutEffect:rn,useMemo:rn,useReducer:rn,useRef:rn,useState:rn,useDebugValue:rn,useDeferredValue:rn,useTransition:rn,useMutableSource:rn,useSyncExternalStore:rn,useId:rn,unstable_isNewReconciler:!1},gM={readContext:Wn,useCallback:function(i,s){return Ir().memoizedState=[i,s===void 0?null:s],i},useContext:Wn,useEffect:Z_,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,xc(4194308,4,n2.bind(null,s,i),l)},useLayoutEffect:function(i,s){return xc(4194308,4,i,s)},useInsertionEffect:function(i,s){return xc(4,2,i,s)},useMemo:function(i,s){var l=Ir();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var d=Ir();return s=l!==void 0?l(s):s,d.memoizedState=d.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},d.queue=i,i=i.dispatch=pM.bind(null,yt,i),[d.memoizedState,i]},useRef:function(i){var s=Ir();return i={current:i},s.memoizedState=i},useState:X_,useDebugValue:Kp,useDeferredValue:function(i){return Ir().memoizedState=i},useTransition:function(){var i=X_(!1),s=i[0];return i=hM.bind(null,i[1]),Ir().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var d=yt,g=Ir();if(pt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Vt===null)throw Error(n(349));(rs&30)!==0||Y_(d,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,Z_(G_.bind(null,d,y,i),[i]),d.flags|=2048,Zu(9,W_.bind(null,d,y,l,s),void 0,null),l},useId:function(){var i=Ir(),s=Vt.identifierPrefix;if(pt){var l=Kr,d=Gr;l=(d&~(1<<32-ur(d)-1)).toString(32)+l,s=":"+s+"R"+l,l=Xu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=dM++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},EM={readContext:Wn,useCallback:i2,useContext:Wn,useEffect:Gp,useImperativeHandle:r2,useInsertionEffect:e2,useLayoutEffect:t2,useMemo:s2,useReducer:Yp,useRef:J_,useState:function(){return Yp(Ju)},useDebugValue:Kp,useDeferredValue:function(i){var s=Gn();return o2(s,Dt.memoizedState,i)},useTransition:function(){var i=Yp(Ju)[0],s=Gn().memoizedState;return[i,s]},useMutableSource:V_,useSyncExternalStore:q_,useId:u2,unstable_isNewReconciler:!1},yM={readContext:Wn,useCallback:i2,useContext:Wn,useEffect:Gp,useImperativeHandle:r2,useInsertionEffect:e2,useLayoutEffect:t2,useMemo:s2,useReducer:Wp,useRef:J_,useState:function(){return Wp(Ju)},useDebugValue:Kp,useDeferredValue:function(i){var s=Gn();return Dt===null?s.memoizedState=i:o2(s,Dt.memoizedState,i)},useTransition:function(){var i=Wp(Ju)[0],s=Gn().memoizedState;return[i,s]},useMutableSource:V_,useSyncExternalStore:q_,useId:u2,unstable_isNewReconciler:!1};function cr(i,s){if(i&&i.defaultProps){s=w({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function Qp(i,s,l,d){s=i.memoizedState,l=l(d,s),l=l==null?s:w({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Cc={isMounted:function(i){return(i=i._reactInternals)?Qi(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var d=fn(),g=ki(i),y=Xr(d,g);y.payload=s,l!=null&&(y.callback=l),s=wi(i,y,g),s!==null&&(hr(s,i,g,d),Ec(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var d=fn(),g=ki(i),y=Xr(d,g);y.tag=1,y.payload=s,l!=null&&(y.callback=l),s=wi(i,y,g),s!==null&&(hr(s,i,g,d),Ec(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=fn(),d=ki(i),g=Xr(l,d);g.tag=2,s!=null&&(g.callback=s),s=wi(i,g,d),s!==null&&(hr(s,i,d,l),Ec(s,i,d))}};function f2(i,s,l,d,g,y,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(d,y,x):s.prototype&&s.prototype.isPureReactComponent?!Uu(l,d)||!Uu(g,y):!0}function d2(i,s,l){var d=!1,g=_i,y=s.contextType;return typeof y=="object"&&y!==null?y=Wn(y):(g=Sn(s)?Ji:nn.current,d=s.contextTypes,y=(d=d!=null)?fo(i,g):_i),s=new s(l,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Cc,i.stateNode=s,s._reactInternals=i,d&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function h2(i,s,l,d){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,d),s.state!==i&&Cc.enqueueReplaceState(s,s.state,null)}function Xp(i,s,l,d){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},Fp(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Wn(y):(y=Sn(s)?Ji:nn.current,g.context=fo(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Qp(i,s,y,l),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Cc.enqueueReplaceState(g,g.state,null),yc(i,l,g,d),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function bo(i,s){try{var l="",d=s;do l+=Ue(d),d=d.return;while(d);var g=l}catch(y){g=`
13
+ Error generating stack: `+y.message+`
14
+ `+y.stack}return{value:i,source:s,stack:g,digest:null}}function Jp(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function Zp(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var TM=typeof WeakMap=="function"?WeakMap:Map;function p2(i,s,l){l=Xr(-1,l),l.tag=3,l.payload={element:null};var d=s.value;return l.callback=function(){Pc||(Pc=!0,pm=d),Zp(i,s)},l}function m2(i,s,l){l=Xr(-1,l),l.tag=3;var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;l.payload=function(){return d(g)},l.callback=function(){Zp(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){Zp(i,s),typeof d!="function"&&(Ai===null?Ai=new Set([this]):Ai.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function g2(i,s,l){var d=i.pingCache;if(d===null){d=i.pingCache=new TM;var g=new Set;d.set(s,g)}else g=d.get(s),g===void 0&&(g=new Set,d.set(s,g));g.has(l)||(g.add(l),i=RM.bind(null,i,s,l),s.then(i,i))}function E2(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 y2(i,s,l,d,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=Xr(-1,1),s.tag=2,wi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var bM=q.ReactCurrentOwner,wn=!1;function cn(i,s,l,d){s.child=i===null?B_(s,null,l,d):go(s,i.child,l,d)}function T2(i,s,l,d,g){l=l.render;var y=s.ref;return yo(s,g),d=Vp(i,s,l,d,y,g),l=qp(),i!==null&&!wn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Jr(i,s,g)):(pt&&l&&vp(s),s.flags|=1,cn(i,s,d,g),s.child)}function b2(i,s,l,d,g){if(i===null){var y=l.type;return typeof y=="function"&&!_m(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,_2(i,s,y,d,g)):(i=Bc(l.type,null,d,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(y=i.child,(i.lanes&g)===0){var x=y.memoizedProps;if(l=l.compare,l=l!==null?l:Uu,l(x,d)&&i.ref===s.ref)return Jr(i,s,g)}return s.flags|=1,i=Oi(y,d),i.ref=s.ref,i.return=s,s.child=i}function _2(i,s,l,d,g){if(i!==null){var y=i.memoizedProps;if(Uu(y,d)&&i.ref===s.ref)if(wn=!1,s.pendingProps=d=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(wn=!0);else return s.lanes=i.lanes,Jr(i,s,g)}return em(i,s,l,d,g)}function x2(i,s,l){var d=s.pendingProps,g=d.children,y=i!==null?i.memoizedState:null;if(d.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},at(xo,Fn),Fn|=l;else{if((l&1073741824)===0)return i=y!==null?y.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,at(xo,Fn),Fn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:l,at(xo,Fn),Fn|=d}else y!==null?(d=y.baseLanes|l,s.memoizedState=null):d=l,at(xo,Fn),Fn|=d;return cn(i,s,g,l),s.child}function S2(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function em(i,s,l,d,g){var y=Sn(l)?Ji:nn.current;return y=fo(s,y),yo(s,g),l=Vp(i,s,l,d,y,g),d=qp(),i!==null&&!wn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Jr(i,s,g)):(pt&&d&&vp(s),s.flags|=1,cn(i,s,l,g),s.child)}function w2(i,s,l,d,g){if(Sn(l)){var y=!0;lc(s)}else y=!1;if(yo(s,g),s.stateNode===null)vc(i,s),d2(s,l,d),Xp(s,l,d,g),d=!0;else if(i===null){var x=s.stateNode,N=s.memoizedProps;x.props=N;var D=x.context,Y=l.contextType;typeof Y=="object"&&Y!==null?Y=Wn(Y):(Y=Sn(l)?Ji:nn.current,Y=fo(s,Y));var se=l.getDerivedStateFromProps,ce=typeof se=="function"||typeof x.getSnapshotBeforeUpdate=="function";ce||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(N!==d||D!==Y)&&h2(s,x,d,Y),Si=!1;var ne=s.memoizedState;x.state=ne,yc(s,d,x,g),D=s.memoizedState,N!==d||ne!==D||xn.current||Si?(typeof se=="function"&&(Qp(s,l,se,d),D=s.memoizedState),(N=Si||f2(s,l,N,d,ne,D,Y))?(ce||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=D),x.props=d,x.state=D,x.context=Y,d=N):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{x=s.stateNode,H_(i,s),N=s.memoizedProps,Y=s.type===s.elementType?N:cr(s.type,N),x.props=Y,ce=s.pendingProps,ne=x.context,D=l.contextType,typeof D=="object"&&D!==null?D=Wn(D):(D=Sn(l)?Ji:nn.current,D=fo(s,D));var Se=l.getDerivedStateFromProps;(se=typeof Se=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(N!==ce||ne!==D)&&h2(s,x,d,D),Si=!1,ne=s.memoizedState,x.state=ne,yc(s,d,x,g);var ve=s.memoizedState;N!==ce||ne!==ve||xn.current||Si?(typeof Se=="function"&&(Qp(s,l,Se,d),ve=s.memoizedState),(Y=Si||f2(s,l,Y,d,ne,ve,D)||!1)?(se||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,ve,D),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,ve,D)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||N===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=ve),x.props=d,x.state=ve,x.context=D,d=Y):(typeof x.componentDidUpdate!="function"||N===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),d=!1)}return tm(i,s,l,d,y,g)}function tm(i,s,l,d,g,y){S2(i,s);var x=(s.flags&128)!==0;if(!d&&!x)return g&&N_(s,l,!1),Jr(i,s,y);d=s.stateNode,bM.current=s;var N=x&&typeof l.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,i!==null&&x?(s.child=go(s,i.child,null,y),s.child=go(s,null,N,y)):cn(i,s,N,y),s.memoizedState=d.state,g&&N_(s,l,!0),s.child}function C2(i){var s=i.stateNode;s.pendingContext?v_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&v_(i,s.context,!1),Bp(i,s.containerInfo)}function A2(i,s,l,d,g){return mo(),Ip(g),s.flags|=256,cn(i,s,l,d),s.child}var nm={dehydrated:null,treeContext:null,retryLane:0};function rm(i){return{baseLanes:i,cachePool:null,transitions:null}}function v2(i,s,l){var d=s.pendingProps,g=Et.current,y=!1,x=(s.flags&128)!==0,N;if((N=x)||(N=i!==null&&i.memoizedState===null?!1:(g&2)!==0),N?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),at(Et,g&1),i===null)return Op(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=d.children,i=d.fallback,y?(d=s.mode,y=s.child,x={mode:"hidden",children:x},(d&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=Uc(x,d,0,null),i=as(i,d,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=rm(l),s.memoizedState=nm,i):im(s,x));if(g=i.memoizedState,g!==null&&(N=g.dehydrated,N!==null))return _M(i,s,x,d,N,g,l);if(y){y=d.fallback,x=s.mode,g=i.child,N=g.sibling;var D={mode:"hidden",children:d.children};return(x&1)===0&&s.child!==g?(d=s.child,d.childLanes=0,d.pendingProps=D,s.deletions=null):(d=Oi(g,D),d.subtreeFlags=g.subtreeFlags&14680064),N!==null?y=Oi(N,y):(y=as(y,x,l,null),y.flags|=2),y.return=s,d.return=s,d.sibling=y,s.child=d,d=y,y=s.child,x=i.child.memoizedState,x=x===null?rm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=i.childLanes&~l,s.memoizedState=nm,d}return y=i.child,i=y.sibling,d=Oi(y,{mode:"visible",children:d.children}),(s.mode&1)===0&&(d.lanes=l),d.return=s,d.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=d,s.memoizedState=null,d}function im(i,s){return s=Uc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Ac(i,s,l,d){return d!==null&&Ip(d),go(s,i.child,null,l),i=im(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function _M(i,s,l,d,g,y,x){if(l)return s.flags&256?(s.flags&=-257,d=Jp(Error(n(422))),Ac(i,s,x,d)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=d.fallback,g=s.mode,d=Uc({mode:"visible",children:d.children},g,0,null),y=as(y,g,x,null),y.flags|=2,d.return=s,y.return=s,d.sibling=y,s.child=d,(s.mode&1)!==0&&go(s,i.child,null,x),s.child.memoizedState=rm(x),s.memoizedState=nm,y);if((s.mode&1)===0)return Ac(i,s,x,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var N=d.dgst;return d=N,y=Error(n(419)),d=Jp(y,d,void 0),Ac(i,s,x,d)}if(N=(x&i.childLanes)!==0,wn||N){if(d=Vt,d!==null){switch(x&-x){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|x))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,Qr(i,g),hr(d,i,g,-1))}return bm(),d=Jp(Error(n(421))),Ac(i,s,x,d)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=LM.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,Mn=Ti(g.nextSibling),Dn=s,pt=!0,lr=null,i!==null&&(qn[Yn++]=Gr,qn[Yn++]=Kr,qn[Yn++]=Zi,Gr=i.id,Kr=i.overflow,Zi=s),s=im(s,d.children),s.flags|=4096,s)}function k2(i,s,l){i.lanes|=s;var d=i.alternate;d!==null&&(d.lanes|=s),Dp(i.return,s,l)}function sm(i,s,l,d,g){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=d,y.tail=l,y.tailMode=g)}function N2(i,s,l){var d=s.pendingProps,g=d.revealOrder,y=d.tail;if(cn(i,s,d.children,l),d=Et.current,(d&2)!==0)d=d&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&&k2(i,l,s);else if(i.tag===19)k2(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}d&=1}if(at(Et,d),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(l=s.child,g=null;l!==null;)i=l.alternate,i!==null&&Tc(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),sm(s,!1,g,l,y);break;case"backwards":for(l=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Tc(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}sm(s,!0,l,null,y);break;case"together":sm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function vc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Jr(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),is|=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=Oi(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Oi(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function xM(i,s,l){switch(s.tag){case 3:C2(s),mo();break;case 5:$_(s);break;case 1:Sn(s.type)&&lc(s);break;case 4:Bp(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;at(mc,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(at(Et,Et.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?v2(i,s,l):(at(Et,Et.current&1),i=Jr(i,s,l),i!==null?i.sibling:null);at(Et,Et.current&1);break;case 19:if(d=(l&s.childLanes)!==0,(i.flags&128)!==0){if(d)return N2(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),at(Et,Et.current),d)break;return null;case 22:case 23:return s.lanes=0,x2(i,s,l)}return Jr(i,s,l)}var O2,om,I2,P2;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}},om=function(){},I2=function(i,s,l,d){var g=i.memoizedProps;if(g!==d){i=s.stateNode,ns(Or.current);var y=null;switch(l){case"input":g=_n(i,g),d=_n(i,d),y=[];break;case"select":g=w({},g,{value:void 0}),d=w({},d,{value:void 0}),y=[];break;case"textarea":g=Su(i,g),d=Su(i,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(i.onclick=oc)}Gt(l,d);var x;l=null;for(Y in g)if(!d.hasOwnProperty(Y)&&g.hasOwnProperty(Y)&&g[Y]!=null)if(Y==="style"){var N=g[Y];for(x in N)N.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(o.hasOwnProperty(Y)?y||(y=[]):(y=y||[]).push(Y,null));for(Y in d){var D=d[Y];if(N=g!=null?g[Y]:void 0,d.hasOwnProperty(Y)&&D!==N&&(D!=null||N!=null))if(Y==="style")if(N){for(x in N)!N.hasOwnProperty(x)||D&&D.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in D)D.hasOwnProperty(x)&&N[x]!==D[x]&&(l||(l={}),l[x]=D[x])}else l||(y||(y=[]),y.push(Y,l)),l=D;else Y==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,N=N?N.__html:void 0,D!=null&&N!==D&&(y=y||[]).push(Y,D)):Y==="children"?typeof D!="string"&&typeof D!="number"||(y=y||[]).push(Y,""+D):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(o.hasOwnProperty(Y)?(D!=null&&Y==="onScroll"&&lt("scroll",i),y||N===D||(y=[])):(y=y||[]).push(Y,D))}l&&(y=y||[]).push("style",l);var Y=y;(s.updateQueue=Y)&&(s.flags|=4)}},P2=function(i,s,l,d){l!==d&&(s.flags|=4)};function ea(i,s){if(!pt)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 d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:d.sibling=null}}function sn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,d=0;if(s)for(var g=i.child;g!==null;)l|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)l|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=d,i.childLanes=l,s}function SM(i,s,l){var d=s.pendingProps;switch(kp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return sn(s),null;case 1:return Sn(s.type)&&ac(),sn(s),null;case 3:return d=s.stateNode,To(),ct(xn),ct(nn),zp(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(hc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,lr!==null&&(Em(lr),lr=null))),om(i,s),sn(s),null;case 5:Up(s);var g=ns(Ku.current);if(l=s.type,i!==null&&s.stateNode!=null)I2(i,s,l,d,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!d){if(s.stateNode===null)throw Error(n(166));return sn(s),null}if(i=ns(Or.current),hc(s)){d=s.stateNode,l=s.type;var y=s.memoizedProps;switch(d[Nr]=s,d[Vu]=y,i=(s.mode&1)!==0,l){case"dialog":lt("cancel",d),lt("close",d);break;case"iframe":case"object":case"embed":lt("load",d);break;case"video":case"audio":for(g=0;g<zu.length;g++)lt(zu[g],d);break;case"source":lt("error",d);break;case"img":case"image":case"link":lt("error",d),lt("load",d);break;case"details":lt("toggle",d);break;case"input":bt(d,y),lt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},lt("invalid",d);break;case"textarea":Ml(d,y),lt("invalid",d)}Gt(l,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var N=y[x];x==="children"?typeof N=="string"?d.textContent!==N&&(y.suppressHydrationWarning!==!0&&sc(d.textContent,N,i),g=["children",N]):typeof N=="number"&&d.textContent!==""+N&&(y.suppressHydrationWarning!==!0&&sc(d.textContent,N,i),g=["children",""+N]):o.hasOwnProperty(x)&&N!=null&&x==="onScroll"&&lt("scroll",d)}switch(l){case"input":Pt(d),Dl(d,y,!0);break;case"textarea":Pt(d),Bl(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=oc)}d=g,s.updateQueue=d,d!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof d.is=="string"?i=x.createElement(l,{is:d.is}):(i=x.createElement(l),l==="select"&&(x=i,d.multiple?x.multiple=!0:d.size&&(x.size=d.size))):i=x.createElementNS(i,l),i[Nr]=s,i[Vu]=d,O2(i,s,!1,!1),s.stateNode=i;e:{switch(x=vr(l,d),l){case"dialog":lt("cancel",i),lt("close",i),g=d;break;case"iframe":case"object":case"embed":lt("load",i),g=d;break;case"video":case"audio":for(g=0;g<zu.length;g++)lt(zu[g],i);g=d;break;case"source":lt("error",i),g=d;break;case"img":case"image":case"link":lt("error",i),lt("load",i),g=d;break;case"details":lt("toggle",i),g=d;break;case"input":bt(i,d),g=_n(i,d),lt("invalid",i);break;case"option":g=d;break;case"select":i._wrapperState={wasMultiple:!!d.multiple},g=w({},d,{value:void 0}),lt("invalid",i);break;case"textarea":Ml(i,d),g=Su(i,d),lt("invalid",i);break;default:g=d}Gt(l,g),N=g;for(y in N)if(N.hasOwnProperty(y)){var D=N[y];y==="style"?di(i,D):y==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,D!=null&&We(i,D)):y==="children"?typeof D=="string"?(l!=="textarea"||D!=="")&&Je(i,D):typeof D=="number"&&Je(i,""+D):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?D!=null&&y==="onScroll"&&lt("scroll",i):D!=null&&L(i,y,D,x))}switch(l){case"input":Pt(i),Dl(i,d,!1);break;case"textarea":Pt(i),Bl(i);break;case"option":d.value!=null&&i.setAttribute("value",""+Ne(d.value));break;case"select":i.multiple=!!d.multiple,y=d.value,y!=null?fi(i,!!d.multiple,y,!1):d.defaultValue!=null&&fi(i,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=oc)}switch(l){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return sn(s),null;case 6:if(i&&s.stateNode!=null)P2(i,s,i.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(l=ns(Ku.current),ns(Or.current),hc(s)){if(d=s.stateNode,l=s.memoizedProps,d[Nr]=s,(y=d.nodeValue!==l)&&(i=Dn,i!==null))switch(i.tag){case 3:sc(d.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&sc(d.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else d=(l.nodeType===9?l:l.ownerDocument).createTextNode(d),d[Nr]=s,s.stateNode=d}return sn(s),null;case 13:if(ct(Et),d=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(pt&&Mn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)D_(),mo(),s.flags|=98560,y=!1;else if(y=hc(s),d!==null&&d.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Nr]=s}else mo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;sn(s),y=!1}else lr!==null&&(Em(lr),lr=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(d=d!==null,d!==(i!==null&&i.memoizedState!==null)&&d&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Et.current&1)!==0?Mt===0&&(Mt=3):bm())),s.updateQueue!==null&&(s.flags|=4),sn(s),null);case 4:return To(),om(i,s),i===null&&ju(s.stateNode.containerInfo),sn(s),null;case 10:return Lp(s.type._context),sn(s),null;case 17:return Sn(s.type)&&ac(),sn(s),null;case 19:if(ct(Et),y=s.memoizedState,y===null)return sn(s),null;if(d=(s.flags&128)!==0,x=y.rendering,x===null)if(d)ea(y,!1);else{if(Mt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Tc(i),x!==null){for(s.flags|=128,ea(y,!1),d=x.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),s.subtreeFlags=0,d=l,l=s.child;l!==null;)y=l,i=d,y.flags&=14680066,x=y.alternate,x===null?(y.childLanes=0,y.lanes=i,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=x.childLanes,y.lanes=x.lanes,y.child=x.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=x.memoizedProps,y.memoizedState=x.memoizedState,y.updateQueue=x.updateQueue,y.type=x.type,i=x.dependencies,y.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return at(Et,Et.current&1|2),s.child}i=i.sibling}y.tail!==null&&vt()>So&&(s.flags|=128,d=!0,ea(y,!1),s.lanes=4194304)}else{if(!d)if(i=Tc(x),i!==null){if(s.flags|=128,d=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),ea(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!pt)return sn(s),null}else 2*vt()-y.renderingStartTime>So&&l!==1073741824&&(s.flags|=128,d=!0,ea(y,!1),s.lanes=4194304);y.isBackwards?(x.sibling=s.child,s.child=x):(l=y.last,l!==null?l.sibling=x:s.child=x,y.last=x)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=vt(),s.sibling=null,l=Et.current,at(Et,d?l&1|2:l&1),s):(sn(s),null);case 22:case 23:return Tm(),d=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(Fn&1073741824)!==0&&(sn(s),s.subtreeFlags&6&&(s.flags|=8192)):sn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function wM(i,s){switch(kp(s),s.tag){case 1:return Sn(s.type)&&ac(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return To(),ct(xn),ct(nn),zp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Up(s),null;case 13:if(ct(Et),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));mo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ct(Et),null;case 4:return To(),null;case 10:return Lp(s.type._context),null;case 22:case 23:return Tm(),null;case 24:return null;default:return null}}var kc=!1,on=!1,CM=typeof WeakSet=="function"?WeakSet:Set,Ae=null;function _o(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(d){_t(i,s,d)}else l.current=null}function um(i,s,l){try{l()}catch(d){_t(i,s,d)}}var R2=!1;function AM(i,s){if(Tp=Gl,i=f_(),fp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{l.nodeType,y.nodeType}catch(ge){l=null;break e}var x=0,N=-1,D=-1,Y=0,se=0,ce=i,ne=null;t:for(;;){for(var Se;ce!==l||g!==0&&ce.nodeType!==3||(N=x+g),ce!==y||d!==0&&ce.nodeType!==3||(D=x+d),ce.nodeType===3&&(x+=ce.nodeValue.length),(Se=ce.firstChild)!==null;)ne=ce,ce=Se;for(;;){if(ce===i)break t;if(ne===l&&++Y===g&&(N=x),ne===y&&++se===d&&(D=x),(Se=ce.nextSibling)!==null)break;ce=ne,ne=ce.parentNode}ce=Se}l=N===-1||D===-1?null:{start:N,end:D}}else l=null}l=l||{start:0,end:0}}else l=null;for(bp={focusedElem:i,selectionRange:l},Gl=!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 ve=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ve!==null){var ke=ve.memoizedProps,kt=ve.memoizedState,z=s.stateNode,M=z.getSnapshotBeforeUpdate(s.elementType===s.type?ke:cr(s.type,ke),kt);z.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ge){_t(s,s.return,ge)}if(i=s.sibling,i!==null){i.return=s.return,Ae=i;break}Ae=s.return}return ve=R2,R2=!1,ve}function ta(i,s,l){var d=s.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&i)===i){var y=g.destroy;g.destroy=void 0,y!==void 0&&um(s,l,y)}g=g.next}while(g!==d)}}function Nc(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 d=l.create;l.destroy=d()}l=l.next}while(l!==s)}}function am(i){var s=i.ref;if(s!==null){var l=i.stateNode;switch(i.tag){case 5:i=l;break;default: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[Nr],delete s[Vu],delete s[wp],delete s[aM],delete s[lM])),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 D2(i){return i.tag===5||i.tag===3||i.tag===4}function M2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||D2(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 lm(i,s,l){var d=i.tag;if(d===5||d===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=oc));else if(d!==4&&(i=i.child,i!==null))for(lm(i,s,l),i=i.sibling;i!==null;)lm(i,s,l),i=i.sibling}function cm(i,s,l){var d=i.tag;if(d===5||d===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(d!==4&&(i=i.child,i!==null))for(cm(i,s,l),i=i.sibling;i!==null;)cm(i,s,l),i=i.sibling}var Kt=null,fr=!1;function Ci(i,s,l){for(l=l.child;l!==null;)F2(i,s,l),l=l.sibling}function F2(i,s,l){if(kr&&typeof kr.onCommitFiberUnmount=="function")try{kr.onCommitFiberUnmount(jl,l)}catch(N){}switch(l.tag){case 5:on||_o(l,s);case 6:var d=Kt,g=fr;Kt=null,Ci(i,s,l),Kt=d,fr=g,Kt!==null&&(fr?(i=Kt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Kt.removeChild(l.stateNode));break;case 18:Kt!==null&&(fr?(i=Kt,l=l.stateNode,i.nodeType===8?Sp(i.parentNode,l):i.nodeType===1&&Sp(i,l),Ru(i)):Sp(Kt,l.stateNode));break;case 4:d=Kt,g=fr,Kt=l.stateNode.containerInfo,fr=!0,Ci(i,s,l),Kt=d,fr=g;break;case 0:case 11:case 14:case 15:if(!on&&(d=l.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var y=g,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&um(l,s,x),g=g.next}while(g!==d)}Ci(i,s,l);break;case 1:if(!on&&(_o(l,s),d=l.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=l.memoizedProps,d.state=l.memoizedState,d.componentWillUnmount()}catch(N){_t(l,s,N)}Ci(i,s,l);break;case 21:Ci(i,s,l);break;case 22:l.mode&1?(on=(d=on)||l.memoizedState!==null,Ci(i,s,l),on=d):Ci(i,s,l);break;default:Ci(i,s,l)}}function B2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new CM),s.forEach(function(d){var g=DM.bind(null,i,d);l.has(d)||(l.add(d),d.then(g,g))})}}function dr(i,s){var l=s.deletions;if(l!==null)for(var d=0;d<l.length;d++){var g=l[d];try{var y=i,x=s,N=x;e:for(;N!==null;){switch(N.tag){case 5:Kt=N.stateNode,fr=!1;break e;case 3:Kt=N.stateNode.containerInfo,fr=!0;break e;case 4:Kt=N.stateNode.containerInfo,fr=!0;break e}N=N.return}if(Kt===null)throw Error(n(160));F2(y,x,g),Kt=null,fr=!1;var D=g.alternate;D!==null&&(D.return=null),g.return=null}catch(Y){_t(g,s,Y)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)U2(s,i),s=s.sibling}function U2(i,s){var l=i.alternate,d=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(dr(s,i),Pr(i),d&4){try{ta(3,i,i.return),Nc(3,i)}catch(ke){_t(i,i.return,ke)}try{ta(5,i,i.return)}catch(ke){_t(i,i.return,ke)}}break;case 1:dr(s,i),Pr(i),d&512&&l!==null&&_o(l,l.return);break;case 5:if(dr(s,i),Pr(i),d&512&&l!==null&&_o(l,l.return),i.flags&32){var g=i.stateNode;try{Je(g,"")}catch(ke){_t(i,i.return,ke)}}if(d&4&&(g=i.stateNode,g!=null)){var y=i.memoizedProps,x=l!==null?l.memoizedProps:y,N=i.type,D=i.updateQueue;if(i.updateQueue=null,D!==null)try{N==="input"&&y.type==="radio"&&y.name!=null&&Lt(g,y),vr(N,x);var Y=vr(N,y);for(x=0;x<D.length;x+=2){var se=D[x],ce=D[x+1];se==="style"?di(g,ce):se==="dangerouslySetInnerHTML"?We(g,ce):se==="children"?Je(g,ce):L(g,se,ce,Y)}switch(N){case"input":Js(g,y);break;case"textarea":Fl(g,y);break;case"select":var ne=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var Se=y.value;Se!=null?fi(g,!!y.multiple,Se,!1):ne!==!!y.multiple&&(y.defaultValue!=null?fi(g,!!y.multiple,y.defaultValue,!0):fi(g,!!y.multiple,y.multiple?[]:"",!1))}g[Vu]=y}catch(ke){_t(i,i.return,ke)}}break;case 6:if(dr(s,i),Pr(i),d&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ke){_t(i,i.return,ke)}}break;case 3:if(dr(s,i),Pr(i),d&4&&l!==null&&l.memoizedState.isDehydrated)try{Ru(s.containerInfo)}catch(ke){_t(i,i.return,ke)}break;case 4:dr(s,i),Pr(i);break;case 13:dr(s,i),Pr(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(hm=vt())),d&4&&B2(i);break;case 22:if(se=l!==null&&l.memoizedState!==null,i.mode&1?(on=(Y=on)||se,dr(s,i),on=Y):dr(s,i),Pr(i),d&8192){if(Y=i.memoizedState!==null,(i.stateNode.isHidden=Y)&&!se&&(i.mode&1)!==0)for(Ae=i,se=i.child;se!==null;){for(ce=Ae=se;Ae!==null;){switch(ne=Ae,Se=ne.child,ne.tag){case 0:case 11:case 14:case 15:ta(4,ne,ne.return);break;case 1:_o(ne,ne.return);var ve=ne.stateNode;if(typeof ve.componentWillUnmount=="function"){d=ne,l=ne.return;try{s=d,ve.props=s.memoizedProps,ve.state=s.memoizedState,ve.componentWillUnmount()}catch(ke){_t(d,l,ke)}}break;case 5:_o(ne,ne.return);break;case 22:if(ne.memoizedState!==null){j2(ce);continue}}Se!==null?(Se.return=ne,Ae=Se):j2(ce)}se=se.sibling}e:for(se=null,ce=i;;){if(ce.tag===5){if(se===null){se=ce;try{g=ce.stateNode,Y?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(N=ce.stateNode,D=ce.memoizedProps.style,x=D!=null&&D.hasOwnProperty("display")?D.display:null,N.style.display=Vn("display",x))}catch(ke){_t(i,i.return,ke)}}}else if(ce.tag===6){if(se===null)try{ce.stateNode.nodeValue=Y?"":ce.memoizedProps}catch(ke){_t(i,i.return,ke)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;se===ce&&(se=null),ce=ce.return}se===ce&&(se=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:dr(s,i),Pr(i),d&4&&B2(i);break;case 21:break;default:dr(s,i),Pr(i)}}function Pr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(D2(l)){var d=l;break e}l=l.return}throw Error(n(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(Je(g,""),d.flags&=-33);var y=M2(i);cm(i,y,g);break;case 3:case 4:var x=d.stateNode.containerInfo,N=M2(i);lm(i,N,x);break;default:throw Error(n(161))}}catch(D){_t(i,i.return,D)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function vM(i,s,l){Ae=i,H2(i)}function H2(i,s,l){for(var d=(i.mode&1)!==0;Ae!==null;){var g=Ae,y=g.child;if(g.tag===22&&d){var x=g.memoizedState!==null||kc;if(!x){var N=g.alternate,D=N!==null&&N.memoizedState!==null||on;N=kc;var Y=on;if(kc=x,(on=D)&&!Y)for(Ae=g;Ae!==null;)x=Ae,D=x.child,x.tag===22&&x.memoizedState!==null?$2(g):D!==null?(D.return=x,Ae=D):$2(g);for(;y!==null;)Ae=y,H2(y),y=y.sibling;Ae=g,kc=N,on=Y}z2(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,Ae=y):z2(i)}}function z2(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:on||Nc(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!on)if(l===null)d.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:cr(s.type,l.memoizedProps);d.componentDidUpdate(g,l.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&j_(s,y,d);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}j_(s,x,l)}break;case 5:var N=s.stateNode;if(l===null&&s.flags&4){l=N;var D=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":D.autoFocus&&l.focus();break;case"img":D.src&&(l.src=D.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Y=s.alternate;if(Y!==null){var se=Y.memoizedState;if(se!==null){var ce=se.dehydrated;ce!==null&&Ru(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}on||s.flags&512&&am(s)}catch(ne){_t(s,s.return,ne)}}if(s===i){Ae=null;break}if(l=s.sibling,l!==null){l.return=s.return,Ae=l;break}Ae=s.return}}function j2(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 $2(i){for(;Ae!==null;){var s=Ae;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{Nc(4,s)}catch(D){_t(s,l,D)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var g=s.return;try{d.componentDidMount()}catch(D){_t(s,g,D)}}var y=s.return;try{am(s)}catch(D){_t(s,y,D)}break;case 5:var x=s.return;try{am(s)}catch(D){_t(s,x,D)}}}catch(D){_t(s,s.return,D)}if(s===i){Ae=null;break}var N=s.sibling;if(N!==null){N.return=s.return,Ae=N;break}Ae=s.return}}var kM=Math.ceil,Oc=q.ReactCurrentDispatcher,fm=q.ReactCurrentOwner,Kn=q.ReactCurrentBatchConfig,Ze=0,Vt=null,Rt=null,Qt=0,Fn=0,xo=bi(0),Mt=0,na=null,is=0,Ic=0,dm=0,ra=null,Cn=null,hm=0,So=1/0,Zr=null,Pc=!1,pm=null,Ai=null,Rc=!1,vi=null,Lc=0,ia=0,mm=null,Dc=-1,Mc=0;function fn(){return(Ze&6)!==0?vt():Dc!==-1?Dc:Dc=vt()}function ki(i){return(i.mode&1)===0?1:(Ze&2)!==0&&Qt!==0?Qt&-Qt:fM.transition!==null?(Mc===0&&(Mc=Mb()),Mc):(i=rt,i!==0||(i=window.event,i=i===void 0?16:qb(i.type)),i)}function hr(i,s,l,d){if(50<ia)throw ia=0,mm=null,Error(n(185));ku(i,l,d),((Ze&2)===0||i!==Vt)&&(i===Vt&&((Ze&2)===0&&(Ic|=l),Mt===4&&Ni(i,Qt)),An(i,d),l===1&&Ze===0&&(s.mode&1)===0&&(So=vt()+500,cc&&xi()))}function An(i,s){var l=i.callbackNode;f8(i,s);var d=ql(i,i===Vt?Qt:0);if(d===0)l!==null&&Rb(l),i.callbackNode=null,i.callbackPriority=0;else if(s=d&-d,i.callbackPriority!==s){if(l!=null&&Rb(l),s===1)i.tag===0?cM(q2.bind(null,i)):O_(q2.bind(null,i)),oM(function(){(Ze&6)===0&&xi()}),l=null;else{switch(Fb(d)){case 1:l=Gh;break;case 4:l=Lb;break;case 16:l=zl;break;case 536870912:l=Db;break;default:l=zl}l=Z2(l,V2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function V2(i,s){if(Dc=-1,Mc=0,(Ze&6)!==0)throw Error(n(327));var l=i.callbackNode;if(wo()&&i.callbackNode!==l)return null;var d=ql(i,i===Vt?Qt:0);if(d===0)return null;if((d&30)!==0||(d&i.expiredLanes)!==0||s)s=Fc(i,d);else{s=d;var g=Ze;Ze|=2;var y=W2();(Vt!==i||Qt!==s)&&(Zr=null,So=vt()+500,os(i,s));do try{IM();break}catch(N){Y2(i,N)}while(!0);Rp(),Oc.current=y,Ze=g,Rt!==null?s=0:(Vt=null,Qt=0,s=Mt)}if(s!==0){if(s===2&&(g=Kh(i),g!==0&&(d=g,s=gm(i,g))),s===1)throw l=na,os(i,0),Ni(i,d),An(i,vt()),l;if(s===6)Ni(i,d);else{if(g=i.current.alternate,(d&30)===0&&!NM(g)&&(s=Fc(i,d),s===2&&(y=Kh(i),y!==0&&(d=y,s=gm(i,y))),s===1))throw l=na,os(i,0),Ni(i,d),An(i,vt()),l;switch(i.finishedWork=g,i.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:us(i,Cn,Zr);break;case 3:if(Ni(i,d),(d&130023424)===d&&(s=hm+500-vt(),10<s)){if(ql(i,0)!==0)break;if(g=i.suspendedLanes,(g&d)!==d){fn(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=xp(us.bind(null,i,Cn,Zr),s);break}us(i,Cn,Zr);break;case 4:if(Ni(i,d),(d&4194240)===d)break;for(s=i.eventTimes,g=-1;0<d;){var x=31-ur(d);y=1<<x,x=s[x],x>g&&(g=x),d&=~y}if(d=g,d=vt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*kM(d/1960))-d,10<d){i.timeoutHandle=xp(us.bind(null,i,Cn,Zr),d);break}us(i,Cn,Zr);break;case 5:us(i,Cn,Zr);break;default:throw Error(n(329))}}}return An(i,vt()),i.callbackNode===l?V2.bind(null,i):null}function gm(i,s){var l=ra;return i.current.memoizedState.isDehydrated&&(os(i,s).flags|=256),i=Fc(i,s),i!==2&&(s=Cn,Cn=l,s!==null&&Em(s)),i}function Em(i){Cn===null?Cn=i:Cn.push.apply(Cn,i)}function NM(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var d=0;d<l.length;d++){var g=l[d],y=g.getSnapshot;g=g.value;try{if(!ar(y(),g))return!1}catch(x){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ni(i,s){for(s&=~dm,s&=~Ic,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-ur(s),d=1<<l;i[l]=-1,s&=~d}}function q2(i){if((Ze&6)!==0)throw Error(n(327));wo();var s=ql(i,0);if((s&1)===0)return An(i,vt()),null;var l=Fc(i,s);if(i.tag!==0&&l===2){var d=Kh(i);d!==0&&(s=d,l=gm(i,d))}if(l===1)throw l=na,os(i,0),Ni(i,s),An(i,vt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,us(i,Cn,Zr),An(i,vt()),null}function ym(i,s){var l=Ze;Ze|=1;try{return i(s)}finally{Ze=l,Ze===0&&(So=vt()+500,cc&&xi())}}function ss(i){vi!==null&&vi.tag===0&&(Ze&6)===0&&wo();var s=Ze;Ze|=1;var l=Kn.transition,d=rt;try{if(Kn.transition=null,rt=1,i)return i()}finally{rt=d,Kn.transition=l,Ze=s,(Ze&6)===0&&xi()}}function Tm(){Fn=xo.current,ct(xo)}function os(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,sM(l)),Rt!==null)for(l=Rt.return;l!==null;){var d=l;switch(kp(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&ac();break;case 3:To(),ct(xn),ct(nn),zp();break;case 5:Up(d);break;case 4:To();break;case 13:ct(Et);break;case 19:ct(Et);break;case 10:Lp(d.type._context);break;case 22:case 23:Tm()}l=l.return}if(Vt=i,Rt=i=Oi(i.current,null),Qt=Fn=s,Mt=0,na=null,dm=Ic=is=0,Cn=ra=null,ts!==null){for(s=0;s<ts.length;s++)if(l=ts[s],d=l.interleaved,d!==null){l.interleaved=null;var g=d.next,y=l.pending;if(y!==null){var x=y.next;y.next=g,d.next=x}l.pending=d}ts=null}return i}function Y2(i,s){do{var l=Rt;try{if(Rp(),bc.current=wc,_c){for(var d=yt.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}_c=!1}if(rs=0,$t=Dt=yt=null,Qu=!1,Xu=0,fm.current=null,l===null||l.return===null){Mt=1,na=s,Rt=null;break}e:{var y=i,x=l.return,N=l,D=s;if(s=Qt,N.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){var Y=D,se=N,ce=se.tag;if((se.mode&1)===0&&(ce===0||ce===11||ce===15)){var ne=se.alternate;ne?(se.updateQueue=ne.updateQueue,se.memoizedState=ne.memoizedState,se.lanes=ne.lanes):(se.updateQueue=null,se.memoizedState=null)}var Se=E2(x);if(Se!==null){Se.flags&=-257,y2(Se,x,N,y,s),Se.mode&1&&g2(y,Y,s),s=Se,D=Y;var ve=s.updateQueue;if(ve===null){var ke=new Set;ke.add(D),s.updateQueue=ke}else ve.add(D);break e}else{if((s&1)===0){g2(y,Y,s),bm();break e}D=Error(n(426))}}else if(pt&&N.mode&1){var kt=E2(x);if(kt!==null){(kt.flags&65536)===0&&(kt.flags|=256),y2(kt,x,N,y,s),Ip(bo(D,N));break e}}y=D=bo(D,N),Mt!==4&&(Mt=2),ra===null?ra=[y]:ra.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var z=p2(y,D,s);z_(y,z);break e;case 1:N=D;var M=y.type,V=y.stateNode;if((y.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Ai===null||!Ai.has(V)))){y.flags|=65536,s&=-s,y.lanes|=s;var ge=m2(y,N,s);z_(y,ge);break e}}y=y.return}while(y!==null)}K2(l)}catch(Oe){s=Oe,Rt===l&&l!==null&&(Rt=l=l.return);continue}break}while(!0)}function W2(){var i=Oc.current;return Oc.current=wc,i===null?wc:i}function bm(){(Mt===0||Mt===3||Mt===2)&&(Mt=4),Vt===null||(is&268435455)===0&&(Ic&268435455)===0||Ni(Vt,Qt)}function Fc(i,s){var l=Ze;Ze|=2;var d=W2();(Vt!==i||Qt!==s)&&(Zr=null,os(i,s));do try{OM();break}catch(g){Y2(i,g)}while(!0);if(Rp(),Ze=l,Oc.current=d,Rt!==null)throw Error(n(261));return Vt=null,Qt=0,Mt}function OM(){for(;Rt!==null;)G2(Rt)}function IM(){for(;Rt!==null&&!n8();)G2(Rt)}function G2(i){var s=J2(i.alternate,i,Fn);i.memoizedProps=i.pendingProps,s===null?K2(i):Rt=s,fm.current=null}function K2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=SM(l,s,Fn),l!==null){Rt=l;return}}else{if(l=wM(l,s),l!==null){l.flags&=32767,Rt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Mt=6,Rt=null;return}}if(s=s.sibling,s!==null){Rt=s;return}Rt=s=i}while(s!==null);Mt===0&&(Mt=5)}function us(i,s,l){var d=rt,g=Kn.transition;try{Kn.transition=null,rt=1,PM(i,s,l,d)}finally{Kn.transition=g,rt=d}return null}function PM(i,s,l,d){do wo();while(vi!==null);if((Ze&6)!==0)throw Error(n(327));l=i.finishedWork;var g=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var y=l.lanes|l.childLanes;if(d8(i,y),i===Vt&&(Rt=Vt=null,Qt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Rc||(Rc=!0,Z2(zl,function(){return wo(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=Kn.transition,Kn.transition=null;var x=rt;rt=1;var N=Ze;Ze|=4,fm.current=null,AM(i,l),U2(l,i),J8(bp),Gl=!!Tp,bp=Tp=null,i.current=l,vM(l),r8(),Ze=N,rt=x,Kn.transition=y}else i.current=l;if(Rc&&(Rc=!1,vi=i,Lc=g),y=i.pendingLanes,y===0&&(Ai=null),o8(l.stateNode),An(i,vt()),s!==null)for(d=i.onRecoverableError,l=0;l<s.length;l++)g=s[l],d(g.value,{componentStack:g.stack,digest:g.digest});if(Pc)throw Pc=!1,i=pm,pm=null,i;return(Lc&1)!==0&&i.tag!==0&&wo(),y=i.pendingLanes,(y&1)!==0?i===mm?ia++:(ia=0,mm=i):ia=0,xi(),null}function wo(){if(vi!==null){var i=Fb(Lc),s=Kn.transition,l=rt;try{if(Kn.transition=null,rt=16>i?16:i,vi===null)var d=!1;else{if(i=vi,vi=null,Lc=0,(Ze&6)!==0)throw Error(n(331));var g=Ze;for(Ze|=4,Ae=i.current;Ae!==null;){var y=Ae,x=y.child;if((Ae.flags&16)!==0){var N=y.deletions;if(N!==null){for(var D=0;D<N.length;D++){var Y=N[D];for(Ae=Y;Ae!==null;){var se=Ae;switch(se.tag){case 0:case 11:case 15:ta(8,se,y)}var ce=se.child;if(ce!==null)ce.return=se,Ae=ce;else for(;Ae!==null;){se=Ae;var ne=se.sibling,Se=se.return;if(L2(se),se===Y){Ae=null;break}if(ne!==null){ne.return=Se,Ae=ne;break}Ae=Se}}}var ve=y.alternate;if(ve!==null){var ke=ve.child;if(ke!==null){ve.child=null;do{var kt=ke.sibling;ke.sibling=null,ke=kt}while(ke!==null)}}Ae=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,Ae=x;else e:for(;Ae!==null;){if(y=Ae,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:ta(9,y,y.return)}var z=y.sibling;if(z!==null){z.return=y.return,Ae=z;break e}Ae=y.return}}var M=i.current;for(Ae=M;Ae!==null;){x=Ae;var V=x.child;if((x.subtreeFlags&2064)!==0&&V!==null)V.return=x,Ae=V;else e:for(x=M;Ae!==null;){if(N=Ae,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:Nc(9,N)}}catch(Oe){_t(N,N.return,Oe)}if(N===x){Ae=null;break e}var ge=N.sibling;if(ge!==null){ge.return=N.return,Ae=ge;break e}Ae=N.return}}if(Ze=g,xi(),kr&&typeof kr.onPostCommitFiberRoot=="function")try{kr.onPostCommitFiberRoot(jl,i)}catch(Oe){}d=!0}return d}finally{rt=l,Kn.transition=s}}return!1}function Q2(i,s,l){s=bo(l,s),s=p2(i,s,1),i=wi(i,s,1),s=fn(),i!==null&&(ku(i,1,s),An(i,s))}function _t(i,s,l){if(i.tag===3)Q2(i,i,l);else for(;s!==null;){if(s.tag===3){Q2(s,i,l);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Ai===null||!Ai.has(d))){i=bo(l,i),i=m2(s,i,1),s=wi(s,i,1),i=fn(),s!==null&&(ku(s,1,i),An(s,i));break}}s=s.return}}function RM(i,s,l){var d=i.pingCache;d!==null&&d.delete(s),s=fn(),i.pingedLanes|=i.suspendedLanes&l,Vt===i&&(Qt&l)===l&&(Mt===4||Mt===3&&(Qt&130023424)===Qt&&500>vt()-hm?os(i,0):dm|=l),An(i,s)}function X2(i,s){s===0&&((i.mode&1)===0?s=1:(s=Vl,Vl<<=1,(Vl&130023424)===0&&(Vl=4194304)));var l=fn();i=Qr(i,s),i!==null&&(ku(i,s,l),An(i,l))}function LM(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),X2(i,l)}function DM(i,s){var l=0;switch(i.tag){case 13:var d=i.stateNode,g=i.memoizedState;g!==null&&(l=g.retryLane);break;case 19:d=i.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(s),X2(i,l)}var J2;J2=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||xn.current)wn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return wn=!1,xM(i,s,l);wn=(i.flags&131072)!==0}else wn=!1,pt&&(s.flags&1048576)!==0&&I_(s,dc,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;vc(i,s),i=s.pendingProps;var g=fo(s,nn.current);yo(s,l),g=Vp(null,s,d,i,g,l);var y=qp();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Sn(d)?(y=!0,lc(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Fp(s),g.updater=Cc,s.stateNode=g,g._reactInternals=s,Xp(s,d,i,l),s=tm(null,s,d,!0,y,l)):(s.tag=0,pt&&y&&vp(s),cn(null,s,g,l),s=s.child),s;case 16:d=s.elementType;e:{switch(vc(i,s),i=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=FM(d),i=cr(d,i),g){case 0:s=em(null,s,d,i,l);break e;case 1:s=w2(null,s,d,i,l);break e;case 11:s=T2(null,s,d,i,l);break e;case 14:s=b2(null,s,d,cr(d.type,i),l);break e}throw Error(n(306,d,""))}return s;case 0:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cr(d,g),em(i,s,d,g,l);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cr(d,g),w2(i,s,d,g,l);case 3:e:{if(C2(s),i===null)throw Error(n(387));d=s.pendingProps,y=s.memoizedState,g=y.element,H_(i,s),yc(s,d,null,l);var x=s.memoizedState;if(d=x.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=bo(Error(n(423)),s),s=A2(i,s,d,l,g);break e}else if(d!==g){g=bo(Error(n(424)),s),s=A2(i,s,d,l,g);break e}else for(Mn=Ti(s.stateNode.containerInfo.firstChild),Dn=s,pt=!0,lr=null,l=B_(s,null,d,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(mo(),d===g){s=Jr(i,s,l);break e}cn(i,s,d,l)}s=s.child}return s;case 5:return $_(s),i===null&&Op(s),d=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,x=g.children,_p(d,g)?x=null:y!==null&&_p(d,y)&&(s.flags|=32),S2(i,s),cn(i,s,x,l),s.child;case 6:return i===null&&Op(s),null;case 13:return v2(i,s,l);case 4:return Bp(s,s.stateNode.containerInfo),d=s.pendingProps,i===null?s.child=go(s,null,d,l):cn(i,s,d,l),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cr(d,g),T2(i,s,d,g,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(d=s.type._context,g=s.pendingProps,y=s.memoizedProps,x=g.value,at(mc,d._currentValue),d._currentValue=x,y!==null)if(ar(y.value,x)){if(y.children===g.children&&!xn.current){s=Jr(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var N=y.dependencies;if(N!==null){x=y.child;for(var D=N.firstContext;D!==null;){if(D.context===d){if(y.tag===1){D=Xr(-1,l&-l),D.tag=2;var Y=y.updateQueue;if(Y!==null){Y=Y.shared;var se=Y.pending;se===null?D.next=D:(D.next=se.next,se.next=D),Y.pending=D}}y.lanes|=l,D=y.alternate,D!==null&&(D.lanes|=l),Dp(y.return,l,s),N.lanes|=l;break}D=D.next}}else if(y.tag===10)x=y.type===s.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=l,N=x.alternate,N!==null&&(N.lanes|=l),Dp(x,l,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}cn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,yo(s,l),g=Wn(g),d=d(g),s.flags|=1,cn(i,s,d,l),s.child;case 14:return d=s.type,g=cr(d,s.pendingProps),g=cr(d.type,g),b2(i,s,d,g,l);case 15:return _2(i,s,s.type,s.pendingProps,l);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cr(d,g),vc(i,s),s.tag=1,Sn(d)?(i=!0,lc(s)):i=!1,yo(s,l),d2(s,d,g),Xp(s,d,g,l),tm(null,s,d,!0,i,l);case 19:return N2(i,s,l);case 22:return x2(i,s,l)}throw Error(n(156,s.tag))};function Z2(i,s){return Pb(i,s)}function MM(i,s,l,d){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=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qn(i,s,l,d){return new MM(i,s,l,d)}function _m(i){return i=i.prototype,!(!i||!i.isReactComponent)}function FM(i){if(typeof i=="function")return _m(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===ye)return 14}return 2}function Oi(i,s){var l=i.alternate;return l===null?(l=Qn(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 Bc(i,s,l,d,g,y){var x=2;if(d=i,typeof i=="function")_m(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case ee:return as(l.children,g,y,s);case be:x=8,g|=8;break;case we:return i=Qn(12,l,s,g|2),i.elementType=we,i.lanes=y,i;case fe:return i=Qn(13,l,s,g),i.elementType=fe,i.lanes=y,i;case de:return i=Qn(19,l,s,g),i.elementType=de,i.lanes=y,i;case oe:return Uc(l,g,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case H:x=10;break e;case ae:x=9;break e;case he:x=11;break e;case ye:x=14;break e;case Ce:x=16,d=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=Qn(x,l,s,g),s.elementType=i,s.type=d,s.lanes=y,s}function as(i,s,l,d){return i=Qn(7,i,d,s),i.lanes=l,i}function Uc(i,s,l,d){return i=Qn(22,i,d,s),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function xm(i,s,l){return i=Qn(6,i,null,s),i.lanes=l,i}function Sm(i,s,l){return s=Qn(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function BM(i,s,l,d,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qh(0),this.expirationTimes=Qh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qh(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function wm(i,s,l,d,g,y,x,N,D){return i=new BM(i,s,l,N,D),s===1?(s=1,y===!0&&(s|=8)):s=0,y=Qn(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:d,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fp(y),i}function UM(i,s,l){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:d==null?null:""+d,children:i,containerInfo:s,implementation:l}}function ex(i){if(!i)return _i;i=i._reactInternals;e:{if(Qi(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(Sn(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(Sn(l))return k_(i,l,s)}return s}function tx(i,s,l,d,g,y,x,N,D){return i=wm(l,d,!0,i,g,y,x,N,D),i.context=ex(null),l=i.current,d=fn(),g=ki(l),y=Xr(d,g),y.callback=s!=null?s:null,wi(l,y,g),i.current.lanes=g,ku(i,g,d),An(i,d),i}function Hc(i,s,l,d){var g=s.current,y=fn(),x=ki(g);return l=ex(l),s.context===null?s.context=l:s.pendingContext=l,s=Xr(y,x),s.payload={element:i},d=d===void 0?null:d,d!==null&&(s.callback=d),i=wi(g,s,x),i!==null&&(hr(i,g,x,y),Ec(i,g,x)),x}function zc(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function nx(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function Cm(i,s){nx(i,s),(i=i.alternate)&&nx(i,s)}function HM(){return null}var rx=typeof reportError=="function"?reportError:function(i){console.error(i)};function Am(i){this._internalRoot=i}jc.prototype.render=Am.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Hc(i,s,null,null)},jc.prototype.unmount=Am.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;ss(function(){Hc(null,i,null,null)}),s[Yr]=null}};function jc(i){this._internalRoot=i}jc.prototype.unstable_scheduleHydration=function(i){if(i){var s=Hb();i={blockedOn:null,target:i,priority:s};for(var l=0;l<gi.length&&s!==0&&s<gi[l].priority;l++);gi.splice(l,0,i),l===0&&$b(i)}};function vm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function $c(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function ix(){}function zM(i,s,l,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var Y=zc(x);y.call(Y)}}var x=tx(s,d,i,0,null,!1,!1,"",ix);return i._reactRootContainer=x,i[Yr]=x.current,ju(i.nodeType===8?i.parentNode:i),ss(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof d=="function"){var N=d;d=function(){var Y=zc(D);N.call(Y)}}var D=wm(i,0,!1,null,null,!1,!1,"",ix);return i._reactRootContainer=D,i[Yr]=D.current,ju(i.nodeType===8?i.parentNode:i),ss(function(){Hc(s,D,l,d)}),D}function Vc(i,s,l,d,g){var y=l._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var N=g;g=function(){var D=zc(x);N.call(D)}}Hc(s,x,i,g)}else x=zM(l,s,i,g,d);return zc(x)}Bb=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=vu(s.pendingLanes);l!==0&&(Xh(s,l|1),An(s,vt()),(Ze&6)===0&&(So=vt()+500,xi()))}break;case 13:ss(function(){var d=Qr(i,1);if(d!==null){var g=fn();hr(d,i,1,g)}}),Cm(i,1)}},Jh=function(i){if(i.tag===13){var s=Qr(i,134217728);if(s!==null){var l=fn();hr(s,i,134217728,l)}Cm(i,134217728)}},Ub=function(i){if(i.tag===13){var s=ki(i),l=Qr(i,s);if(l!==null){var d=fn();hr(l,i,s,d)}Cm(i,s)}},Hb=function(){return rt},zb=function(i,s){var l=rt;try{return rt=i,s()}finally{rt=l}},Vh=function(i,s,l){switch(s){case"input":if(Js(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 d=l[s];if(d!==i&&d.form===i.form){var g=uc(d);if(!g)throw Error(n(90));tn(d),Js(d,g)}}}break;case"textarea":Fl(i,l);break;case"select":s=l.value,s!=null&&fi(i,!!l.multiple,s,!1)}},Cb=ym,Ab=ss;var jM={usingClientEntryPoint:!1,Events:[qu,lo,uc,Sb,wb,ym]},sa={findFiberByHostInstance:Xi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},$M={bundleType:sa.bundleType,version:sa.version,rendererPackageName:sa.rendererPackageName,rendererConfig:sa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:q.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Ob(i),i===null?null:i.stateNode},findFiberByHostInstance:sa.findFiberByHostInstance||HM,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 qc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qc.isDisabled&&qc.supportsFiber)try{jl=qc.inject($M),kr=qc}catch(i){}}return En.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jM,En.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vm(s))throw Error(n(200));return UM(i,s,null,l)},En.createRoot=function(i,s){if(!vm(i))throw Error(n(299));var l=!1,d="",g=rx;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=wm(i,1,!1,null,null,l,!1,d,g),i[Yr]=s.current,ju(i.nodeType===8?i.parentNode:i),new Am(s)},En.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=Ob(s),i=i===null?null:i.stateNode,i},En.flushSync=function(i){return ss(i)},En.hydrate=function(i,s,l){if(!$c(s))throw Error(n(200));return Vc(null,i,s,!0,l)},En.hydrateRoot=function(i,s,l){if(!vm(i))throw Error(n(405));var d=l!=null&&l.hydratedSources||null,g=!1,y="",x=rx;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=tx(s,null,i,1,l!=null?l:null,g,!1,y,x),i[Yr]=s.current,ju(i),d)for(i=0;i<d.length;i++)l=d[i],g=l._getVersion,g=g(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,g]:s.mutableSourceEagerHydrationData.push(l,g);return new jc(s)},En.render=function(i,s,l){if(!$c(s))throw Error(n(200));return Vc(null,i,s,!1,l)},En.unmountComponentAtNode=function(i){if(!$c(i))throw Error(n(40));return i._reactRootContainer?(ss(function(){Vc(null,null,i,!1,function(){i._reactRootContainer=null,i[Yr]=null})}),!0):!1},En.unstable_batchedUpdates=ym,En.unstable_renderSubtreeIntoContainer=function(i,s,l,d){if(!$c(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Vc(i,s,l,!1,d)},En.version="18.3.1-next-f1338f8080-20240426",En}var Wg;function Gg(){if(Wg)return nd.exports;Wg=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(),nd.exports=Tv(),nd.exports}var qa=Gg();function bv(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var sd=()=>e=>Array.from(new Set(e)),Kg=typeof globalThis.document!="undefined"?G.useLayoutEffect:G.useEffect;function Ya(e){var E,b;const t=(E=e().value)!=null?E:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=G.useState(t),[o,u]=G.useState(r),a=e().value!==void 0,c=G.useRef(o);c.current=a?e().value:o;const f=G.useRef(c.current);Kg(()=>{f.current=c.current},[o,e().value]);const h=T=>{var C,I;const _=f.current,S=xs(T)?T(_):T;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),a||u(S),n(S,_)||(I=(C=e()).onChange)==null||I.call(C,S,_)};function m(){return a?e().value:o}return{initial:r,ref:c,get:m,set(T){(e().sync?qa.flushSync:EA)(()=>h(T))},invoke(T,_){var S,C;(C=(S=e()).onChange)==null||C.call(S,T,_)},hash(T){var _,S,C;return(C=(S=(_=e()).hash)==null?void 0:S.call(_,T))!=null?C:String(T)}}}Ya.cleanup=e=>{G.useEffect(()=>e,[])},Ya.ref=e=>{const t=G.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function _v(e){const t=G.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var xv=(e,t)=>{const n=G.useRef(!1),r=G.useRef(!1);G.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),G.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function od(e,t={}){var ae,he,fe,de,ye,Ce;const n=G.useMemo(()=>{const{id:oe,ids:$,getRootNode:te}=t;return gv({id:oe,ids:$,getRootNode:te})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},o=(he=(ae=e.props)==null?void 0:ae.call(e,{props:qf(t),scope:n}))!=null?he:t,u=Sv(o),a=(fe=e.context)==null?void 0:fe.call(e,{prop:u,bindable:Ya,scope:n,flush:Xg,getContext(){return f},getComputed(){return X},getRefs(){return S},getEvent(){return T()}}),c=Qg(a),f={get(oe){var $;return($=c.current)==null?void 0:$[oe].ref.current},set(oe,$){var te;(te=c.current)==null||te[oe].set($)},initial(oe){var $;return($=c.current)==null?void 0:$[oe].initial},hash(oe){var te,w;const $=(te=c.current)==null?void 0:te[oe].get();return(w=c.current)==null?void 0:w[oe].hash($)}},h=G.useRef(new Map),m=G.useRef(null),E=G.useRef(null),b=G.useRef({type:""}),T=()=>Te(U({},b.current),{current(){return b.current},previous(){return E.current}}),_=()=>Te(U({},F),{matches(...oe){return oe.includes(F.ref.current)},hasTag(oe){var $,te;return!!((te=($=e.states[F.ref.current])==null?void 0:$.tags)!=null&&te.includes(oe))}}),S=_v((ye=(de=e.refs)==null?void 0:de.call(e,{prop:u,context:f}))!=null?ye:{}),C=()=>({state:_(),context:f,event:T(),prop:u,send:H,action:I,guard:B,track:xv,refs:S,computed:X,flush:Xg,scope:n,choose:q}),I=oe=>{const $=xs(oe)?oe(C()):oe;if(!$)return;const te=$.map(w=>{var K,k;const R=(k=(K=e.implementations)==null?void 0:K.actions)==null?void 0:k[w];return R||Yf(`[zag-js] No implementation found for action "${JSON.stringify(w)}"`),R});for(const w of te)w==null||w(C())},B=oe=>{var $,te;return xs(oe)?oe(C()):(te=($=e.implementations)==null?void 0:$.guards)==null?void 0:te[oe](C())},L=oe=>{const $=xs(oe)?oe(C()):oe;if(!$)return;const te=$.map(R=>{var k,_e;const K=(_e=(k=e.implementations)==null?void 0:k.effects)==null?void 0:_e[R];return K||Yf(`[zag-js] No implementation found for effect "${JSON.stringify(R)}"`),K}),w=[];for(const R of te){const K=R==null?void 0:R(C());K&&w.push(K)}return()=>w.forEach(R=>R==null?void 0:R())},q=oe=>uA(oe).find($=>{let te=!$.guard;return Ba($.guard)?te=!!B($.guard):xs($.guard)&&(te=$.guard(C())),te}),X=oe=>{TA(e.computed,()=>"[zag-js] No computed object found on machine");const $=e.computed[oe];return $({context:f,event:T(),prop:u,refs:S,scope:n,computed:X})},F=Ya(()=>({defaultValue:e.initialState({prop:u}),onChange(oe,$){var w,R,K,k;if($){const _e=h.current.get($);_e==null||_e(),h.current.delete($)}$&&I((w=e.states[$])==null?void 0:w.exit),I((R=m.current)==null?void 0:R.actions);const te=L((K=e.states[oe])==null?void 0:K.effects);if(te&&h.current.set(oe,te),$===td){I(e.entry);const _e=L(e.effects);_e&&h.current.set(td,_e)}I((k=e.states[oe])==null?void 0:k.entry)}})),ee=G.useRef(void 0),be=G.useRef(Cs.NotStarted);Kg(()=>{queueMicrotask(()=>{var R;const te=be.current===Cs.Started;be.current=Cs.Started,r(te?"rehydrating...":"initializing...");const w=(R=ee.current)!=null?R:F.initial;F.invoke(w,te?F.get():td)});const oe=h.current,$=F.ref.current;return()=>{r("unmounting..."),ee.current=$,be.current=Cs.Stopped,oe.forEach(te=>te==null?void 0:te()),h.current=new Map,m.current=null,queueMicrotask(()=>{I(e.exit)})}},[]);const we=()=>"ref"in F?F.ref.current:F.get(),H=oe=>{queueMicrotask(()=>{var k,_e,Ue,ie,xe;if(be.current!==Cs.Started)return;E.current=b.current,b.current=oe;let $=we();const te=(Ue=(k=e.states[$].on)==null?void 0:k[oe.type])!=null?Ue:(_e=e.on)==null?void 0:_e[oe.type],w=q(te);if(!w)return;m.current=w;const R=(ie=w.target)!=null?ie:$;r("transition",oe.type,w.target||$,`(${w.actions})`);const K=R!==$;K?qa.flushSync(()=>F.set(R)):w.reenter&&!K?F.invoke($,$):I((xe=w.actions)!=null?xe:[])})};return(Ce=e.watch)==null||Ce.call(e,C()),{state:_(),send:H,context:f,prop:u,scope:n,refs:S,computed:X,event:T(),getStatus:()=>be.current}}function Qg(e){const t=G.useRef(e);return t.current=e,t}function Sv(e){const t=Qg(e);return function(r){return t.current[r]}}function Xg(e){queueMicrotask(()=>{qa.flushSync(()=>e())})}var Jg=bv(e=>e);function Wa(...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 wv(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 ud=e=>{const t=G.memo(G.forwardRef((n,r)=>{const h=n,{asChild:o,children:u}=h,a=Yt(h,["asChild","children"]);if(!o)return G.createElement(e,Te(U({},a),{ref:r}),u);if(!G.isValidElement(u))return null;const c=G.Children.only(u),f=wv(c);return G.cloneElement(c,Te(U({},nr(a,c.props)),{ref:r?Wa(r,f):f}))}));return t.displayName=e.displayName||e.name,t},ni=(()=>{const e=new Map;return new Proxy(ud,{apply(t,n,r){return ud(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,ud(r)),e.get(r)}})})();function Cv(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function As(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:u,defaultValue:a}=e,c=G.createContext(a);c.displayName=t;function f(){var m;const h=G.useContext(c);if(!h&&n){const E=new Error(u!=null?u:Cv(r,o));throw E.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,E,f),E}return h}return[c.Provider,f,c]}const[Av,ad]=As({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[Zg,Vo]=As({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),e1=G.forwardRef((e,t)=>{const n=ad(),r=Vo(),o=nr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:O.jsx(ni.div,Te(U({},o),{ref:Wa(r.ref,t)}))});e1.displayName="PopoverContent";const t1=G.forwardRef((e,t)=>{const n=ad(),r=Vo(),o=nr(n.getPositionerProps(),e);return r.unmounted?null:O.jsx(ni.div,Te(U({},o),{ref:t}))});t1.displayName="PopoverPositioner";const n1=()=>(e,t)=>t.reduce((n,r)=>{const[o,u]=n,a=r;return u[a]!==void 0&&(o[a]=u[a]),delete u[a],[o,u]},[{},U({},e)]),r1=e=>n1()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function vv(e,t){const{state:n,send:r,context:o}=e,u=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:u,setNode(a){a&&r({type:"NODE.SET",node:a})},unmount(){r({type:"UNMOUNT"})}}}var kv={props({props:e}){return Te(U({},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",ja(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 u=t.get("node");if(!o&&(u==null?void 0:u.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});gn(()=>{var c,f;const a=Ga(t.get("styles"));e.set("unmountAnimationName",a),a==="none"||a===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((f=t.get("styles"))==null?void 0:f.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{gn(()=>{e.set("prevAnimationName",Ga(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 u=f=>{var m,E,b;((b=(E=(m=f.composedPath)==null?void 0:m.call(f))==null?void 0:E[0])!=null?b:f.target)===o&&e.set("prevAnimationName",Ga(t.get("styles")))},a=f=>{const h=Ga(t.get("styles"));Br(f)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",u),o.addEventListener("animationcancel",a),o.addEventListener("animationend",a);const c=Va(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",u),o.removeEventListener("animationcancel",a),o.removeEventListener("animationend",a),iv(()=>c())}}}}};function Ga(e){return(e==null?void 0:e.animationName)||"none"}sd()(["onExitComplete","present","immediate"]);function Nv(e,t={}){const{sync:n=!1}=t,r=Ov(e);return G.useCallback((...o)=>{var u;return n?queueMicrotask(()=>{var a;return(a=r.current)==null?void 0:a.call(r,...o)}):(u=r.current)==null?void 0:u.call(r,...o)},[n,r])}function Ov(e){const t=G.useRef(e);return t.current=e,t}const ld=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,u=Yt(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),a=G.useRef(!1),c=Te(U({},u),{present:r,onExitComplete:Nv(e.onExitComplete)}),f=od(kv,c),h=vv(f);h.present&&(a.current=!0);const m=!h.present&&!a.current&&t||n&&!h.present&&a.current,E=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:E,present:h.present,unmounted:m}};var vs=(e,t=[])=>({parts:(...n)=>{if(Iv(t))return vs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>vs(e,[...t,...n]),omit:(...n)=>vs(e,t.filter(r=>!n.includes(r))),rename:n=>vs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${ks(e)}"][data-part="${ks(r)}"]`,`& [data-scope="${ks(e)}"][data-part="${ks(r)}"]`].join(", "),attrs:{"data-scope":ks(e),"data-part":ks(r)}}}),{})}),ks=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Iv=e=>e.length===0;const Pv=["top","right","bottom","left"],ri=Math.min,kn=Math.max,Ka=Math.round,Qa=Math.floor,yr=e=>({x:e,y:e}),Rv={left:"right",right:"left",bottom:"top",top:"bottom"},Lv={start:"end",end:"start"};function cd(e,t,n){return kn(e,ri(t,n))}function Hr(e,t){return typeof e=="function"?e(t):e}function zr(e){return e.split("-")[0]}function Ns(e){return e.split("-")[1]}function fd(e){return e==="x"?"y":"x"}function dd(e){return e==="y"?"height":"width"}const Dv=new Set(["top","bottom"]);function Tr(e){return Dv.has(zr(e))?"y":"x"}function hd(e){return fd(Tr(e))}function Mv(e,t,n){n===void 0&&(n=!1);const r=Ns(e),o=hd(e),u=dd(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[u]>t.floating[u]&&(a=Xa(a)),[a,Xa(a)]}function Fv(e){const t=Xa(e);return[pd(e),t,pd(t)]}function pd(e){return e.replace(/start|end/g,t=>Lv[t])}const i1=["left","right"],s1=["right","left"],Bv=["top","bottom"],Uv=["bottom","top"];function Hv(e,t,n){switch(e){case"top":case"bottom":return n?t?s1:i1:t?i1:s1;case"left":case"right":return t?Bv:Uv;default:return[]}}function zv(e,t,n,r){const o=Ns(e);let u=Hv(zr(e),n==="start",r);return o&&(u=u.map(a=>a+"-"+o),t&&(u=u.concat(u.map(pd)))),u}function Xa(e){return e.replace(/left|right|bottom|top/g,t=>Rv[t])}function jv(e){return U({top:0,right:0,bottom:0,left:0},e)}function o1(e){return typeof e!="number"?jv(e):{top:e,right:e,bottom:e,left:e}}function Ja(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 u1(e,t,n){let{reference:r,floating:o}=e;const u=Tr(t),a=hd(t),c=dd(a),f=zr(t),h=u==="y",m=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,b=r[c]/2-o[c]/2;let T;switch(f){case"top":T={x:m,y:r.y-o.height};break;case"bottom":T={x:m,y:r.y+r.height};break;case"right":T={x:r.x+r.width,y:E};break;case"left":T={x:r.x-o.width,y:E};break;default:T={x:r.x,y:r.y}}switch(Ns(t)){case"start":T[a]-=b*(n&&h?-1:1);break;case"end":T[a]+=b*(n&&h?-1:1);break}return T}const $v=(e,t,n)=>nt(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:u=[],platform:a}=n,c=u.filter(Boolean),f=yield a.isRTL==null?void 0:a.isRTL(t);let h=yield a.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:E}=u1(h,r,f),b=r,T={},_=0;for(let S=0;S<c.length;S++){const{name:C,fn:I}=c[S],{x:B,y:L,data:q,reset:X}=yield I({x:m,y:E,initialPlacement:r,placement:b,strategy:o,middlewareData:T,rects:h,platform:a,elements:{reference:e,floating:t}});m=B!=null?B:m,E=L!=null?L:E,T=Te(U({},T),{[C]:U(U({},T[C]),q)}),X&&_<=50&&(_++,typeof X=="object"&&(X.placement&&(b=X.placement),X.rects&&(h=X.rects===!0?yield a.getElementRects({reference:e,floating:t,strategy:o}):X.rects),{x:m,y:E}=u1(h,b,f)),S=-1)}return{x:m,y:E,placement:b,strategy:o,middlewareData:T}});function qo(e,t){return nt(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:u,rects:a,elements:c,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:E="floating",altBoundary:b=!1,padding:T=0}=Hr(t,e),_=o1(T),C=c[b?E==="floating"?"reference":"floating":E],I=Ja(yield u.getClippingRect({element:(n=yield u.isElement==null?void 0:u.isElement(C))==null||n?C:C.contextElement||(yield u.getDocumentElement==null?void 0:u.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:f})),B=E==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,L=yield u.getOffsetParent==null?void 0:u.getOffsetParent(c.floating),q=(yield u.isElement==null?void 0:u.isElement(L))?(yield u.getScale==null?void 0:u.getScale(L))||{x:1,y:1}:{x:1,y:1},X=Ja(u.convertOffsetParentRelativeRectToViewportRelativeRect?yield u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:B,offsetParent:L,strategy:f}):B);return{top:(I.top-X.top+_.top)/q.y,bottom:(X.bottom-I.bottom+_.bottom)/q.y,left:(I.left-X.left+_.left)/q.x,right:(X.right-I.right+_.right)/q.x}})}const Vv=e=>({name:"arrow",options:e,fn(n){return nt(this,null,function*(){const{x:r,y:o,placement:u,rects:a,platform:c,elements:f,middlewareData:h}=n,{element:m,padding:E=0}=Hr(e,n)||{};if(m==null)return{};const b=o1(E),T={x:r,y:o},_=hd(u),S=dd(_),C=yield c.getDimensions(m),I=_==="y",B=I?"top":"left",L=I?"bottom":"right",q=I?"clientHeight":"clientWidth",X=a.reference[S]+a.reference[_]-T[_]-a.floating[S],F=T[_]-a.reference[_],ee=yield c.getOffsetParent==null?void 0:c.getOffsetParent(m);let be=ee?ee[q]:0;(!be||!(yield c.isElement==null?void 0:c.isElement(ee)))&&(be=f.floating[q]||a.floating[S]);const we=X/2-F/2,H=be/2-C[S]/2-1,ae=ri(b[B],H),he=ri(b[L],H),fe=ae,de=be-C[S]-he,ye=be/2-C[S]/2+we,Ce=cd(fe,ye,de),oe=!h.arrow&&Ns(u)!=null&&ye!==Ce&&a.reference[S]/2-(ye<fe?ae:he)-C[S]/2<0,$=oe?ye<fe?ye-fe:ye-de:0;return{[_]:T[_]+$,data:U({[_]:Ce,centerOffset:ye-Ce-$},oe&&{alignmentOffset:$}),reset:oe}})}}),qv=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return nt(this,null,function*(){var r,o;const{placement:u,middlewareData:a,rects:c,initialPlacement:f,platform:h,elements:m}=n,ye=Hr(e,n),{mainAxis:E=!0,crossAxis:b=!0,fallbackPlacements:T,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0}=ye,I=Yt(ye,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const B=zr(u),L=Tr(f),q=zr(f)===f,X=yield h.isRTL==null?void 0:h.isRTL(m.floating),F=T||(q||!C?[Xa(f)]:Fv(f)),ee=S!=="none";!T&&ee&&F.push(...zv(f,C,S,X));const be=[f,...F],we=yield qo(n,I),H=[];let ae=((o=a.flip)==null?void 0:o.overflows)||[];if(E&&H.push(we[B]),b){const Ce=Mv(u,c,X);H.push(we[Ce[0]],we[Ce[1]])}if(ae=[...ae,{placement:u,overflows:H}],!H.every(Ce=>Ce<=0)){var he,fe;const Ce=(((he=a.flip)==null?void 0:he.index)||0)+1,oe=be[Ce];if(oe&&(!(b==="alignment"?L!==Tr(oe):!1)||ae.every(w=>Tr(w.placement)===L?w.overflows[0]>0:!0)))return{data:{index:Ce,overflows:ae},reset:{placement:oe}};let $=(fe=ae.filter(te=>te.overflows[0]<=0).sort((te,w)=>te.overflows[1]-w.overflows[1])[0])==null?void 0:fe.placement;if(!$)switch(_){case"bestFit":{var de;const te=(de=ae.filter(w=>{if(ee){const R=Tr(w.placement);return R===L||R==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(R=>R>0).reduce((R,K)=>R+K,0)]).sort((w,R)=>w[1]-R[1])[0])==null?void 0:de[0];te&&($=te);break}case"initialPlacement":$=f;break}if(u!==$)return{reset:{placement:$}}}return{}})}}};function a1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function l1(e){return Pv.some(t=>e[t]>=0)}const Yv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return nt(this,null,function*(){const{rects:r}=n,a=Hr(e,n),{strategy:o="referenceHidden"}=a,u=Yt(a,["strategy"]);switch(o){case"referenceHidden":{const c=yield qo(n,Te(U({},u),{elementContext:"reference"})),f=a1(c,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:l1(f)}}}case"escaped":{const c=yield qo(n,Te(U({},u),{altBoundary:!0})),f=a1(c,r.floating);return{data:{escapedOffsets:f,escaped:l1(f)}}}default:return{}}})}}},c1=new Set(["left","top"]);function Wv(e,t){return nt(this,null,function*(){const{placement:n,platform:r,elements:o}=e,u=yield r.isRTL==null?void 0:r.isRTL(o.floating),a=zr(n),c=Ns(n),f=Tr(n)==="y",h=c1.has(a)?-1:1,m=u&&f?-1:1,E=Hr(t,e);let{mainAxis:b,crossAxis:T,alignmentAxis:_}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof _=="number"&&(T=c==="end"?_*-1:_),f?{x:T*m,y:b*h}:{x:b*h,y:T*m}})}const Gv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return nt(this,null,function*(){var r,o;const{x:u,y:a,placement:c,middlewareData:f}=n,h=yield Wv(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(o=f.arrow)!=null&&o.alignmentOffset?{}:{x:u+h.x,y:a+h.y,data:Te(U({},h),{placement:c})}})}}},Kv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return nt(this,null,function*(){const{x:r,y:o,placement:u}=n,I=Hr(e,n),{mainAxis:a=!0,crossAxis:c=!1,limiter:f={fn:B=>{let{x:L,y:q}=B;return{x:L,y:q}}}}=I,h=Yt(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},E=yield qo(n,h),b=Tr(zr(u)),T=fd(b);let _=m[T],S=m[b];if(a){const B=T==="y"?"top":"left",L=T==="y"?"bottom":"right",q=_+E[B],X=_-E[L];_=cd(q,_,X)}if(c){const B=b==="y"?"top":"left",L=b==="y"?"bottom":"right",q=S+E[B],X=S-E[L];S=cd(q,S,X)}const C=f.fn(Te(U({},n),{[T]:_,[b]:S}));return Te(U({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[T]:a,[b]:c}}})})}}},Qv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:u,middlewareData:a}=t,{offset:c=0,mainAxis:f=!0,crossAxis:h=!0}=Hr(e,t),m={x:n,y:r},E=Tr(o),b=fd(E);let T=m[b],_=m[E];const S=Hr(c,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:U({mainAxis:0,crossAxis:0},S);if(f){const L=b==="y"?"height":"width",q=u.reference[b]-u.floating[L]+C.mainAxis,X=u.reference[b]+u.reference[L]-C.mainAxis;T<q?T=q:T>X&&(T=X)}if(h){var I,B;const L=b==="y"?"width":"height",q=c1.has(zr(o)),X=u.reference[E]-u.floating[L]+(q&&((I=a.offset)==null?void 0:I[E])||0)+(q?0:C.crossAxis),F=u.reference[E]+u.reference[L]+(q?0:((B=a.offset)==null?void 0:B[E])||0)-(q?C.crossAxis:0);_<X?_=X:_>F&&(_=F)}return{[b]:T,[E]:_}}}},Xv=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return nt(this,null,function*(){var r,o;const{placement:u,rects:a,platform:c,elements:f}=n,ae=Hr(e,n),{apply:h=()=>{}}=ae,m=Yt(ae,["apply"]),E=yield qo(n,m),b=zr(u),T=Ns(u),_=Tr(u)==="y",{width:S,height:C}=a.floating;let I,B;b==="top"||b==="bottom"?(I=b,B=T===((yield c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(B=b,I=T==="end"?"top":"bottom");const L=C-E.top-E.bottom,q=S-E.left-E.right,X=ri(C-E[I],L),F=ri(S-E[B],q),ee=!n.middlewareData.shift;let be=X,we=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(we=q),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(be=L),ee&&!T){const he=kn(E.left,0),fe=kn(E.right,0),de=kn(E.top,0),ye=kn(E.bottom,0);_?we=S-2*(he!==0||fe!==0?he+fe:kn(E.left,E.right)):be=C-2*(de!==0||ye!==0?de+ye:kn(E.top,E.bottom))}yield h(Te(U({},n),{availableWidth:we,availableHeight:be}));const H=yield c.getDimensions(f.floating);return S!==H.width||C!==H.height?{reset:{rects:!0}}:{}})}}};function Za(){return typeof window!="undefined"}function Os(e){return f1(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function br(e){var t;return(t=(f1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function f1(e){return Za()?e instanceof Node||e instanceof Nn(e).Node:!1}function rr(e){return Za()?e instanceof Element||e instanceof Nn(e).Element:!1}function _r(e){return Za()?e instanceof HTMLElement||e instanceof Nn(e).HTMLElement:!1}function d1(e){return!Za()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}const Jv=new Set(["inline","contents"]);function Yo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ir(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jv.has(o)}const Zv=new Set(["table","td","th"]);function ek(e){return Zv.has(Os(e))}const tk=[":popover-open",":modal"];function el(e){return tk.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const nk=["transform","translate","scale","rotate","perspective"],rk=["transform","translate","scale","rotate","perspective","filter"],ik=["paint","layout","strict","content"];function md(e){const t=gd(),n=rr(e)?ir(e):e;return nk.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)||rk.some(r=>(n.willChange||"").includes(r))||ik.some(r=>(n.contain||"").includes(r))}function sk(e){let t=ii(e);for(;_r(t)&&!Is(t);){if(md(t))return t;if(el(t))return null;t=ii(t)}return null}function gd(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ok=new Set(["html","body","#document"]);function Is(e){return ok.has(Os(e))}function ir(e){return Nn(e).getComputedStyle(e)}function tl(e){return rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ii(e){if(Os(e)==="html")return e;const t=e.assignedSlot||e.parentNode||d1(e)&&e.host||br(e);return d1(t)?t.host:t}function h1(e){const t=ii(e);return Is(t)?e.ownerDocument?e.ownerDocument.body:e.body:_r(t)&&Yo(t)?t:h1(t)}function Wo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=h1(e),u=o===((r=e.ownerDocument)==null?void 0:r.body),a=Nn(o);if(u){const c=Ed(a);return t.concat(a,a.visualViewport||[],Yo(o)?o:[],c&&n?Wo(c):[])}return t.concat(o,Wo(o,[],n))}function Ed(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function p1(e){const t=ir(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_r(e),u=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=Ka(n)!==u||Ka(r)!==a;return c&&(n=u,r=a),{width:n,height:r,$:c}}function yd(e){return rr(e)?e:e.contextElement}function Ps(e){const t=yd(e);if(!_r(t))return yr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:u}=p1(t);let a=(u?Ka(n.width):n.width)/r,c=(u?Ka(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const uk=yr(0);function m1(e){const t=Nn(e);return!gd()||!t.visualViewport?uk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ak(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nn(e)?!1:t}function Hi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),u=yd(e);let a=yr(1);t&&(r?rr(r)&&(a=Ps(r)):a=Ps(e));const c=ak(u,n,r)?m1(u):yr(0);let f=(o.left+c.x)/a.x,h=(o.top+c.y)/a.y,m=o.width/a.x,E=o.height/a.y;if(u){const b=Nn(u),T=r&&rr(r)?Nn(r):r;let _=b,S=Ed(_);for(;S&&r&&T!==_;){const C=Ps(S),I=S.getBoundingClientRect(),B=ir(S),L=I.left+(S.clientLeft+parseFloat(B.paddingLeft))*C.x,q=I.top+(S.clientTop+parseFloat(B.paddingTop))*C.y;f*=C.x,h*=C.y,m*=C.x,E*=C.y,f+=L,h+=q,_=Nn(S),S=Ed(_)}}return Ja({width:m,height:E,x:f,y:h})}function nl(e,t){const n=tl(e).scrollLeft;return t?t.left+n:Hi(br(e)).left+n}function g1(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-nl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function lk(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const u=o==="fixed",a=br(r),c=t?el(t.floating):!1;if(r===a||c&&u)return n;let f={scrollLeft:0,scrollTop:0},h=yr(1);const m=yr(0),E=_r(r);if((E||!E&&!u)&&((Os(r)!=="body"||Yo(a))&&(f=tl(r)),_r(r))){const T=Hi(r);h=Ps(r),m.x=T.x+r.clientLeft,m.y=T.y+r.clientTop}const b=a&&!E&&!u?g1(a,f):yr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+b.x,y:n.y*h.y-f.scrollTop*h.y+m.y+b.y}}function ck(e){return Array.from(e.getClientRects())}function fk(e){const t=br(e),n=tl(e),r=e.ownerDocument.body,o=kn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),u=kn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+nl(e);const c=-n.scrollTop;return ir(r).direction==="rtl"&&(a+=kn(t.clientWidth,r.clientWidth)-o),{width:o,height:u,x:a,y:c}}const E1=25;function dk(e,t){const n=Nn(e),r=br(e),o=n.visualViewport;let u=r.clientWidth,a=r.clientHeight,c=0,f=0;if(o){u=o.width,a=o.height;const m=gd();(!m||m&&t==="fixed")&&(c=o.offsetLeft,f=o.offsetTop)}const h=nl(r);if(h<=0){const m=r.ownerDocument,E=m.body,b=getComputedStyle(E),T=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-E.clientWidth-T);_<=E1&&(u-=_)}else h<=E1&&(u+=h);return{width:u,height:a,x:c,y:f}}const hk=new Set(["absolute","fixed"]);function pk(e,t){const n=Hi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,u=_r(e)?Ps(e):yr(1),a=e.clientWidth*u.x,c=e.clientHeight*u.y,f=o*u.x,h=r*u.y;return{width:a,height:c,x:f,y:h}}function y1(e,t,n){let r;if(t==="viewport")r=dk(e,n);else if(t==="document")r=fk(br(e));else if(rr(t))r=pk(t,n);else{const o=m1(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ja(r)}function T1(e,t){const n=ii(e);return n===t||!rr(n)||Is(n)?!1:ir(n).position==="fixed"||T1(n,t)}function mk(e,t){const n=t.get(e);if(n)return n;let r=Wo(e,[],!1).filter(c=>rr(c)&&Os(c)!=="body"),o=null;const u=ir(e).position==="fixed";let a=u?ii(e):e;for(;rr(a)&&!Is(a);){const c=ir(a),f=md(a);!f&&c.position==="fixed"&&(o=null),(u?!f&&!o:!f&&c.position==="static"&&!!o&&hk.has(o.position)||Yo(a)&&!f&&T1(e,a))?r=r.filter(m=>m!==a):o=c,a=ii(a)}return t.set(e,r),r}function gk(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?el(t)?[]:mk(t,this._c):[].concat(n),r],c=a[0],f=a.reduce((h,m)=>{const E=y1(t,m,o);return h.top=kn(E.top,h.top),h.right=ri(E.right,h.right),h.bottom=ri(E.bottom,h.bottom),h.left=kn(E.left,h.left),h},y1(t,c,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Ek(e){const{width:t,height:n}=p1(e);return{width:t,height:n}}function yk(e,t,n){const r=_r(t),o=br(t),u=n==="fixed",a=Hi(e,!0,u,t);let c={scrollLeft:0,scrollTop:0};const f=yr(0);function h(){f.x=nl(o)}if(r||!r&&!u)if((Os(t)!=="body"||Yo(o))&&(c=tl(t)),r){const T=Hi(t,!0,u,t);f.x=T.x+t.clientLeft,f.y=T.y+t.clientTop}else o&&h();u&&!r&&o&&h();const m=o&&!r&&!u?g1(o,c):yr(0),E=a.left+c.scrollLeft-f.x-m.x,b=a.top+c.scrollTop-f.y-m.y;return{x:E,y:b,width:a.width,height:a.height}}function Td(e){return ir(e).position==="static"}function b1(e,t){if(!_r(e)||ir(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return br(e)===n&&(n=n.ownerDocument.body),n}function _1(e,t){const n=Nn(e);if(el(e))return n;if(!_r(e)){let o=ii(e);for(;o&&!Is(o);){if(rr(o)&&!Td(o))return o;o=ii(o)}return n}let r=b1(e,t);for(;r&&ek(r)&&Td(r);)r=b1(r,t);return r&&Is(r)&&Td(r)&&!md(r)?n:r||sk(e)||n}const Tk=function(e){return nt(this,null,function*(){const t=this.getOffsetParent||_1,n=this.getDimensions,r=yield n(e.floating);return{reference:yk(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function bk(e){return ir(e).direction==="rtl"}const _k={convertOffsetParentRelativeRectToViewportRelativeRect:lk,getDocumentElement:br,getClippingRect:gk,getOffsetParent:_1,getElementRects:Tk,getClientRects:ck,getDimensions:Ek,getScale:Ps,isElement:rr,isRTL:bk};function x1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xk(e,t){let n=null,r;const o=br(e);function u(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),u();const h=e.getBoundingClientRect(),{left:m,top:E,width:b,height:T}=h;if(c||t(),!b||!T)return;const _=Qa(E),S=Qa(o.clientWidth-(m+b)),C=Qa(o.clientHeight-(E+T)),I=Qa(m),L={rootMargin:-_+"px "+-S+"px "+-C+"px "+-I+"px",threshold:kn(0,ri(1,f))||1};let q=!0;function X(F){const ee=F[0].intersectionRatio;if(ee!==f){if(!q)return a();ee?a(!1,ee):r=setTimeout(()=>{a(!1,1e-7)},1e3)}ee===1&&!x1(h,e.getBoundingClientRect())&&a(),q=!1}try{n=new IntersectionObserver(X,Te(U({},L),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(X,L)}n.observe(e)}return a(!0),u}function Sk(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,h=yd(e),m=o||u?[...h?Wo(h):[],...Wo(t)]:[];m.forEach(I=>{o&&I.addEventListener("scroll",n,{passive:!0}),u&&I.addEventListener("resize",n)});const E=h&&c?xk(h,n):null;let b=-1,T=null;a&&(T=new ResizeObserver(I=>{let[B]=I;B&&B.target===h&&T&&(T.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var L;(L=T)==null||L.observe(t)})),n()}),h&&!f&&T.observe(h),T.observe(t));let _,S=f?Hi(e):null;f&&C();function C(){const I=Hi(e);S&&!x1(S,I)&&n(),S=I,_=requestAnimationFrame(C)}return n(),()=>{var I;m.forEach(B=>{o&&B.removeEventListener("scroll",n),u&&B.removeEventListener("resize",n)}),E==null||E(),(I=T)==null||I.disconnect(),T=null,f&&cancelAnimationFrame(_)}}const wk=Gv,Ck=Kv,Ak=qv,vk=Xv,kk=Yv,Nk=Vv,Ok=Qv,Ik=(e,t,n)=>{const r=new Map,o=U({platform:_k},n),u=Te(U({},o.platform),{_c:r});return $v(e,t,Te(U({},o),{platform:u}))};function S1(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return Te(U({},o),{toJSON:()=>o})}function Pk(e){if(!e)return S1();const{x:t,y:n,width:r,height:o}=e;return S1(t,n,r,o)}function Rk(e,t){return{contextElement:Ht(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?Pk(r):n.getBoundingClientRect()}}}var Go=e=>({variable:e,reference:`var(${e})`}),jr={arrowSize:Go("--arrow-size"),arrowSizeHalf:Go("--arrow-size-half"),arrowBg:Go("--arrow-background"),transformOrigin:Go("--transform-origin"),arrowOffset:Go("--arrow-offset")},Lk=e=>e==="top"||e==="bottom"?"y":"x";function Dk(e,t){return{name:"transformOrigin",fn(n){var we,H,ae,he,fe;const{elements:r,middlewareData:o,placement:u,rects:a,y:c}=n,f=u.split("-")[0],h=Lk(f),m=((we=o.arrow)==null?void 0:we.x)||0,E=((H=o.arrow)==null?void 0:H.y)||0,b=(t==null?void 0:t.clientWidth)||0,T=(t==null?void 0:t.clientHeight)||0,_=m+b/2,S=E+T/2,C=Math.abs(((ae=o.shift)==null?void 0:ae.y)||0),I=a.reference.height/2,B=T/2,L=(fe=(he=e.offset)==null?void 0:he.mainAxis)!=null?fe:e.gutter,q=typeof L=="number"?L+B:L!=null?L:B,X=C>q,F={top:`${_}px calc(100% + ${q}px)`,bottom:`${_}px ${-q}px`,left:`calc(100% + ${q}px) ${S}px`,right:`${-q}px ${S}px`}[f],ee=`${_}px ${a.reference.y+I-c}px`,be=!!e.overlap&&h==="y"&&X;return r.floating.style.setProperty(jr.transformOrigin.variable,be?ee:F),{data:{transformOrigin:be?ee:F}}}}}var Mk={name:"rects",fn({rects:e}){return{data:e}}},Fk=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,u=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[u]:`calc(100% + ${jr.arrowOffset.reference})`}),{}}}};function Bk(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var Uk={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function w1(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function bd(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function Hk(e,t,n){const r=e||t.createElement("div");return Nk({element:r,padding:n.arrowPadding})}function zk(e,t){var n;if(!lA((n=t.offset)!=null?n:t.gutter))return wk(({placement:r})=>{var m,E,b,T;const o=((e==null?void 0:e.clientHeight)||0)/2,u=(E=(m=t.offset)==null?void 0:m.mainAxis)!=null?E:t.gutter,a=typeof u=="number"?u+o:u!=null?u:o,{hasAlign:c}=Bk(r),f=c?void 0:t.shift,h=(T=(b=t.offset)==null?void 0:b.crossAxis)!=null?T:f;return qf({crossAxis:h,mainAxis:a,alignmentAxis:t.shift})})}function jk(e){if(!e.flip)return;const t=bd(e.boundary);return Ak(Te(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function $k(e){if(!e.slide&&!e.overlap)return;const t=bd(e.boundary);return Ck(Te(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Ok()}))}function Vk(e){return vk({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const u=t.floating,a=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),u.style.setProperty("--reference-width",`${a}px`),u.style.setProperty("--reference-height",`${c}px`),u.style.setProperty("--available-width",`${o}px`),u.style.setProperty("--available-height",`${r}px`)}})}function qk(e){var t;if(e.hideWhenDetached)return kk({strategy:"referenceHidden",boundary:(t=bd(e.boundary))!=null?t:"clippingAncestors"})}function Yk(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function Wk(e,t,n={}){const r=Rk(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},Uk,n),u=t.querySelector("[data-part=arrow]"),a=[zk(u,o),jk(o),$k(o),Hk(u,t.ownerDocument,o),Fk(u),Dk({gutter:o.gutter,offset:o.offset,overlap:o.overlap},u),Vk(o),qk(o),Mk],{placement:c,strategy:f,onComplete:h,onPositioned:m}=o,E=()=>nt(null,null,function*(){var q;if(!r||!t)return;const S=yield Ik(r,t,{placement:c,middleware:a,strategy:f});h==null||h(S),m==null||m({placed:!0});const C=Ss(t),I=w1(C,S.x),B=w1(C,S.y);t.style.setProperty("--x",`${I}px`),t.style.setProperty("--y",`${B}px`),o.hideWhenDetached&&(((q=S.middlewareData.hide)==null?void 0:q.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const L=t.firstElementChild;if(L){const X=ja(L);t.style.setProperty("--z-index",X.zIndex)}}),b=()=>nt(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),m==null||m({placed:!0})):yield E()}),T=Yk(o.listeners),_=o.listeners?Sk(r,t,b,T):yA;return b(),()=>{_==null||_(),m==null||m({placed:!1})}}function C1(e,t,n={}){const c=n,{defer:r}=c,o=Yt(c,["defer"]),u=r?gn:f=>f(),a=[];return a.push(u(()=>{const f=typeof e=="function"?e():e,h=typeof t=="function"?t():t;a.push(Wk(f,h,o))})),()=>{a.forEach(f=>f==null?void 0:f())}}var Gk={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function Kk(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:jr.arrowSize.reference,height:jr.arrowSize.reference,[jr.arrowSizeHalf.variable]:`calc(${jr.arrowSize.reference} / 2)`,[jr.arrowOffset.variable]:`calc(${jr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?Gk[t.split("-")[0]]:void 0,background:jr.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 Rs=new WeakMap,rl=new WeakMap,il={},_d=0,A1=e=>e&&(e.host||A1(e.parentNode)),Qk=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=A1(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),Xk=new Set(["script","output","status","next-route-announcer"]),Jk=e=>Xk.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Zk=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:u=!0}=t,a=Qk(n,Array.isArray(e)?e:[e]);il[r]||(il[r]=new WeakMap);const c=il[r],f=[],h=new Set,m=new Set(a),E=T=>{!T||h.has(T)||(h.add(T),E(T.parentNode))};a.forEach(T=>{E(T),u&&Ht(T)&&Dg(T,_=>{E(_)})});const b=T=>{!T||m.has(T)||Array.prototype.forEach.call(T.children,_=>{if(h.has(_))b(_);else try{if(Jk(_))return;const C=_.getAttribute(o)==="true",I=(Rs.get(_)||0)+1,B=(c.get(_)||0)+1;Rs.set(_,I),c.set(_,B),f.push(_),I===1&&C&&rl.set(_,!0),B===1&&_.setAttribute(r,""),C||_.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return b(n),h.clear(),_d++,()=>{f.forEach(T=>{const _=Rs.get(T)-1,S=c.get(T)-1;Rs.set(T,_),c.set(T,S),_||(rl.has(T)||T.removeAttribute(o),rl.delete(T)),S||T.removeAttribute(r)}),_d--,_d||(Rs=new WeakMap,Rs=new WeakMap,rl=new WeakMap,il={})}},eN=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,tN=(e,t=eN(e),n="data-aria-hidden",r=!0)=>{if(t)return Zk(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},nN=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function v1(e,t={}){const{defer:n=!0}=t,r=n?nN:u=>u(),o=[];return o.push(r(()=>{const a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&o.push(tN(a))})),()=>{o.forEach(u=>u==null?void 0:u())}}function rN(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const u=e.frames[o];u&&n(u)}},addEventListener(n,r,o){return t.each(u=>{try{u.document.addEventListener(n,r,o)}catch(a){}}),()=>{try{t.removeEventListener(n,r,o)}catch(u){}}},removeEventListener(n,r,o){t.each(u=>{try{u.document.removeEventListener(n,r,o)}catch(a){}})}};return t}function iN(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(u){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(u){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(u){}}}}var k1="pointerdown.outside",N1="focus.outside";function sN(e){for(const t of e)if(Ht(t)&&Ur(t))return!0;return!1}var O1=e=>"clientY"in e;function oN(e,t){if(!O1(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 uN(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function I1(e,t){if(!t||!O1(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,u=o&&e.clientY>t.offsetTop+t.clientHeight,a={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 uN(a,c)?r||u:!1}function aN(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:u,defer:a,followControlledElements:c=!0}=t;if(!e)return;const f=Er(e),h=Ss(e),m=rN(h),E=iN(h);function b(L,q){if(!Ht(q)||!q.isConnected||za(e,q)||oN(e,L)||c&&Lg(e,q))return!1;const X=f.querySelector(`[aria-controls="${e.id}"]`);if(X){const ee=ed(X);if(I1(L,ee))return!1}const F=ed(e);return I1(L,F)?!1:!(n!=null&&n(q))}const T=new Set,_=Bi(e==null?void 0:e.getRootNode());function S(L){function q(X){var we,H;const F=a&&!Mg()?gn:ae=>ae(),ee=X!=null?X:L,be=(H=(we=ee==null?void 0:ee.composedPath)==null?void 0:we.call(ee))!=null?H:[ee==null?void 0:ee.target];F(()=>{const ae=_?be[0]:Br(L);if(!(!e||!b(L,ae))){if(o||u){const he=Vf(o,u);e.addEventListener(k1,he,{once:!0})}P1(e,k1,{bubbles:!1,cancelable:!0,detail:{originalEvent:ee,contextmenu:QA(ee),focusable:sN(be),target:ae}})}})}L.pointerType==="touch"?(T.forEach(X=>X()),T.add(tr(f,"click",q,{once:!0})),T.add(E.addEventListener("click",q,{once:!0})),T.add(m.addEventListener("click",q,{once:!0}))):q()}const C=new Set,I=setTimeout(()=>{C.add(tr(f,"pointerdown",S,!0)),C.add(E.addEventListener("pointerdown",S,!0)),C.add(m.addEventListener("pointerdown",S,!0))},0);function B(L){(a?gn:X=>X())(()=>{var ee,be;const X=(be=(ee=L==null?void 0:L.composedPath)==null?void 0:ee.call(L))!=null?be:[L==null?void 0:L.target],F=_?X[0]:Br(L);if(!(!e||!b(L,F))){if(r||u){const we=Vf(r,u);e.addEventListener(N1,we,{once:!0})}P1(e,N1,{bubbles:!1,cancelable:!0,detail:{originalEvent:L,contextmenu:!1,focusable:Ur(F),target:F}})}})}return Mg()||(C.add(tr(f,"focusin",B,!0)),C.add(E.addEventListener("focusin",B,!0)),C.add(m.addEventListener("focusin",B,!0))),()=>{clearTimeout(I),T.forEach(L=>L()),C.forEach(L=>L())}}function lN(e,t){const{defer:n}=t,r=n?gn:u=>u(),o=[];return o.push(r(()=>{const u=typeof e=="function"?e():e;o.push(aN(u,t))})),()=>{o.forEach(u=>u==null?void 0:u())}}function P1(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function cN(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return tr(Er(e),"keydown",n,{capture:!0})}var R1="layer:request-dismiss",Hn={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=>za(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>za(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=>Hn.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];dN(e,R1,o=>{var u;(u=r.requestDismiss)==null||u.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),fN(e,R1,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function fN(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 dN(e,t,n){e.addEventListener(t,n,{once:!0})}var L1;function D1(){Hn.layers.forEach(({node:e})=>{e.style.pointerEvents=Hn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function hN(e){e.style.pointerEvents=""}function pN(e,t){const n=Er(e),r=[];return Hn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(L1=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[u,a]=dv(()=>{const c=o();return Ht(c)?c:null},{timeout:1e3});u.then(c=>r.push(Va(c,{pointerEvents:"auto"}))),r.push(a)}),()=>{Hn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=L1,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function mN(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Yf("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:u,exclude:a,debug:c,type:f="dialog"}=t,h={dismiss:r,node:e,type:f,pointerBlocking:u,requestDismiss:o};Hn.add(h),D1();function m(S){var I,B;const C=Br(S.detail.originalEvent);Hn.isBelowPointerBlockingLayer(e)||Hn.isInBranch(C)||((I=t.onPointerDownOutside)==null||I.call(t,S),(B=t.onInteractOutside)==null||B.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function E(S){var I,B;const C=Br(S.detail.originalEvent);Hn.isInBranch(C)||((I=t.onFocusOutside)==null||I.call(t,S),(B=t.onInteractOutside)==null||B.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var C;Hn.isTopMost(e)&&((C=t.onEscapeKeyDown)==null||C.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function T(S){var L;if(!e)return!1;const C=typeof a=="function"?a():a,I=Array.isArray(C)?C:[C],B=(L=t.persistentElements)==null?void 0:L.map(q=>q()).filter(Ht);return B&&I.push(...B),I.some(q=>za(q,S))||Hn.isInNestedLayer(e,S)}const _=[u?pN(e,t.persistentElements):void 0,cN(e,b),lN(e,{exclude:T,onFocusOutside:E,onPointerDownOutside:m,defer:t.defer})];return()=>{Hn.remove(e),D1(),hN(e),_.forEach(S=>S==null?void 0:S())}}function M1(e,t){const{defer:n}=t,r=n?gn:u=>u(),o=[];return o.push(r(()=>{const u=xs(e)?e():e;o.push(mN(u,t))})),()=>{o.forEach(u=>u==null?void 0:u())}}var gN=Object.defineProperty,EN=(e,t,n)=>t in e?gN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dt=(e,t,n)=>EN(e,typeof t!="symbol"?t+"":t,n),F1={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()}},yN=[],TN=class{constructor(e,t){dt(this,"trapStack"),dt(this,"config"),dt(this,"doc"),dt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),dt(this,"portalContainers",new Set),dt(this,"listenerCleanups",[]),dt(this,"handleFocus",r=>{const o=Br(r),u=this.findContainerIndex(o,r)>=0;if(u||Ha(o))u&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let a,c=!0;if(this.state.mostRecentlyFocusedNode)if($o(this.state.mostRecentlyFocusedNode)>0){const f=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[f];if(h.length>0){const m=h.findIndex(E=>E===this.state.mostRecentlyFocusedNode);m>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?m+1<h.length&&(a=h[m+1],c=!1):m-1>=0&&(a=h[m-1],c=!1))}}else this.state.containerGroups.some(f=>f.tabbableNodes.some(h=>$o(h)>0))||(c=!1);else c=!1;c&&(a=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),a?this.tryFocus(a):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),dt(this,"handlePointerDown",r=>{const o=Br(r);if(!(this.findContainerIndex(o,r)>=0)){if(Qo(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Qo(this.config.allowOutsideClick,r)||r.preventDefault()}}),dt(this,"handleClick",r=>{const o=Br(r);this.findContainerIndex(o,r)>=0||Qo(this.config.clickOutsideDeactivates,r)||Qo(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),dt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),u=this.findNextNavNode({event:r,isBackward:o});if(!u)return;Ko(r)&&r.preventDefault(),this.tryFocus(u)}}),dt(this,"handleEscapeKey",r=>{bN(r)&&Qo(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),dt(this,"_mutationObserver"),dt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===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(f=>{if(f.nodeType!==Node.ELEMENT_NODE)return!1;const h=f;return HA(h)?!0:h.id&&!this.state.containers.some(m=>m.contains(h))?zA(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),dt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var u;(u=this._mutationObserver)==null||u.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),dt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Ur(r)){const o=ws(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const u=this.state.tabbableGroups[0];r=u&&u.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}),dt(this,"tryFocus",r=>{if(r!==!1&&r!==ws(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,_N(r)&&r.select()}}),dt(this,"deactivate",r=>{if(!this.state.active)return this;const o=U({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(),F1.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const u=this.getOption(o,"onDeactivate"),a=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),f=this.getOption(o,"returnFocus","returnFocusOnDeactivate");u==null||u();const h=()=>{B1(()=>{if(f){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(m)}a==null||a()})};if(f&&c){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(m).then(h,h),this}return h(),this}),dt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),u=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),u==null||u(),this}),dt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),u=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),u==null||u(),this}),dt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),dt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),dt(this,"getOption",(r,o,u)=>r&&r[o]!==void 0?r[o]:this.config[u||o]),dt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:u=[]}={})=>{let a=this.config[r];if(typeof a=="function"&&(a=a(...u)),a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=a;if(typeof a=="string"){try{c=this.doc.querySelector(a)}catch(f){throw new Error(`\`${r}\` appears to be an invalid selector; error="${f.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),dt(this,"findNextNavNode",r=>{const{event:o,isBackward:u=!1}=r,a=r.target||Br(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const f=this.findContainerIndex(a,o),h=f>=0?this.state.containerGroups[f]:void 0;if(f<0)u?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(u){let m=this.state.tabbableGroups.findIndex(({firstTabbableNode:E})=>a===E);if(m<0&&((h==null?void 0:h.container)===a||Ur(a)&&!Ui(a)&&!(h!=null&&h.nextTabbableNode(a,!1)))&&(m=f),m>=0){const E=m===0?this.state.tabbableGroups.length-1:m-1,b=this.state.tabbableGroups[E];c=$o(a)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Ko(o)||(c=h==null?void 0:h.nextTabbableNode(a,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>a===E);if(m<0&&((h==null?void 0:h.container)===a||Ur(a)&&!Ui(a)&&!(h!=null&&h.nextTabbableNode(a)))&&(m=f),m>=0){const E=m===this.state.tabbableGroups.length-1?0:m+1,b=this.state.tabbableGroups[E];c=$o(a)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Ko(o)||(c=h==null?void 0:h.nextTabbableNode(a))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||yN;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Ko(r)&&!r.shiftKey},isKeyBackward(r){return Ko(r)&&r.shiftKey}},t);this.doc=n.document||Er(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=>{FA(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(u=>u===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Lg(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=jo(e,{getShadowRoot:this.config.getShadowRoot}),n=zg(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],u=r,a=o;let c=!1;for(let h=0;h<t.length;h++)if($o(t[h])>0){c=!0;break}function f(h,m=!0){const E=t.indexOf(h);if(E>=0)return t[E+(m?1:-1)];const b=n.indexOf(h);if(!(b<0)){if(m){for(let T=b+1;T<n.length;T++)if(Ui(n[T]))return n[T]}else for(let T=b-1;T>=0;T--)if(Ui(n[T]))return n[T]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:u,lastDomTabbableNode:a,nextTabbableNode:f}}),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 F1.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?B1(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(tr(this.doc,"focusin",this.handleFocus,!0),tr(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),tr(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),tr(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),tr(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),tr(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=ws(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)}},Ko=e=>e.key==="Tab",Qo=(e,...t)=>typeof e=="function"?e(...t):e,bN=e=>!e.isComposing&&e.key==="Escape",B1=e=>setTimeout(e,0),_N=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function U1(e,t={}){let n;const r=gn(()=>{const o=typeof e=="function"?e():e;if(o){n=new TN(o,Te(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Er(o)}));try{n.activate()}catch(u){}}});return function(){n==null||n.deactivate(),r()}}var xd="data-scroll-lock";function xN(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function H1(e){const t=ja(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function z1(e){var T;const t=e!=null?e:document,n=(T=t.defaultView)!=null?T:window,{documentElement:r,body:o}=t;if(o.hasAttribute(xd))return;const a=H1(r)||H1(o),c=n.innerWidth-r.clientWidth;o.setAttribute(xd,"");const f=()=>cv(r,"--scrollbar-width",`${c}px`),h=xN(r),m=()=>{const _={overflow:"hidden"};return!a&&c>0&&(_[h]=`${c}px`),Va(o,_)},E=()=>{var X,F;const{scrollX:_,scrollY:S,visualViewport:C}=n,I=(X=C==null?void 0:C.offsetLeft)!=null?X:0,B=(F=C==null?void 0:C.offsetTop)!=null?F:0,L={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(B))}px`,left:`${-(_-Math.floor(I))}px`,right:"0"};!a&&c>0&&(L[h]=`${c}px`);const q=Va(o,L);return()=>{q==null||q(),n.scrollTo({left:_,top:S,behavior:"instant"})}},b=[f(),Fg()?E():m()];return()=>{b.forEach(_=>_==null?void 0:_()),o.removeAttribute(xd)}}var SN=vs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),xr=SN.build(),j1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},$1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Sd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},V1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},wN=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},wd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Cd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},CN=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},q1=e=>e.getById(j1(e)),Ls=e=>e.getById($1(e)),Ds=e=>e.getById(Sd(e)),Y1=e=>e.getById(V1(e)),AN=e=>e.getById(wd(e)),vN=e=>e.getById(Cd(e));function kN(e,t){const{state:n,context:r,send:o,computed:u,prop:a,scope:c}=e,f=n.matches("open"),h=r.get("currentPlacement"),m=u("currentPortalled"),E=r.get("renderedElements"),b=Kk(Te(U({},a("positioning")),{placement:h}));return{portalled:m,open:f,setOpen(T){n.matches("open")!==T&&o({type:T?"OPEN":"CLOSE"})},reposition(T={}){o({type:"POSITIONING.SET",options:T})},getArrowProps(){return t.element(Te(U({id:wN(c)},xr.arrow.attrs),{dir:a("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(Te(U({},xr.arrowTip.attrs),{dir:a("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(Te(U({},xr.anchor.attrs),{dir:a("dir"),id:j1(c)}))},getTriggerProps(){return t.button(Te(U({},xr.trigger.attrs),{dir:a("dir"),type:"button","data-placement":h,id:$1(c),"aria-haspopup":"dialog","aria-expanded":f,"data-state":f?"open":"closed","aria-controls":Sd(c),onPointerDown(T){KA(T)&&WA()&&T.currentTarget.focus()},onClick(T){T.defaultPrevented||o({type:"TOGGLE"})},onBlur(T){o({type:"TRIGGER_BLUR",target:T.relatedTarget})}}))},getIndicatorProps(){return t.element(Te(U({},xr.indicator.attrs),{dir:a("dir"),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(Te(U({id:V1(c)},xr.positioner.attrs),{dir:a("dir"),style:b.floating}))},getContentProps(){return t.element(Te(U({},xr.content.attrs),{dir:a("dir"),id:Sd(c),tabIndex:-1,role:"dialog","aria-modal":SA(a("modal")),hidden:!f,"data-state":f?"open":"closed","data-expanded":xA(f),"aria-labelledby":E.title?wd(c):void 0,"aria-describedby":E.description?Cd(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(Te(U({},xr.title.attrs),{id:wd(c),dir:a("dir")}))},getDescriptionProps(){return t.element(Te(U({},xr.description.attrs),{id:Cd(c),dir:a("dir")}))},getCloseTriggerProps(){return t.button(Te(U({},xr.closeTrigger.attrs),{dir:a("dir"),id:CN(c),type:"button","aria-label":"close",onClick(T){T.defaultPrevented||(T.stopPropagation(),o({type:"CLOSE"}))}}))}}}var NN={props({props:e}){return Te(U({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:U({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 u;e.set("currentPlacement",t("positioning").placement);const r=(u=q1(n))!=null?u:Ls(n);return C1(r,()=>Y1(n),Te(U({},t("positioning")),{defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Ds(n);let o=!0;return M1(r,{type:"popover",pointerBlocking:t("modal"),exclude:Ls(n),defer:!0,onEscapeKeyDown(u){var a;(a=t("onEscapeKeyDown"))==null||a(u),!t("closeOnEscape")&&u.preventDefault()},onInteractOutside(u){var a;(a=t("onInteractOutside"))==null||a(u),!u.defaultPrevented&&(o=!(u.detail.focusable||u.detail.contextmenu),t("closeOnInteractOutside")||u.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:lv(()=>Ds(t),{triggerElement:Ls(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?v1(()=>[Ds(t),Ls(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return z1(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?U1(()=>Ds(t),{initialFocus:()=>jg({root:Ds(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var a;const o=(a=q1(n))!=null?a:Ls(n);C1(o,()=>Y1(n),Te(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){gn(()=>{Object.assign(e.get("renderedElements"),{title:!!AN(t),description:!!vN(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||gn(()=>{const n=jg({root:Ds(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||gn(()=>{const u=Ls(t);u==null||u.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})}}}};sd()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[MF,Ad]=As({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[FF,W1]=As({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),ON=e=>{const t=G.useId(),{getRootNode:n}=Ad(),{dir:r}=W1(),o=U({id:t,dir:r,getRootNode:n},e),u=od(NN,o);return kN(u,Jg)},IN=e=>{const[t,a]=r1(e),c=a,{children:n}=c,r=Yt(c,["children"]),o=ON(r),u=ld(nr({present:o.open},t));return O.jsx(Av,{value:o,children:O.jsx(Zg,{value:u,children:n})})},G1=G.forwardRef((e,t)=>{const n=ad(),r=Vo(),o=nr(Te(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return O.jsx(ni.button,Te(U({},o),{ref:t}))});G1.displayName="PopoverTrigger";function PN(e){return an({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 RN(e){return an({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 LN(e){return an({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"},child:[]}]})(e)}function DN(e){return an({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 MN=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=ti(),r=()=>{n(),e()};return O.jsxs("button",{className:ue(`${Z}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[O.jsx(DN,{}),"Clear chat"]})},vd=({className:e,componentType:t,children:n})=>{const[r,o]=G.useState(!1),{globalClassName:u}=er(),a=()=>{o(!1)},c=f=>{o(f.open)};return O.jsxs(IN,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[O.jsx(G1,{"aria-label":`Overflow menu for ${t}`,className:ue(`${Z}-overflow-menu-button-trigger`,u,e,t),children:O.jsx(LN,{})}),O.jsx(t1,{children:O.jsxs(e1,{className:ue(`${Z}-overflow-menu-list`,u,t),children:[n,O.jsx(MN,{componentType:t,onClearChat:a})]})})]})};function FN(e){return an({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 K1(e){return an({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 Q1=({className:e,onClick:t,disabled:n=!1})=>O.jsx("button",{"aria-label":"Close",className:ue(e,`${Z}-close-button`),disabled:n,onClick:t,children:O.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:O.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"})})}),X1=({componentType:e,isIcon:t})=>{const n=()=>{Hf("modal")};return t?O.jsx(Fa,{className:ue("toggle-modal-button",e),ariaLabel:"Toggle Modal",onClick:n,icon:O.jsx(K1,{})}):O.jsxs("button",{className:ue(`${Z}-overflow-menu-button`,e,"toggle-modal-button"),onClick:n,children:[O.jsx(K1,{}),"Show modal"]})},BN=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r}=er();if(!n)return null;const o=n.getName(t),u=n.getBrand(t),a=n.getPriceDisplay(t),c=n.getRelativePdp(t),f=n.getPdp(t),h=n.getImage(t),m=c&&typeof c=="string"?new URL(c,window.location.origin).href:f;return O.jsxs("div",{className:ue(r,`${Z}-product-tile`,{embedded:!e,standalone:e}),children:[O.jsx("img",{className:ue(r,`${Z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${h}`,alt:`${o}`,loading:"lazy"}),O.jsxs("div",{className:ue(r,`${Z}-product-tile-details`,{embedded:!e,standalone:e}),children:[O.jsxs("div",{className:ue(r,`${Z}-product-tile-content`),children:[u&&O.jsx("p",{className:`${Z}-product-tile-brand`,children:u}),m?O.jsxs("a",{"aria-label":`Go to product page for ${o}`,className:ue(r,`${Z}-product-tile-pdp`),href:`${m}`,target:"_blank",rel:"noopener noreferrer",children:[o," ",O.jsx("span",{className:ue(r,`${Z}-product-tile-pdp-arrow`),children:"→"})]}):O.jsx("p",{className:ue(r,`${Z}-product-tile-name`),title:o,children:o})]}),O.jsx("div",{className:ue(r,`${Z}-product-tile-footer`),children:O.jsx("p",{className:ue(r,`${Z}-product-tile-price`),children:a})})]})]})},UN=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=er(),o=t;return n?O.jsxs("div",{className:ue(r,`${Z}-display-products widget-message`),children:[O.jsx("p",{children:o.message}),o.products&&o.products.length>0&&O.jsx("div",{className:ue(r,`${Z}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(u=>{const a=n.getPid(u);return O.jsx(BN,{isWidgetStandalone:e,product:u},`${a}`)})})]}):null},HN=({globalClassName:e,message:t,isWidgetStandalone:n})=>O.jsx("div",{className:ue(e,`${Z}-error-message`,{standalone:n,embedded:!n}),children:O.jsxs("p",{className:ue(e,`${Z}-error-message-text`,{standalone:n,embedded:!n}),children:[O.jsx(tA,{})," ",t.message||"An error occurred while processing your request."]})});function zN(e){return an({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 jN=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:u})=>O.jsx("div",{className:ue(e,`${Z}-suggestion-container standalone`),children:o.map(a=>O.jsxs(jf,{disabled:r,className:ue(e,`${Z}-suggestion-button standalone`),onClick:()=>u(a,n||t),children:[O.jsx(zN,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",a.displayText]},a.displayText))}),$N=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=ti();return O.jsxs("div",{className:ue(e,`${Z}-follow-up`),children:[O.jsx("p",{className:ue(e,`${Z}-text`),children:t.message}),n&&O.jsx(jN,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&O.jsx("div",{className:ue(e,`${Z}-suggestion-container embedded`),children:t.suggestions.map(u=>O.jsx("button",{disabled:o,className:ue(e,`${Z}-suggestion-button embedded`),onClick:()=>r(u,t.eventSourceId||t.id),children:u.displayText},u.displayText))})]})};function BF(){}function UF(){}function J1(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,u=!1;for(;!u;){r===-1&&(r=n.length,u=!0);const a=n.slice(o,r).trim();(a||!u)&&t.push(a),o=r+1,r=n.indexOf(",",o)}return t}function Z1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const VN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YN={};function eE(e,t){return(YN.jsx?qN:VN).test(e)}const WN=/[ \t\n\f\r]/g;function GN(e){return typeof e=="object"?e.type==="text"?tE(e.value):!1:tE(e)}function tE(e){return e.replace(WN,"")===""}let Xo=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Xo.prototype.normal={},Xo.prototype.property={},Xo.prototype.space=void 0;function nE(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Xo(n,r,t)}function Jo(e){return e.toLowerCase()}let yn=class{constructor(t,n){this.attribute=n,this.property=t}};yn.prototype.attribute="",yn.prototype.booleanish=!1,yn.prototype.boolean=!1,yn.prototype.commaOrSpaceSeparated=!1,yn.prototype.commaSeparated=!1,yn.prototype.defined=!1,yn.prototype.mustUseProperty=!1,yn.prototype.number=!1,yn.prototype.overloadedBoolean=!1,yn.prototype.property="",yn.prototype.spaceSeparated=!1,yn.prototype.space=void 0;let KN=0;const Ve=zi(),Ot=zi(),kd=zi(),pe=zi(),ot=zi(),Ms=zi(),On=zi();function zi(){return Wc(2,++KN)}const Nd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ve,booleanish:Ot,commaOrSpaceSeparated:On,commaSeparated:Ms,number:pe,overloadedBoolean:kd,spaceSeparated:ot},Symbol.toStringTag,{value:"Module"})),Od=Object.keys(Nd);let Id=class extends yn{constructor(t,n,r,o){let u=-1;if(super(t,n),rE(this,"space",o),typeof r=="number")for(;++u<Od.length;){const a=Od[u];rE(this,Od[u],(r&Nd[a])===Nd[a])}}};Id.prototype.defined=!0;function rE(e,t,n){n&&(e[t]=n)}function Fs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const u=new Id(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[Jo(r)]=r,n[Jo(u.attribute)]=r}return new Xo(t,n,e.space)}const iE=Fs({properties:{ariaActiveDescendant:null,ariaAtomic:Ot,ariaAutoComplete:null,ariaBusy:Ot,ariaChecked:Ot,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:ot,ariaCurrent:null,ariaDescribedBy:ot,ariaDetails:null,ariaDisabled:Ot,ariaDropEffect:ot,ariaErrorMessage:null,ariaExpanded:Ot,ariaFlowTo:ot,ariaGrabbed:Ot,ariaHasPopup:null,ariaHidden:Ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ot,ariaLevel:pe,ariaLive:null,ariaModal:Ot,ariaMultiLine:Ot,ariaMultiSelectable:Ot,ariaOrientation:null,ariaOwns:ot,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Ot,ariaReadOnly:Ot,ariaRelevant:null,ariaRequired:Ot,ariaRoleDescription:ot,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Ot,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function sE(e,t){return t in e?e[t]:t}function oE(e,t){return sE(e,t.toLowerCase())}const QN=Fs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ms,acceptCharset:ot,accessKey:ot,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:ot,autoFocus:Ve,autoPlay:Ve,blocking:ot,capture:null,charSet:null,checked:Ve,cite:null,className:ot,cols:pe,colSpan:null,content:null,contentEditable:Ot,controls:Ve,controlsList:ot,coords:pe|Ms,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ve,defer:Ve,dir:null,dirName:null,disabled:Ve,download:kd,draggable:Ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ve,formTarget:null,headers:ot,height:pe,hidden:kd,high:pe,href:null,hrefLang:null,htmlFor:ot,httpEquiv:ot,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:ot,itemRef:ot,itemScope:Ve,itemType:ot,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ve,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:Ve,muted:Ve,name:null,nonce:null,noModule:Ve,noValidate:Ve,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ve,optimum:pe,pattern:null,ping:ot,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:ot,required:Ve,reversed:Ve,rows:pe,rowSpan:pe,sandbox:ot,scope:null,scoped:Ve,seamless:Ve,selected:Ve,shadowRootClonable:Ve,shadowRootDelegatesFocus:Ve,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:Ve,useMap:null,value:Ot,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ot,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ve,declare:Ve,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:Ve,noHref:Ve,noShade:Ve,noWrap:Ve,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Ot,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ve,disableRemotePlayback:Ve,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:oE}),XN=Fs({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:On,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:ot,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:Ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ms,g2:Ms,glyphName:Ms,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:On,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:pe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ot,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:On,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:On,rev:On,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:On,requiredFeatures:On,requiredFonts:On,requiredFormats:On,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:On,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:On,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:On,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:sE}),uE=Fs({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()}}),aE=Fs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:oE}),lE=Fs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),JN={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"},ZN=/[A-Z]/g,cE=/-[a-z]/g,e3=/^data[-\w.:]+$/i;function Pd(e,t){const n=Jo(t);let r=t,o=yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&e3.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(cE,n3);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!cE.test(u)){let a=u.replace(ZN,t3);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Id}return new o(r,t)}function t3(e){return"-"+e.toLowerCase()}function n3(e){return e.charAt(1).toUpperCase()}const sl=nE([iE,QN,uE,aE,lE],"html"),Bs=nE([iE,XN,uE,aE,lE],"svg");function fE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function dE(e){return e.join(" ").trim()}var Us={},Rd,hE;function r3(){if(hE)return Rd;hE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
15
+ `,h="/",m="*",E="",b="comment",T="declaration";Rd=function(S,C){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];C=C||{};var I=1,B=1;function L(fe){var de=fe.match(t);de&&(I+=de.length);var ye=fe.lastIndexOf(f);B=~ye?fe.length-ye:B+fe.length}function q(){var fe={line:I,column:B};return function(de){return de.position=new X(fe),be(),de}}function X(fe){this.start=fe,this.end={line:I,column:B},this.source=C.source}X.prototype.content=S;function F(fe){var de=new Error(C.source+":"+I+":"+B+": "+fe);if(de.reason=fe,de.filename=C.source,de.line=I,de.column=B,de.source=S,!C.silent)throw de}function ee(fe){var de=fe.exec(S);if(de){var ye=de[0];return L(ye),S=S.slice(ye.length),de}}function be(){ee(n)}function we(fe){var de;for(fe=fe||[];de=H();)de!==!1&&fe.push(de);return fe}function H(){var fe=q();if(!(h!=S.charAt(0)||m!=S.charAt(1))){for(var de=2;E!=S.charAt(de)&&(m!=S.charAt(de)||h!=S.charAt(de+1));)++de;if(de+=2,E===S.charAt(de-1))return F("End of comment missing");var ye=S.slice(2,de-2);return B+=2,L(ye),S=S.slice(de),B+=2,fe({type:b,comment:ye})}}function ae(){var fe=q(),de=ee(r);if(de){if(H(),!ee(o))return F("property missing ':'");var ye=ee(u),Ce=fe({type:T,property:_(de[0].replace(e,E)),value:ye?_(ye[0].replace(e,E)):E});return ee(a),Ce}}function he(){var fe=[];we(fe);for(var de;de=ae();)de!==!1&&(fe.push(de),we(fe));return fe}return be(),he()};function _(S){return S?S.replace(c,E):E}return Rd}var pE;function i3(){if(pE)return Us;pE=1;var e=Us&&Us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Us,"__esModule",{value:!0}),Us.default=n;var t=e(r3());function n(r,o){var u=null;if(!r||typeof r!="string")return u;var a=(0,t.default)(r),c=typeof o=="function";return a.forEach(function(f){if(f.type==="declaration"){var h=f.property,m=f.value;c?o(h,m,f):m&&(u=u||{},u[h]=m)}}),u}return Us}var Zo={},mE;function s3(){if(mE)return Zo;mE=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(h){return!h||n.test(h)||e.test(h)},a=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},f=function(h,m){return m===void 0&&(m={}),u(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,a))};return Zo.camelCase=f,Zo}var eu,gE;function o3(){if(gE)return eu;gE=1;var e=eu&&eu.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(i3()),n=s3();function r(o,u){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(c,f){c&&f&&(a[(0,n.camelCase)(c,u)]=f)}),a}return r.default=r,eu=r,eu}var u3=o3();const a3=Ge(u3),ol=EE("end"),Sr=EE("start");function EE(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function l3(e){const t=Sr(e),n=ol(e);if(t&&n)return{start:t,end:n}}function tu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?yE(e.position):"start"in e||"end"in e?yE(e):"line"in e||"column"in e?Ld(e):""}function Ld(e){return TE(e&&e.line)+":"+TE(e&&e.column)}function yE(e){return Ld(e&&e.start)+"-"+Ld(e&&e.end)}function TE(e){return e&&typeof e=="number"?e:1}class Jt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",u={},a=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u=U({},n)),typeof t=="string"?o=t:!u.cause&&t&&(a=!0,o=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?u.ruleId=r:(u.source=r.slice(0,f),u.ruleId=r.slice(f+1))}if(!u.place&&u.ancestors&&u.ancestors){const f=u.ancestors[u.ancestors.length-1];f&&(u.place=f.position)}const c=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.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=tu(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=a&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual,this.expected,this.note,this.url}}Jt.prototype.file="",Jt.prototype.name="",Jt.prototype.reason="",Jt.prototype.message="",Jt.prototype.stack="",Jt.prototype.column=void 0,Jt.prototype.line=void 0,Jt.prototype.ancestors=void 0,Jt.prototype.cause=void 0,Jt.prototype.fatal=void 0,Jt.prototype.place=void 0,Jt.prototype.ruleId=void 0,Jt.prototype.source=void 0;const Dd={}.hasOwnProperty,c3=new Map,f3=/[A-Z]/g,d3=new Set(["table","tbody","thead","tfoot","tr"]),h3=new Set(["td","th"]),bE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function p3(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=x3(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=_3(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"?Bs:sl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=_E(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function _E(e,t,n){if(t.type==="element")return m3(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return g3(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return y3(e,t,n);if(t.type==="mdxjsEsm")return E3(e,t);if(t.type==="root")return T3(e,t,n);if(t.type==="text")return b3(e,t)}function m3(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Bs,e.schema=o),e.ancestors.push(t);const u=SE(e,t.tagName,!1),a=S3(e,t);let c=Fd(e,t);return d3.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!GN(f):!0})),xE(e,a,u,t),Md(a,c),e.ancestors.pop(),e.schema=r,e.create(t,u,a,n)}function g3(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)}nu(e,t.position)}function E3(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);nu(e,t.position)}function y3(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Bs,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:SE(e,t.name,!0),a=w3(e,t),c=Fd(e,t);return xE(e,a,u,t),Md(a,c),e.ancestors.pop(),e.schema=r,e.create(t,u,a,n)}function T3(e,t,n){const r={};return Md(r,Fd(e,t)),e.create(t,e.Fragment,r,n)}function b3(e,t){return t.value}function xE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Md(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function _3(e,t,n){return r;function r(o,u,a,c){const h=Array.isArray(a.children)?n:t;return c?h(u,a,c):h(u,a)}}function x3(e,t){return n;function n(r,o,u,a){const c=Array.isArray(u.children),f=Sr(r);return t(o,u,a,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function S3(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Dd.call(t.properties,o)){const u=C3(e,o,t.properties[o]);if(u){const[a,c]=u;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&h3.has(t.tagName)?r=c:n[a]=c}}if(r){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function w3(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const u=r.data.estree.body[0];u.type;const a=u.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else nu(e,t.position);else{const o=r.name;let u;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,u=e.evaluater.evaluateExpression(c.expression)}else nu(e,t.position);else u=r.value===null?!0:r.value;n[o]=u}return n}function Fd(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:c3;for(;++r<t.children.length;){const u=t.children[r];let a;if(e.passKeys){const f=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(f){const h=o.get(f)||0;a=f+"-"+h,o.set(f,h+1)}}const c=_E(e,u,a);c!==void 0&&n.push(c)}return n}function C3(e,t,n){const r=Pd(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Z1(n):dE(n)),r.property==="style"){let o=typeof n=="object"?n:A3(e,String(n));return e.stylePropertyNameCase==="css"&&(o=v3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?JN[r.property]||r.property:r.attribute,n]}}function A3(e,t){try{return a3(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Jt("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=bE+"#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 u=-1,a;for(;++u<o.length;){const c=eE(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(u&&c.type==="Literal"),optional:!1}:c}r=a}else r=eE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Dd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);nu(e)}function nu(e,t){const n=new Jt("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=bE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function v3(e){const t={};let n;for(n in e)Dd.call(e,n)&&(t[k3(n)]=e[n]);return t}function k3(e){let t=e.replace(f3,N3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function N3(e){return"-"+e.toLowerCase()}const Bd={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"]},O3={};function Ud(e,t){const n=O3,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return wE(e,r,o)}function wE(e,t,n){if(I3(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 CE(e.children,t,n)}return Array.isArray(e)?CE(e,t,n):""}function CE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=wE(e[o],t,n);return r.join("")}function I3(e){return!!(e&&typeof e=="object")}const AE=document.createElement("i");function Hd(e){const t="&"+e+";";AE.innerHTML=t;const n=AE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function In(e,t,n,r){const o=e.length;let u=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);u<r.length;)a=r.slice(u,u+1e4),a.unshift(t,0),e.splice(...a),u+=1e4,t+=1e4}function zn(e,t){return e.length>0?(In(e,e.length,0,t),e):t}const vE={}.hasOwnProperty;function kE(e){const t={};let n=-1;for(;++n<e.length;)P3(t,e[n]);return t}function P3(e,t){let n;for(n in t){const o=(vE.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let a;if(u)for(a in u){vE.call(o,a)||(o[a]=[]);const c=u[a];R3(o[a],Array.isArray(c)?c:c?[c]:[])}}}function R3(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);In(e,0,0,r)}function NE(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 sr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ln=si(/[A-Za-z]/),Zt=si(/[\dA-Za-z]/),L3=si(/[#-'*+\--9=?A-Z^-~]/);function ul(e){return e!==null&&(e<32||e===127)}const zd=si(/\d/),D3=si(/[\dA-Fa-f]/),M3=si(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const al=si(new RegExp("\\p{P}|\\p{S}","u")),ji=si(/\s/);function si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Hs(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let a="";if(u===37&&Zt(e.charCodeAt(n+1))&&Zt(e.charCodeAt(n+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(a=String.fromCharCode(u));else if(u>55295&&u<57344){const c=e.charCodeAt(n+1);u<56320&&c>56319&&c<57344?(a=String.fromCharCode(u,c),o=1):a="�"}else a=String.fromCharCode(u);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let u=0;return a;function a(f){return Ke(f)?(e.enter(n),c(f)):t(f)}function c(f){return Ke(f)&&u++<o?(e.consume(f),c):(e.exit(n),t(f))}}const F3={tokenize:B3};function B3(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"),Xe(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),u(c)}function u(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Re(c)?(e.consume(c),e.exit("chunkText"),u):(e.consume(c),a)}}const U3={tokenize:H3},OE={tokenize:z3};function H3(e){const t=this,n=[];let r=0,o,u,a;return c;function c(L){if(r<n.length){const q=n[r];return t.containerState=q[1],e.attempt(q[0].continuation,f,h)(L)}return h(L)}function f(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&B();const q=t.events.length;let X=q,F;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){F=t.events[X][1].end;break}I(r);let ee=q;for(;ee<t.events.length;)t.events[ee][1].end=U({},F),ee++;return In(t.events,X+1,0,t.events.slice(q)),t.events.length=ee,h(L)}return c(L)}function h(L){if(r===n.length){if(!o)return b(L);if(o.currentConstruct&&o.currentConstruct.concrete)return _(L);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(OE,m,E)(L)}function m(L){return o&&B(),I(r),b(L)}function E(L){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,_(L)}function b(L){return t.containerState={},e.attempt(OE,T,_)(L)}function T(L){return r++,n.push([t.currentConstruct,t.containerState]),b(L)}function _(L){if(L===null){o&&B(),I(0),e.consume(L);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),S(L)}function S(L){if(L===null){C(e.exit("chunkFlow"),!0),I(0),e.consume(L);return}return Re(L)?(e.consume(L),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(L),S)}function C(L,q){const X=t.sliceStream(L);if(q&&X.push(null),L.previous=u,u&&(u.next=L),u=L,o.defineSkip(L.start),o.write(X),t.parser.lazy[L.start.line]){let F=o.events.length;for(;F--;)if(o.events[F][1].start.offset<a&&(!o.events[F][1].end||o.events[F][1].end.offset>a))return;const ee=t.events.length;let be=ee,we,H;for(;be--;)if(t.events[be][0]==="exit"&&t.events[be][1].type==="chunkFlow"){if(we){H=t.events[be][1].end;break}we=!0}for(I(r),F=ee;F<t.events.length;)t.events[F][1].end=U({},H),F++;In(t.events,be+1,0,t.events.slice(ee)),t.events.length=F}}function I(L){let q=n.length;for(;q-- >L;){const X=n[q];t.containerState=X[1],X[0].exit.call(t,e)}n.length=L}function B(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function z3(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function zs(e){if(e===null||st(e)||ji(e))return 1;if(al(e))return 2}function ll(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!r.includes(u)&&(t=u(t,n),r.push(u))}return t}const jd={name:"attention",resolveAll:j3,tokenize:$3};function j3(e,t){let n=-1,r,o,u,a,c,f,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const E=U({},e[r][1].end),b=U({},e[n][1].start);IE(E,-f),IE(b,f),a={type:f>1?"strongSequence":"emphasisSequence",start:E,end:U({},e[r][1].end)},c={type:f>1?"strongSequence":"emphasisSequence",start:U({},e[n][1].start),end:b},u={type:f>1?"strongText":"emphasisText",start:U({},e[r][1].end),end:U({},e[n][1].start)},o={type:f>1?"strong":"emphasis",start:U({},a.start),end:U({},c.end)},e[r][1].end=U({},a.start),e[n][1].start=U({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=zn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=zn(h,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",u,t]]),h=zn(h,ll(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=zn(h,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=zn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,In(e,r-1,n-r+3,h),n=r+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $3(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=zs(r);let u;return a;function a(f){return u=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===u)return e.consume(f),c;const h=e.exit("attentionSequence"),m=zs(f),E=!m||m===2&&o||n.includes(f),b=!o||o===2&&m||n.includes(r);return h._open=!!(u===42?E:E&&(o||!b)),h._close=!!(u===42?b:b&&(m||!E)),t(f)}}function IE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const V3={name:"autolink",tokenize:q3};function q3(e,t,n){let r=0;return o;function o(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(T){return ln(T)?(e.consume(T),a):T===64?n(T):h(T)}function a(T){return T===43||T===45||T===46||Zt(T)?(r=1,c(T)):h(T)}function c(T){return T===58?(e.consume(T),r=0,f):(T===43||T===45||T===46||Zt(T))&&r++<32?(e.consume(T),c):(r=0,h(T))}function f(T){return T===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):T===null||T===32||T===60||ul(T)?n(T):(e.consume(T),f)}function h(T){return T===64?(e.consume(T),m):L3(T)?(e.consume(T),h):n(T)}function m(T){return Zt(T)?E(T):n(T)}function E(T){return T===46?(e.consume(T),r=0,m):T===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):b(T)}function b(T){if((T===45||Zt(T))&&r++<63){const _=T===45?b:E;return e.consume(T),_}return n(T)}}const ru={partial:!0,tokenize:Y3};function Y3(e,t,n){return r;function r(u){return Ke(u)?Xe(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Re(u)?t(u):n(u)}}const PE={continuation:{tokenize:G3},exit:K3,name:"blockQuote",tokenize:W3};function W3(e,t,n){const r=this;return o;function o(a){if(a===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),u}return n(a)}function u(a){return Ke(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function G3(e,t,n){const r=this;return o;function o(a){return Ke(a)?Xe(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):u(a)}function u(a){return e.attempt(PE,t,n)(a)}}function K3(e){e.exit("blockQuote")}const RE={name:"characterEscape",tokenize:Q3};function Q3(e,t,n){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return M3(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const LE={name:"characterReference",tokenize:X3};function X3(e,t,n){const r=this;let o=0,u,a;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),f}function f(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,a=Zt,m(E))}function h(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,a=D3,m):(e.enter("characterReferenceValue"),u=7,a=zd,m(E))}function m(E){if(E===59&&o){const b=e.exit("characterReferenceValue");return a===Zt&&!Hd(r.sliceSerialize(b))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(E)&&o++<u?(e.consume(E),m):n(E)}}const DE={partial:!0,tokenize:Z3},ME={concrete:!0,name:"codeFenced",tokenize:J3};function J3(e,t,n){const r=this,o={partial:!0,tokenize:X};let u=0,a=0,c;return f;function f(F){return h(F)}function h(F){const ee=r.events[r.events.length-1];return u=ee&&ee[1].type==="linePrefix"?ee[2].sliceSerialize(ee[1],!0).length:0,c=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(F)}function m(F){return F===c?(a++,e.consume(F),m):a<3?n(F):(e.exit("codeFencedFenceSequence"),Ke(F)?Xe(e,E,"whitespace")(F):E(F))}function E(F){return F===null||Re(F)?(e.exit("codeFencedFence"),r.interrupt?t(F):e.check(DE,S,q)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(F))}function b(F){return F===null||Re(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(F)):Ke(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,T,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),b)}function T(F){return F===null||Re(F)?E(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(F))}function _(F){return F===null||Re(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(F)):F===96&&F===c?n(F):(e.consume(F),_)}function S(F){return e.attempt(o,q,C)(F)}function C(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),I}function I(F){return u>0&&Ke(F)?Xe(e,B,"linePrefix",u+1)(F):B(F)}function B(F){return F===null||Re(F)?e.check(DE,S,q)(F):(e.enter("codeFlowValue"),L(F))}function L(F){return F===null||Re(F)?(e.exit("codeFlowValue"),B(F)):(e.consume(F),L)}function q(F){return e.exit("codeFenced"),t(F)}function X(F,ee,be){let we=0;return H;function H(ye){return F.enter("lineEnding"),F.consume(ye),F.exit("lineEnding"),ae}function ae(ye){return F.enter("codeFencedFence"),Ke(ye)?Xe(F,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ye):he(ye)}function he(ye){return ye===c?(F.enter("codeFencedFenceSequence"),fe(ye)):be(ye)}function fe(ye){return ye===c?(we++,F.consume(ye),fe):we>=a?(F.exit("codeFencedFenceSequence"),Ke(ye)?Xe(F,de,"whitespace")(ye):de(ye)):be(ye)}function de(ye){return ye===null||Re(ye)?(F.exit("codeFencedFence"),ee(ye)):be(ye)}}}function Z3(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u)}function u(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const $d={name:"codeIndented",tokenize:tO},eO={partial:!0,tokenize:nO};function tO(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Xe(e,u,"linePrefix",5)(h)}function u(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?f(h):Re(h)?e.attempt(eO,a,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Re(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function nO(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):Re(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Xe(e,u,"linePrefix",5)(a)}function u(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):Re(a)?o(a):n(a)}}const rO={name:"codeText",previous:sO,resolve:iO,tokenize:oO};function iO(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 sO(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function oO(e,t,n){let r=0,o,u;return a;function a(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),f(E))}function f(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),f):E===96?(u=e.enter("codeTextSequence"),o=0,m(E)):Re(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(E))}function h(E){return E===null||E===32||E===96||Re(E)?(e.exit("codeTextData"),f(E)):(e.consume(E),h)}function m(E){return E===96?(e.consume(E),o++,m):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(u.type="codeTextData",h(E))}}class uO{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 u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&iu(this.left,r),u.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),iu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),iu(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);iu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);iu(this.left,n.reverse())}}}function iu(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 FE(e){const t={};let n=-1,r,o,u,a,c,f,h;const m=new uO(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,u=0,u<f.length&&f[u][1].type==="lineEndingBlank"&&(u+=2),u<f.length&&f[u][1].type==="content"))for(;++u<f.length&&f[u][1].type!=="content";)f[u][1].type==="chunkText"&&(f[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,aO(m,n)),n=t[n],h=!0);else if(r[1]._container){for(u=n,o=void 0;u--;)if(a=m.get(u),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(m.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=u);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end=U({},m.get(o)[1].start),c=m.slice(o,n),c.unshift(r),m.splice(o,n-o+1,c))}}return In(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function aO(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const u=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,f=[],h={};let m,E,b=-1,T=n,_=0,S=0;const C=[S];for(;T;){for(;e.get(++o)[1]!==T;);u.push(o),T._tokenizer||(m=r.sliceStream(T),T.next||m.push(null),E&&a.defineSkip(T.start),T._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),T._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),E=T,T=T.next}for(T=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,C.push(S),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(a.events=[],T?(T._tokenizer=void 0,T.previous=void 0):C.pop(),b=C.length;b--;){const I=c.slice(C[b],C[b+1]),B=u.pop();f.push([B,B+I.length-1]),e.splice(B,2,I)}for(f.reverse(),b=-1;++b<f.length;)h[_+f[b][0]]=_+f[b][1],_+=f[b][1]-f[b][0]-1;return h}const lO={resolve:fO,tokenize:dO},cO={partial:!0,tokenize:hO};function fO(e){return FE(e),e}function dO(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?u(c):Re(c)?e.check(cO,a,u)(c):(e.consume(c),o)}function u(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function hO(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Xe(e,u,"linePrefix")}function u(a){if(a===null||Re(a))return n(a);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(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function BE(e,t,n,r,o,u,a,c,f){const h=f||Number.POSITIVE_INFINITY;let m=0;return E;function E(I){return I===60?(e.enter(r),e.enter(o),e.enter(u),e.consume(I),e.exit(u),b):I===null||I===32||I===41||ul(I)?n(I):(e.enter(r),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(I))}function b(I){return I===62?(e.enter(u),e.consume(I),e.exit(u),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),T(I))}function T(I){return I===62?(e.exit("chunkString"),e.exit(c),b(I)):I===null||I===60||Re(I)?n(I):(e.consume(I),I===92?_:T)}function _(I){return I===60||I===62||I===92?(e.consume(I),T):T(I)}function S(I){return!m&&(I===null||I===41||st(I))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(r),t(I)):m<h&&I===40?(e.consume(I),m++,S):I===41?(e.consume(I),m--,S):I===null||I===32||I===40||ul(I)?n(I):(e.consume(I),I===92?C:S)}function C(I){return I===40||I===41||I===92?(e.consume(I),S):S(I)}}function UE(e,t,n,r,o,u){const a=this;let c=0,f;return h;function h(T){return e.enter(r),e.enter(o),e.consume(T),e.exit(o),e.enter(u),m}function m(T){return c>999||T===null||T===91||T===93&&!f||T===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(T):T===93?(e.exit(u),e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):Re(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),E(T))}function E(T){return T===null||T===91||T===93||Re(T)||c++>999?(e.exit("chunkString"),m(T)):(e.consume(T),f||(f=!Ke(T)),T===92?b:E)}function b(T){return T===91||T===92||T===93?(e.consume(T),c++,E):E(T)}}function HE(e,t,n,r,o,u){let a;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),a=b===40?41:b,f):n(b)}function f(b){return b===a?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(u),h(b))}function h(b){return b===a?(e.exit(u),f(a)):b===null?n(b):Re(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Xe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===a||b===null||Re(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?E:m)}function E(b){return b===a||b===92?(e.consume(b),m):m(b)}}function su(e,t){let n;return r;function r(o){return Re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ke(o)?Xe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const pO={name:"definition",tokenize:gO},mO={partial:!0,tokenize:EO};function gO(e,t,n){const r=this;let o;return u;function u(T){return e.enter("definition"),a(T)}function a(T){return UE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function c(T){return o=sr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),f):n(T)}function f(T){return st(T)?su(e,h)(T):h(T)}function h(T){return BE(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function m(T){return e.attempt(mO,E,E)(T)}function E(T){return Ke(T)?Xe(e,b,"whitespace")(T):b(T)}function b(T){return T===null||Re(T)?(e.exit("definition"),r.parser.defined.push(o),t(T)):n(T)}}function EO(e,t,n){return r;function r(c){return st(c)?su(e,o)(c):n(c)}function o(c){return HE(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function u(c){return Ke(c)?Xe(e,a,"whitespace")(c):a(c)}function a(c){return c===null||Re(c)?t(c):n(c)}}const yO={name:"hardBreakEscape",tokenize:TO};function TO(e,t,n){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return Re(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const bO={name:"headingAtx",resolve:_O,tokenize:xO};function _O(e,t){let n=e.length-2,r=3,o,u;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},u={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},In(e,r,n-r+1,[["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t]])),e}function xO(e,t,n){let r=0;return o;function o(m){return e.enter("atxHeading"),u(m)}function u(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&r++<6?(e.consume(m),a):m===null||st(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||Re(m)?(e.exit("atxHeading"),t(m)):Ke(m)?Xe(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function f(m){return m===35?(e.consume(m),f):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||st(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const SO=["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"],zE=["pre","script","style","textarea"],wO={concrete:!0,name:"htmlFlow",resolveTo:vO,tokenize:kO},CO={partial:!0,tokenize:OO},AO={partial:!0,tokenize:NO};function vO(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 kO(e,t,n){const r=this;let o,u,a,c,f;return h;function h(k){return m(k)}function m(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),E}function E(k){return k===33?(e.consume(k),b):k===47?(e.consume(k),u=!0,S):k===63?(e.consume(k),o=3,r.interrupt?t:w):ln(k)?(e.consume(k),a=String.fromCharCode(k),C):n(k)}function b(k){return k===45?(e.consume(k),o=2,T):k===91?(e.consume(k),o=5,c=0,_):ln(k)?(e.consume(k),o=4,r.interrupt?t:w):n(k)}function T(k){return k===45?(e.consume(k),r.interrupt?t:w):n(k)}function _(k){const _e="CDATA[";return k===_e.charCodeAt(c++)?(e.consume(k),c===_e.length?r.interrupt?t:he:_):n(k)}function S(k){return ln(k)?(e.consume(k),a=String.fromCharCode(k),C):n(k)}function C(k){if(k===null||k===47||k===62||st(k)){const _e=k===47,Ue=a.toLowerCase();return!_e&&!u&&zE.includes(Ue)?(o=1,r.interrupt?t(k):he(k)):SO.includes(a.toLowerCase())?(o=6,_e?(e.consume(k),I):r.interrupt?t(k):he(k)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):u?B(k):L(k))}return k===45||Zt(k)?(e.consume(k),a+=String.fromCharCode(k),C):n(k)}function I(k){return k===62?(e.consume(k),r.interrupt?t:he):n(k)}function B(k){return Ke(k)?(e.consume(k),B):H(k)}function L(k){return k===47?(e.consume(k),H):k===58||k===95||ln(k)?(e.consume(k),q):Ke(k)?(e.consume(k),L):H(k)}function q(k){return k===45||k===46||k===58||k===95||Zt(k)?(e.consume(k),q):X(k)}function X(k){return k===61?(e.consume(k),F):Ke(k)?(e.consume(k),X):L(k)}function F(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),f=k,ee):Ke(k)?(e.consume(k),F):be(k)}function ee(k){return k===f?(e.consume(k),f=null,we):k===null||Re(k)?n(k):(e.consume(k),ee)}function be(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||st(k)?X(k):(e.consume(k),be)}function we(k){return k===47||k===62||Ke(k)?L(k):n(k)}function H(k){return k===62?(e.consume(k),ae):n(k)}function ae(k){return k===null||Re(k)?he(k):Ke(k)?(e.consume(k),ae):n(k)}function he(k){return k===45&&o===2?(e.consume(k),Ce):k===60&&o===1?(e.consume(k),oe):k===62&&o===4?(e.consume(k),R):k===63&&o===3?(e.consume(k),w):k===93&&o===5?(e.consume(k),te):Re(k)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(CO,K,fe)(k)):k===null||Re(k)?(e.exit("htmlFlowData"),fe(k)):(e.consume(k),he)}function fe(k){return e.check(AO,de,K)(k)}function de(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),ye}function ye(k){return k===null||Re(k)?fe(k):(e.enter("htmlFlowData"),he(k))}function Ce(k){return k===45?(e.consume(k),w):he(k)}function oe(k){return k===47?(e.consume(k),a="",$):he(k)}function $(k){if(k===62){const _e=a.toLowerCase();return zE.includes(_e)?(e.consume(k),R):he(k)}return ln(k)&&a.length<8?(e.consume(k),a+=String.fromCharCode(k),$):he(k)}function te(k){return k===93?(e.consume(k),w):he(k)}function w(k){return k===62?(e.consume(k),R):k===45&&o===2?(e.consume(k),w):he(k)}function R(k){return k===null||Re(k)?(e.exit("htmlFlowData"),K(k)):(e.consume(k),R)}function K(k){return e.exit("htmlFlow"),t(k)}}function NO(e,t,n){const r=this;return o;function o(a){return Re(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u):n(a)}function u(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function OO(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ru,t,n)}}const IO={name:"htmlText",tokenize:PO};function PO(e,t,n){const r=this;let o,u,a;return c;function c(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),f}function f(w){return w===33?(e.consume(w),h):w===47?(e.consume(w),X):w===63?(e.consume(w),L):ln(w)?(e.consume(w),be):n(w)}function h(w){return w===45?(e.consume(w),m):w===91?(e.consume(w),u=0,_):ln(w)?(e.consume(w),B):n(w)}function m(w){return w===45?(e.consume(w),T):n(w)}function E(w){return w===null?n(w):w===45?(e.consume(w),b):Re(w)?(a=E,oe(w)):(e.consume(w),E)}function b(w){return w===45?(e.consume(w),T):E(w)}function T(w){return w===62?Ce(w):w===45?b(w):E(w)}function _(w){const R="CDATA[";return w===R.charCodeAt(u++)?(e.consume(w),u===R.length?S:_):n(w)}function S(w){return w===null?n(w):w===93?(e.consume(w),C):Re(w)?(a=S,oe(w)):(e.consume(w),S)}function C(w){return w===93?(e.consume(w),I):S(w)}function I(w){return w===62?Ce(w):w===93?(e.consume(w),I):S(w)}function B(w){return w===null||w===62?Ce(w):Re(w)?(a=B,oe(w)):(e.consume(w),B)}function L(w){return w===null?n(w):w===63?(e.consume(w),q):Re(w)?(a=L,oe(w)):(e.consume(w),L)}function q(w){return w===62?Ce(w):L(w)}function X(w){return ln(w)?(e.consume(w),F):n(w)}function F(w){return w===45||Zt(w)?(e.consume(w),F):ee(w)}function ee(w){return Re(w)?(a=ee,oe(w)):Ke(w)?(e.consume(w),ee):Ce(w)}function be(w){return w===45||Zt(w)?(e.consume(w),be):w===47||w===62||st(w)?we(w):n(w)}function we(w){return w===47?(e.consume(w),Ce):w===58||w===95||ln(w)?(e.consume(w),H):Re(w)?(a=we,oe(w)):Ke(w)?(e.consume(w),we):Ce(w)}function H(w){return w===45||w===46||w===58||w===95||Zt(w)?(e.consume(w),H):ae(w)}function ae(w){return w===61?(e.consume(w),he):Re(w)?(a=ae,oe(w)):Ke(w)?(e.consume(w),ae):we(w)}function he(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,fe):Re(w)?(a=he,oe(w)):Ke(w)?(e.consume(w),he):(e.consume(w),de)}function fe(w){return w===o?(e.consume(w),o=void 0,ye):w===null?n(w):Re(w)?(a=fe,oe(w)):(e.consume(w),fe)}function de(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||st(w)?we(w):(e.consume(w),de)}function ye(w){return w===47||w===62||st(w)?we(w):n(w)}function Ce(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function oe(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),$}function $(w){return Ke(w)?Xe(e,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):te(w)}function te(w){return e.enter("htmlTextData"),a(w)}}const Vd={name:"labelEnd",resolveAll:MO,resolveTo:FO,tokenize:BO},RO={tokenize:UO},LO={tokenize:HO},DO={tokenize:zO};function MO(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&&In(e,0,e.length,n),e}function FO(e,t){let n=e.length,r=0,o,u,a,c;for(;n--;)if(o=e[n][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const f={type:e[u][1].type==="labelLink"?"link":"image",start:U({},e[u][1].start),end:U({},e[e.length-1][1].end)},h={type:"label",start:U({},e[u][1].start),end:U({},e[a][1].end)},m={type:"labelText",start:U({},e[u+r+2][1].end),end:U({},e[a-2][1].start)};return c=[["enter",f,t],["enter",h,t]],c=zn(c,e.slice(u+1,u+r+3)),c=zn(c,[["enter",m,t]]),c=zn(c,ll(t.parser.constructs.insideSpan.null,e.slice(u+r+4,a-3),t)),c=zn(c,[["exit",m,t],e[a-2],e[a-1],["exit",h,t]]),c=zn(c,e.slice(a+1)),c=zn(c,[["exit",f,t]]),In(e,u,e.length,c),e}function BO(e,t,n){const r=this;let o=r.events.length,u,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){u=r.events[o][1];break}return c;function c(b){return u?u._inactive?E(b):(a=r.parser.defined.includes(sr(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),f):n(b)}function f(b){return b===40?e.attempt(RO,m,a?m:E)(b):b===91?e.attempt(LO,m,a?h:E)(b):a?m(b):E(b)}function h(b){return e.attempt(DO,m,E)(b)}function m(b){return t(b)}function E(b){return u._balanced=!0,n(b)}}function UO(e,t,n){return r;function r(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),o}function o(E){return st(E)?su(e,u)(E):u(E)}function u(E){return E===41?m(E):BE(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function a(E){return st(E)?su(e,f)(E):m(E)}function c(E){return n(E)}function f(E){return E===34||E===39||E===40?HE(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):m(E)}function h(E){return st(E)?su(e,m)(E):m(E)}function m(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function HO(e,t,n){const r=this;return o;function o(c){return UE.call(r,e,u,a,"reference","referenceMarker","referenceString")(c)}function u(c){return r.parser.defined.includes(sr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function zO(e,t,n){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const jO={name:"labelStartImage",resolveAll:Vd.resolveAll,tokenize:$O};function $O(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),u}function u(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const VO={name:"labelStartLink",resolveAll:Vd.resolveAll,tokenize:qO};function qO(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),u}function u(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const qd={name:"lineEnding",tokenize:YO};function YO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const cl={name:"thematicBreak",tokenize:WO};function WO(e,t,n){let r=0,o;return u;function u(h){return e.enter("thematicBreak"),a(h)}function a(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),f(h)):r>=3&&(h===null||Re(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===o?(e.consume(h),r++,f):(e.exit("thematicBreakSequence"),Ke(h)?Xe(e,c,"whitespace")(h):c(h))}}const Tn={continuation:{tokenize:XO},exit:ZO,name:"list",tokenize:QO},GO={partial:!0,tokenize:eI},KO={partial:!0,tokenize:JO};function QO(e,t,n){const r=this,o=r.events[r.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return c;function c(T){const _=r.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||T===r.containerState.marker:zd(T)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(cl,n,h)(T):h(T);if(!r.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(T)}return n(T)}function f(T){return zd(T)&&++a<10?(e.consume(T),f):(!r.interrupt||a<2)&&(r.containerState.marker?T===r.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),h(T)):n(T)}function h(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||T,e.check(ru,r.interrupt?n:m,e.attempt(GO,b,E))}function m(T){return r.containerState.initialBlankLine=!0,u++,b(T)}function E(T){return Ke(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),b):n(T)}function b(T){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function XO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ru,o,u);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(c)}function u(c){return r.containerState.furtherBlankLines||!Ke(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(KO,t,a)(c))}function a(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(Tn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function JO(e,t,n){const r=this;return Xe(e,o,"listItemIndent",r.containerState.size+1);function o(u){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(u):n(u)}}function ZO(e){e.exit(this.containerState.type)}function eI(e,t,n){const r=this;return Xe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const a=r.events[r.events.length-1];return!Ke(u)&&a&&a[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const jE={name:"setextUnderline",resolveTo:tI,tokenize:nI};function tI(e,t){let n=e.length,r,o,u;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),!u&&e[n][1].type==="definition"&&(u=n);const a={type:"setextHeading",start:U({},e[r][1].start),end:U({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",a,t]),e.splice(u+1,0,["exit",e[r][1],t]),e[r][1].end=U({},e[u][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function nI(e,t,n){const r=this;let o;return u;function u(h){let m=r.events.length,E;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){E=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||E)?(e.enter("setextHeadingLine"),o=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ke(h)?Xe(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Re(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const rI={tokenize:iI};function iI(e){const t=this,n=e.attempt(ru,r,e.attempt(this.parser.constructs.flowInitial,o,Xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(lO,o)),"linePrefix")));return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sI={resolveAll:VE()},oI=$E("string"),uI=$E("text");function $E(e){return{resolveAll:VE(e==="text"?aI:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],u=n.attempt(o,a,c);return a;function a(m){return h(m)?u(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),f}function f(m){return h(m)?(n.exit("data"),u(m)):(n.consume(m),f)}function h(m){if(m===null)return!0;const E=o[m];let b=-1;if(E)for(;++b<E.length;){const T=E[b];if(!T.previous||T.previous.call(r,r.previous))return!0}return!1}}}function VE(e){return t;function t(n,r){let o=-1,u;for(;++o<=n.length;)u===void 0?n[o]&&n[o][1].type==="data"&&(u=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==u+2&&(n[u][1].end=n[o-1][1].end,n.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(n,r):n}}function aI(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 u=o.length,a=-1,c=0,f;for(;u--;){const h=o[u];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)f=!0,c++;else if(h!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?a:r.start._bufferIndex+a,_index:r.start._index+u,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:U({},r.end)};r.end=U({},h.start),r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const lI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:pO},disable:{null:[]},document:{42:Tn,43:Tn,45:Tn,48:Tn,49:Tn,50:Tn,51:Tn,52:Tn,53:Tn,54:Tn,55:Tn,56:Tn,57:Tn,62:PE},flow:{35:bO,42:cl,45:[jE,cl],60:wO,61:jE,95:cl,96:ME,126:ME},flowInitial:{[-2]:$d,[-1]:$d,32:$d},insideSpan:{null:[jd,sI]},string:{38:LE,92:RE},text:{[-5]:qd,[-4]:qd,[-3]:qd,33:jO,38:LE,42:jd,60:[V3,IO],91:VO,92:[yO,RE],93:Vd,95:jd,96:rO}},Symbol.toStringTag,{value:"Module"}));function cI(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={},u=[];let a=[],c=[];const f={attempt:ee(X),check:ee(F),consume:B,enter:L,exit:q,interrupt:ee(F,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:T,write:E};let m=t.tokenize.call(h,f);return t.resolveAll&&u.push(t),h;function E(ae){return a=zn(a,ae),C(),a[a.length-1]!==null?[]:(be(t,0),h.events=ll(u,h.events,h),h.events)}function b(ae,he){return dI(T(ae),he)}function T(ae){return fI(a,ae)}function _(){const{_bufferIndex:ae,_index:he,line:fe,column:de,offset:ye}=r;return{_bufferIndex:ae,_index:he,line:fe,column:de,offset:ye}}function S(ae){o[ae.line]=ae.column,H()}function C(){let ae;for(;r._index<a.length;){const he=a[r._index];if(typeof he=="string")for(ae=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ae&&r._bufferIndex<he.length;)I(he.charCodeAt(r._bufferIndex));else I(he)}}function I(ae){m=m(ae)}function B(ae){Re(ae)?(r.line++,r.column=1,r.offset+=ae===-3?2:1,H()):ae!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=ae}function L(ae,he){const fe=he||{};return fe.type=ae,fe.start=_(),h.events.push(["enter",fe,h]),c.push(fe),fe}function q(ae){const he=c.pop();return he.end=_(),h.events.push(["exit",he,h]),he}function X(ae,he){be(ae,he.from)}function F(ae,he){he.restore()}function ee(ae,he){return fe;function fe(de,ye,Ce){let oe,$,te,w;return Array.isArray(de)?K(de):"tokenize"in de?K([de]):R(de);function R(ie){return xe;function xe(Ne){const Fe=Ne!==null&&ie[Ne],Ye=Ne!==null&&ie.null,Pt=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(Ye)?Ye:Ye?[Ye]:[]];return K(Pt)(Ne)}}function K(ie){return oe=ie,$=0,ie.length===0?Ce:k(ie[$])}function k(ie){return xe;function xe(Ne){return w=we(),te=ie,ie.partial||(h.currentConstruct=ie),ie.name&&h.parser.constructs.disable.null.includes(ie.name)?Ue():ie.tokenize.call(he?Object.assign(Object.create(h),he):h,f,_e,Ue)(Ne)}}function _e(ie){return ae(te,w),ye}function Ue(ie){return w.restore(),++$<oe.length?k(oe[$]):Ce}}}function be(ae,he){ae.resolveAll&&!u.includes(ae)&&u.push(ae),ae.resolve&&In(h.events,he,h.events.length-he,ae.resolve(h.events.slice(he),h)),ae.resolveTo&&(h.events=ae.resolveTo(h.events,h))}function we(){const ae=_(),he=h.previous,fe=h.currentConstruct,de=h.events.length,ye=Array.from(c);return{from:de,restore:Ce};function Ce(){r=ae,h.previous=he,h.currentConstruct=fe,h.events.length=de,c=ye,H()}}function H(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function fI(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,u=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,u)];else{if(a=e.slice(n,o),r>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(r):a.shift()}u>0&&a.push(e[o].slice(0,u))}return a}function dI(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const u=e[n];let a;if(typeof u=="string")a=u;else switch(u){case-5:{a="\r";break}case-4:{a=`
16
+ `;break}case-3:{a=`\r
17
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(u)}o=u===-2,r.push(a)}return r.join("")}function hI(e){const r={constructs:kE([lI,...(e||{}).extensions||[]]),content:o(F3),defined:[],document:o(U3),flow:o(rI),lazy:{},string:o(oI),text:o(uI)};return r;function o(u){return a;function a(c){return cI(r,u,c)}}}function pI(e){for(;!FE(e););return e}const qE=/[\0\t\n\r]/g;function mI(){let e=1,t="",n=!0,r;return o;function o(u,a,c){const f=[];let h,m,E,b,T;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(a||void 0).decode(u)),E=0,t="",n&&(u.charCodeAt(0)===65279&&E++,n=void 0);E<u.length;){if(qE.lastIndex=E,h=qE.exec(u),b=h&&h.index!==void 0?h.index:u.length,T=u.charCodeAt(b),!h){t=u.slice(E);break}if(T===10&&E===b&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),E<b&&(f.push(u.slice(E,b)),e+=b-E),T){case 0:{f.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,f.push(-2);e++<m;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}E=b+1}return c&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const gI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function EI(e){return e.replace(gI,yI)}function yI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),u=o===120||o===88;return NE(n.slice(u?2:1),u?16:10)}return Hd(n)||e}const YE={}.hasOwnProperty;function TI(e,t,n){return typeof t!="string"&&(n=t,t=void 0),bI(n)(pI(hI(n).document().write(mI()(e,t,!0))))}function bI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Zs),autolinkProtocol:we,autolinkEmail:we,atxHeading:u(bt),blockQuote:u(Ye),characterEscape:we,characterReference:we,codeFenced:u(Pt),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:u(Pt,a),codeText:u(tn,a),codeTextData:we,data:we,codeFlowValue:we,definition:u(gt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:u(_n),hardBreakEscape:u(Lt),hardBreakTrailing:u(Lt),htmlFlow:u(Js,a),htmlFlowData:we,htmlText:u(Js,a),htmlTextData:we,image:u(Dl),label:a,link:u(Zs),listItem:u(fi),listItemValue:b,listOrdered:u(ci,E),listUnordered:u(ci),paragraph:u(Su),reference:k,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:u(bt),strong:u(Ml),thematicBreak:u(Bl)},exit:{atxHeading:f(),atxHeadingSequence:X,autolink:f(),autolinkEmail:Fe,autolinkProtocol:Ne,blockQuote:f(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Ue,characterReferenceMarkerNumeric:Ue,characterReferenceValue:ie,characterReference:xe,codeFenced:f(C),codeFencedFence:S,codeFencedFenceInfo:T,codeFencedFenceMeta:_,codeFlowValue:H,codeIndented:f(I),codeText:f(ye),codeTextData:H,data:H,definition:f(),definitionDestinationString:q,definitionLabelString:B,definitionTitleString:L,emphasis:f(),hardBreakEscape:f(he),hardBreakTrailing:f(he),htmlFlow:f(fe),htmlFlowData:H,htmlText:f(de),htmlTextData:H,image:f(oe),label:te,labelText:$,lineEnding:ae,link:f(Ce),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:_e,resourceDestinationString:w,resourceTitleString:R,resource:K,setextHeading:f(be),setextHeadingLineSequence:ee,setextHeadingText:F,strong:f(),thematicBreak:f()}};WE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let Ee={type:"root",children:[]};const He={stack:[Ee],tokenStack:[],config:t,enter:c,exit:h,buffer:a,resume:m,data:n},We=[];let Je=-1;for(;++Je<J.length;)if(J[Je][1].type==="listOrdered"||J[Je][1].type==="listUnordered")if(J[Je][0]==="enter")We.push(Je);else{const Wt=We.pop();Je=o(J,Wt,Je)}for(Je=-1;++Je<J.length;){const Wt=t[J[Je][0]];YE.call(Wt,J[Je][1].type)&&Wt[J[Je][1].type].call(Object.assign({sliceSerialize:J[Je][2].sliceSerialize},He),J[Je][1])}if(He.tokenStack.length>0){const Wt=He.tokenStack[He.tokenStack.length-1];(Wt[1]||GE).call(He,void 0,Wt[0])}for(Ee.position={start:oi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:oi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<t.transforms.length;)Ee=t.transforms[Je](Ee)||Ee;return Ee}function o(J,Ee,He){let We=Ee-1,Je=-1,Wt=!1,qr,Vn,di,Ki;for(;++We<=He;){const Gt=J[We];switch(Gt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Gt[0]==="enter"?Je++:Je--,Ki=void 0;break}case"lineEndingBlank":{Gt[0]==="enter"&&(qr&&!Ki&&!Je&&!di&&(di=We),Ki=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ki=void 0}if(!Je&&Gt[0]==="enter"&&Gt[1].type==="listItemPrefix"||Je===-1&&Gt[0]==="exit"&&(Gt[1].type==="listUnordered"||Gt[1].type==="listOrdered")){if(qr){let vr=We;for(Vn=void 0;vr--;){const Rn=J[vr];if(Rn[1].type==="lineEnding"||Rn[1].type==="lineEndingBlank"){if(Rn[0]==="exit")continue;Vn&&(J[Vn][1].type="lineEndingBlank",Wt=!0),Rn[1].type="lineEnding",Vn=vr}else if(!(Rn[1].type==="linePrefix"||Rn[1].type==="blockQuotePrefix"||Rn[1].type==="blockQuotePrefixWhitespace"||Rn[1].type==="blockQuoteMarker"||Rn[1].type==="listItemIndent"))break}di&&(!Vn||di<Vn)&&(qr._spread=!0),qr.end=Object.assign({},Vn?J[Vn][1].start:Gt[1].end),J.splice(Vn||We,0,["exit",qr,Gt[2]]),We++,He++}if(Gt[1].type==="listItemPrefix"){const vr={type:"listItem",_spread:!1,start:Object.assign({},Gt[1].start),end:void 0};qr=vr,J.splice(We,0,["enter",vr,Gt[2]]),We++,He++,di=void 0,Ki=!0}}}return J[Ee][1]._spread=Wt,He}function u(J,Ee){return He;function He(We){c.call(this,J(We),We),Ee&&Ee.call(this,We)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(J,Ee,He){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([Ee,He||void 0]),J.position={start:oi(Ee.start),end:void 0}}function f(J){return Ee;function Ee(He){J&&J.call(this,He),h.call(this,He)}}function h(J,Ee){const He=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==J.type&&(Ee?Ee.call(this,J,We[0]):(We[1]||GE).call(this,J,We[0]));else throw new Error("Cannot close `"+J.type+"` ("+tu({start:J.start,end:J.end})+"): it’s not open");He.position.end=oi(J.end)}function m(){return Ud(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const Ee=this.stack[this.stack.length-2];Ee.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function T(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.lang=J}function _(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function I(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J.replace(/(\r?\n|\r)$/g,"")}function B(J){const Ee=this.resume(),He=this.stack[this.stack.length-1];He.label=Ee,He.identifier=sr(this.sliceSerialize(J)).toLowerCase()}function L(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=J}function q(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=J}function X(J){const Ee=this.stack[this.stack.length-1];if(!Ee.depth){const He=this.sliceSerialize(J).length;Ee.depth=He}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function ee(J){const Ee=this.stack[this.stack.length-1];Ee.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function be(){this.data.setextHeadingSlurpLineEnding=void 0}function we(J){const He=this.stack[this.stack.length-1].children;let We=He[He.length-1];(!We||We.type!=="text")&&(We=Fl(),We.position={start:oi(J.start),end:void 0},He.push(We)),this.stack.push(We)}function H(J){const Ee=this.stack.pop();Ee.value+=this.sliceSerialize(J),Ee.position.end=oi(J.end)}function ae(J){const Ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const He=Ee.children[Ee.children.length-1];He.position.end=oi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ee.type)&&(we.call(this,J),H.call(this,J))}function he(){this.data.atHardBreak=!0}function fe(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function de(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function ye(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function Ce(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=Ee,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function oe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=Ee,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function $(J){const Ee=this.sliceSerialize(J),He=this.stack[this.stack.length-2];He.label=EI(Ee),He.identifier=sr(Ee).toLowerCase()}function te(){const J=this.stack[this.stack.length-1],Ee=this.resume(),He=this.stack[this.stack.length-1];if(this.data.inReference=!0,He.type==="link"){const We=J.children;He.children=We}else He.alt=Ee}function w(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=J}function R(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=J}function K(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function _e(J){const Ee=this.resume(),He=this.stack[this.stack.length-1];He.label=Ee,He.identifier=sr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Ue(J){this.data.characterReferenceType=J.type}function ie(J){const Ee=this.sliceSerialize(J),He=this.data.characterReferenceType;let We;He?(We=NE(Ee,He==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=Hd(Ee);const Je=this.stack[this.stack.length-1];Je.value+=We}function xe(J){const Ee=this.stack.pop();Ee.position.end=oi(J.end)}function Ne(J){H.call(this,J);const Ee=this.stack[this.stack.length-1];Ee.url=this.sliceSerialize(J)}function Fe(J){H.call(this,J);const Ee=this.stack[this.stack.length-1];Ee.url="mailto:"+this.sliceSerialize(J)}function Ye(){return{type:"blockquote",children:[]}}function Pt(){return{type:"code",lang:null,meta:null,value:""}}function tn(){return{type:"inlineCode",value:""}}function gt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _n(){return{type:"emphasis",children:[]}}function bt(){return{type:"heading",depth:0,children:[]}}function Lt(){return{type:"break"}}function Js(){return{type:"html",value:""}}function Dl(){return{type:"image",title:null,url:"",alt:null}}function Zs(){return{type:"link",title:null,url:"",children:[]}}function ci(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function fi(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Su(){return{type:"paragraph",children:[]}}function Ml(){return{type:"strong",children:[]}}function Fl(){return{type:"text",value:""}}function Bl(){return{type:"thematicBreak"}}}function oi(e){return{line:e.line,column:e.column,offset:e.offset}}function WE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?WE(e,r):_I(e,r)}}function _I(e,t){let n;for(n in t)if(YE.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 GE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tu({start:t.start,end:t.end})+") is still open")}function xI(e){const t=this;t.parser=n;function n(r){return TI(r,Te(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function SI(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 wI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
18
+ `}]}function CI(e,t){const n=t.value?t.value+`
19
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function AI(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vI(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kI(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Hs(r.toLowerCase()),u=e.footnoteOrder.indexOf(r);let a,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=u+1,c+=1,e.footnoteCounts.set(r,c);const f={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(a)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function NI(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 OI(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function KE(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),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function II(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return KE(e,t);const o={src:Hs(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,u),e.applyData(t,u)}function PI(e,t){const n={src:Hs(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 RI(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 LI(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return KE(e,t);const o={href:Hs(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function DI(e,t){const n={href:Hs(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 MI(e,t,n){const r=e.all(t),o=n?FI(n):QE(t),u={},a=[];if(typeof t.checked=="boolean"){const m=r[0];let E;m&&m.type==="element"&&m.tagName==="p"?E=m:(E={type:"element",tagName:"p",properties:{},children:[]},r.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const m=r[c];(o||c!==0||m.type!=="element"||m.tagName!=="p")&&a.push({type:"text",value:`
20
+ `}),m.type==="element"&&m.tagName==="p"&&!o?a.push(...m.children):a.push(m)}const f=r[r.length-1];f&&(o||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
21
+ `});const h={type:"element",tagName:"li",properties:u,children:a};return e.patch(t,h),e.applyData(t,h)}function FI(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=QE(n[r])}return t}function QE(e){const t=e.spread;return t==null?e.children.length>1:t}function BI(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 a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,u),e.applyData(t,u)}function UI(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HI(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function zI(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jI(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Sr(t.children[1]),f=ol(t.children[t.children.length-1]);c&&f&&(a.position={start:c,end:f}),o.push(a)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function $I(e,t,n){const r=n?n.children:void 0,u=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let f=-1;const h=[];for(;++f<c;){const E=t.children[f],b={},T=a?a[f]:void 0;T&&(b.align=T);let _={type:"element",tagName:u,properties:b,children:[]};E&&(_.children=e.all(E),e.patch(E,_),_=e.applyData(E,_)),h.push(_)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function VI(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const XE=9,JE=32;function qI(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const u=[];for(;r;)u.push(ZE(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return u.push(ZE(t.slice(o),o>0,!1)),u.join("")}function ZE(e,t,n){let r=0,o=e.length;if(t){let u=e.codePointAt(r);for(;u===XE||u===JE;)r++,u=e.codePointAt(r)}if(n){let u=e.codePointAt(o-1);for(;u===XE||u===JE;)o--,u=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function YI(e,t){const n={type:"text",value:qI(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function WI(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const GI={blockquote:SI,break:wI,code:CI,delete:AI,emphasis:vI,footnoteReference:kI,heading:NI,html:OI,imageReference:II,image:PI,inlineCode:RI,linkReference:LI,link:DI,listItem:MI,list:BI,paragraph:UI,root:HI,strong:zI,table:jI,tableCell:VI,tableRow:$I,text:YI,thematicBreak:WI,toml:fl,yaml:fl,definition:fl,footnoteDefinition:fl};function fl(){}const ey=-1,dl=0,ou=1,hl=2,Yd=3,Wd=4,Gd=5,Kd=6,ty=7,ny=8,ry=typeof self=="object"?self:globalThis,KI=(e,t)=>{const n=(o,u)=>(e.set(u,o),o),r=o=>{if(e.has(o))return e.get(o);const[u,a]=t[o];switch(u){case dl:case ey:return n(a,o);case ou:{const c=n([],o);for(const f of a)c.push(r(f));return c}case hl:{const c=n({},o);for(const[f,h]of a)c[r(f)]=r(h);return c}case Yd:return n(new Date(a),o);case Wd:{const{source:c,flags:f}=a;return n(new RegExp(c,f),o)}case Gd:{const c=n(new Map,o);for(const[f,h]of a)c.set(r(f),r(h));return c}case Kd:{const c=n(new Set,o);for(const f of a)c.add(r(f));return c}case ty:{const{name:c,message:f}=a;return n(new ry[c](f),o)}case ny:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}}return n(new ry[u](a),o)};return r},iy=e=>KI(new Map,e)(0),js="",{toString:QI}={},{keys:XI}=Object,uu=e=>{const t=typeof e;if(t!=="object"||!e)return[dl,t];const n=QI.call(e).slice(8,-1);switch(n){case"Array":return[ou,js];case"Object":return[hl,js];case"Date":return[Yd,js];case"RegExp":return[Wd,js];case"Map":return[Gd,js];case"Set":return[Kd,js];case"DataView":return[ou,n]}return n.includes("Array")?[ou,n]:n.includes("Error")?[ty,n]:[hl,n]},pl=([e,t])=>e===dl&&(t==="function"||t==="symbol"),JI=(e,t,n,r)=>{const o=(a,c)=>{const f=r.push(a)-1;return n.set(c,f),f},u=a=>{if(n.has(a))return n.get(a);let[c,f]=uu(a);switch(c){case dl:{let m=a;switch(f){case"bigint":c=ny,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);m=null;break;case"undefined":return o([ey],a)}return o([c,m],a)}case ou:{if(f){let b=a;return f==="DataView"?b=new Uint8Array(a.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(a)),o([f,[...b]],a)}const m=[],E=o([c,m],a);for(const b of a)m.push(u(b));return E}case hl:{if(f)switch(f){case"BigInt":return o([f,a.toString()],a);case"Boolean":case"Number":case"String":return o([f,a.valueOf()],a)}if(t&&"toJSON"in a)return u(a.toJSON());const m=[],E=o([c,m],a);for(const b of XI(a))(e||!pl(uu(a[b])))&&m.push([u(b),u(a[b])]);return E}case Yd:return o([c,a.toISOString()],a);case Wd:{const{source:m,flags:E}=a;return o([c,{source:m,flags:E}],a)}case Gd:{const m=[],E=o([c,m],a);for(const[b,T]of a)(e||!(pl(uu(b))||pl(uu(T))))&&m.push([u(b),u(T)]);return E}case Kd:{const m=[],E=o([c,m],a);for(const b of a)(e||!pl(uu(b)))&&m.push(u(b));return E}}const{message:h}=a;return o([c,{name:f,message:h}],a)};return u},sy=(e,{json:t,lossy:n}={})=>{const r=[];return JI(!(t||n),!!t,new Map,r)(e),r},$s=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?iy(sy(e,t)):structuredClone(e):(e,t)=>iy(sy(e,t));function ZI(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 eP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function tP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ZI,r=e.options.footnoteBackLabel||eP,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const m=e.all(h),E=String(h.identifier).toUpperCase(),b=Hs(E.toLowerCase());let T=0;const _=[],S=e.footnoteCounts.get(E);for(;S!==void 0&&++T<=S;){_.length>0&&_.push({type:"text",value:" "});let B=typeof n=="string"?n:n(f,T);typeof B=="string"&&(B={type:"text",value:B}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(T>1?"-"+T:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,T),className:["data-footnote-backref"]},children:Array.isArray(B)?B:[B]})}const C=m[m.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const B=C.children[C.children.length-1];B&&B.type==="text"?B.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(..._)}else m.push(..._);const I={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(m,!0)};e.patch(h,I),c.push(I)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:Te(U({},$s(a)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
31
22
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
32
- `}]}}const ya=function(e){if(e==null)return Cw;if(typeof e=="function")return Ta(e);if(typeof e=="object")return Array.isArray(e)?_w(e):Sw(e);if(typeof e=="string")return xw(e);throw new Error("Expected function, string, or object as test")};function _w(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ya(e[n]);return Ta(r);function r(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function Sw(e){const t=e;return Ta(n);function n(r){const o=r;let u;for(u in e)if(o[u]!==t[u])return!1;return!0}}function xw(e){return Ta(t);function t(n){return n&&n.type===e}}function Ta(e){return t;function t(n,r,o){return!!(Aw(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function Cw(){return!0}function Aw(e){return e!==null&&typeof e=="object"&&"type"in e}function GD(e){return e}const wg=[],kw=!0,xf=!1,ww="skip";function vg(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const u=ya(o),l=r?-1:1;c(e,void 0,[])();function c(d,h,g){const y=d&&typeof d=="object"?d:{};if(typeof y.type=="string"){const T=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(T?"<"+T+">":""))+")"})}return b;function b(){let T=wg,S,k,P;if((!t||u(d,h,g[g.length-1]||void 0))&&(T=vw(n(d,g)),T[0]===xf))return T;if("children"in d&&d.children){const L=d;if(L.children&&T[0]!==ww)for(k=(r?L.children.length:-1)+l,P=g.concat(L);k>-1&&k<L.children.length;){const H=L.children[k];if(S=c(H,k,P)(),S[0]===xf)return S;k=typeof S[1]=="number"?S[1]:k+l}}return T}}}function vw(e){return Array.isArray(e)?e:typeof e=="number"?[kw,e]:e==null?wg:[e]}function ba(e,t,n,r){let o,u,l;typeof t=="function"&&typeof n!="function"?(u=void 0,l=t,o=n):(u=t,l=n,o=r),vg(e,u,c,o);function c(d,h){const g=h[h.length-1],y=g?g.children.indexOf(d):void 0;return l(d,y,g)}}const Cf={}.hasOwnProperty,Nw={};function Iw(e,t){const n=t||Nw,r=new Map,o=new Map,u=new Map,l=G(G({},hw),n.handlers),c={all:h,applyData:Pw,definitionById:r,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:l,one:d,options:n,patch:Ow,wrap:Lw};return ba(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?r:o,b=String(g.identifier).toUpperCase();y.has(b)||y.set(b,g)}}),c;function d(g,y){const b=g.type,T=c.handlers[b];if(Cf.call(c.handlers,b)&&T)return T(c,g,y);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in g){const k=g,{children:P}=k,L=nr(k,["children"]),H=ls(L);return H.children=c.all(g),H}return ls(g)}return(c.options.unknownHandler||Rw)(c,g,y)}function h(g){const y=[];if("children"in g){const b=g.children;let T=-1;for(;++T<b.length;){const S=c.one(b[T],g);if(S){if(T&&b[T-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=Ng(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=Ng(k.value))}Array.isArray(S)?y.push(...S):y.push(S)}}}return y}}function Ow(e,t){e.position&&(t.position=vC(e))}function Pw(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&u&&Object.assign(n.properties,ls(u)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function Rw(e,t){const n=t.data||{},r="value"in t&&!(Cf.call(n,"hProperties")||Cf.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 Lw(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
23
+ `}]}}const ml=function(e){if(e==null)return sP;if(typeof e=="function")return gl(e);if(typeof e=="object")return Array.isArray(e)?nP(e):rP(e);if(typeof e=="string")return iP(e);throw new Error("Expected function, string, or object as test")};function nP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ml(e[n]);return gl(r);function r(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function rP(e){const t=e;return gl(n);function n(r){const o=r;let u;for(u in e)if(o[u]!==t[u])return!1;return!0}}function iP(e){return gl(t);function t(n){return n&&n.type===e}}function gl(e){return t;function t(n,r,o){return!!(oP(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function sP(){return!0}function oP(e){return e!==null&&typeof e=="object"&&"type"in e}function KF(e){return e}const oy=[],uP=!0,Qd=!1,aP="skip";function uy(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const u=ml(o),a=r?-1:1;c(e,void 0,[])();function c(f,h,m){const E=f&&typeof f=="object"?f:{};if(typeof E.type=="string"){const T=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(f.type+(T?"<"+T+">":""))+")"})}return b;function b(){let T=oy,_,S,C;if((!t||u(f,h,m[m.length-1]||void 0))&&(T=lP(n(f,m)),T[0]===Qd))return T;if("children"in f&&f.children){const I=f;if(I.children&&T[0]!==aP)for(S=(r?I.children.length:-1)+a,C=m.concat(I);S>-1&&S<I.children.length;){const B=I.children[S];if(_=c(B,S,C)(),_[0]===Qd)return _;S=typeof _[1]=="number"?_[1]:S+a}}return T}}}function lP(e){return Array.isArray(e)?e:typeof e=="number"?[uP,e]:e==null?oy:[e]}function El(e,t,n,r){let o,u,a;typeof t=="function"&&typeof n!="function"?(u=void 0,a=t,o=n):(u=t,a=n,o=r),uy(e,u,c,o);function c(f,h){const m=h[h.length-1],E=m?m.children.indexOf(f):void 0;return a(f,E,m)}}const Xd={}.hasOwnProperty,cP={};function fP(e,t){const n=t||cP,r=new Map,o=new Map,u=new Map,a=U(U({},GI),n.handlers),c={all:h,applyData:hP,definitionById:r,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:a,one:f,options:n,patch:dP,wrap:mP};return El(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const E=m.type==="definition"?r:o,b=String(m.identifier).toUpperCase();E.has(b)||E.set(b,m)}}),c;function f(m,E){const b=m.type,T=c.handlers[b];if(Xd.call(c.handlers,b)&&T)return T(c,m,E);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in m){const S=m,{children:C}=S,I=Yt(S,["children"]),B=$s(I);return B.children=c.all(m),B}return $s(m)}return(c.options.unknownHandler||pP)(c,m,E)}function h(m){const E=[];if("children"in m){const b=m.children;let T=-1;for(;++T<b.length;){const _=c.one(b[T],m);if(_){if(T&&b[T-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=ay(_.value)),!Array.isArray(_)&&_.type==="element")){const S=_.children[0];S&&S.type==="text"&&(S.value=ay(S.value))}Array.isArray(_)?E.push(..._):E.push(_)}}}return E}}function dP(e,t){e.position&&(t.position=l3(e))}function hP(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&u&&Object.assign(n.properties,$s(u)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function pP(e,t){const n=t.data||{},r="value"in t&&!(Xd.call(n,"hProperties")||Xd.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 mP(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
33
24
  `});++r<e.length;)r&&n.push({type:"text",value:`
34
25
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
35
- `}),n}function Ng(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ig(e,t){const n=Iw(e,t),r=n.one(e,void 0),o=bw(n),u=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
36
- `},o),u}function Dw(e,t){return e&&"run"in e?function(n,r){return jt(this,null,function*(){const o=Ig(n,G({file:r},t));yield e.run(o,r)})}:function(n,r){return Ig(n,G({file:r},e||t))}}function Og(e){if(e)throw e}var Af,Pg;function Mw(){if(Pg)return Af;Pg=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},u=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!y)return!1;var b;for(b in h);return typeof b=="undefined"||e.call(h,b)},l=function(h,g){n&&g.name==="__proto__"?n(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},c=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(r)return r(h,g).value}else return;return h[g]};return Af=function d(){var h,g,y,b,T,S,k=arguments[0],P=1,L=arguments.length,H=!1;for(typeof k=="boolean"&&(H=k,k=arguments[1]||{},P=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});P<L;++P)if(h=arguments[P],h!=null)for(g in h)y=c(k,g),b=c(h,g),k!==b&&(H&&b&&(u(b)||(T=o(b)))?(T?(T=!1,S=y&&o(y)?y:[]):S=y&&u(y)?y:{},l(k,{name:g,newValue:d(H,S,b)})):typeof b!="undefined"&&l(k,{name:g,newValue:b}));return k},Af}var Fw=Mw();const kf=We(Fw);function wf(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 Bw(){const e=[],t={run:n,use:r};return t;function n(...o){let u=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...o);function c(d,...h){const g=e[++u];let y=-1;if(d){l(d);return}for(;++y<o.length;)(h[y]===null||h[y]===void 0)&&(h[y]=o[y]);o=h,g?Uw(g,c)(...h):l(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function Uw(e,t){let n;return r;function r(...l){const c=e.length>l.length;let d;c&&l.push(o);try{d=e.apply(this,l)}catch(h){const g=h;if(c&&n)throw g;return o(g)}c||(d&&d.then&&typeof d.then=="function"?d.then(u,o):d instanceof Error?o(d):u(d))}function o(l,...c){n||(n=!0,t(l,...c))}function u(l){o(null,l)}}const ar={basename:Hw,dirname:zw,extname:jw,join:$w,sep:"/"};function Hw(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xo(e);let n=0,r=-1,o=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else r<0&&(u=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else l<0&&(u=!0,l=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function zw(e){if(xo(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 jw(e){xo(e);let t=e.length,n=-1,r=0,o=-1,u=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?o<0?o=t:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||n<0||u===0||u===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function $w(...e){let t=-1,n;for(;++t<e.length;)xo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Vw(n)}function Vw(e){xo(e);const t=e.codePointAt(0)===47;let n=qw(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function qw(e,t){let n="",r=0,o=-1,u=0,l=-1,c,d;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(o===l-1||u===1))if(o!==l-1&&u===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=l,u=0;continue}}else if(n.length>0){n="",r=0,o=l,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),r=l-o-1;o=l,u=0}else c===46&&u>-1?u++:u=-1}return n}function xo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Yw={cwd:Ww};function Ww(){return"/"}function vf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Gw(e){if(typeof e=="string")e=new URL(e);else if(!vf(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 Kw(e)}function Kw(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 Nf=["history","path","basename","stem","extname","dirname"];class Rg{constructor(t){let n;t?vf(t)?n={path:t}:typeof t=="string"||Qw(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Yw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Nf.length;){const u=Nf[r];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let o;for(o in n)Nf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?ar.basename(this.path):void 0}set basename(t){Of(t,"basename"),If(t,"basename"),this.path=ar.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ar.dirname(this.path):void 0}set dirname(t){Lg(this.basename,"dirname"),this.path=ar.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ar.extname(this.path):void 0}set extname(t){if(If(t,"extname"),Lg(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ar.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vf(t)&&(t=Gw(t)),Of(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ar.basename(this.path,this.extname):void 0}set stem(t){Of(t,"stem"),If(t,"stem"),this.path=ar.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Kt(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 If(e,t){if(e&&e.includes(ar.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ar.sep+"`")}function Of(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Lg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Qw(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xw=function(e){const r=this.constructor.prototype,o=r[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,r),u},Jw={}.hasOwnProperty;class Pf extends Xw{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=Bw()}copy(){const t=new Pf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(kf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Df("data",this.frozen),this.namespace[t]=n,this):Jw.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Df("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=_a(t),r=this.parser||this.Parser;return Rf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Rf("process",this.parser||this.Parser),Lf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(u,l){const c=_a(t),d=r.parse(c);r.run(d,c,function(g,y,b){if(g||!y||!b)return h(g);const T=y,S=r.stringify(T,b);tv(S)?b.value=S:b.result=S,h(g,b)});function h(g,y){g||!y?l(g):u?u(y):n(void 0,y)}}}processSync(t){let n=!1,r;return this.freeze(),Rf("processSync",this.parser||this.Parser),Lf("processSync",this.compiler||this.Compiler),this.process(t,o),Mg("processSync","process",n),r;function o(u,l){n=!0,Og(u),r=l}}run(t,n,r){Dg(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?u(void 0,r):new Promise(u);function u(l,c){const d=_a(n);o.run(t,d,h);function h(g,y,b){const T=y||t;g?c(g):l?l(T):r(void 0,T,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,u),Mg("runSync","run",r),o;function u(l,c){Og(l),o=c,r=!0}}stringify(t,n){this.freeze();const r=_a(n),o=this.compiler||this.Compiler;return Lf("stringify",o),Dg(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Df("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...y]=h;d(g,y)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(o.settings=kf(!0,o.settings,h.settings))}function c(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const y=h[g];u(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,g){let y=-1,b=-1;for(;++y<r.length;)if(r[y][0]===h){b=y;break}if(b===-1)r.push([h,...g]);else if(g.length>0){let[T,...S]=g;const k=r[b][1];wf(k)&&wf(T)&&(T=kf(!0,k,T)),r[b]=[h,T,...S]}}}}const Zw=new Pf().freeze();function Rf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Lf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Df(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 Dg(e){if(!wf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Mg(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function _a(e){return ev(e)?e:new Rg(e)}function ev(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tv(e){return typeof e=="string"||nv(e)}function nv(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rv="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Fg=[],Bg={allowDangerousHtml:!0},iv=/^(https?|ircs?|mailto|xmpp)$/i,sv=[{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 ov(e){const t=uv(e),n=av(e);return lv(t.runSync(t.parse(n),n),e)}function uv(e){const t=e.rehypePlugins||Fg,n=e.remarkPlugins||Fg,r=e.remarkRehypeOptions?G(G({},e.remarkRehypeOptions),Bg):Bg;return Zw().use(zk).use(n).use(Dw,r).use(t)}function av(e){const t=e.children||"",n=new Rg;return typeof t=="string"&&(n.value=t),n}function lv(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,u=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||cv;for(const g of sv)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+rv+g.id,void 0);return ba(e,h),RC(e,{Fragment:I.Fragment,components:o,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function h(g,y,b){if(g.type==="raw"&&b&&typeof y=="number")return l?b.children.splice(y,1):b.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let T;for(T in ff)if(Object.hasOwn(ff,T)&&Object.hasOwn(g.properties,T)){const S=g.properties[T],k=ff[T];(k===null||k.includes(g.tagName))&&(g.properties[T]=d(String(S||""),T,g))}}if(g.type==="element"){let T=n?!n.includes(g.tagName):u?u.includes(g.tagName):!1;if(!T&&r&&typeof y=="number"&&(T=!r(g,y,b)),T&&b&&typeof y=="number")return c&&g.children?b.children.splice(y,1,...g.children):b.children.splice(y,1),y}}}function cv(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||iv.test(e.slice(0,t))?e:""}const Ug=/[#.]/g;function fv(e,t){const n=e||"",r={};let o=0,u,l;for(;o<n.length;){Ug.lastIndex=o;const c=Ug.exec(n),d=n.slice(o,c?c.index:n.length);d&&(u?u==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:l=d,o+=d.length),c&&(u=c[0],o++)}return{type:"element",tagName:l||t||"div",properties:r,children:[]}}function Hg(e,t,n){const r=n?mv(n):void 0;function o(u,l,...c){let d;if(u==null){d={type:"root",children:[]};const h=l;c.unshift(h)}else{d=fv(u,t);const h=d.tagName.toLowerCase(),g=r?r.get(h):void 0;if(d.tagName=g||h,dv(l))c.unshift(l);else for(const[y,b]of Object.entries(l))hv(e,d.properties,y,b)}for(const h of c)Mf(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function dv(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 u=o;for(const l of u)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function hv(e,t,n,r){const o=sf(e,n);let u;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;u=r}else typeof r=="boolean"?u=r:typeof r=="string"?o.spaceSeparated?u=P0(r):o.commaSeparated?u=T0(r):o.commaOrSpaceSeparated?u=P0(T0(r).join(" ")):u=zg(o,o.property,r):Array.isArray(r)?u=[...r]:u=o.property==="style"?pv(r):String(r);if(Array.isArray(u)){const l=[];for(const c of u)l.push(zg(o,o.property,c));u=l}o.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[o.property]=u}}function Mf(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)Mf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Mf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function zg(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ho(n)===ho(t)))return!0}return n}function pv(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function mv(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const gv=["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"],Ev=Hg(aa,"div"),yv=Hg(is,"g",gv);function Tv(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(u){if(typeof u=="number"&&u>-1&&u<=t.length){let l=0;for(;;){let c=n[l];if(c===void 0){const d=jg(t,n[l-1]);c=d===-1?t.length+1:d+1,n[l]=c}if(c>u)return{line:l+1,column:u-(l>0?n[l-1]:0)+1,offset:u};l++}}}function o(u){if(u&&typeof u.line=="number"&&typeof u.column=="number"&&!Number.isNaN(u.line)&&!Number.isNaN(u.column)){for(;n.length<u.line;){const c=n[n.length-1],d=jg(t,c),h=d===-1?t.length+1:d+1;if(c===h)break;n.push(h)}const l=(u.line>1?n[u.line-2]:0)+u.column-1;if(l<n[u.line-1])return l}}}function jg(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
37
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const _i={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/"},$g={}.hasOwnProperty,bv=Object.prototype;function _v(e,t){const n=t||{};return Ff({file:n.file||void 0,location:!1,schema:n.space==="svg"?is:aa,verbose:n.verbose||!1},e)}function Ff(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Sa(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:Vg(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const u=String(e.file),l=Tv(u),c=l.toPoint(0),d=l.toPoint(u.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Sa(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Sa(e,r,n),n}default:return n=Sv(e,t),n}}function Vg(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Ff(e,t[n]);r.push(o)}return r}function Sv(e,t){const n=e.schema;e.schema=t.namespaceURI===_i.svg?is:aa;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;$g.call(bv,d)||(o[d]=c.value)}const l=(e.schema.space==="svg"?yv:Ev)(t.tagName,o,Vg(e,t.childNodes));if(Sa(e,t,l),l.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&cs(d.startTag),g=d&&d.endTag&&cs(d.endTag),y=Ff(e,c.content);h&&g&&e.file&&(y.position={start:h.end,end:g.start}),l.content=y}return e.schema=n,l}function Sa(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=xv(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function xv(e,t,n){const r=cs(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 u={};let l;if(n.attrs)for(l in n.attrs)$g.call(n.attrs,l)&&(u[sf(e.schema,l).property]=cs(n.attrs[l]));n.startTag;const c=cs(n.startTag),d=n.endTag?cs(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=u,t.data={position:h}}}return r}function cs(e){const t=qg({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=qg({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function qg(e){return e.line&&e.column?e:void 0}class Co{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Co.prototype.property={},Co.prototype.normal={},Co.prototype.space=null;function Yg(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 Co(n,r,t)}function Bf(e){return e.toLowerCase()}class Ln{constructor(t,n){this.property=t,this.attribute=n}}Ln.prototype.space=null,Ln.prototype.boolean=!1,Ln.prototype.booleanish=!1,Ln.prototype.overloadedBoolean=!1,Ln.prototype.number=!1,Ln.prototype.commaSeparated=!1,Ln.prototype.spaceSeparated=!1,Ln.prototype.commaOrSpaceSeparated=!1,Ln.prototype.mustUseProperty=!1,Ln.prototype.defined=!1;let Cv=0;const $e=Si(),Nt=Si(),Wg=Si(),ue=Si(),ot=Si(),fs=Si(),An=Si();function Si(){return sc(2,++Cv)}const Uf=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Nt,commaOrSpaceSeparated:An,commaSeparated:fs,number:ue,overloadedBoolean:Wg,spaceSeparated:ot},Symbol.toStringTag,{value:"Module"})),Hf=Object.keys(Uf);class zf extends Ln{constructor(t,n,r,o){let u=-1;if(super(t,n),Gg(this,"space",o),typeof r=="number")for(;++u<Hf.length;){const l=Hf[u];Gg(this,Hf[u],(r&Uf[l])===Uf[l])}}}zf.prototype.defined=!0;function Gg(e,t,n){n&&(e[t]=n)}const Av={}.hasOwnProperty;function ds(e){const t={},n={};let r;for(r in e.properties)if(Av.call(e.properties,r)){const o=e.properties[r],u=new zf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[Bf(r)]=r,n[Bf(u.attribute)]=r}return new Co(t,n,e.space)}const Kg=ds({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}}),Qg=ds({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Xg(e,t){return t in e?e[t]:t}function Jg(e,t){return Xg(e,t.toLowerCase())}const Zg=ds({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Jg,properties:{xmlns:null,xmlnsXLink:null}}),e1=ds({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Nt,ariaAutoComplete:null,ariaBusy:Nt,ariaChecked:Nt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:ot,ariaCurrent:null,ariaDescribedBy:ot,ariaDetails:null,ariaDisabled:Nt,ariaDropEffect:ot,ariaErrorMessage:null,ariaExpanded:Nt,ariaFlowTo:ot,ariaGrabbed:Nt,ariaHasPopup:null,ariaHidden:Nt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ot,ariaLevel:ue,ariaLive:null,ariaModal:Nt,ariaMultiLine:Nt,ariaMultiSelectable:Nt,ariaOrientation:null,ariaOwns:ot,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:Nt,ariaReadOnly:Nt,ariaRelevant:null,ariaRequired:Nt,ariaRoleDescription:ot,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:Nt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null}}),kv=ds({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Jg,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fs,acceptCharset:ot,accessKey:ot,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:ot,autoFocus:$e,autoPlay:$e,blocking:ot,capture:null,charSet:null,checked:$e,cite:null,className:ot,cols:ue,colSpan:null,content:null,contentEditable:Nt,controls:$e,controlsList:ot,coords:ue|fs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:Wg,draggable:Nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:ot,height:ue,hidden:$e,high:ue,href:null,hrefLang:null,htmlFor:ot,httpEquiv:ot,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:ot,itemRef:ot,itemScope:$e,itemType:ot,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:$e,optimum:ue,pattern:null,ping:ot,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:ot,required:$e,reversed:$e,rows:ue,rowSpan:ue,sandbox:ot,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:Nt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Nt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ot,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:Nt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:ue,security:null,unselectable:null}}),wv=ds({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:Xg,properties:{about:An,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:ot,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:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fs,g2:fs,glyphName:fs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:An,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,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:ue,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:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ot,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:An,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:An,rev:An,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:An,requiredFeatures:An,requiredFonts:An,requiredFormats:An,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:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:An,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:An,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:An,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),vv=/^data[-\w.:]+$/i,t1=/-[a-z]/g,Nv=/[A-Z]/g;function Iv(e,t){const n=Bf(t);let r=t,o=Ln;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&vv.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(t1,Pv);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!t1.test(u)){let l=u.replace(Nv,Ov);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=zf}return new o(r,t)}function Ov(e){return"-"+e.toLowerCase()}function Pv(e){return e.charAt(1).toUpperCase()}const Rv=Yg([Qg,Kg,Zg,e1,kv],"html"),n1=Yg([Qg,Kg,Zg,e1,wv],"svg"),r1={}.hasOwnProperty;function i1(e,t){const n=t||{};function r(o,...u){let l=r.invalid;const c=r.handlers;if(o&&r1.call(o,e)){const d=String(o[e]);l=r1.call(c,d)?c[d]:r.unknown}if(l)return l.call(this,o,...u)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Lv={},Dv={}.hasOwnProperty,s1=i1("type",{handlers:{root:Fv,element:jv,text:Hv,comment:zv,doctype:Uv}});function Mv(e,t){const r=(t||Lv).space;return s1(e,r==="svg"?n1:Rv)}function Fv(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=jf(e.children,n,t),hs(e,n),n}function Bv(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=jf(e.children,n,t),hs(e,n),n}function Uv(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return hs(e,t),t}function Hv(e){const t={nodeName:"#text",value:e.value,parentNode:null};return hs(e,t),t}function zv(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return hs(e,t),t}function jv(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=n1);const o=[];let u;if(e.properties){for(u in e.properties)if(u!=="children"&&Dv.call(e.properties,u)){const d=$v(r,u,e.properties[u]);d&&o.push(d)}}const l=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:_i[l],childNodes:[],parentNode:null};return c.childNodes=jf(e.children,c,r),hs(e,c),e.tagName==="template"&&e.content&&(c.content=Bv(e.content,r)),c}function $v(e,t,n){const r=Iv(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?b0(n):R0(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const u=o.name.indexOf(":");u<0?o.prefix="":(o.name=o.name.slice(u+1),o.prefix=r.attribute.slice(0,u)),o.namespace=_i[r.space]}return o}function jf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const u=s1(e[r],n);u.parentNode=t,o.push(u)}return o}function hs(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 Vv=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],qv=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]),ft="�";var A;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(A||(A={}));const hn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function o1(e){return e>=55296&&e<=57343}function Yv(e){return e>=56320&&e<=57343}function Wv(e,t){return(e-55296)*1024+9216+t}function u1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function a1(e){return e>=64976&&e<=65007||qv.has(e)}var W;(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"})(W||(W={}));const Gv=65536;class Kv{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=Gv,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:u}=this,l=o+n,c=u+n;return{code:t,startLine:r,endLine:r,startCol:l,endCol:l,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(Yv(n))return this.pos++,this._addGap(),Wv(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(W.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;const r=this.html.charCodeAt(n);return r===A.CARRIAGE_RETURN?A.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;let t=this.html.charCodeAt(this.pos);return t===A.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,A.LINE_FEED):t===A.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,o1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===A.LINE_FEED||t===A.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){u1(t)?this._err(W.controlCharacterInInputStream):a1(t)&&this._err(W.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var qe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(qe||(qe={}));function l1(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 Qv=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Xv=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 Jv(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Xv.get(e))!==null&&t!==void 0?t:e}var Mt;(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"})(Mt||(Mt={}));const Zv=32;var Hr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Hr||(Hr={}));function $f(e){return e>=Mt.ZERO&&e<=Mt.NINE}function eN(e){return e>=Mt.UPPER_A&&e<=Mt.UPPER_F||e>=Mt.LOWER_A&&e<=Mt.LOWER_F}function tN(e){return e>=Mt.UPPER_A&&e<=Mt.UPPER_Z||e>=Mt.LOWER_A&&e<=Mt.LOWER_Z||$f(e)}function nN(e){return e===Mt.EQUALS||tN(e)}var Ft;(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"})(Ft||(Ft={}));var Cr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Cr||(Cr={}));class rN{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ft.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Cr.Strict}startEntity(t){this.decodeMode=t,this.state=Ft.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ft.EntityStart:return t.charCodeAt(n)===Mt.NUM?(this.state=Ft.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ft.NamedEntity,this.stateNamedEntity(t,n));case Ft.NumericStart:return this.stateNumericStart(t,n);case Ft.NumericDecimal:return this.stateNumericDecimal(t,n);case Ft.NumericHex:return this.stateNumericHex(t,n);case Ft.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Zv)===Mt.LOWER_X?(this.state=Ft.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ft.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const u=r-n;this.result=this.result*Math.pow(o,u)+Number.parseInt(t.substr(n,u),o),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if($f(o)||eN(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($f(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===Mt.SEMI)this.consumed+=1;else if(this.decodeMode===Cr.Strict)return 0;return this.emitCodePoint(Jv(this.result),this.consumed),this.errors&&(t!==Mt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],u=(o&Hr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=iN(r,o,this.treeIndex+Math.max(1,u),l),this.treeIndex<0)return this.result===0||this.decodeMode===Cr.Attribute&&(u===0||nN(l))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],u=(o&Hr.VALUE_LENGTH)>>14,u!==0){if(l===Mt.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Cr.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]&Hr.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]&~Hr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Ft.NamedEntity:return this.result!==0&&(this.decodeMode!==Cr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ft.NumericDecimal:return this.emitNumericEntity(0,2);case Ft.NumericHex:return this.emitNumericEntity(0,3);case Ft.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ft.EntityStart:return 0}}}function iN(e,t,n,r){const o=(t&Hr.BRANCH_LENGTH)>>7,u=t&Hr.JUMP_TABLE;if(o===0)return u!==0&&r===u?n:-1;if(u){const d=r-u;return d<0||d>=o?-1:e[n+d]-1}let l=n,c=l+o-1;for(;l<=c;){const d=l+c>>>1,h=e[d];if(h<r)l=d+1;else if(h>r)c=d-1;else return e[d+o]}return-1}var J;(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/"})(J||(J={}));var xi;(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"})(xi||(xi={}));var Dn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Dn||(Dn={}));var B;(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"})(B||(B={}));var p;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(p||(p={}));const sN=new Map([[B.A,p.A],[B.ADDRESS,p.ADDRESS],[B.ANNOTATION_XML,p.ANNOTATION_XML],[B.APPLET,p.APPLET],[B.AREA,p.AREA],[B.ARTICLE,p.ARTICLE],[B.ASIDE,p.ASIDE],[B.B,p.B],[B.BASE,p.BASE],[B.BASEFONT,p.BASEFONT],[B.BGSOUND,p.BGSOUND],[B.BIG,p.BIG],[B.BLOCKQUOTE,p.BLOCKQUOTE],[B.BODY,p.BODY],[B.BR,p.BR],[B.BUTTON,p.BUTTON],[B.CAPTION,p.CAPTION],[B.CENTER,p.CENTER],[B.CODE,p.CODE],[B.COL,p.COL],[B.COLGROUP,p.COLGROUP],[B.DD,p.DD],[B.DESC,p.DESC],[B.DETAILS,p.DETAILS],[B.DIALOG,p.DIALOG],[B.DIR,p.DIR],[B.DIV,p.DIV],[B.DL,p.DL],[B.DT,p.DT],[B.EM,p.EM],[B.EMBED,p.EMBED],[B.FIELDSET,p.FIELDSET],[B.FIGCAPTION,p.FIGCAPTION],[B.FIGURE,p.FIGURE],[B.FONT,p.FONT],[B.FOOTER,p.FOOTER],[B.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[B.FORM,p.FORM],[B.FRAME,p.FRAME],[B.FRAMESET,p.FRAMESET],[B.H1,p.H1],[B.H2,p.H2],[B.H3,p.H3],[B.H4,p.H4],[B.H5,p.H5],[B.H6,p.H6],[B.HEAD,p.HEAD],[B.HEADER,p.HEADER],[B.HGROUP,p.HGROUP],[B.HR,p.HR],[B.HTML,p.HTML],[B.I,p.I],[B.IMG,p.IMG],[B.IMAGE,p.IMAGE],[B.INPUT,p.INPUT],[B.IFRAME,p.IFRAME],[B.KEYGEN,p.KEYGEN],[B.LABEL,p.LABEL],[B.LI,p.LI],[B.LINK,p.LINK],[B.LISTING,p.LISTING],[B.MAIN,p.MAIN],[B.MALIGNMARK,p.MALIGNMARK],[B.MARQUEE,p.MARQUEE],[B.MATH,p.MATH],[B.MENU,p.MENU],[B.META,p.META],[B.MGLYPH,p.MGLYPH],[B.MI,p.MI],[B.MO,p.MO],[B.MN,p.MN],[B.MS,p.MS],[B.MTEXT,p.MTEXT],[B.NAV,p.NAV],[B.NOBR,p.NOBR],[B.NOFRAMES,p.NOFRAMES],[B.NOEMBED,p.NOEMBED],[B.NOSCRIPT,p.NOSCRIPT],[B.OBJECT,p.OBJECT],[B.OL,p.OL],[B.OPTGROUP,p.OPTGROUP],[B.OPTION,p.OPTION],[B.P,p.P],[B.PARAM,p.PARAM],[B.PLAINTEXT,p.PLAINTEXT],[B.PRE,p.PRE],[B.RB,p.RB],[B.RP,p.RP],[B.RT,p.RT],[B.RTC,p.RTC],[B.RUBY,p.RUBY],[B.S,p.S],[B.SCRIPT,p.SCRIPT],[B.SEARCH,p.SEARCH],[B.SECTION,p.SECTION],[B.SELECT,p.SELECT],[B.SOURCE,p.SOURCE],[B.SMALL,p.SMALL],[B.SPAN,p.SPAN],[B.STRIKE,p.STRIKE],[B.STRONG,p.STRONG],[B.STYLE,p.STYLE],[B.SUB,p.SUB],[B.SUMMARY,p.SUMMARY],[B.SUP,p.SUP],[B.TABLE,p.TABLE],[B.TBODY,p.TBODY],[B.TEMPLATE,p.TEMPLATE],[B.TEXTAREA,p.TEXTAREA],[B.TFOOT,p.TFOOT],[B.TD,p.TD],[B.TH,p.TH],[B.THEAD,p.THEAD],[B.TITLE,p.TITLE],[B.TR,p.TR],[B.TRACK,p.TRACK],[B.TT,p.TT],[B.U,p.U],[B.UL,p.UL],[B.SVG,p.SVG],[B.VAR,p.VAR],[B.WBR,p.WBR],[B.XMP,p.XMP]]);function ps(e){var t;return(t=sN.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const ie=p,oN={[J.HTML]:new Set([ie.ADDRESS,ie.APPLET,ie.AREA,ie.ARTICLE,ie.ASIDE,ie.BASE,ie.BASEFONT,ie.BGSOUND,ie.BLOCKQUOTE,ie.BODY,ie.BR,ie.BUTTON,ie.CAPTION,ie.CENTER,ie.COL,ie.COLGROUP,ie.DD,ie.DETAILS,ie.DIR,ie.DIV,ie.DL,ie.DT,ie.EMBED,ie.FIELDSET,ie.FIGCAPTION,ie.FIGURE,ie.FOOTER,ie.FORM,ie.FRAME,ie.FRAMESET,ie.H1,ie.H2,ie.H3,ie.H4,ie.H5,ie.H6,ie.HEAD,ie.HEADER,ie.HGROUP,ie.HR,ie.HTML,ie.IFRAME,ie.IMG,ie.INPUT,ie.LI,ie.LINK,ie.LISTING,ie.MAIN,ie.MARQUEE,ie.MENU,ie.META,ie.NAV,ie.NOEMBED,ie.NOFRAMES,ie.NOSCRIPT,ie.OBJECT,ie.OL,ie.P,ie.PARAM,ie.PLAINTEXT,ie.PRE,ie.SCRIPT,ie.SECTION,ie.SELECT,ie.SOURCE,ie.STYLE,ie.SUMMARY,ie.TABLE,ie.TBODY,ie.TD,ie.TEMPLATE,ie.TEXTAREA,ie.TFOOT,ie.TH,ie.THEAD,ie.TITLE,ie.TR,ie.TRACK,ie.UL,ie.WBR,ie.XMP]),[J.MATHML]:new Set([ie.MI,ie.MO,ie.MN,ie.MS,ie.MTEXT,ie.ANNOTATION_XML]),[J.SVG]:new Set([ie.TITLE,ie.FOREIGN_OBJECT,ie.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},Vf=new Set([ie.H1,ie.H2,ie.H3,ie.H4,ie.H5,ie.H6]);B.STYLE,B.SCRIPT,B.XMP,B.IFRAME,B.NOEMBED,B.NOFRAMES,B.PLAINTEXT;var w;(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"})(w||(w={}));const xt={DATA:w.DATA,RCDATA:w.RCDATA,RAWTEXT:w.RAWTEXT,SCRIPT_DATA:w.SCRIPT_DATA,PLAINTEXT:w.PLAINTEXT,CDATA_SECTION:w.CDATA_SECTION};function uN(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function Ao(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function aN(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function zr(e){return aN(e)||Ao(e)}function c1(e){return zr(e)||uN(e)}function xa(e){return e+32}function f1(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function d1(e){return f1(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function lN(e){return e===A.NULL?W.nullCharacterReference:e>1114111?W.characterReferenceOutsideUnicodeRange:o1(e)?W.surrogateCharacterReference:a1(e)?W.noncharacterCharacterReference:u1(e)||e===A.CARRIAGE_RETURN?W.controlCharacterReference:null}class cN{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=w.DATA,this.returnState=w.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Kv(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new rN(Qv,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(W.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(W.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=lN(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:qe.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qe.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:qe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(l1(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(W.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=ps(t.tagName),t.type===qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(W.endTagWithAttributes),t.selfClosing&&this._err(W.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case qe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:qe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=f1(t)?qe.WHITESPACE_CHARACTER:t===A.NULL?qe.NULL_CHARACTER:qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=w.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Cr.Attribute:Cr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===w.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===w.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===w.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case w.DATA:{this._stateData(t);break}case w.RCDATA:{this._stateRcdata(t);break}case w.RAWTEXT:{this._stateRawtext(t);break}case w.SCRIPT_DATA:{this._stateScriptData(t);break}case w.PLAINTEXT:{this._statePlaintext(t);break}case w.TAG_OPEN:{this._stateTagOpen(t);break}case w.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case w.TAG_NAME:{this._stateTagName(t);break}case w.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case w.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case w.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case w.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case w.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case w.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case w.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case w.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case w.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case w.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case w.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case w.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case w.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case w.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case w.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case w.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case w.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case w.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case w.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case w.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case w.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case w.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case w.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case w.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case w.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case w.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case w.BOGUS_COMMENT:{this._stateBogusComment(t);break}case w.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case w.COMMENT_START:{this._stateCommentStart(t);break}case w.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case w.COMMENT:{this._stateComment(t);break}case w.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case w.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case w.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case w.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case w.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case w.COMMENT_END:{this._stateCommentEnd(t);break}case w.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case w.DOCTYPE:{this._stateDoctype(t);break}case w.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case w.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case w.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case w.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case w.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case w.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case w.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case w.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case w.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case w.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case w.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case w.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case w.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case w.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case w.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case w.CDATA_SECTION:{this._stateCdataSection(t);break}case w.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case w.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case w.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case w.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=w.TAG_OPEN;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(W.unexpectedNullCharacter),this._emitCodePoint(t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case A.AMPERSAND:{this._startCharacterReference();break}case A.LESS_THAN_SIGN:{this.state=w.RCDATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case A.LESS_THAN_SIGN:{this.state=w.RAWTEXT_LESS_THAN_SIGN;break}case A.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(zr(t))this._createStartTagToken(),this.state=w.TAG_NAME,this._stateTagName(t);else switch(t){case A.EXCLAMATION_MARK:{this.state=w.MARKUP_DECLARATION_OPEN;break}case A.SOLIDUS:{this.state=w.END_TAG_OPEN;break}case A.QUESTION_MARK:{this._err(W.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=w.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(W.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(W.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=w.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(zr(t))this._createEndTagToken(),this.state=w.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(W.missingEndTagName),this.state=w.DATA;break}case A.EOF:{this._err(W.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(W.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=w.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=w.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this.state=w.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(W.unexpectedNullCharacter),n.tagName+=ft;break}case A.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ao(t)?xa(t):t)}}_stateRcdataLessThanSign(t){t===A.SOLIDUS?this.state=w.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=w.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){zr(t)?(this.state=w.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=w.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=w.BEFORE_ATTRIBUTE_NAME,!1;case A.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=w.SELF_CLOSING_START_TAG,!1;case A.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=w.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=w.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===A.SOLIDUS?this.state=w.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=w.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){zr(t)?(this.state=w.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=w.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=w.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case A.SOLIDUS:{this.state=w.SCRIPT_DATA_END_TAG_OPEN;break}case A.EXCLAMATION_MARK:{this.state=w.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=w.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){zr(t)?(this.state=w.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=w.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=w.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===A.HYPHEN_MINUS?(this.state=w.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=w.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===A.HYPHEN_MINUS?(this.state=w.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=w.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=w.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=w.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(W.unexpectedNullCharacter),this.state=w.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case A.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=w.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.GREATER_THAN_SIGN:{this.state=w.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(W.unexpectedNullCharacter),this.state=w.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case A.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=w.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===A.SOLIDUS?this.state=w.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:zr(t)?(this._emitChars("<"),this.state=w.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=w.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){zr(t)?(this.state=w.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=w.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=w.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(hn.SCRIPT,!1)&&d1(this.preprocessor.peek(hn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<hn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=w.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(ft);break}case A.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(W.unexpectedNullCharacter),this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case A.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.GREATER_THAN_SIGN:{this.state=w.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(W.unexpectedNullCharacter),this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case A.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===A.SOLIDUS?(this.state=w.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(hn.SCRIPT,!1)&&d1(this.preprocessor.peek(hn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<hn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=w.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this.state=w.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._err(W.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=w.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=w.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this._leaveAttrName(),this.state=w.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._leaveAttrName(),this.state=w.BEFORE_ATTRIBUTE_VALUE;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:{this._err(W.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(W.unexpectedNullCharacter),this.currentAttr.name+=ft;break}default:this.currentAttr.name+=String.fromCodePoint(Ao(t)?xa(t):t)}}_stateAfterAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:{this.state=w.SELF_CLOSING_START_TAG;break}case A.EQUALS_SIGN:{this.state=w.BEFORE_ATTRIBUTE_VALUE;break}case A.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=w.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{this.state=w.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this.state=w.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(W.missingAttributeValue),this.state=w.DATA,this.emitCurrentTagToken();break}default:this.state=w.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case A.QUOTATION_MARK:{this.state=w.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(W.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case A.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case A.APOSTROPHE:{this.state=w.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(W.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case A.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=w.BEFORE_ATTRIBUTE_NAME;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=w.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(W.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(W.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=w.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this._leaveAttrValue(),this.state=w.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=w.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this._err(W.missingWhitespaceBetweenAttributes),this.state=w.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case A.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=w.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this._err(W.unexpectedSolidusInTag),this.state=w.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentComment(n);break}case A.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case A.NULL:{this._err(W.unexpectedNullCharacter),n.data+=ft;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(hn.DASH_DASH,!0)?(this._createCommentToken(hn.DASH_DASH.length+1),this.state=w.COMMENT_START):this._consumeSequenceIfMatch(hn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(hn.DOCTYPE.length+1),this.state=w.DOCTYPE):this._consumeSequenceIfMatch(hn.CDATA_START,!0)?this.inForeignNode?this.state=w.CDATA_SECTION:(this._err(W.cdataInHtmlContent),this._createCommentToken(hn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=w.BOGUS_COMMENT):this._ensureHibernation()||(this._err(W.incorrectlyOpenedComment),this._createCommentToken(2),this.state=w.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case A.HYPHEN_MINUS:{this.state=w.COMMENT_START_DASH;break}case A.GREATER_THAN_SIGN:{this._err(W.abruptClosingOfEmptyComment),this.state=w.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=w.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=w.COMMENT_END;break}case A.GREATER_THAN_SIGN:{this._err(W.abruptClosingOfEmptyComment),this.state=w.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(W.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=w.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=w.COMMENT_END_DASH;break}case A.LESS_THAN_SIGN:{n.data+="<",this.state=w.COMMENT_LESS_THAN_SIGN;break}case A.NULL:{this._err(W.unexpectedNullCharacter),n.data+=ft;break}case A.EOF:{this._err(W.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case A.EXCLAMATION_MARK:{n.data+="!",this.state=w.COMMENT_LESS_THAN_SIGN_BANG;break}case A.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=w.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===A.HYPHEN_MINUS?this.state=w.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=w.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===A.HYPHEN_MINUS?this.state=w.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=w.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==A.GREATER_THAN_SIGN&&t!==A.EOF&&this._err(W.nestedComment),this.state=w.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=w.COMMENT_END;break}case A.EOF:{this._err(W.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=w.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentComment(n);break}case A.EXCLAMATION_MARK:{this.state=w.COMMENT_END_BANG;break}case A.HYPHEN_MINUS:{n.data+="-";break}case A.EOF:{this._err(W.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=w.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{n.data+="--!",this.state=w.COMMENT_END_DASH;break}case A.GREATER_THAN_SIGN:{this._err(W.incorrectlyClosedComment),this.state=w.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(W.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=w.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=w.BEFORE_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=w.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case A.EOF:{this._err(W.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingWhitespaceBeforeDoctypeName),this.state=w.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ao(t))this._createDoctypeToken(String.fromCharCode(xa(t))),this.state=w.DOCTYPE_NAME;else switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.NULL:{this._err(W.unexpectedNullCharacter),this._createDoctypeToken(ft),this.state=w.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(W.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=w.DATA;break}case A.EOF:{this._err(W.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=w.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=w.AFTER_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentDoctype(n);break}case A.NULL:{this._err(W.unexpectedNullCharacter),n.name+=ft;break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ao(t)?xa(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(hn.PUBLIC,!1)?this.state=w.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(hn.SYSTEM,!1)?this.state=w.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(W.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=w.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(W.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=w.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(W.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=w.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(W.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=w.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.publicId="",this.state=w.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.publicId="",this.state=w.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(W.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=w.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=w.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(W.unexpectedNullCharacter),n.publicId+=ft;break}case A.GREATER_THAN_SIGN:{this._err(W.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=w.DATA;break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=w.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(W.unexpectedNullCharacter),n.publicId+=ft;break}case A.GREATER_THAN_SIGN:{this._err(W.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=w.DATA;break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=w.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case A.GREATER_THAN_SIGN:{this.state=w.DATA,this.emitCurrentDoctype(n);break}case A.QUOTATION_MARK:{this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=w.DATA;break}case A.QUOTATION_MARK:{n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=w.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(W.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=w.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(W.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=w.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(W.unexpectedNullCharacter),n.systemId+=ft;break}case A.GREATER_THAN_SIGN:{this._err(W.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=w.DATA;break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=w.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(W.unexpectedNullCharacter),n.systemId+=ft;break}case A.GREATER_THAN_SIGN:{this._err(W.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=w.DATA;break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=w.DATA;break}case A.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=w.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=w.DATA;break}case A.NULL:{this._err(W.unexpectedNullCharacter);break}case A.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case A.RIGHT_SQUARE_BRACKET:{this.state=w.CDATA_SECTION_BRACKET;break}case A.EOF:{this._err(W.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===A.RIGHT_SQUARE_BRACKET?this.state=w.CDATA_SECTION_END:(this._emitChars("]"),this.state=w.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case A.GREATER_THAN_SIGN:{this.state=w.DATA;break}case A.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=w.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(A.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&c1(this.preprocessor.peek(1))?w.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){c1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(W.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const h1=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),p1=new Set([...h1,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Ca=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),fN=new Set([...Ca,p.OL,p.UL]),dN=new Set([...Ca,p.BUTTON]),m1=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),g1=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),hN=new Set([p.TR,p.TEMPLATE,p.HTML]),pN=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),mN=new Set([p.TABLE,p.TEMPLATE,p.HTML]),gN=new Set([p.TD,p.TH]);class EN{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.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])!==J.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(Vf,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(gN,J.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(mN,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(pN,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(hN,J.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===p.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===p.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case J.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case J.SVG:{if(g1.has(o))return!1;break}case J.MATHML:{if(m1.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ca)}hasInListItemScope(t){return this.hasInDynamicScope(t,fN)}hasInButtonScope(t){return this.hasInDynamicScope(t,dN)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case J.HTML:{if(Vf.has(n))return!0;if(Ca.has(n))return!1;break}case J.SVG:{if(g1.has(n))return!1;break}case J.MATHML:{if(m1.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===J.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===J.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&h1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&p1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&p1.has(this.currentTagId);)this.pop()}}const qf=3;var lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(lr||(lr={}));const E1={type:lr.Marker};class yN{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,u=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===lr.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===u&&this.treeAdapter.getNamespaceURI(h)===l){const g=this.treeAdapter.getAttrList(h);g.length===o&&r.push({idx:c,attrs:g})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<qf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<qf)return;const o=new Map(n.map(l=>[l.name,l.value]));let u=0;for(let l=0;l<r.length;l++){const c=r[l];c.attrs.every(d=>o.get(d.name)===d.value)&&(u+=1,u>=qf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(E1)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:lr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(E1);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===lr.Element&&n.element===t)}}const jr={createDocument(){return{nodeName:"#document",mode:Dn.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(u=>u.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};jr.appendChild(e,u)}},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(jr.isTextNode(n)){n.value+=t;return}}jr.appendChild(e,jr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&jr.isTextNode(r)?r.value+=t:jr.insertBefore(e,jr.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=G(G({},e.sourceCodeLocation),t)}},y1="html",TN="about:legacy-compat",bN="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",T1=["+//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//"],_N=[...T1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],SN=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),b1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],xN=[...b1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function _1(e,t){return t.some(n=>e.startsWith(n))}function CN(e){return e.name===y1&&e.publicId===null&&(e.systemId===null||e.systemId===TN)}function AN(e){if(e.name!==y1)return Dn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===bN)return Dn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),SN.has(n))return Dn.QUIRKS;let r=t===null?_N:T1;if(_1(n,r))return Dn.QUIRKS;if(r=t===null?b1:xN,_1(n,r))return Dn.LIMITED_QUIRKS}return Dn.NO_QUIRKS}const S1={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},kN="definitionurl",wN="definitionURL",vN=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])),NN=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:J.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:J.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:J.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:J.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:J.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:J.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:J.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:J.XML}],["xml:space",{prefix:"xml",name:"space",namespace:J.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:J.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:J.XMLNS}]]),IN=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])),ON=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function PN(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:r})=>r===xi.COLOR||r===xi.SIZE||r===xi.FACE)||ON.has(t)}function x1(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===kN){e.attrs[t].name=wN;break}}function C1(e){for(let t=0;t<e.attrs.length;t++){const n=vN.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Yf(e){for(let t=0;t<e.attrs.length;t++){const n=NN.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 RN(e){const t=IN.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ps(e.tagName))}function LN(e,t){return t===J.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function DN(e,t,n){if(t===J.MATHML&&e===p.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===xi.ENCODING){const o=n[r].value.toLowerCase();return o===S1.TEXT_HTML||o===S1.APPLICATION_XML}}return t===J.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function MN(e,t,n,r){return(!r||r===J.HTML)&&DN(e,t,n)||(!r||r===J.MATHML)&&LN(e,t)}const FN="hidden",BN=8,UN=3;var N;(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"})(N||(N={}));const HN={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},A1=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),k1={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:jr,onParseError:null};class w1{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=N.INITIAL,this.originalInsertionMode=N.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=G(G({},k1),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 cN(this.options,this),this.activeFormattingElements=new yN(this.treeAdapter),this.fragmentContextID=r?ps(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new EN(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=G(G({},k1),n);t!=null||(t=r.treeAdapter.createElement(B.TEMPLATE,J.HTML,[]));const o=r.treeAdapter.createElement("documentmock",J.HTML,[]),u=new this(r,o,t);return u.fragmentContextID===p.TEMPLATE&&u.tmplInsertionModeStack.unshift(N.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}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 u=(o=t.location)!==null&&o!==void 0?o:HN,l={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:r?u.startLine:u.endLine,endCol:r?u.startCol:u.endCol,endOffset:r?u.startOffset:u.endOffset};this.onParseError(l)}onItemPush(t,n,r){var o,u;(u=(o=this.treeAdapter).onItemPush)===null||u===void 0||u.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 u,l;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,l=this.fragmentContextID):{current:u,currentTagId:l}=this.openElements,this._setContextModes(u,l)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===J.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,J.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=N.TEXT}switchToPlaintextParsing(){this.insertionMode=N.TEXT,this.originalInsertionMode=N.IN_BODY,this.tokenizer.state=xt.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)===B.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==J.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=xt.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=xt.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=xt.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=xt.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 l=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&He(G({},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,J.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,J.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(B.HTML,J.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),u=r?o.lastIndexOf(r):o.length,l=o[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:d,endCol:h,endOffset:g}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:d,endCol:h,endOffset:g})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,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),u=n.type===qe.END_TAG&&o===n.tagName?{endTag:G({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(n)===B.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===J.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,J.HTML)}_processToken(t){switch(t.type){case qe.CHARACTER:{this.onCharacter(t);break}case qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case qe.COMMENT:{this.onComment(t);break}case qe.DOCTYPE:{this.onDoctype(t);break}case qe.START_TAG:{this._processStartTag(t);break}case qe.END_TAG:{this.onEndTag(t);break}case qe.EOF:{this.onEof(t);break}case qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return MN(t,o,u,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===lr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const u=this.activeFormattingElements.entries[o];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=N.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=N.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=N.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=N.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=N.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=N.IN_TABLE;return}case p.BODY:{this.insertionMode=N.IN_BODY;return}case p.FRAMESET:{this.insertionMode=N.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?N.AFTER_HEAD:N.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=N.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=N.IN_HEAD;return}break}}this.insertionMode=N.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===p.TEMPLATE)break;if(r===p.TABLE){this.insertionMode=N.IN_SELECT_IN_TABLE;return}}this.insertionMode=N.IN_SELECT}_isElementCausesFosterParenting(t){return A1.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return oN[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gI(this,t);return}switch(this.insertionMode){case N.INITIAL:{ko(this,t);break}case N.BEFORE_HTML:{wo(this,t);break}case N.BEFORE_HEAD:{vo(this,t);break}case N.IN_HEAD:{No(this,t);break}case N.IN_HEAD_NO_SCRIPT:{Io(this,t);break}case N.AFTER_HEAD:{Oo(this,t);break}case N.IN_BODY:case N.IN_CAPTION:case N.IN_CELL:case N.IN_TEMPLATE:{N1(this,t);break}case N.TEXT:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case N.IN_TABLE:case N.IN_TABLE_BODY:case N.IN_ROW:{Qf(this,t);break}case N.IN_TABLE_TEXT:{F1(this,t);break}case N.IN_COLUMN_GROUP:{wa(this,t);break}case N.AFTER_BODY:{Ia(this,t);break}case N.AFTER_AFTER_BODY:{Oa(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){mI(this,t);return}switch(this.insertionMode){case N.INITIAL:{ko(this,t);break}case N.BEFORE_HTML:{wo(this,t);break}case N.BEFORE_HEAD:{vo(this,t);break}case N.IN_HEAD:{No(this,t);break}case N.IN_HEAD_NO_SCRIPT:{Io(this,t);break}case N.AFTER_HEAD:{Oo(this,t);break}case N.TEXT:{this._insertCharacters(t);break}case N.IN_TABLE:case N.IN_TABLE_BODY:case N.IN_ROW:{Qf(this,t);break}case N.IN_COLUMN_GROUP:{wa(this,t);break}case N.AFTER_BODY:{Ia(this,t);break}case N.AFTER_AFTER_BODY:{Oa(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Gf(this,t);return}switch(this.insertionMode){case N.INITIAL:case N.BEFORE_HTML:case N.BEFORE_HEAD:case N.IN_HEAD:case N.IN_HEAD_NO_SCRIPT:case N.AFTER_HEAD:case N.IN_BODY:case N.IN_TABLE:case N.IN_CAPTION:case N.IN_COLUMN_GROUP:case N.IN_TABLE_BODY:case N.IN_ROW:case N.IN_CELL:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:case N.IN_TEMPLATE:case N.IN_FRAMESET:case N.AFTER_FRAMESET:{Gf(this,t);break}case N.IN_TABLE_TEXT:{Lo(this,t);break}case N.AFTER_BODY:{WN(this,t);break}case N.AFTER_AFTER_BODY:case N.AFTER_AFTER_FRAMESET:{GN(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case N.INITIAL:{KN(this,t);break}case N.BEFORE_HEAD:case N.IN_HEAD:case N.IN_HEAD_NO_SCRIPT:case N.AFTER_HEAD:{this._err(t,W.misplacedDoctype);break}case N.IN_TABLE_TEXT:{Lo(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,W.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?EI(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case N.INITIAL:{ko(this,t);break}case N.BEFORE_HTML:{QN(this,t);break}case N.BEFORE_HEAD:{JN(this,t);break}case N.IN_HEAD:{Wn(this,t);break}case N.IN_HEAD_NO_SCRIPT:{t3(this,t);break}case N.AFTER_HEAD:{r3(this,t);break}case N.IN_BODY:{Xt(this,t);break}case N.IN_TABLE:{ms(this,t);break}case N.IN_TABLE_TEXT:{Lo(this,t);break}case N.IN_CAPTION:{Z3(this,t);break}case N.IN_COLUMN_GROUP:{Xf(this,t);break}case N.IN_TABLE_BODY:{va(this,t);break}case N.IN_ROW:{Na(this,t);break}case N.IN_CELL:{nI(this,t);break}case N.IN_SELECT:{H1(this,t);break}case N.IN_SELECT_IN_TABLE:{iI(this,t);break}case N.IN_TEMPLATE:{oI(this,t);break}case N.AFTER_BODY:{aI(this,t);break}case N.IN_FRAMESET:{lI(this,t);break}case N.AFTER_FRAMESET:{fI(this,t);break}case N.AFTER_AFTER_BODY:{hI(this,t);break}case N.AFTER_AFTER_FRAMESET:{pI(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?yI(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case N.INITIAL:{ko(this,t);break}case N.BEFORE_HTML:{XN(this,t);break}case N.BEFORE_HEAD:{ZN(this,t);break}case N.IN_HEAD:{e3(this,t);break}case N.IN_HEAD_NO_SCRIPT:{n3(this,t);break}case N.AFTER_HEAD:{i3(this,t);break}case N.IN_BODY:{ka(this,t);break}case N.TEXT:{$3(this,t);break}case N.IN_TABLE:{Po(this,t);break}case N.IN_TABLE_TEXT:{Lo(this,t);break}case N.IN_CAPTION:{eI(this,t);break}case N.IN_COLUMN_GROUP:{tI(this,t);break}case N.IN_TABLE_BODY:{Jf(this,t);break}case N.IN_ROW:{U1(this,t);break}case N.IN_CELL:{rI(this,t);break}case N.IN_SELECT:{z1(this,t);break}case N.IN_SELECT_IN_TABLE:{sI(this,t);break}case N.IN_TEMPLATE:{uI(this,t);break}case N.AFTER_BODY:{$1(this,t);break}case N.IN_FRAMESET:{cI(this,t);break}case N.AFTER_FRAMESET:{dI(this,t);break}case N.AFTER_AFTER_BODY:{Oa(this,t);break}}}onEof(t){switch(this.insertionMode){case N.INITIAL:{ko(this,t);break}case N.BEFORE_HTML:{wo(this,t);break}case N.BEFORE_HEAD:{vo(this,t);break}case N.IN_HEAD:{No(this,t);break}case N.IN_HEAD_NO_SCRIPT:{Io(this,t);break}case N.AFTER_HEAD:{Oo(this,t);break}case N.IN_BODY:case N.IN_TABLE:case N.IN_CAPTION:case N.IN_COLUMN_GROUP:case N.IN_TABLE_BODY:case N.IN_ROW:case N.IN_CELL:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:{D1(this,t);break}case N.TEXT:{V3(this,t);break}case N.IN_TABLE_TEXT:{Lo(this,t);break}case N.IN_TEMPLATE:{j1(this,t);break}case N.AFTER_BODY:case N.IN_FRAMESET:case N.AFTER_FRAMESET:case N.AFTER_AFTER_BODY:case N.AFTER_AFTER_FRAMESET:{Kf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case N.IN_HEAD:case N.IN_HEAD_NO_SCRIPT:case N.AFTER_HEAD:case N.TEXT:case N.IN_COLUMN_GROUP:case N.IN_SELECT:case N.IN_SELECT_IN_TABLE:case N.IN_FRAMESET:case N.AFTER_FRAMESET:{this._insertCharacters(t);break}case N.IN_BODY:case N.IN_CAPTION:case N.IN_CELL:case N.IN_TEMPLATE:case N.AFTER_BODY:case N.AFTER_AFTER_BODY:case N.AFTER_AFTER_FRAMESET:{v1(this,t);break}case N.IN_TABLE:case N.IN_TABLE_BODY:case N.IN_ROW:{Qf(this,t);break}case N.IN_TABLE_TEXT:{M1(this,t);break}}}}function zN(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):L1(e,t),n}function jN(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 $N(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let u=0,l=o;l!==n;u++,l=o){o=e.openElements.getCommonAncestor(l);const c=e.activeFormattingElements.getElementEntry(l),d=c&&u>=UN;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(l)):(l=VN(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(l,r),r=l)}return r}function VN(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 qN(e,t,n){const r=e.treeAdapter.getTagName(t),o=ps(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);o===p.TEMPLATE&&u===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function YN(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,u=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,o.tagID)}function Wf(e,t){for(let n=0;n<BN;n++){const r=zN(e,t);if(!r)break;const o=jN(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const u=$N(e,o,r.element),l=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(u),l&&qN(e,l,u),YN(e,o,r)}}function Gf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function WN(e,t){e._appendCommentNode(t,e.openElements.items[0])}function GN(e,t){e._appendCommentNode(t,e.document)}function Kf(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 u=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(u);l&&!l.endTag&&e._setEndLocation(u,t)}}}}function KN(e,t){e._setDocumentType(t);const n=t.forceQuirks?Dn.QUIRKS:AN(t);CN(t)||e._err(t,W.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=N.BEFORE_HTML}function ko(e,t){e._err(t,W.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Dn.QUIRKS),e.insertionMode=N.BEFORE_HTML,e._processToken(t)}function QN(e,t){t.tagID===p.HTML?(e._insertElement(t,J.HTML),e.insertionMode=N.BEFORE_HEAD):wo(e,t)}function XN(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&wo(e,t)}function wo(e,t){e._insertFakeRootElement(),e.insertionMode=N.BEFORE_HEAD,e._processToken(t)}function JN(e,t){switch(t.tagID){case p.HTML:{Xt(e,t);break}case p.HEAD:{e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=N.IN_HEAD;break}default:vo(e,t)}}function ZN(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?vo(e,t):e._err(t,W.endTagWithoutMatchingOpenElement)}function vo(e,t){e._insertFakeElement(B.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=N.IN_HEAD,e._processToken(t)}function Wn(e,t){switch(t.tagID){case p.HTML:{Xt(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,xt.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,xt.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=N.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,xt.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,xt.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=N.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(N.IN_TEMPLATE);break}case p.HEAD:{e._err(t,W.misplacedStartTagForHeadElement);break}default:No(e,t)}}function e3(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=N.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{No(e,t);break}case p.TEMPLATE:{Ci(e,t);break}default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function Ci(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,W.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,W.endTagWithoutMatchingOpenElement)}function No(e,t){e.openElements.pop(),e.insertionMode=N.AFTER_HEAD,e._processToken(t)}function t3(e,t){switch(t.tagID){case p.HTML:{Xt(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{Wn(e,t);break}case p.NOSCRIPT:{e._err(t,W.nestedNoscriptInHead);break}default:Io(e,t)}}function n3(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=N.IN_HEAD;break}case p.BR:{Io(e,t);break}default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function Io(e,t){const n=t.type===qe.EOF?W.openElementsLeftAfterEof:W.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=N.IN_HEAD,e._processToken(t)}function r3(e,t){switch(t.tagID){case p.HTML:{Xt(e,t);break}case p.BODY:{e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=N.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,J.HTML),e.insertionMode=N.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,W.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),Wn(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,W.misplacedStartTagForHeadElement);break}default:Oo(e,t)}}function i3(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{Oo(e,t);break}case p.TEMPLATE:{Ci(e,t);break}default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function Oo(e,t){e._insertFakeElement(B.BODY,p.BODY),e.insertionMode=N.IN_BODY,Aa(e,t)}function Aa(e,t){switch(t.type){case qe.CHARACTER:{N1(e,t);break}case qe.WHITESPACE_CHARACTER:{v1(e,t);break}case qe.COMMENT:{Gf(e,t);break}case qe.START_TAG:{Xt(e,t);break}case qe.END_TAG:{ka(e,t);break}case qe.EOF:{D1(e,t);break}}}function v1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function N1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function s3(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function o3(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function u3(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=N.IN_FRAMESET)}function a3(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function l3(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Vf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function c3(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function f3(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function d3(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===p.LI&&o===p.LI||(n===p.DD||n===p.DT)&&(o===p.DD||o===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==p.ADDRESS&&o!==p.DIV&&o!==p.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function h3(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=xt.PLAINTEXT}function p3(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function m3(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(B.A);n&&(Wf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function g3(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function E3(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(Wf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function y3(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function T3(e,t){e.treeAdapter.getDocumentMode(e.document)!==Dn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=N.IN_TABLE}function I1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function O1(e){const t=l1(e,xi.TYPE);return t!=null&&t.toLowerCase()===FN}function b3(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),O1(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function _3(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function S3(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function x3(e,t){t.tagName=B.IMG,t.tagID=p.IMG,I1(e,t)}function C3(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=xt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=N.TEXT}function A3(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function k3(e,t){e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function P1(e,t){e._switchToTextParsing(t,xt.RAWTEXT)}function w3(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===N.IN_TABLE||e.insertionMode===N.IN_CAPTION||e.insertionMode===N.IN_TABLE_BODY||e.insertionMode===N.IN_ROW||e.insertionMode===N.IN_CELL?N.IN_SELECT_IN_TABLE:N.IN_SELECT}function v3(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function N3(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function I3(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,J.HTML)}function O3(e,t){e._reconstructActiveFormattingElements(),x1(t),Yf(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function P3(e,t){e._reconstructActiveFormattingElements(),C1(t),Yf(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function R1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function Xt(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{g3(e,t);break}case p.A:{m3(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{l3(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{a3(e,t);break}case p.LI:case p.DD:case p.DT:{d3(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{I1(e,t);break}case p.HR:{S3(e,t);break}case p.RB:case p.RTC:{N3(e,t);break}case p.RT:case p.RP:{I3(e,t);break}case p.PRE:case p.LISTING:{c3(e,t);break}case p.XMP:{A3(e,t);break}case p.SVG:{P3(e,t);break}case p.HTML:{s3(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{Wn(e,t);break}case p.BODY:{o3(e,t);break}case p.FORM:{f3(e,t);break}case p.NOBR:{E3(e,t);break}case p.MATH:{O3(e,t);break}case p.TABLE:{T3(e,t);break}case p.INPUT:{b3(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{_3(e,t);break}case p.IMAGE:{x3(e,t);break}case p.BUTTON:{p3(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{y3(e,t);break}case p.IFRAME:{k3(e,t);break}case p.SELECT:{w3(e,t);break}case p.OPTION:case p.OPTGROUP:{v3(e,t);break}case p.NOEMBED:case p.NOFRAMES:{P1(e,t);break}case p.FRAMESET:{u3(e,t);break}case p.TEXTAREA:{C3(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?P1(e,t):R1(e,t);break}case p.PLAINTEXT:{h3(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:R1(e,t)}}function R3(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=N.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function L3(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=N.AFTER_BODY,$1(e,t))}function D3(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function M3(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function F3(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(B.P,p.P),e._closePElement()}function B3(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function U3(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function H3(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function z3(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function j3(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(B.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function L1(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const u=e.openElements.items[o],l=e.openElements.tagIDs[o];if(r===l&&(r!==p.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(u,l))break}}function ka(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{Wf(e,t);break}case p.P:{F3(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{D3(e,t);break}case p.LI:{B3(e);break}case p.DD:case p.DT:{U3(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{H3(e);break}case p.BR:{j3(e);break}case p.BODY:{R3(e,t);break}case p.HTML:{L3(e,t);break}case p.FORM:{M3(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{z3(e,t);break}case p.TEMPLATE:{Ci(e,t);break}default:L1(e,t)}}function D1(e,t){e.tmplInsertionModeStack.length>0?j1(e,t):Kf(e,t)}function $3(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function V3(e,t){e._err(t,W.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Qf(e,t){if(e.openElements.currentTagId!==void 0&&A1.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=N.IN_TABLE_TEXT,t.type){case qe.CHARACTER:{F1(e,t);break}case qe.WHITESPACE_CHARACTER:{M1(e,t);break}}else Ro(e,t)}function q3(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=N.IN_CAPTION}function Y3(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=N.IN_COLUMN_GROUP}function W3(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(B.COLGROUP,p.COLGROUP),e.insertionMode=N.IN_COLUMN_GROUP,Xf(e,t)}function G3(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=N.IN_TABLE_BODY}function K3(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(B.TBODY,p.TBODY),e.insertionMode=N.IN_TABLE_BODY,va(e,t)}function Q3(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function X3(e,t){O1(t)?e._appendElement(t,J.HTML):Ro(e,t),t.ackSelfClosing=!0}function J3(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ms(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{K3(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{Wn(e,t);break}case p.COL:{W3(e,t);break}case p.FORM:{J3(e,t);break}case p.TABLE:{Q3(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{G3(e,t);break}case p.INPUT:{X3(e,t);break}case p.CAPTION:{q3(e,t);break}case p.COLGROUP:{Y3(e,t);break}default:Ro(e,t)}}function Po(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Ci(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Ro(e,t)}}function Ro(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Aa(e,t),e.fosterParentingEnabled=n}function M1(e,t){e.pendingCharacterTokens.push(t)}function F1(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Lo(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ro(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const B1=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function Z3(e,t){const n=t.tagID;B1.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=N.IN_TABLE,ms(e,t)):Xt(e,t)}function eI(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=N.IN_TABLE,n===p.TABLE&&Po(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:ka(e,t)}}function Xf(e,t){switch(t.tagID){case p.HTML:{Xt(e,t);break}case p.COL:{e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{Wn(e,t);break}default:wa(e,t)}}function tI(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=N.IN_TABLE);break}case p.TEMPLATE:{Ci(e,t);break}case p.COL:break;default:wa(e,t)}}function wa(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=N.IN_TABLE,e._processToken(t))}function va(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=N.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(B.TR,p.TR),e.insertionMode=N.IN_ROW,Na(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE,ms(e,t));break}default:ms(e,t)}}function Jf(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE,Po(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:Po(e,t)}}function Na(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=N.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY,va(e,t));break}default:ms(e,t)}}function U1(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY,Jf(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N.IN_TABLE_BODY,Jf(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:Po(e,t)}}function nI(e,t){const n=t.tagID;B1.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),Na(e,t)):Xt(e,t)}function rI(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=N.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),U1(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:ka(e,t)}}function H1(e,t){switch(t.tagID){case p.HTML:{Xt(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{Wn(e,t);break}}}function z1(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Ci(e,t);break}}}function iI(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):H1(e,t)}function sI(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):z1(e,t)}function oI(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{Wn(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=N.IN_TABLE,e.insertionMode=N.IN_TABLE,ms(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=N.IN_COLUMN_GROUP,e.insertionMode=N.IN_COLUMN_GROUP,Xf(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=N.IN_TABLE_BODY,e.insertionMode=N.IN_TABLE_BODY,va(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=N.IN_ROW,e.insertionMode=N.IN_ROW,Na(e,t);break}default:e.tmplInsertionModeStack[0]=N.IN_BODY,e.insertionMode=N.IN_BODY,Xt(e,t)}}function uI(e,t){t.tagID===p.TEMPLATE&&Ci(e,t)}function j1(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Kf(e,t)}function aI(e,t){t.tagID===p.HTML?Xt(e,t):Ia(e,t)}function $1(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=N.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Ia(e,t)}function Ia(e,t){e.insertionMode=N.IN_BODY,Aa(e,t)}function lI(e,t){switch(t.tagID){case p.HTML:{Xt(e,t);break}case p.FRAMESET:{e._insertElement(t,J.HTML);break}case p.FRAME:{e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{Wn(e,t);break}}}function cI(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=N.AFTER_FRAMESET))}function fI(e,t){switch(t.tagID){case p.HTML:{Xt(e,t);break}case p.NOFRAMES:{Wn(e,t);break}}}function dI(e,t){t.tagID===p.HTML&&(e.insertionMode=N.AFTER_AFTER_FRAMESET)}function hI(e,t){t.tagID===p.HTML?Xt(e,t):Oa(e,t)}function Oa(e,t){e.insertionMode=N.IN_BODY,Aa(e,t)}function pI(e,t){switch(t.tagID){case p.HTML:{Xt(e,t);break}case p.NOFRAMES:{Wn(e,t);break}}}function mI(e,t){t.chars=ft,e._insertCharacters(t)}function gI(e,t){e._insertCharacters(t),e.framesetOk=!1}function V1(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function EI(e,t){if(PN(t))V1(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===J.MATHML?x1(t):r===J.SVG&&(RN(t),C1(t)),Yf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function yI(e,t){if(t.tagID===p.P||t.tagID===p.BR){V1(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)===J.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}B.AREA,B.BASE,B.BASEFONT,B.BGSOUND,B.BR,B.COL,B.EMBED,B.FRAME,B.HR,B.IMG,B.INPUT,B.KEYGEN,B.LINK,B.META,B.PARAM,B.SOURCE,B.TRACK,B.WBR;const TI=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,bI=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),q1={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Y1(e,t){const n=II(e),r=i1("type",{handlers:{root:_I,element:SI,text:xI,comment:G1,doctype:CI,raw:kI},unknown:wI}),o={parser:n?new w1(q1):w1.getFragmentParser(void 0,q1),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),gs(o,ur());const u=n?o.parser.document:o.parser.getFragment(),l=_v(u,{file:o.options.file});return o.stitches&&ba(l,"comment",function(c,d,h){const g=c;if(g.value.stitch&&h&&d!==void 0){const y=h.children;return y[d]=g.value.stitch,d}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function W1(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function _I(e,t){W1(e.children,t)}function SI(e,t){vI(e,t),W1(e.children,t),NI(e,t)}function xI(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:Do(e)};gs(t,ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function CI(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Do(e)};gs(t,ur(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function AI(e,t){t.stitches=!0;const n=OI(e);if("children"in e&&"children"in n){const r=Y1({type:"root",children:e.children},t.options);n.children=r.children}G1({type:"comment",value:{stitch:n}},t)}function G1(e,t){const n=e.value,r={type:qe.COMMENT,data:n,location:Do(e)};gs(t,ur(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function kI(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,K1(t,ur(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(TI,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function wI(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))AI(n,t);else{let r="";throw bI.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 gs(e,t){K1(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=xt.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 K1(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 vI(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===xt.PLAINTEXT)return;gs(t,ur(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:_i.html;o===_i.html&&n==="svg"&&(o=_i.svg);const u=Mv(He(G({},e),{children:[]}),{space:o===_i.svg?"svg":"html"}),l={type:qe.START_TAG,tagName:n,tagID:ps(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in u?u.attrs:[],location:Do(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function NI(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Vv.includes(n)||t.parser.tokenizer.state===xt.PLAINTEXT)return;gs(t,la(e));const r={type:qe.END_TAG,tagName:n,tagID:ps(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Do(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===xt.RCDATA||t.parser.tokenizer.state===xt.RAWTEXT||t.parser.tokenizer.state===xt.SCRIPT_DATA)&&(t.parser.tokenizer.state=xt.DATA)}function II(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Do(e){const t=ur(e)||{line:void 0,column:void 0,offset:void 0},n=la(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 OI(e){return"children"in e?ls(He(G({},e),{children:[]})):ls(e)}function PI(e){return function(t,n){return Y1(t,He(G({},e),{file:n}))}}function Q1(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 RI(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function LI(e,t,n){const o=ya((n||{}).ignore||[]),u=DI(t);let l=-1;for(;++l<u.length;)vg(e,"text",c);function c(h,g){let y=-1,b;for(;++y<g.length;){const T=g[y],S=b?b.children:void 0;if(o(T,S?S.indexOf(T):void 0,b))return;b=T}if(b)return d(h,g)}function d(h,g){const y=g[g.length-1],b=u[l][0],T=u[l][1];let S=0;const P=y.children.indexOf(h);let L=!1,H=[];b.lastIndex=0;let $=b.exec(h.value);for(;$;){const Z=$.index,he={index:$.index,input:$.input,stack:[...g,h]};let M=T(...$,he);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?b.lastIndex=Z+1:(S!==Z&&H.push({type:"text",value:h.value.slice(S,Z)}),Array.isArray(M)?H.push(...M):M&&H.push(M),S=Z+$[0].length,L=!0),!b.global)break;$=b.exec(h.value)}return L?(S<h.value.length&&H.push({type:"text",value:h.value.slice(S)}),y.children.splice(P,1,...H)):H=[h],P+H.length}}function DI(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([MI(o[0]),FI(o[1])])}return t}function MI(e){return typeof e=="string"?new RegExp(RI(e),"g"):e}function FI(e){return typeof e=="function"?e:function(){return e}}const Zf="phrasing",ed=["autolink","link","image","label"];function BI(){return{transforms:[qI],enter:{literalAutolink:HI,literalAutolinkEmail:td,literalAutolinkHttp:td,literalAutolinkWww:td},exit:{literalAutolink:VI,literalAutolinkEmail:$I,literalAutolinkHttp:zI,literalAutolinkWww:jI}}}function UI(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Zf,notInConstruct:ed},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Zf,notInConstruct:ed},{character:":",before:"[ps]",after:"\\/",inConstruct:Zf,notInConstruct:ed}]}}function HI(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function td(e){this.config.enter.autolinkProtocol.call(this,e)}function zI(e){this.config.exit.autolinkProtocol.call(this,e)}function jI(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 $I(e){this.config.exit.autolinkEmail.call(this,e)}function VI(e){this.exit(e)}function qI(e){LI(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,YI],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),WI]],{ignore:["link","linkReference"]})}function YI(e,t,n,r,o){let u="";if(!X1(o)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!GI(n)))return!1;const l=KI(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:u+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function WI(e,t,n,r){return!X1(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function GI(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 KI(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=Q1(e,"(");let u=Q1(e,")");for(;r!==-1&&o>u;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),u++;return[e,n]}function X1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||bi(n)||fa(n))&&(!t||n!==47)}J1.peek=iO;function QI(){this.buffer()}function XI(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function JI(){this.buffer()}function ZI(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function eO(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tO(e){this.exit(e)}function nO(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rO(e){this.exit(e)}function iO(){return"["}function J1(e,t,n,r){const o=n.createTracker(r);let u=o.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return u+=o.move(n.safe(n.associationId(e),{after:"]",before:u})),c(),l(),u+=o.move("]"),u}function sO(){return{enter:{gfmFootnoteCallString:QI,gfmFootnoteCall:XI,gfmFootnoteDefinitionLabelString:JI,gfmFootnoteDefinition:ZI},exit:{gfmFootnoteCallString:eO,gfmFootnoteCall:tO,gfmFootnoteDefinitionLabelString:nO,gfmFootnoteDefinition:rO}}}function oO(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:J1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,u,l){const c=u.createTracker(l);let d=c.move("[^");const h=u.enter("footnoteDefinition"),g=u.enter("label");return d+=c.move(u.safe(u.associationId(r),{before:d,after:"]"})),g(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
38
- `:" ")+u.indentLines(u.containerFlow(r,c.current()),t?Z1:uO))),h(),d}}function uO(e,t,n){return t===0?e:Z1(e,t,n)}function Z1(e,t,n){return(n?"":" ")+e}const aO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];eE.peek=hO;function lO(){return{canContainEols:["delete"],enter:{strikethrough:fO},exit:{strikethrough:dO}}}function cO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aO}],handlers:{delete:eE}}}function fO(e){this.enter({type:"delete",children:[]},e)}function dO(e){this.exit(e)}function eE(e,t,n,r){const o=n.createTracker(r),u=n.enter("strikethrough");let l=o.move("~~");return l+=n.containerPhrasing(e,He(G({},o.current()),{before:l,after:"~"})),l+=o.move("~~"),u(),l}function hO(){return"~"}function pO(e){return e.length}function mO(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||pO,u=[],l=[],c=[],d=[];let h=0,g=-1;for(;++g<e.length;){const k=[],P=[];let L=-1;for(e[g].length>h&&(h=e[g].length);++L<e[g].length;){const H=gO(e[g][L]);if(n.alignDelimiters!==!1){const $=o(H);P[L]=$,(d[L]===void 0||$>d[L])&&(d[L]=$)}k.push(H)}l[g]=k,c[g]=P}let y=-1;if(typeof r=="object"&&"length"in r)for(;++y<h;)u[y]=tE(r[y]);else{const k=tE(r);for(;++y<h;)u[y]=k}y=-1;const b=[],T=[];for(;++y<h;){const k=u[y];let P="",L="";k===99?(P=":",L=":"):k===108?P=":":k===114&&(L=":");let H=n.alignDelimiters===!1?1:Math.max(1,d[y]-P.length-L.length);const $=P+"-".repeat(H)+L;n.alignDelimiters!==!1&&(H=P.length+H+L.length,H>d[y]&&(d[y]=H),T[y]=H),b[y]=$}l.splice(1,0,b),c.splice(1,0,T),g=-1;const S=[];for(;++g<l.length;){const k=l[g],P=c[g];y=-1;const L=[];for(;++y<h;){const H=k[y]||"";let $="",Z="";if(n.alignDelimiters!==!1){const he=d[y]-(P[y]||0),M=u[y];M===114?$=" ".repeat(he):M===99?he%2?($=" ".repeat(he/2+.5),Z=" ".repeat(he/2-.5)):($=" ".repeat(he/2),Z=$):Z=" ".repeat(he)}n.delimiterStart!==!1&&!y&&L.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&H==="")&&(n.delimiterStart!==!1||y)&&L.push(" "),n.alignDelimiters!==!1&&L.push($),L.push(H),n.alignDelimiters!==!1&&L.push(Z),n.padding!==!1&&L.push(" "),(n.delimiterEnd!==!1||y!==h-1)&&L.push("|")}S.push(n.delimiterEnd===!1?L.join("").replace(/ +$/,""):L.join(""))}return S.join(`
39
- `)}function gO(e){return e==null?"":String(e)}function tE(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 EO(e,t,n,r){const o=n.enter("blockquote"),u=n.createTracker(r);u.move("> "),u.shift(2);const l=n.indentLines(n.containerFlow(e,u.current()),yO);return o(),l}function yO(e,t,n){return">"+(n?"":" ")+e}function TO(e,t){return nE(e,t.inConstruct,!0)&&!nE(e,t.notInConstruct,!1)}function nE(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 rE(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
40
- `&&TO(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
- `}function bO(e,t){const n=String(e);let r=n.indexOf(t),o=r,u=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++u>l&&(l=u):u=1,o=r+t.length,r=n.indexOf(t,o);return l}function _O(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 SO(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 xO(e,t,n,r){const o=SO(n),u=e.value||"",l=o==="`"?"GraveAccent":"Tilde";if(_O(e,n)){const y=n.enter("codeIndented"),b=n.indentLines(u,CO);return y(),b}const c=n.createTracker(r),d=o.repeat(Math.max(bO(u,o)+1,3)),h=n.enter("codeFenced");let g=c.move(d);if(e.lang){const y=n.enter(`codeFencedLang${l}`);g+=c.move(n.safe(e.lang,G({before:g,after:" ",encode:["`"]},c.current()))),y()}if(e.lang&&e.meta){const y=n.enter(`codeFencedMeta${l}`);g+=c.move(" "),g+=c.move(n.safe(e.meta,G({before:g,after:`
42
- `,encode:["`"]},c.current()))),y()}return g+=c.move(`
43
- `),u&&(g+=c.move(u+`
44
- `)),g+=c.move(d),h(),g}function CO(e,t,n){return(n?"":" ")+e}function nd(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 AO(e,t,n,r){const o=nd(n),u=o==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),G({before:h,after:"]"},d.current()))),h+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,G({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,G({before:h,after:e.title?" ":`
45
- `},d.current())))),c(),e.title&&(c=n.enter(`title${u}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,G({before:h,after:o},d.current()))),h+=d.move(o),c()),l(),h}function kO(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 Mo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Pa(e,t,n){const r=us(e),o=us(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}}iE.peek=wO;function iE(e,t,n,r){const o=kO(n),u=n.enter("emphasis"),l=n.createTracker(r),c=l.move(o);let d=l.move(n.containerPhrasing(e,G({after:o,before:c},l.current())));const h=d.charCodeAt(0),g=Pa(r.before.charCodeAt(r.before.length-1),h,o);g.inside&&(d=Mo(h)+d.slice(1));const y=d.charCodeAt(d.length-1),b=Pa(r.after.charCodeAt(0),y,o);b.inside&&(d=d.slice(0,-1)+Mo(y));const T=l.move(o);return u(),n.attentionEncodeSurroundingInfo={after:b.outside,before:g.outside},c+d+T}function wO(e,t,n){return n.options.emphasis||"*"}function vO(e,t){let n=!1;return ba(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,xf}),!!((!e.depth||e.depth<3)&&df(e)&&(t.options.setext||n))}function NO(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(r);if(vO(e,n)){const g=n.enter("headingSetext"),y=n.enter("phrasing"),b=n.containerPhrasing(e,He(G({},u.current()),{before:`
26
+ `}),n}function ay(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ly(e,t){const n=fP(e,t),r=n.one(e,void 0),o=tP(n),u=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
27
+ `},o),u}function gP(e,t){return e&&"run"in e?function(n,r){return nt(this,null,function*(){const o=ly(n,U({file:r},t));yield e.run(o,r)})}:function(n,r){return ly(n,U({file:r},e||t))}}function cy(e){if(e)throw e}var Jd,fy;function EP(){if(fy)return Jd;fy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},u=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),E=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!E)return!1;var b;for(b in h);return typeof b=="undefined"||e.call(h,b)},a=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},c=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(r)return r(h,m).value}else return;return h[m]};return Jd=function f(){var h,m,E,b,T,_,S=arguments[0],C=1,I=arguments.length,B=!1;for(typeof S=="boolean"&&(B=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<I;++C)if(h=arguments[C],h!=null)for(m in h)E=c(S,m),b=c(h,m),S!==b&&(B&&b&&(u(b)||(T=o(b)))?(T?(T=!1,_=E&&o(E)?E:[]):_=E&&u(E)?E:{},a(S,{name:m,newValue:f(B,_,b)})):typeof b!="undefined"&&a(S,{name:m,newValue:b}));return S},Jd}var yP=EP();const Zd=Ge(yP);function eh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function TP(){const e=[],t={run:n,use:r};return t;function n(...o){let u=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...o);function c(f,...h){const m=e[++u];let E=-1;if(f){a(f);return}for(;++E<o.length;)(h[E]===null||h[E]===void 0)&&(h[E]=o[E]);o=h,m?bP(m,c)(...h):a(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function bP(e,t){let n;return r;function r(...a){const c=e.length>a.length;let f;c&&a.push(o);try{f=e.apply(this,a)}catch(h){const m=h;if(c&&n)throw m;return o(m)}c||(f&&f.then&&typeof f.then=="function"?f.then(u,o):f instanceof Error?o(f):u(f))}function o(a,...c){n||(n=!0,t(a,...c))}function u(a){o(null,a)}}const wr={basename:_P,dirname:xP,extname:SP,join:wP,sep:"/"};function _P(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');au(e);let n=0,r=-1,o=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else r<0&&(u=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else a<0&&(u=!0,a=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function xP(e){if(au(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 SP(e){au(e);let t=e.length,n=-1,r=0,o=-1,u=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?o<0?o=t:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||n<0||u===0||u===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function wP(...e){let t=-1,n;for(;++t<e.length;)au(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":CP(n)}function CP(e){au(e);const t=e.codePointAt(0)===47;let n=AP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function AP(e,t){let n="",r=0,o=-1,u=0,a=-1,c,f;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(o===a-1||u===1))if(o!==a-1&&u===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),o=a,u=0;continue}}else if(n.length>0){n="",r=0,o=a,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,u=0}else c===46&&u>-1?u++:u=-1}return n}function au(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const vP={cwd:kP};function kP(){return"/"}function th(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function NP(e){if(typeof e=="string")e=new URL(e);else if(!th(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return OP(e)}function OP(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 nh=["history","path","basename","stem","extname","dirname"];class dy{constructor(t){let n;t?th(t)?n={path:t}:typeof t=="string"||IP(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":vP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<nh.length;){const u=nh[r];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let o;for(o in n)nh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?wr.basename(this.path):void 0}set basename(t){ih(t,"basename"),rh(t,"basename"),this.path=wr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?wr.dirname(this.path):void 0}set dirname(t){hy(this.basename,"dirname"),this.path=wr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?wr.extname(this.path):void 0}set extname(t){if(rh(t,"extname"),hy(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=wr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){th(t)&&(t=NP(t)),ih(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?wr.basename(this.path,this.extname):void 0}set stem(t){ih(t,"stem"),rh(t,"stem"),this.path=wr.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 Jt(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 rh(e,t){if(e&&e.includes(wr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+wr.sep+"`")}function ih(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function IP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const PP=function(e){const r=this.constructor.prototype,o=r[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,r),u},RP={}.hasOwnProperty;class sh extends PP{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=TP()}copy(){const t=new sh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Zd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ah("data",this.frozen),this.namespace[t]=n,this):RP.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ah("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const 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=yl(t),r=this.parser||this.Parser;return oh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),oh("process",this.parser||this.Parser),uh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(u,a){const c=yl(t),f=r.parse(c);r.run(f,c,function(m,E,b){if(m||!E||!b)return h(m);const T=E,_=r.stringify(T,b);MP(_)?b.value=_:b.result=_,h(m,b)});function h(m,E){m||!E?a(m):u?u(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),oh("processSync",this.parser||this.Parser),uh("processSync",this.compiler||this.Compiler),this.process(t,o),my("processSync","process",n),r;function o(u,a){n=!0,cy(u),r=a}}run(t,n,r){py(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?u(void 0,r):new Promise(u);function u(a,c){const f=yl(n);o.run(t,f,h);function h(m,E,b){const T=E||t;m?c(m):a?a(T):r(void 0,T,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,u),my("runSync","run",r),o;function u(a,c){cy(a),o=c,r=!0}}stringify(t,n){this.freeze();const r=yl(n),o=this.compiler||this.Compiler;return uh("stringify",o),py(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(ah("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...E]=h;f(m,E)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(o.settings=Zd(!0,o.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const E=h[m];u(E)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,m){let E=-1,b=-1;for(;++E<r.length;)if(r[E][0]===h){b=E;break}if(b===-1)r.push([h,...m]);else if(m.length>0){let[T,..._]=m;const S=r[b][1];eh(S)&&eh(T)&&(T=Zd(!0,S,T)),r[b]=[h,T,..._]}}}}const LP=new sh().freeze();function oh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ah(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function py(e){if(!eh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function my(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function yl(e){return DP(e)?e:new dy(e)}function DP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function MP(e){return typeof e=="string"||FP(e)}function FP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gy=[],Ey={allowDangerousHtml:!0},UP=/^(https?|ircs?|mailto|xmpp)$/i,HP=[{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 zP(e){const t=jP(e),n=$P(e);return VP(t.runSync(t.parse(n),n),e)}function jP(e){const t=e.rehypePlugins||gy,n=e.remarkPlugins||gy,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),Ey):Ey;return LP().use(xI).use(n).use(gP,r).use(t)}function $P(e){const t=e.children||"",n=new dy;return typeof t=="string"&&(n.value=t),n}function VP(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,u=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||qP;for(const m of HP)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+BP+m.id,void 0);return El(e,h),p3(e,{Fragment:O.Fragment,components:o,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function h(m,E,b){if(m.type==="raw"&&b&&typeof E=="number")return a?b.children.splice(E,1):b.children[E]={type:"text",value:m.value},E;if(m.type==="element"){let T;for(T in Bd)if(Object.hasOwn(Bd,T)&&Object.hasOwn(m.properties,T)){const _=m.properties[T],S=Bd[T];(S===null||S.includes(m.tagName))&&(m.properties[T]=f(String(_||""),T,m))}}if(m.type==="element"){let T=n?!n.includes(m.tagName):u?u.includes(m.tagName):!1;if(!T&&r&&typeof E=="number"&&(T=!r(m,E,b)),T&&b&&typeof E=="number")return c&&m.children?b.children.splice(E,1,...m.children):b.children.splice(E,1),E}}}function qP(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||UP.test(e.slice(0,t))?e:""}const yy=/[#.]/g;function YP(e,t){const n=e||"",r={};let o=0,u,a;for(;o<n.length;){yy.lastIndex=o;const c=yy.exec(n),f=n.slice(o,c?c.index:n.length);f&&(u?u==="#"?r.id=f:Array.isArray(r.className)?r.className.push(f):r.className=[f]:a=f,o+=f.length),c&&(u=c[0],o++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function Ty(e,t,n){const r=n?QP(n):void 0;function o(u,a,...c){let f;if(u==null){f={type:"root",children:[]};const h=a;c.unshift(h)}else{f=YP(u,t);const h=f.tagName.toLowerCase(),m=r?r.get(h):void 0;if(f.tagName=m||h,WP(a))c.unshift(a);else for(const[E,b]of Object.entries(a))GP(e,f.properties,E,b)}for(const h of c)lh(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return o}function WP(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 u=o;for(const a of u)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function GP(e,t,n,r){const o=Pd(e,n);let u;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;u=r}else typeof r=="boolean"?u=r:typeof r=="string"?o.spaceSeparated?u=fE(r):o.commaSeparated?u=J1(r):o.commaOrSpaceSeparated?u=fE(J1(r).join(" ")):u=by(o,o.property,r):Array.isArray(r)?u=[...r]:u=o.property==="style"?KP(r):String(r);if(Array.isArray(u)){const a=[];for(const c of u)a.push(by(o,o.property,c));u=a}o.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[o.property]=u}}function lh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)lh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?lh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function by(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Jo(n)===Jo(t)))return!0}return n}function KP(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function QP(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const XP=["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"],JP=Ty(sl,"div"),ZP=Ty(Bs,"g",XP);function eR(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(u){if(typeof u=="number"&&u>-1&&u<=t.length){let a=0;for(;;){let c=n[a];if(c===void 0){const f=_y(t,n[a-1]);c=f===-1?t.length+1:f+1,n[a]=c}if(c>u)return{line:a+1,column:u-(a>0?n[a-1]:0)+1,offset:u};a++}}}function o(u){if(u&&typeof u.line=="number"&&typeof u.column=="number"&&!Number.isNaN(u.line)&&!Number.isNaN(u.column)){for(;n.length<u.line;){const c=n[n.length-1],f=_y(t,c),h=f===-1?t.length+1:f+1;if(c===h)break;n.push(h)}const a=(u.line>1?n[u.line-2]:0)+u.column-1;if(a<n[u.line-1])return a}}}function _y(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
28
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const $i={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/"},xy={}.hasOwnProperty,tR=Object.prototype;function nR(e,t){const n=t||{};return ch({file:n.file||void 0,location:!1,schema:n.space==="svg"?Bs:sl,verbose:n.verbose||!1},e)}function ch(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Tl(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 u=String(e.file),a=eR(u),c=a.toPoint(0),f=a.toPoint(u.length);n.position={start:c,end:f}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Tl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Tl(e,r,n),n}default:return n=rR(e,t),n}}function Sy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=ch(e,t[n]);r.push(o)}return r}function rR(e,t){const n=e.schema;e.schema=t.namespaceURI===$i.svg?Bs:sl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],f=(c.prefix?c.prefix+":":"")+c.name;xy.call(tR,f)||(o[f]=c.value)}const a=(e.schema.space==="svg"?ZP:JP)(t.tagName,o,Sy(e,t.childNodes));if(Tl(e,t,a),a.tagName==="template"){const c=t,f=c.sourceCodeLocation,h=f&&f.startTag&&Vs(f.startTag),m=f&&f.endTag&&Vs(f.endTag),E=ch(e,c.content);h&&m&&e.file&&(E.position={start:h.end,end:m.start}),a.content=E}return e.schema=n,a}function Tl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=iR(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function iR(e,t,n){const r=Vs(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const u={};let a;if(n.attrs)for(a in n.attrs)xy.call(n.attrs,a)&&(u[Pd(e.schema,a).property]=Vs(n.attrs[a]));n.startTag;const c=Vs(n.startTag),f=n.endTag?Vs(n.endTag):void 0,h={opening:c};f&&(h.closing=f),h.properties=u,t.data={position:h}}}return r}function Vs(e){const t=wy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=wy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function wy(e){return e.line&&e.column?e:void 0}class lu{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}lu.prototype.property={},lu.prototype.normal={},lu.prototype.space=null;function Cy(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 lu(n,r,t)}function fh(e){return e.toLowerCase()}class jn{constructor(t,n){this.property=t,this.attribute=n}}jn.prototype.space=null,jn.prototype.boolean=!1,jn.prototype.booleanish=!1,jn.prototype.overloadedBoolean=!1,jn.prototype.number=!1,jn.prototype.commaSeparated=!1,jn.prototype.spaceSeparated=!1,jn.prototype.commaOrSpaceSeparated=!1,jn.prototype.mustUseProperty=!1,jn.prototype.defined=!1;let sR=0;const $e=Vi(),It=Vi(),Ay=Vi(),me=Vi(),ut=Vi(),qs=Vi(),Pn=Vi();function Vi(){return Wc(2,++sR)}const dh=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:It,commaOrSpaceSeparated:Pn,commaSeparated:qs,number:me,overloadedBoolean:Ay,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),hh=Object.keys(dh);class ph extends jn{constructor(t,n,r,o){let u=-1;if(super(t,n),vy(this,"space",o),typeof r=="number")for(;++u<hh.length;){const a=hh[u];vy(this,hh[u],(r&dh[a])===dh[a])}}}ph.prototype.defined=!0;function vy(e,t,n){n&&(e[t]=n)}const oR={}.hasOwnProperty;function Ys(e){const t={},n={};let r;for(r in e.properties)if(oR.call(e.properties,r)){const o=e.properties[r],u=new ph(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[fh(r)]=r,n[fh(u.attribute)]=r}return new lu(t,n,e.space)}const ky=Ys({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Ny=Ys({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Oy(e,t){return t in e?e[t]:t}function Iy(e,t){return Oy(e,t.toLowerCase())}const Py=Ys({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Iy,properties:{xmlns:null,xmlnsXLink:null}}),Ry=Ys({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:It,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:ut,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:me,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:ut,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:It,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}}),uR=Ys({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Iy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qs,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:ut,autoFocus:$e,autoPlay:$e,blocking:ut,capture:null,charSet:null,checked:$e,cite:null,className:ut,cols:me,colSpan:null,content:null,contentEditable:It,controls:$e,controlsList:ut,coords:me|qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:Ay,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:ut,height:me,hidden:$e,high:me,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:ut,itemRef:ut,itemScope:$e,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:$e,optimum:me,pattern:null,ping:ut,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:ut,required:$e,reversed:$e,rows:me,rowSpan:me,sandbox:ut,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:It,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:It,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:It,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:me,security:null,unselectable:null}}),aR=Ys({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Oy,properties:{about:Pn,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:ut,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qs,g2:qs,glyphName:qs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:me,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),lR=/^data[-\w.:]+$/i,Ly=/-[a-z]/g,cR=/[A-Z]/g;function fR(e,t){const n=fh(t);let r=t,o=jn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&lR.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(Ly,hR);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!Ly.test(u)){let a=u.replace(cR,dR);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=ph}return new o(r,t)}function dR(e){return"-"+e.toLowerCase()}function hR(e){return e.charAt(1).toUpperCase()}const pR=Cy([Ny,ky,Py,Ry,uR],"html"),Dy=Cy([Ny,ky,Py,Ry,aR],"svg"),My={}.hasOwnProperty;function Fy(e,t){const n=t||{};function r(o,...u){let a=r.invalid;const c=r.handlers;if(o&&My.call(o,e)){const f=String(o[e]);a=My.call(c,f)?c[f]:r.unknown}if(a)return a.call(this,o,...u)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const mR={},gR={}.hasOwnProperty,By=Fy("type",{handlers:{root:yR,element:SR,text:_R,comment:xR,doctype:bR}});function ER(e,t){const r=(t||mR).space;return By(e,r==="svg"?Dy:pR)}function yR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=mh(e.children,n,t),Ws(e,n),n}function TR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=mh(e.children,n,t),Ws(e,n),n}function bR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ws(e,t),t}function _R(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ws(e,t),t}function xR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ws(e,t),t}function SR(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Dy);const o=[];let u;if(e.properties){for(u in e.properties)if(u!=="children"&&gR.call(e.properties,u)){const f=wR(r,u,e.properties[u]);f&&o.push(f)}}const a=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:$i[a],childNodes:[],parentNode:null};return c.childNodes=mh(e.children,c,r),Ws(e,c),e.tagName==="template"&&e.content&&(c.content=TR(e.content,r)),c}function wR(e,t,n){const r=fR(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?Z1(n):dE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const u=o.name.indexOf(":");u<0?o.prefix="":(o.name=o.name.slice(u+1),o.prefix=r.attribute.slice(0,u)),o.namespace=$i[r.space]}return o}function mh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const u=By(e[r],n);u.parentNode=t,o.push(u)}return o}function Ws(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const CR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],AR=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]),ht="�";var A;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(A||(A={}));const bn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Uy(e){return e>=55296&&e<=57343}function vR(e){return e>=56320&&e<=57343}function kR(e,t){return(e-55296)*1024+9216+t}function Hy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function zy(e){return e>=64976&&e<=65007||AR.has(e)}var Q;(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"})(Q||(Q={}));const NR=65536;class OR{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=NR,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:u}=this,a=o+n,c=u+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,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(vR(n))return this.pos++,this._addGap(),kR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(Q.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;const r=this.html.charCodeAt(n);return r===A.CARRIAGE_RETURN?A.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,A.EOF;let t=this.html.charCodeAt(this.pos);return t===A.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,A.LINE_FEED):t===A.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Uy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===A.LINE_FEED||t===A.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Hy(t)?this._err(Q.controlCharacterInInputStream):zy(t)&&this._err(Q.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var qe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(qe||(qe={}));function jy(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 IR=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),PR=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 RR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=PR.get(e))!==null&&t!==void 0?t:e}var zt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(zt||(zt={}));const LR=32;var ui;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ui||(ui={}));function gh(e){return e>=zt.ZERO&&e<=zt.NINE}function DR(e){return e>=zt.UPPER_A&&e<=zt.UPPER_F||e>=zt.LOWER_A&&e<=zt.LOWER_F}function MR(e){return e>=zt.UPPER_A&&e<=zt.UPPER_Z||e>=zt.LOWER_A&&e<=zt.LOWER_Z||gh(e)}function FR(e){return e===zt.EQUALS||MR(e)}var jt;(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"})(jt||(jt={}));var $r;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})($r||($r={}));class BR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=jt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=$r.Strict}startEntity(t){this.decodeMode=t,this.state=jt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case jt.EntityStart:return t.charCodeAt(n)===zt.NUM?(this.state=jt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=jt.NamedEntity,this.stateNamedEntity(t,n));case jt.NumericStart:return this.stateNumericStart(t,n);case jt.NumericDecimal:return this.stateNumericDecimal(t,n);case jt.NumericHex:return this.stateNumericHex(t,n);case jt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|LR)===zt.LOWER_X?(this.state=jt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=jt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const u=r-n;this.result=this.result*Math.pow(o,u)+Number.parseInt(t.substr(n,u),o),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(gh(o)||DR(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(gh(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===zt.SEMI)this.consumed+=1;else if(this.decodeMode===$r.Strict)return 0;return this.emitCodePoint(RR(this.result),this.consumed),this.errors&&(t!==zt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],u=(o&ui.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=UR(r,o,this.treeIndex+Math.max(1,u),a),this.treeIndex<0)return this.result===0||this.decodeMode===$r.Attribute&&(u===0||FR(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],u=(o&ui.VALUE_LENGTH)>>14,u!==0){if(a===zt.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==$r.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]&ui.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]&~ui.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case jt.NamedEntity:return this.result!==0&&(this.decodeMode!==$r.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case jt.NumericDecimal:return this.emitNumericEntity(0,2);case jt.NumericHex:return this.emitNumericEntity(0,3);case jt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case jt.EntityStart:return 0}}}function UR(e,t,n,r){const o=(t&ui.BRANCH_LENGTH)>>7,u=t&ui.JUMP_TABLE;if(o===0)return u!==0&&r===u?n:-1;if(u){const f=r-u;return f<0||f>=o?-1:e[n+f]-1}let a=n,c=a+o-1;for(;a<=c;){const f=a+c>>>1,h=e[f];if(h<r)a=f+1;else if(h>r)c=f-1;else return e[f+o]}return-1}var re;(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/"})(re||(re={}));var qi;(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"})(qi||(qi={}));var $n;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})($n||($n={}));var j;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(j||(j={}));var p;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(p||(p={}));const HR=new Map([[j.A,p.A],[j.ADDRESS,p.ADDRESS],[j.ANNOTATION_XML,p.ANNOTATION_XML],[j.APPLET,p.APPLET],[j.AREA,p.AREA],[j.ARTICLE,p.ARTICLE],[j.ASIDE,p.ASIDE],[j.B,p.B],[j.BASE,p.BASE],[j.BASEFONT,p.BASEFONT],[j.BGSOUND,p.BGSOUND],[j.BIG,p.BIG],[j.BLOCKQUOTE,p.BLOCKQUOTE],[j.BODY,p.BODY],[j.BR,p.BR],[j.BUTTON,p.BUTTON],[j.CAPTION,p.CAPTION],[j.CENTER,p.CENTER],[j.CODE,p.CODE],[j.COL,p.COL],[j.COLGROUP,p.COLGROUP],[j.DD,p.DD],[j.DESC,p.DESC],[j.DETAILS,p.DETAILS],[j.DIALOG,p.DIALOG],[j.DIR,p.DIR],[j.DIV,p.DIV],[j.DL,p.DL],[j.DT,p.DT],[j.EM,p.EM],[j.EMBED,p.EMBED],[j.FIELDSET,p.FIELDSET],[j.FIGCAPTION,p.FIGCAPTION],[j.FIGURE,p.FIGURE],[j.FONT,p.FONT],[j.FOOTER,p.FOOTER],[j.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[j.FORM,p.FORM],[j.FRAME,p.FRAME],[j.FRAMESET,p.FRAMESET],[j.H1,p.H1],[j.H2,p.H2],[j.H3,p.H3],[j.H4,p.H4],[j.H5,p.H5],[j.H6,p.H6],[j.HEAD,p.HEAD],[j.HEADER,p.HEADER],[j.HGROUP,p.HGROUP],[j.HR,p.HR],[j.HTML,p.HTML],[j.I,p.I],[j.IMG,p.IMG],[j.IMAGE,p.IMAGE],[j.INPUT,p.INPUT],[j.IFRAME,p.IFRAME],[j.KEYGEN,p.KEYGEN],[j.LABEL,p.LABEL],[j.LI,p.LI],[j.LINK,p.LINK],[j.LISTING,p.LISTING],[j.MAIN,p.MAIN],[j.MALIGNMARK,p.MALIGNMARK],[j.MARQUEE,p.MARQUEE],[j.MATH,p.MATH],[j.MENU,p.MENU],[j.META,p.META],[j.MGLYPH,p.MGLYPH],[j.MI,p.MI],[j.MO,p.MO],[j.MN,p.MN],[j.MS,p.MS],[j.MTEXT,p.MTEXT],[j.NAV,p.NAV],[j.NOBR,p.NOBR],[j.NOFRAMES,p.NOFRAMES],[j.NOEMBED,p.NOEMBED],[j.NOSCRIPT,p.NOSCRIPT],[j.OBJECT,p.OBJECT],[j.OL,p.OL],[j.OPTGROUP,p.OPTGROUP],[j.OPTION,p.OPTION],[j.P,p.P],[j.PARAM,p.PARAM],[j.PLAINTEXT,p.PLAINTEXT],[j.PRE,p.PRE],[j.RB,p.RB],[j.RP,p.RP],[j.RT,p.RT],[j.RTC,p.RTC],[j.RUBY,p.RUBY],[j.S,p.S],[j.SCRIPT,p.SCRIPT],[j.SEARCH,p.SEARCH],[j.SECTION,p.SECTION],[j.SELECT,p.SELECT],[j.SOURCE,p.SOURCE],[j.SMALL,p.SMALL],[j.SPAN,p.SPAN],[j.STRIKE,p.STRIKE],[j.STRONG,p.STRONG],[j.STYLE,p.STYLE],[j.SUB,p.SUB],[j.SUMMARY,p.SUMMARY],[j.SUP,p.SUP],[j.TABLE,p.TABLE],[j.TBODY,p.TBODY],[j.TEMPLATE,p.TEMPLATE],[j.TEXTAREA,p.TEXTAREA],[j.TFOOT,p.TFOOT],[j.TD,p.TD],[j.TH,p.TH],[j.THEAD,p.THEAD],[j.TITLE,p.TITLE],[j.TR,p.TR],[j.TRACK,p.TRACK],[j.TT,p.TT],[j.U,p.U],[j.UL,p.UL],[j.SVG,p.SVG],[j.VAR,p.VAR],[j.WBR,p.WBR],[j.XMP,p.XMP]]);function Gs(e){var t;return(t=HR.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const le=p,zR={[re.HTML]:new Set([le.ADDRESS,le.APPLET,le.AREA,le.ARTICLE,le.ASIDE,le.BASE,le.BASEFONT,le.BGSOUND,le.BLOCKQUOTE,le.BODY,le.BR,le.BUTTON,le.CAPTION,le.CENTER,le.COL,le.COLGROUP,le.DD,le.DETAILS,le.DIR,le.DIV,le.DL,le.DT,le.EMBED,le.FIELDSET,le.FIGCAPTION,le.FIGURE,le.FOOTER,le.FORM,le.FRAME,le.FRAMESET,le.H1,le.H2,le.H3,le.H4,le.H5,le.H6,le.HEAD,le.HEADER,le.HGROUP,le.HR,le.HTML,le.IFRAME,le.IMG,le.INPUT,le.LI,le.LINK,le.LISTING,le.MAIN,le.MARQUEE,le.MENU,le.META,le.NAV,le.NOEMBED,le.NOFRAMES,le.NOSCRIPT,le.OBJECT,le.OL,le.P,le.PARAM,le.PLAINTEXT,le.PRE,le.SCRIPT,le.SECTION,le.SELECT,le.SOURCE,le.STYLE,le.SUMMARY,le.TABLE,le.TBODY,le.TD,le.TEMPLATE,le.TEXTAREA,le.TFOOT,le.TH,le.THEAD,le.TITLE,le.TR,le.TRACK,le.UL,le.WBR,le.XMP]),[re.MATHML]:new Set([le.MI,le.MO,le.MN,le.MS,le.MTEXT,le.ANNOTATION_XML]),[re.SVG]:new Set([le.TITLE,le.FOREIGN_OBJECT,le.DESC]),[re.XLINK]:new Set,[re.XML]:new Set,[re.XMLNS]:new Set},Eh=new Set([le.H1,le.H2,le.H3,le.H4,le.H5,le.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.PLAINTEXT;var v;(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"})(v||(v={}));const At={DATA:v.DATA,RCDATA:v.RCDATA,RAWTEXT:v.RAWTEXT,SCRIPT_DATA:v.SCRIPT_DATA,PLAINTEXT:v.PLAINTEXT,CDATA_SECTION:v.CDATA_SECTION};function jR(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function cu(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function $R(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function ai(e){return $R(e)||cu(e)}function $y(e){return ai(e)||jR(e)}function bl(e){return e+32}function Vy(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function qy(e){return Vy(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function VR(e){return e===A.NULL?Q.nullCharacterReference:e>1114111?Q.characterReferenceOutsideUnicodeRange:Uy(e)?Q.surrogateCharacterReference:zy(e)?Q.noncharacterCharacterReference:Hy(e)||e===A.CARRIAGE_RETURN?Q.controlCharacterReference:null}class qR{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=v.DATA,this.returnState=v.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new OR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new BR(IR,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(Q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=VR(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:qe.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qe.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:qe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(jy(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(Q.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Gs(t.tagName),t.type===qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Q.endTagWithAttributes),t.selfClosing&&this._err(Q.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case qe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:qe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Vy(t)?qe.WHITESPACE_CHARACTER:t===A.NULL?qe.NULL_CHARACTER:qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=v.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?$r.Attribute:$r.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===v.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===v.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===v.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case v.DATA:{this._stateData(t);break}case v.RCDATA:{this._stateRcdata(t);break}case v.RAWTEXT:{this._stateRawtext(t);break}case v.SCRIPT_DATA:{this._stateScriptData(t);break}case v.PLAINTEXT:{this._statePlaintext(t);break}case v.TAG_OPEN:{this._stateTagOpen(t);break}case v.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case v.TAG_NAME:{this._stateTagName(t);break}case v.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case v.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case v.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case v.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case v.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case v.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case v.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case v.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case v.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case v.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case v.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case v.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case v.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case v.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case v.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case v.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case v.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case v.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case v.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case v.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case v.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case v.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case v.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case v.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case v.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case v.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case v.BOGUS_COMMENT:{this._stateBogusComment(t);break}case v.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case v.COMMENT_START:{this._stateCommentStart(t);break}case v.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case v.COMMENT:{this._stateComment(t);break}case v.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case v.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case v.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case v.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case v.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case v.COMMENT_END:{this._stateCommentEnd(t);break}case v.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case v.DOCTYPE:{this._stateDoctype(t);break}case v.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case v.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case v.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case v.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case v.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case v.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case v.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case v.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case v.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case v.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case v.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case v.CDATA_SECTION:{this._stateCdataSection(t);break}case v.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case v.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case v.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case v.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=v.TAG_OPEN;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitCodePoint(t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case A.AMPERSAND:{this._startCharacterReference();break}case A.LESS_THAN_SIGN:{this.state=v.RCDATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ht);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case A.LESS_THAN_SIGN:{this.state=v.RAWTEXT_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ht);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ht);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ht);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ai(t))this._createStartTagToken(),this.state=v.TAG_NAME,this._stateTagName(t);else switch(t){case A.EXCLAMATION_MARK:{this.state=v.MARKUP_DECLARATION_OPEN;break}case A.SOLIDUS:{this.state=v.END_TAG_OPEN;break}case A.QUESTION_MARK:{this._err(Q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=v.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=v.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ai(t))this._createEndTagToken(),this.state=v.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(Q.missingEndTagName),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=v.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this.state=v.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.tagName+=ht;break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(cu(t)?bl(t):t)}}_stateRcdataLessThanSign(t){t===A.SOLIDUS?this.state=v.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=v.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ai(t)?(this.state=v.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=v.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=v.BEFORE_ATTRIBUTE_NAME,!1;case A.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=v.SELF_CLOSING_START_TAG,!1;case A.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=v.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===A.SOLIDUS?this.state=v.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=v.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ai(t)?(this.state=v.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=v.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case A.SOLIDUS:{this.state=v.SCRIPT_DATA_END_TAG_OPEN;break}case A.EXCLAMATION_MARK:{this.state=v.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=v.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ai(t)?(this.state=v.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===A.HYPHEN_MINUS?(this.state=v.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===A.HYPHEN_MINUS?(this.state=v.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=v.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ht);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_ESCAPED,this._emitChars(ht);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.GREATER_THAN_SIGN:{this.state=v.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_ESCAPED,this._emitChars(ht);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===A.SOLIDUS?this.state=v.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ai(t)?(this._emitChars("<"),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ai(t)?(this.state=v.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(bn.SCRIPT,!1)&&qy(this.preprocessor.peek(bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=v.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ht);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ht);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.GREATER_THAN_SIGN:{this.state=v.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ht);break}case A.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===A.SOLIDUS?(this.state=v.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(bn.SCRIPT,!1)&&qy(this.preprocessor.peek(bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=v.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this.state=v.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._err(Q.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=v.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=v.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this._leaveAttrName(),this.state=v.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._leaveAttrName(),this.state=v.BEFORE_ATTRIBUTE_VALUE;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:{this._err(Q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.name+=ht;break}default:this.currentAttr.name+=String.fromCodePoint(cu(t)?bl(t):t)}}_stateAfterAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:{this.state=v.SELF_CLOSING_START_TAG;break}case A.EQUALS_SIGN:{this.state=v.BEFORE_ATTRIBUTE_VALUE;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=v.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{this.state=v.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this.state=v.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingAttributeValue),this.state=v.DATA,this.emitCurrentTagToken();break}default:this.state=v.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case A.QUOTATION_MARK:{this.state=v.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case A.APOSTROPHE:{this.state=v.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=v.BEFORE_ATTRIBUTE_NAME;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=v.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(Q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=v.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this._leaveAttrValue(),this.state=v.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=v.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBetweenAttributes),this.state=v.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case A.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=v.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.unexpectedSolidusInTag),this.state=v.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=ht;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(bn.DASH_DASH,!0)?(this._createCommentToken(bn.DASH_DASH.length+1),this.state=v.COMMENT_START):this._consumeSequenceIfMatch(bn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(bn.DOCTYPE.length+1),this.state=v.DOCTYPE):this._consumeSequenceIfMatch(bn.CDATA_START,!0)?this.inForeignNode?this.state=v.CDATA_SECTION:(this._err(Q.cdataInHtmlContent),this._createCommentToken(bn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=v.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=v.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_START_DASH;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=v.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=v.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_END;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=v.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_END_DASH;break}case A.LESS_THAN_SIGN:{n.data+="<",this.state=v.COMMENT_LESS_THAN_SIGN;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=ht;break}case A.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case A.EXCLAMATION_MARK:{n.data+="!",this.state=v.COMMENT_LESS_THAN_SIGN_BANG;break}case A.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=v.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===A.HYPHEN_MINUS?this.state=v.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=v.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===A.HYPHEN_MINUS?this.state=v.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=v.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==A.GREATER_THAN_SIGN&&t!==A.EOF&&this._err(Q.nestedComment),this.state=v.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=v.COMMENT_END;break}case A.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=v.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentComment(n);break}case A.EXCLAMATION_MARK:{this.state=v.COMMENT_END_BANG;break}case A.HYPHEN_MINUS:{n.data+="-";break}case A.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=v.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{n.data+="--!",this.state=v.COMMENT_END_DASH;break}case A.GREATER_THAN_SIGN:{this._err(Q.incorrectlyClosedComment),this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=v.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=v.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case A.EOF:{this._err(Q.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBeforeDoctypeName),this.state=v.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(cu(t))this._createDoctypeToken(String.fromCharCode(bl(t))),this.state=v.DOCTYPE_NAME;else switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.NULL:{this._err(Q.unexpectedNullCharacter),this._createDoctypeToken(ht),this.state=v.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.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=v.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.AFTER_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.name+=ht;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(cu(t)?bl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(bn.PUBLIC,!1)?this.state=v.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(bn.SYSTEM,!1)?this.state=v.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Q.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=v.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=ht;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=v.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=ht;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case A.GREATER_THAN_SIGN:{this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.QUOTATION_MARK:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.QUOTATION_MARK:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=v.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=v.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=ht;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case A.APOSTROPHE:{this.state=v.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=ht;break}case A.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=v.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.NULL:{this._err(Q.unexpectedNullCharacter);break}case A.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case A.RIGHT_SQUARE_BRACKET:{this.state=v.CDATA_SECTION_BRACKET;break}case A.EOF:{this._err(Q.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===A.RIGHT_SQUARE_BRACKET?this.state=v.CDATA_SECTION_END:(this._emitChars("]"),this.state=v.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case A.GREATER_THAN_SIGN:{this.state=v.DATA;break}case A.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=v.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(A.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&$y(this.preprocessor.peek(1))?v.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){$y(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(Q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Yy=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),Wy=new Set([...Yy,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),_l=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),YR=new Set([..._l,p.OL,p.UL]),WR=new Set([..._l,p.BUTTON]),Gy=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),Ky=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),GR=new Set([p.TR,p.TEMPLATE,p.HTML]),KR=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),QR=new Set([p.TABLE,p.TEMPLATE,p.HTML]),XR=new Set([p.TD,p.TH]);class JR{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===re.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])!==re.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Eh,re.HTML)}popUntilTableCellPopped(){this.popUntilPopped(XR,re.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(QR,re.HTML)}clearBackToTableBodyContext(){this.clearBackTo(KR,re.HTML)}clearBackToTableRowContext(){this.clearBackTo(GR,re.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===p.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===p.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case re.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case re.SVG:{if(Ky.has(o))return!1;break}case re.MATHML:{if(Gy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,_l)}hasInListItemScope(t){return this.hasInDynamicScope(t,YR)}hasInButtonScope(t){return this.hasInDynamicScope(t,WR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case re.HTML:{if(Eh.has(n))return!0;if(_l.has(n))return!1;break}case re.SVG:{if(Ky.has(n))return!1;break}case re.MATHML:{if(Gy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===re.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===re.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===re.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Yy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Wy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Wy.has(this.currentTagId);)this.pop()}}const yh=3;var Cr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Cr||(Cr={}));const Qy={type:Cr.Marker};class ZR{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,u=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===Cr.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===u&&this.treeAdapter.getNamespaceURI(h)===a){const m=this.treeAdapter.getAttrList(h);m.length===o&&r.push({idx:c,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<yh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<yh)return;const o=new Map(n.map(a=>[a.name,a.value]));let u=0;for(let a=0;a<r.length;a++){const c=r[a];c.attrs.every(f=>o.get(f.name)===f.value)&&(u+=1,u>=yh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Qy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Cr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Cr.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(Qy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Cr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Cr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Cr.Element&&n.element===t)}}const li={createDocument(){return{nodeName:"#document",mode:$n.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(u=>u.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};li.appendChild(e,u)}},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(li.isTextNode(n)){n.value+=t;return}}li.appendChild(e,li.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&li.isTextNode(r)?r.value+=t:li.insertBefore(e,li.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=U(U({},e.sourceCodeLocation),t)}},Xy="html",eL="about:legacy-compat",tL="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Jy=["+//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//"],nL=[...Jy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],rL=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Zy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],iL=[...Zy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function eT(e,t){return t.some(n=>e.startsWith(n))}function sL(e){return e.name===Xy&&e.publicId===null&&(e.systemId===null||e.systemId===eL)}function oL(e){if(e.name!==Xy)return $n.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===tL)return $n.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),rL.has(n))return $n.QUIRKS;let r=t===null?nL:Jy;if(eT(n,r))return $n.QUIRKS;if(r=t===null?Zy:iL,eT(n,r))return $n.LIMITED_QUIRKS}return $n.NO_QUIRKS}const tT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},uL="definitionurl",aL="definitionURL",lL=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])),cL=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:re.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:re.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:re.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:re.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:re.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:re.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:re.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:re.XML}],["xml:space",{prefix:"xml",name:"space",namespace:re.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:re.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:re.XMLNS}]]),fL=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])),dL=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function hL(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:r})=>r===qi.COLOR||r===qi.SIZE||r===qi.FACE)||dL.has(t)}function nT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===uL){e.attrs[t].name=aL;break}}function rT(e){for(let t=0;t<e.attrs.length;t++){const n=lL.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Th(e){for(let t=0;t<e.attrs.length;t++){const n=cL.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 pL(e){const t=fL.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Gs(e.tagName))}function mL(e,t){return t===re.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function gL(e,t,n){if(t===re.MATHML&&e===p.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===qi.ENCODING){const o=n[r].value.toLowerCase();return o===tT.TEXT_HTML||o===tT.APPLICATION_XML}}return t===re.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function EL(e,t,n,r){return(!r||r===re.HTML)&&gL(e,t,n)||(!r||r===re.MATHML)&&mL(e,t)}const yL="hidden",TL=8,bL=3;var P;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(P||(P={}));const _L={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},iT=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),sT={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:li,onParseError:null};class oT{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=P.INITIAL,this.originalInsertionMode=P.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=U(U({},sT),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 qR(this.options,this),this.activeFormattingElements=new ZR(this.treeAdapter),this.fragmentContextID=r?Gs(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new JR(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=U(U({},sT),n);t!=null||(t=r.treeAdapter.createElement(j.TEMPLATE,re.HTML,[]));const o=r.treeAdapter.createElement("documentmock",re.HTML,[]),u=new this(r,o,t);return u.fragmentContextID===p.TEMPLATE&&u.tmplInsertionModeStack.unshift(P.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}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 u=(o=t.location)!==null&&o!==void 0?o:_L,a={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:r?u.startLine:u.endLine,endCol:r?u.startCol:u.endCol,endOffset:r?u.startOffset:u.endOffset};this.onParseError(a)}onItemPush(t,n,r){var o,u;(u=(o=this.treeAdapter).onItemPush)===null||u===void 0||u.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 u,a;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,a=this.fragmentContextID):{current:u,currentTagId:a}=this.openElements,this._setContextModes(u,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===re.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,re.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=P.TEXT}switchToPlaintextParsing(){this.insertionMode=P.TEXT,this.originalInsertionMode=P.IN_BODY,this.tokenizer.state=At.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===j.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==re.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=At.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=At.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=At.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=At.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 a=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&Te(U({},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,re.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,re.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(j.HTML,re.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),u=r?o.lastIndexOf(r):o.length,a=o[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:f,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:f,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,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),u=n.type===qe.END_TAG&&o===n.tagName?{endTag:U({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===re.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,re.HTML)}_processToken(t){switch(t.type){case qe.CHARACTER:{this.onCharacter(t);break}case qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case qe.COMMENT:{this.onComment(t);break}case qe.DOCTYPE:{this.onDoctype(t);break}case qe.START_TAG:{this._processStartTag(t);break}case qe.END_TAG:{this.onEndTag(t);break}case qe.EOF:{this.onEof(t);break}case qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return EL(t,o,u,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Cr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const u=this.activeFormattingElements.entries[o];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=P.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=P.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=P.IN_TABLE;return}case p.BODY:{this.insertionMode=P.IN_BODY;return}case p.FRAMESET:{this.insertionMode=P.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?P.AFTER_HEAD:P.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===p.TEMPLATE)break;if(r===p.TABLE){this.insertionMode=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return iT.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===re.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return zR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){X6(this,t);return}switch(this.insertionMode){case P.INITIAL:{fu(this,t);break}case P.BEFORE_HTML:{du(this,t);break}case P.BEFORE_HEAD:{hu(this,t);break}case P.IN_HEAD:{pu(this,t);break}case P.IN_HEAD_NO_SCRIPT:{mu(this,t);break}case P.AFTER_HEAD:{gu(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{aT(this,t);break}case P.TEXT:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Sh(this,t);break}case P.IN_TABLE_TEXT:{gT(this,t);break}case P.IN_COLUMN_GROUP:{wl(this,t);break}case P.AFTER_BODY:{vl(this,t);break}case P.AFTER_AFTER_BODY:{kl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Q6(this,t);return}switch(this.insertionMode){case P.INITIAL:{fu(this,t);break}case P.BEFORE_HTML:{du(this,t);break}case P.BEFORE_HEAD:{hu(this,t);break}case P.IN_HEAD:{pu(this,t);break}case P.IN_HEAD_NO_SCRIPT:{mu(this,t);break}case P.AFTER_HEAD:{gu(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Sh(this,t);break}case P.IN_COLUMN_GROUP:{wl(this,t);break}case P.AFTER_BODY:{vl(this,t);break}case P.AFTER_AFTER_BODY:{kl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){_h(this,t);return}switch(this.insertionMode){case P.INITIAL:case P.BEFORE_HTML:case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_TEMPLATE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{_h(this,t);break}case P.IN_TABLE_TEXT:{Tu(this,t);break}case P.AFTER_BODY:{kL(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{NL(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{OL(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,Q.misplacedDoctype);break}case P.IN_TABLE_TEXT:{Tu(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?J6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{fu(this,t);break}case P.BEFORE_HTML:{IL(this,t);break}case P.BEFORE_HEAD:{RL(this,t);break}case P.IN_HEAD:{or(this,t);break}case P.IN_HEAD_NO_SCRIPT:{ML(this,t);break}case P.AFTER_HEAD:{BL(this,t);break}case P.IN_BODY:{en(this,t);break}case P.IN_TABLE:{Ks(this,t);break}case P.IN_TABLE_TEXT:{Tu(this,t);break}case P.IN_CAPTION:{L6(this,t);break}case P.IN_COLUMN_GROUP:{wh(this,t);break}case P.IN_TABLE_BODY:{Cl(this,t);break}case P.IN_ROW:{Al(this,t);break}case P.IN_CELL:{F6(this,t);break}case P.IN_SELECT:{TT(this,t);break}case P.IN_SELECT_IN_TABLE:{U6(this,t);break}case P.IN_TEMPLATE:{z6(this,t);break}case P.AFTER_BODY:{$6(this,t);break}case P.IN_FRAMESET:{V6(this,t);break}case P.AFTER_FRAMESET:{Y6(this,t);break}case P.AFTER_AFTER_BODY:{G6(this,t);break}case P.AFTER_AFTER_FRAMESET:{K6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Z6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{fu(this,t);break}case P.BEFORE_HTML:{PL(this,t);break}case P.BEFORE_HEAD:{LL(this,t);break}case P.IN_HEAD:{DL(this,t);break}case P.IN_HEAD_NO_SCRIPT:{FL(this,t);break}case P.AFTER_HEAD:{UL(this,t);break}case P.IN_BODY:{Sl(this,t);break}case P.TEXT:{w6(this,t);break}case P.IN_TABLE:{Eu(this,t);break}case P.IN_TABLE_TEXT:{Tu(this,t);break}case P.IN_CAPTION:{D6(this,t);break}case P.IN_COLUMN_GROUP:{M6(this,t);break}case P.IN_TABLE_BODY:{Ch(this,t);break}case P.IN_ROW:{yT(this,t);break}case P.IN_CELL:{B6(this,t);break}case P.IN_SELECT:{bT(this,t);break}case P.IN_SELECT_IN_TABLE:{H6(this,t);break}case P.IN_TEMPLATE:{j6(this,t);break}case P.AFTER_BODY:{xT(this,t);break}case P.IN_FRAMESET:{q6(this,t);break}case P.AFTER_FRAMESET:{W6(this,t);break}case P.AFTER_AFTER_BODY:{kl(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{fu(this,t);break}case P.BEFORE_HTML:{du(this,t);break}case P.BEFORE_HEAD:{hu(this,t);break}case P.IN_HEAD:{pu(this,t);break}case P.IN_HEAD_NO_SCRIPT:{mu(this,t);break}case P.AFTER_HEAD:{gu(this,t);break}case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{pT(this,t);break}case P.TEXT:{C6(this,t);break}case P.IN_TABLE_TEXT:{Tu(this,t);break}case P.IN_TEMPLATE:{_T(this,t);break}case P.AFTER_BODY:case P.IN_FRAMESET:case P.AFTER_FRAMESET:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{xh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.TEXT:case P.IN_COLUMN_GROUP:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{this._insertCharacters(t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:case P.AFTER_BODY:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{uT(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Sh(this,t);break}case P.IN_TABLE_TEXT:{mT(this,t);break}}}}function xL(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):hT(e,t),n}function SL(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 wL(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let u=0,a=o;a!==n;u++,a=o){o=e.openElements.getCommonAncestor(a);const c=e.activeFormattingElements.getElementEntry(a),f=c&&u>=bL;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(a)):(a=CL(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function CL(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 AL(e,t,n){const r=e.treeAdapter.getTagName(t),o=Gs(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);o===p.TEMPLATE&&u===re.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function vL(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,u=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,o.tagID)}function bh(e,t){for(let n=0;n<TL;n++){const r=xL(e,t);if(!r)break;const o=SL(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const u=wL(e,o,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(u),a&&AL(e,a,u),vL(e,o,r)}}function _h(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function kL(e,t){e._appendCommentNode(t,e.openElements.items[0])}function NL(e,t){e._appendCommentNode(t,e.document)}function xh(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 u=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(u);a&&!a.endTag&&e._setEndLocation(u,t)}}}}function OL(e,t){e._setDocumentType(t);const n=t.forceQuirks?$n.QUIRKS:oL(t);sL(t)||e._err(t,Q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function fu(e,t){e._err(t,Q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,$n.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function IL(e,t){t.tagID===p.HTML?(e._insertElement(t,re.HTML),e.insertionMode=P.BEFORE_HEAD):du(e,t)}function PL(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&du(e,t)}function du(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function RL(e,t){switch(t.tagID){case p.HTML:{en(e,t);break}case p.HEAD:{e._insertElement(t,re.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:hu(e,t)}}function LL(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?hu(e,t):e._err(t,Q.endTagWithoutMatchingOpenElement)}function hu(e,t){e._insertFakeElement(j.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function or(e,t){switch(t.tagID){case p.HTML:{en(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,At.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,At.RAWTEXT):(e._insertElement(t,re.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,At.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,At.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=P.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(P.IN_TEMPLATE);break}case p.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:pu(e,t)}}function DL(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=P.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{pu(e,t);break}case p.TEMPLATE:{Yi(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function Yi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,Q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Q.endTagWithoutMatchingOpenElement)}function pu(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function ML(e,t){switch(t.tagID){case p.HTML:{en(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{or(e,t);break}case p.NOSCRIPT:{e._err(t,Q.nestedNoscriptInHead);break}default:mu(e,t)}}function FL(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case p.BR:{mu(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function mu(e,t){const n=t.type===qe.EOF?Q.openElementsLeftAfterEof:Q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function BL(e,t){switch(t.tagID){case p.HTML:{en(e,t);break}case p.BODY:{e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=P.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,re.HTML),e.insertionMode=P.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,Q.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),or(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:gu(e,t)}}function UL(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{gu(e,t);break}case p.TEMPLATE:{Yi(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function gu(e,t){e._insertFakeElement(j.BODY,p.BODY),e.insertionMode=P.IN_BODY,xl(e,t)}function xl(e,t){switch(t.type){case qe.CHARACTER:{aT(e,t);break}case qe.WHITESPACE_CHARACTER:{uT(e,t);break}case qe.COMMENT:{_h(e,t);break}case qe.START_TAG:{en(e,t);break}case qe.END_TAG:{Sl(e,t);break}case qe.EOF:{pT(e,t);break}}}function uT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function aT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function HL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function zL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function jL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_FRAMESET)}function $L(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML)}function VL(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Eh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,re.HTML)}function qL(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function YL(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),n||(e.formElement=e.openElements.current))}function WL(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===p.LI&&o===p.LI||(n===p.DD||n===p.DT)&&(o===p.DD||o===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==p.ADDRESS&&o!==p.DIV&&o!==p.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML)}function GL(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.tokenizer.state=At.PLAINTEXT}function KL(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.framesetOk=!1}function QL(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(bh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function XL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function JL(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(bh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ZL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function e6(e,t){e.treeAdapter.getDocumentMode(e.document)!==$n.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function lT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,re.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function cT(e){const t=jy(e,qi.TYPE);return t!=null&&t.toLowerCase()===yL}function t6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,re.HTML),cT(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function n6(e,t){e._appendElement(t,re.HTML),t.ackSelfClosing=!0}function r6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,re.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function i6(e,t){t.tagName=j.IMG,t.tagID=p.IMG,lT(e,t)}function s6(e,t){e._insertElement(t,re.HTML),e.skipNextNewLine=!0,e.tokenizer.state=At.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function o6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,At.RAWTEXT)}function u6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,At.RAWTEXT)}function fT(e,t){e._switchToTextParsing(t,At.RAWTEXT)}function a6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===P.IN_TABLE||e.insertionMode===P.IN_CAPTION||e.insertionMode===P.IN_TABLE_BODY||e.insertionMode===P.IN_ROW||e.insertionMode===P.IN_CELL?P.IN_SELECT_IN_TABLE:P.IN_SELECT}function l6(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML)}function c6(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,re.HTML)}function f6(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,re.HTML)}function d6(e,t){e._reconstructActiveFormattingElements(),nT(t),Th(t),t.selfClosing?e._appendElement(t,re.MATHML):e._insertElement(t,re.MATHML),t.ackSelfClosing=!0}function h6(e,t){e._reconstructActiveFormattingElements(),rT(t),Th(t),t.selfClosing?e._appendElement(t,re.SVG):e._insertElement(t,re.SVG),t.ackSelfClosing=!0}function dT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML)}function en(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{XL(e,t);break}case p.A:{QL(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{VL(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{$L(e,t);break}case p.LI:case p.DD:case p.DT:{WL(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{lT(e,t);break}case p.HR:{r6(e,t);break}case p.RB:case p.RTC:{c6(e,t);break}case p.RT:case p.RP:{f6(e,t);break}case p.PRE:case p.LISTING:{qL(e,t);break}case p.XMP:{o6(e,t);break}case p.SVG:{h6(e,t);break}case p.HTML:{HL(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{or(e,t);break}case p.BODY:{zL(e,t);break}case p.FORM:{YL(e,t);break}case p.NOBR:{JL(e,t);break}case p.MATH:{d6(e,t);break}case p.TABLE:{e6(e,t);break}case p.INPUT:{t6(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{n6(e,t);break}case p.IMAGE:{i6(e,t);break}case p.BUTTON:{KL(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{ZL(e,t);break}case p.IFRAME:{u6(e,t);break}case p.SELECT:{a6(e,t);break}case p.OPTION:case p.OPTGROUP:{l6(e,t);break}case p.NOEMBED:case p.NOFRAMES:{fT(e,t);break}case p.FRAMESET:{jL(e,t);break}case p.TEXTAREA:{s6(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?fT(e,t):dT(e,t);break}case p.PLAINTEXT:{GL(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:dT(e,t)}}function p6(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function m6(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,xT(e,t))}function g6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function E6(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function y6(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(j.P,p.P),e._closePElement()}function T6(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function b6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function _6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function x6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function S6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function hT(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const u=e.openElements.items[o],a=e.openElements.tagIDs[o];if(r===a&&(r!==p.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(u,a))break}}function Sl(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{bh(e,t);break}case p.P:{y6(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{g6(e,t);break}case p.LI:{T6(e);break}case p.DD:case p.DT:{b6(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{_6(e);break}case p.BR:{S6(e);break}case p.BODY:{p6(e,t);break}case p.HTML:{m6(e,t);break}case p.FORM:{E6(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{x6(e,t);break}case p.TEMPLATE:{Yi(e,t);break}default:hT(e,t)}}function pT(e,t){e.tmplInsertionModeStack.length>0?_T(e,t):xh(e,t)}function w6(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function C6(e,t){e._err(t,Q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Sh(e,t){if(e.openElements.currentTagId!==void 0&&iT.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=P.IN_TABLE_TEXT,t.type){case qe.CHARACTER:{gT(e,t);break}case qe.WHITESPACE_CHARACTER:{mT(e,t);break}}else yu(e,t)}function A6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_CAPTION}function v6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function k6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,p.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,wh(e,t)}function N6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_TABLE_BODY}function O6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,p.TBODY),e.insertionMode=P.IN_TABLE_BODY,Cl(e,t)}function I6(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function P6(e,t){cT(t)?e._appendElement(t,re.HTML):yu(e,t),t.ackSelfClosing=!0}function R6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,re.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ks(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{O6(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{or(e,t);break}case p.COL:{k6(e,t);break}case p.FORM:{R6(e,t);break}case p.TABLE:{I6(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{N6(e,t);break}case p.INPUT:{P6(e,t);break}case p.CAPTION:{A6(e,t);break}case p.COLGROUP:{v6(e,t);break}default:yu(e,t)}}function Eu(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Yi(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:yu(e,t)}}function yu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,xl(e,t),e.fosterParentingEnabled=n}function mT(e,t){e.pendingCharacterTokens.push(t)}function gT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Tu(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)yu(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([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function L6(e,t){const n=t.tagID;ET.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,Ks(e,t)):en(e,t)}function D6(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,n===p.TABLE&&Eu(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Sl(e,t)}}function wh(e,t){switch(t.tagID){case p.HTML:{en(e,t);break}case p.COL:{e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{or(e,t);break}default:wl(e,t)}}function M6(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case p.TEMPLATE:{Yi(e,t);break}case p.COL:break;default:wl(e,t)}}function wl(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function Cl(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,p.TR),e.insertionMode=P.IN_ROW,Al(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,Ks(e,t));break}default:Ks(e,t)}}function Ch(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,Eu(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:Eu(e,t)}}function Al(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,Cl(e,t));break}default:Ks(e,t)}}function yT(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,Ch(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,Ch(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:Eu(e,t)}}function F6(e,t){const n=t.tagID;ET.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),Al(e,t)):en(e,t)}function B6(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),yT(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Sl(e,t)}}function TT(e,t){switch(t.tagID){case p.HTML:{en(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,re.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,re.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{or(e,t);break}}}function bT(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Yi(e,t);break}}}function U6(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):TT(e,t)}function H6(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):bT(e,t)}function z6(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{or(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=P.IN_TABLE,e.insertionMode=P.IN_TABLE,Ks(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,wh(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,Cl(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,Al(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,en(e,t)}}function j6(e,t){t.tagID===p.TEMPLATE&&Yi(e,t)}function _T(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):xh(e,t)}function $6(e,t){t.tagID===p.HTML?en(e,t):vl(e,t)}function xT(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=P.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else vl(e,t)}function vl(e,t){e.insertionMode=P.IN_BODY,xl(e,t)}function V6(e,t){switch(t.tagID){case p.HTML:{en(e,t);break}case p.FRAMESET:{e._insertElement(t,re.HTML);break}case p.FRAME:{e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{or(e,t);break}}}function q6(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=P.AFTER_FRAMESET))}function Y6(e,t){switch(t.tagID){case p.HTML:{en(e,t);break}case p.NOFRAMES:{or(e,t);break}}}function W6(e,t){t.tagID===p.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function G6(e,t){t.tagID===p.HTML?en(e,t):kl(e,t)}function kl(e,t){e.insertionMode=P.IN_BODY,xl(e,t)}function K6(e,t){switch(t.tagID){case p.HTML:{en(e,t);break}case p.NOFRAMES:{or(e,t);break}}}function Q6(e,t){t.chars=ht,e._insertCharacters(t)}function X6(e,t){e._insertCharacters(t),e.framesetOk=!1}function ST(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==re.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function J6(e,t){if(hL(t))ST(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===re.MATHML?nT(t):r===re.SVG&&(pL(t),rT(t)),Th(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Z6(e,t){if(t.tagID===p.P||t.tagID===p.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)===re.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const e4=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,t4=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),wT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function CT(e,t){const n=f4(e),r=Fy("type",{handlers:{root:n4,element:r4,text:i4,comment:vT,doctype:s4,raw:u4},unknown:a4}),o={parser:n?new oT(wT):oT.getFragmentParser(void 0,wT),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Qs(o,Sr());const u=n?o.parser.document:o.parser.getFragment(),a=nR(u,{file:o.options.file});return o.stitches&&El(a,"comment",function(c,f,h){const m=c;if(m.value.stitch&&h&&f!==void 0){const E=h.children;return E[f]=m.value.stitch,f}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function AT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function n4(e,t){AT(e.children,t)}function r4(e,t){l4(e,t),AT(e.children,t),c4(e,t)}function i4(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:bu(e)};Qs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function s4(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:bu(e)};Qs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function o4(e,t){t.stitches=!0;const n=d4(e);if("children"in e&&"children"in n){const r=CT({type:"root",children:e.children},t.options);n.children=r.children}vT({type:"comment",value:{stitch:n}},t)}function vT(e,t){const n=e.value,r={type:qe.COMMENT,data:n,location:bu(e)};Qs(t,Sr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function u4(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,kT(t,Sr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(e4,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function a4(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))o4(n,t);else{let r="";throw t4.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Qs(e,t){kT(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=At.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 kT(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 l4(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===At.PLAINTEXT)return;Qs(t,Sr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:$i.html;o===$i.html&&n==="svg"&&(o=$i.svg);const u=ER(Te(U({},e),{children:[]}),{space:o===$i.svg?"svg":"html"}),a={type:qe.START_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in u?u.attrs:[],location:bu(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function c4(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&CR.includes(n)||t.parser.tokenizer.state===At.PLAINTEXT)return;Qs(t,ol(e));const r={type:qe.END_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:bu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===At.RCDATA||t.parser.tokenizer.state===At.RAWTEXT||t.parser.tokenizer.state===At.SCRIPT_DATA)&&(t.parser.tokenizer.state=At.DATA)}function f4(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function bu(e){const t=Sr(e)||{line:void 0,column:void 0,offset:void 0},n=ol(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 d4(e){return"children"in e?$s(Te(U({},e),{children:[]})):$s(e)}function h4(e){return function(t,n){return CT(t,Te(U({},e),{file:n}))}}function NT(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 p4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function m4(e,t,n){const o=ml((n||{}).ignore||[]),u=g4(t);let a=-1;for(;++a<u.length;)uy(e,"text",c);function c(h,m){let E=-1,b;for(;++E<m.length;){const T=m[E],_=b?b.children:void 0;if(o(T,_?_.indexOf(T):void 0,b))return;b=T}if(b)return f(h,m)}function f(h,m){const E=m[m.length-1],b=u[a][0],T=u[a][1];let _=0;const C=E.children.indexOf(h);let I=!1,B=[];b.lastIndex=0;let L=b.exec(h.value);for(;L;){const q=L.index,X={index:L.index,input:L.input,stack:[...m,h]};let F=T(...L,X);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?b.lastIndex=q+1:(_!==q&&B.push({type:"text",value:h.value.slice(_,q)}),Array.isArray(F)?B.push(...F):F&&B.push(F),_=q+L[0].length,I=!0),!b.global)break;L=b.exec(h.value)}return I?(_<h.value.length&&B.push({type:"text",value:h.value.slice(_)}),E.children.splice(C,1,...B)):B=[h],C+B.length}}function g4(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([E4(o[0]),y4(o[1])])}return t}function E4(e){return typeof e=="string"?new RegExp(p4(e),"g"):e}function y4(e){return typeof e=="function"?e:function(){return e}}const Ah="phrasing",vh=["autolink","link","image","label"];function T4(){return{transforms:[A4],enter:{literalAutolink:_4,literalAutolinkEmail:kh,literalAutolinkHttp:kh,literalAutolinkWww:kh},exit:{literalAutolink:C4,literalAutolinkEmail:w4,literalAutolinkHttp:x4,literalAutolinkWww:S4}}}function b4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ah,notInConstruct:vh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ah,notInConstruct:vh},{character:":",before:"[ps]",after:"\\/",inConstruct:Ah,notInConstruct:vh}]}}function _4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function kh(e){this.config.enter.autolinkProtocol.call(this,e)}function x4(e){this.config.exit.autolinkProtocol.call(this,e)}function S4(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 w4(e){this.config.exit.autolinkEmail.call(this,e)}function C4(e){this.exit(e)}function A4(e){m4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,v4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),k4]],{ignore:["link","linkReference"]})}function v4(e,t,n,r,o){let u="";if(!OT(o)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!N4(n)))return!1;const a=O4(n+r);if(!a[0])return!1;const c={type:"link",title:null,url:u+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function k4(e,t,n,r){return!OT(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function N4(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 O4(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=NT(e,"(");let u=NT(e,")");for(;r!==-1&&o>u;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),u++;return[e,n]}function OT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ji(n)||al(n))&&(!t||n!==47)}IT.peek=U4;function I4(){this.buffer()}function P4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function R4(){this.buffer()}function L4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function D4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=sr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function M4(e){this.exit(e)}function F4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=sr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function B4(e){this.exit(e)}function U4(){return"["}function IT(e,t,n,r){const o=n.createTracker(r);let u=o.move("[^");const a=n.enter("footnoteReference"),c=n.enter("reference");return u+=o.move(n.safe(n.associationId(e),{after:"]",before:u})),c(),a(),u+=o.move("]"),u}function H4(){return{enter:{gfmFootnoteCallString:I4,gfmFootnoteCall:P4,gfmFootnoteDefinitionLabelString:R4,gfmFootnoteDefinition:L4},exit:{gfmFootnoteCallString:D4,gfmFootnoteCall:M4,gfmFootnoteDefinitionLabelString:F4,gfmFootnoteDefinition:B4}}}function z4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:IT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,u,a){const c=u.createTracker(a);let f=c.move("[^");const h=u.enter("footnoteDefinition"),m=u.enter("label");return f+=c.move(u.safe(u.associationId(r),{before:f,after:"]"})),m(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
29
+ `:" ")+u.indentLines(u.containerFlow(r,c.current()),t?PT:j4))),h(),f}}function j4(e,t,n){return t===0?e:PT(e,t,n)}function PT(e,t,n){return(n?"":" ")+e}const $4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];RT.peek=G4;function V4(){return{canContainEols:["delete"],enter:{strikethrough:Y4},exit:{strikethrough:W4}}}function q4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$4}],handlers:{delete:RT}}}function Y4(e){this.enter({type:"delete",children:[]},e)}function W4(e){this.exit(e)}function RT(e,t,n,r){const o=n.createTracker(r),u=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,Te(U({},o.current()),{before:a,after:"~"})),a+=o.move("~~"),u(),a}function G4(){return"~"}function K4(e){return e.length}function Q4(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||K4,u=[],a=[],c=[],f=[];let h=0,m=-1;for(;++m<e.length;){const S=[],C=[];let I=-1;for(e[m].length>h&&(h=e[m].length);++I<e[m].length;){const B=X4(e[m][I]);if(n.alignDelimiters!==!1){const L=o(B);C[I]=L,(f[I]===void 0||L>f[I])&&(f[I]=L)}S.push(B)}a[m]=S,c[m]=C}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<h;)u[E]=LT(r[E]);else{const S=LT(r);for(;++E<h;)u[E]=S}E=-1;const b=[],T=[];for(;++E<h;){const S=u[E];let C="",I="";S===99?(C=":",I=":"):S===108?C=":":S===114&&(I=":");let B=n.alignDelimiters===!1?1:Math.max(1,f[E]-C.length-I.length);const L=C+"-".repeat(B)+I;n.alignDelimiters!==!1&&(B=C.length+B+I.length,B>f[E]&&(f[E]=B),T[E]=B),b[E]=L}a.splice(1,0,b),c.splice(1,0,T),m=-1;const _=[];for(;++m<a.length;){const S=a[m],C=c[m];E=-1;const I=[];for(;++E<h;){const B=S[E]||"";let L="",q="";if(n.alignDelimiters!==!1){const X=f[E]-(C[E]||0),F=u[E];F===114?L=" ".repeat(X):F===99?X%2?(L=" ".repeat(X/2+.5),q=" ".repeat(X/2-.5)):(L=" ".repeat(X/2),q=L):q=" ".repeat(X)}n.delimiterStart!==!1&&!E&&I.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&B==="")&&(n.delimiterStart!==!1||E)&&I.push(" "),n.alignDelimiters!==!1&&I.push(L),I.push(B),n.alignDelimiters!==!1&&I.push(q),n.padding!==!1&&I.push(" "),(n.delimiterEnd!==!1||E!==h-1)&&I.push("|")}_.push(n.delimiterEnd===!1?I.join("").replace(/ +$/,""):I.join(""))}return _.join(`
30
+ `)}function X4(e){return e==null?"":String(e)}function LT(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 J4(e,t,n,r){const o=n.enter("blockquote"),u=n.createTracker(r);u.move("> "),u.shift(2);const a=n.indentLines(n.containerFlow(e,u.current()),Z4);return o(),a}function Z4(e,t,n){return">"+(n?"":" ")+e}function eD(e,t){return DT(e,t.inConstruct,!0)&&!DT(e,t.notInConstruct,!1)}function DT(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 MT(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
31
+ `&&eD(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
32
+ `}function tD(e,t){const n=String(e);let r=n.indexOf(t),o=r,u=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++u>a&&(a=u):u=1,o=r+t.length,r=n.indexOf(t,o);return a}function nD(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 rD(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 iD(e,t,n,r){const o=rD(n),u=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(nD(e,n)){const E=n.enter("codeIndented"),b=n.indentLines(u,sD);return E(),b}const c=n.createTracker(r),f=o.repeat(Math.max(tD(u,o)+1,3)),h=n.enter("codeFenced");let m=c.move(f);if(e.lang){const E=n.enter(`codeFencedLang${a}`);m+=c.move(n.safe(e.lang,U({before:m,after:" ",encode:["`"]},c.current()))),E()}if(e.lang&&e.meta){const E=n.enter(`codeFencedMeta${a}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,U({before:m,after:`
33
+ `,encode:["`"]},c.current()))),E()}return m+=c.move(`
34
+ `),u&&(m+=c.move(u+`
35
+ `)),m+=c.move(f),h(),m}function sD(e,t,n){return(n?"":" ")+e}function Nh(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 oD(e,t,n,r){const o=Nh(n),u=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let c=n.enter("label");const f=n.createTracker(r);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),U({before:h,after:"]"},f.current()))),h+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,U({before:h,after:">"},f.current()))),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,U({before:h,after:e.title?" ":`
36
+ `},f.current())))),c(),e.title&&(c=n.enter(`title${u}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,U({before:h,after:o},f.current()))),h+=f.move(o),c()),a(),h}function uD(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 _u(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Nl(e,t,n){const r=zs(e),o=zs(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}}FT.peek=aD;function FT(e,t,n,r){const o=uD(n),u=n.enter("emphasis"),a=n.createTracker(r),c=a.move(o);let f=a.move(n.containerPhrasing(e,U({after:o,before:c},a.current())));const h=f.charCodeAt(0),m=Nl(r.before.charCodeAt(r.before.length-1),h,o);m.inside&&(f=_u(h)+f.slice(1));const E=f.charCodeAt(f.length-1),b=Nl(r.after.charCodeAt(0),E,o);b.inside&&(f=f.slice(0,-1)+_u(E));const T=a.move(o);return u(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+T}function aD(e,t,n){return n.options.emphasis||"*"}function lD(e,t){let n=!1;return El(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Qd}),!!((!e.depth||e.depth<3)&&Ud(e)&&(t.options.setext||n))}function cD(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(r);if(lD(e,n)){const m=n.enter("headingSetext"),E=n.enter("phrasing"),b=n.containerPhrasing(e,Te(U({},u.current()),{before:`
46
37
  `,after:`
47
- `}));return y(),g(),b+`
38
+ `}));return E(),m(),b+`
48
39
  `+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
49
- `))+1))}const l="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");u.move(l+" ");let h=n.containerPhrasing(e,G({before:"# ",after:`
50
- `},u.current()));return/^[\t ]/.test(h)&&(h=Mo(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),d(),c(),h}sE.peek=IO;function sE(e){return e.value||""}function IO(){return"<"}oE.peek=OO;function oE(e,t,n,r){const o=nd(n),u=o==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,G({before:h,after:"]"},d.current()))),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,G({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,G({before:h,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${u}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,G({before:h,after:o},d.current()))),h+=d.move(o),c()),h+=d.move(")"),l(),h}function OO(){return"!"}uE.peek=PO;function uE(e,t,n,r){const o=e.referenceType,u=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const h=n.safe(e.alt,G({before:d,after:"]"},c.current()));d+=c.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const y=n.safe(n.associationId(e),G({before:d,after:"]"},c.current()));return l(),n.stack=g,u(),o==="full"||!h||h!==y?d+=c.move(y+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function PO(){return"!"}aE.peek=RO;function aE(e,t,n){let r=e.value||"",o="`",u=-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+" ");++u<n.unsafe.length;){const l=n.unsafe[u],c=n.compilePattern(l);let d;if(l.atBreak)for(;d=c.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return o+r+o}function RO(){return"`"}function lE(e,t){const n=df(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))}cE.peek=LO;function cE(e,t,n,r){const o=nd(n),u=o==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(lE(e,n)){const g=n.stack;n.stack=[],c=n.enter("autolink");let y=l.move("<");return y+=l.move(n.containerPhrasing(e,G({before:y,after:">"},l.current()))),y+=l.move(">"),c(),n.stack=g,y}c=n.enter("link"),d=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,G({before:h,after:"]("},l.current()))),h+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,G({before:h,after:">"},l.current()))),h+=l.move(">")):(d=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,G({before:h,after:e.title?" ":")"},l.current())))),d(),e.title&&(d=n.enter(`title${u}`),h+=l.move(" "+o),h+=l.move(n.safe(e.title,G({before:h,after:o},l.current()))),h+=l.move(o),d()),h+=l.move(")"),c(),h}function LO(e,t,n){return lE(e,n)?"<":"["}fE.peek=DO;function fE(e,t,n,r){const o=e.referenceType,u=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const h=n.containerPhrasing(e,G({before:d,after:"]"},c.current()));d+=c.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const y=n.safe(n.associationId(e),G({before:d,after:"]"},c.current()));return l(),n.stack=g,u(),o==="full"||!h||h!==y?d+=c.move(y+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function DO(){return"["}function rd(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 MO(e){const t=rd(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 FO(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 dE(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 BO(e,t,n,r){const o=n.enter("list"),u=n.bulletCurrent;let l=e.ordered?FO(n):rd(n);const c=e.ordered?l==="."?")":".":MO(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&g&&(!g.children||!g.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),dE(n)===l&&g){let y=-1;for(;++y<e.children.length;){const b=e.children[y];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const h=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=u,o(),h}function UO(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 HO(e,t,n,r){const o=UO(n);let u=n.bulletCurrent||rd(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let l=u.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(u+" ".repeat(l-u.length)),c.shift(l);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),g);return d(),h;function g(y,b,T){return b?(T?"":" ".repeat(l))+y:(T?u:u+" ".repeat(l-u.length))+y}}function zO(e,t,n,r){const o=n.enter("paragraph"),u=n.enter("phrasing"),l=n.containerPhrasing(e,r);return u(),o(),l}const jO=ya(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $O(e,t,n,r){return(e.children.some(function(l){return jO(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function VO(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}hE.peek=qO;function hE(e,t,n,r){const o=VO(n),u=n.enter("strong"),l=n.createTracker(r),c=l.move(o+o);let d=l.move(n.containerPhrasing(e,G({after:o,before:c},l.current())));const h=d.charCodeAt(0),g=Pa(r.before.charCodeAt(r.before.length-1),h,o);g.inside&&(d=Mo(h)+d.slice(1));const y=d.charCodeAt(d.length-1),b=Pa(r.after.charCodeAt(0),y,o);b.inside&&(d=d.slice(0,-1)+Mo(y));const T=l.move(o+o);return u(),n.attentionEncodeSurroundingInfo={after:b.outside,before:g.outside},c+d+T}function qO(e,t,n){return n.options.strong||"*"}function YO(e,t,n,r){return n.safe(e.value,r)}function WO(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 GO(e,t,n){const r=(dE(n)+(n.options.ruleSpaces?" ":"")).repeat(WO(n));return n.options.ruleSpaces?r.slice(0,-1):r}const pE={blockquote:EO,break:rE,code:xO,definition:AO,emphasis:iE,hardBreak:rE,heading:NO,html:sE,image:oE,imageReference:uE,inlineCode:aE,link:cE,linkReference:fE,list:BO,listItem:HO,paragraph:zO,root:$O,strong:hE,text:YO,thematicBreak:GO};function KO(){return{enter:{table:QO,tableData:mE,tableHeader:mE,tableRow:JO},exit:{codeText:ZO,table:XO,tableData:id,tableHeader:id,tableRow:id}}}function QO(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 XO(e){this.exit(e),this.data.inTable=void 0}function JO(e){this.enter({type:"tableRow",children:[]},e)}function id(e){this.exit(e)}function mE(e){this.enter({type:"tableCell",children:[]},e)}function ZO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,eP));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function eP(e,t){return t==="|"?t:e}function tP(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:d,tableRow:c}};function l(T,S,k,P){return h(g(T,k,P),T.align)}function c(T,S,k,P){const L=y(T,k,P),H=h([L]);return H.slice(0,H.indexOf(`
52
- `))}function d(T,S,k,P){const L=k.enter("tableCell"),H=k.enter("phrasing"),$=k.containerPhrasing(T,He(G({},P),{before:u,after:u}));return H(),L(),$}function h(T,S){return mO(T,{align:S,alignDelimiters:r,padding:n,stringLength:o})}function g(T,S,k){const P=T.children;let L=-1;const H=[],$=S.enter("table");for(;++L<P.length;)H[L]=y(P[L],S,k);return $(),H}function y(T,S,k){const P=T.children;let L=-1;const H=[],$=S.enter("tableRow");for(;++L<P.length;)H[L]=d(P[L],T,S,k);return $(),H}function b(T,S,k){let P=pE.inlineCode(T,S,k);return k.stack.includes("tableCell")&&(P=P.replace(/\|/g,"\\$&")),P}}function nP(){return{exit:{taskListCheckValueChecked:gE,taskListCheckValueUnchecked:gE,paragraph:iP}}}function rP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sP}}}function gE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function iP(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 u=-1,l;for(;++u<o.length;){const c=o[u];if(c.type==="paragraph"){l=c;break}}l===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 sP(e,t,n,r){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);u&&c.move(l);let d=pE.listItem(e,t,n,G(G({},r),c.current()));return u&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(g){return g+l}}function oP(){return[BI(),sO(),lO(),KO(),nP()]}function uP(e){return{extensions:[UI(),oO(e),cO(),tP(e),rP()]}}const aP={tokenize:pP,partial:!0},EE={tokenize:mP,partial:!0},yE={tokenize:gP,partial:!0},TE={tokenize:EP,partial:!0},lP={tokenize:yP,partial:!0},bE={name:"wwwAutolink",tokenize:dP,previous:SE},_E={name:"protocolAutolink",tokenize:hP,previous:xE},Ar={name:"emailAutolink",tokenize:fP,previous:CE},cr={};function cP(){return{text:cr}}let Ai=48;for(;Ai<123;)cr[Ai]=Ar,Ai++,Ai===58?Ai=65:Ai===91&&(Ai=97);cr[43]=Ar,cr[45]=Ar,cr[46]=Ar,cr[95]=Ar,cr[72]=[Ar,_E],cr[104]=[Ar,_E],cr[87]=[Ar,bE],cr[119]=[Ar,bE];function fP(e,t,n){const r=this;let o,u;return l;function l(y){return!sd(y)||!CE.call(r,r.previous)||od(r.events)?n(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(y))}function c(y){return sd(y)?(e.consume(y),c):y===64?(e.consume(y),d):n(y)}function d(y){return y===46?e.check(lP,g,h)(y):y===45||y===95||Qt(y)?(u=!0,e.consume(y),d):g(y)}function h(y){return e.consume(y),o=!0,d}function g(y){return u&&o&&rn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(y)):n(y)}}function dP(e,t,n){const r=this;return o;function o(l){return l!==87&&l!==119||!SE.call(r,r.previous)||od(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(aP,e.attempt(EE,e.attempt(yE,u),n),n)(l))}function u(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function hP(e,t,n){const r=this;let o="",u=!1;return l;function l(y){return(y===72||y===104)&&xE.call(r,r.previous)&&!od(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(y),e.consume(y),c):n(y)}function c(y){if(rn(y)&&o.length<5)return o+=String.fromCodePoint(y),e.consume(y),c;if(y===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(y),d}return n(y)}function d(y){return y===47?(e.consume(y),u?h:(u=!0,d)):n(y)}function h(y){return y===null||ca(y)||it(y)||bi(y)||fa(y)?n(y):e.attempt(EE,e.attempt(yE,g),n)(y)}function g(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(y)}}function pP(e,t,n){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),u):n(l)}function u(l){return l===null?n(l):t(l)}}function mP(e,t,n){let r,o,u;return l;function l(h){return h===46||h===95?e.check(TE,d,c)(h):h===null||it(h)||bi(h)||h!==45&&fa(h)?d(h):(u=!0,e.consume(h),l)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),l}function d(h){return o||r||!u?n(h):t(h)}}function gP(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r<n?u(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(TE,t,u)(l):l===null||it(l)||bi(l)?t(l):(e.consume(l),o)}function u(l){return l===41&&r++,e.consume(l),o}}function EP(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),u):c===93?(e.consume(c),o):c===60||c===null||it(c)||bi(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||it(c)||bi(c)?t(c):r(c)}function u(c){return rn(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):rn(c)?(e.consume(c),l):n(c)}}function yP(e,t,n){return r;function r(u){return e.consume(u),o}function o(u){return Qt(u)?n(u):t(u)}}function SE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||it(e)}function xE(e){return!rn(e)}function CE(e){return!(e===47||sd(e))}function sd(e){return e===43||e===45||e===46||e===95||Qt(e)}function od(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 TP={tokenize:wP,partial:!0};function bP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:CP,continuation:{tokenize:AP},exit:kP}},text:{91:{name:"gfmFootnoteCall",tokenize:xP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_P,resolveTo:SP}}}}function _P(e,t,n){const r=this;let o=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){l=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(!l||!l._balanced)return n(d);const h=Yn(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function SP(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 u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",u,t],["enter",l,t],["exit",l,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function xP(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,l;return c;function c(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),d}function d(y){return y!==94?n(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(y){if(u>999||y===93&&!l||y===null||y===91||it(y))return n(y);if(y===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(Yn(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(y)}return it(y)||(l=!0),u++,e.consume(y),y===92?g:h}function g(y){return y===91||y===92||y===93?(e.consume(y),u++,h):h(y)}}function CP(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,l=0,c;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(S)}function g(S){if(l>999||S===93&&!c||S===null||S===91||it(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return u=Yn(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return it(S)||(c=!0),l++,e.consume(S),S===92?y:g}function y(S){return S===91||S===92||S===93?(e.consume(S),l++,g):g(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),o.includes(u)||o.push(u),Xe(e,T,"gfmFootnoteDefinitionWhitespace")):n(S)}function T(S){return t(S)}}function AP(e,t,n){return e.check(yo,t,e.attempt(TP,t,n))}function kP(e){e.exit("gfmFootnoteDefinition")}function wP(e,t,n){const r=this;return Xe(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(u):n(u)}}function vP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(l,c){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let h=d;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[d][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[d][1].end)},y={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[d][1].start)},b=[["enter",g,c],["enter",l[h][1],c],["exit",l[h][1],c],["enter",y,c]],T=c.parser.constructs.insideSpan.null;T&&Cn(b,b.length,0,da(T,l.slice(h+1,d),c)),Cn(b,b.length,0,[["exit",y,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",g,c]]),Cn(l,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function u(l,c,d){const h=this.previous,g=this.events;let y=0;return b;function b(S){return h===126&&g[g.length-1][1].type!=="characterEscape"?d(S):(l.enter("strikethroughSequenceTemporary"),T(S))}function T(S){const k=us(h);if(S===126)return y>1?d(S):(l.consume(S),y++,T);if(y<2&&!n)return d(S);const P=l.exit("strikethroughSequenceTemporary"),L=us(S);return P._open=!L||L===2&&!!k,P._close=!k||k===2&&!!L,c(S)}}}class NP{constructor(){this.map=[]}add(t,n,r){IP(this,t,n,r)}consume(t){if(this.map.sort(function(u,l){return u[0]-l[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 u of o)t.push(u);o=r.pop()}this.map.length=0}}function IP(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 OP(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 u=r.length-1;r[u]=r[u]==="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 PP(){return{flow:{null:{name:"table",tokenize:RP,resolveAll:LP}}}}function RP(e,t,n){const r=this;let o=0,u=0,l;return c;function c(U){let ge=r.events.length-1;for(;ge>-1;){const le=r.events[ge][1].type;if(le==="lineEnding"||le==="linePrefix")ge--;else break}const me=ge>-1?r.events[ge][1].type:null,pe=me==="tableHead"||me==="tableRow"?M:d;return pe===M&&r.parser.lazy[r.now().line]?n(U):pe(U)}function d(U){return e.enter("tableHead"),e.enter("tableRow"),h(U)}function h(U){return U===124||(l=!0,u+=1),g(U)}function g(U){return U===null?n(U):Oe(U)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),T):n(U):Ge(U)?Xe(e,g,"whitespace")(U):(u+=1,l&&(l=!1,o+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),l=!0,g):(e.enter("data"),y(U)))}function y(U){return U===null||U===124||it(U)?(e.exit("data"),g(U)):(e.consume(U),U===92?b:y)}function b(U){return U===92||U===124?(e.consume(U),y):y(U)}function T(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(U):(e.enter("tableDelimiterRow"),l=!1,Ge(U)?Xe(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):S(U))}function S(U){return U===45||U===58?P(U):U===124?(l=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),k):he(U)}function k(U){return Ge(U)?Xe(e,P,"whitespace")(U):P(U)}function P(U){return U===58?(u+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),L):U===45?(u+=1,L(U)):U===null||Oe(U)?Z(U):he(U)}function L(U){return U===45?(e.enter("tableDelimiterFiller"),H(U)):he(U)}function H(U){return U===45?(e.consume(U),H):U===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),$):(e.exit("tableDelimiterFiller"),$(U))}function $(U){return Ge(U)?Xe(e,Z,"whitespace")(U):Z(U)}function Z(U){return U===124?S(U):U===null||Oe(U)?!l||o!==u?he(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):he(U)}function he(U){return n(U)}function M(U){return e.enter("tableRow"),Ee(U)}function Ee(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),Ee):U===null||Oe(U)?(e.exit("tableRow"),t(U)):Ge(U)?Xe(e,Ee,"whitespace")(U):(e.enter("data"),ke(U))}function ke(U){return U===null||U===124||it(U)?(e.exit("data"),Ee(U)):(e.consume(U),U===92?Ne:ke)}function Ne(U){return U===92||U===124?(e.consume(U),ke):ke(U)}}function LP(e,t){let n=-1,r=!0,o=0,u=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,h,g,y;const b=new NP;for(;++n<e.length;){const T=e[n],S=T[1];T[0]==="enter"?S.type==="tableHead"?(c=!1,d!==0&&(AE(b,t,d,h,g),g=void 0,d=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,y=void 0,u=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,g={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",g,t]])),o=S.type==="tableDelimiterRow"?2:g?3:1):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(u[1]!==0&&(l[0]=l[1],y=Ra(b,t,u,o,void 0,y),u=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(l[0]=l[1],y=Ra(b,t,u,o,void 0,y)),u=l,l=[u[1],n,0,0])):S.type==="tableHead"?(c=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,u[1]!==0?(l[0]=l[1],y=Ra(b,t,u,o,n,y)):l[1]!==0&&(y=Ra(b,t,l,o,n,y)),o=0):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&AE(b,t,d,h,g),b.consume(t.events),n=-1;++n<t.events.length;){const T=t.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=OP(t.events,n))}return e}function Ra(e,t,n,r,o,u){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(u.end=Object.assign({},Es(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const d=Es(t.events,n[1]);if(u={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const h=Es(t.events,n[2]),g=Es(t.events,n[3]),y={type:c,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",y,t]]),r!==2){const b=t.events[n[2]],T=t.events[n[3]];if(b[1].end=Object.assign({},T[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,k=n[3]-n[2]-1;e.add(S,k,[])}}e.add(n[3]+1,0,[["exit",y,t]])}return o!==void 0&&(u.end=Object.assign({},Es(t.events,o)),e.add(o,0,[["exit",u,t]]),u=void 0),u}function AE(e,t,n,r,o){const u=[],l=Es(t.events,n);o&&(o.end=Object.assign({},l),u.push(["exit",o,t])),r.end=Object.assign({},l),u.push(["exit",r,t]),e.add(n+1,0,u)}function Es(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const DP={name:"tasklistCheck",tokenize:FP};function MP(){return{text:{91:DP}}}function FP(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"),u)}function u(d){return it(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Oe(d)?t(d):Ge(d)?e.check({tokenize:BP},t,n)(d):n(d)}}function BP(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function UP(e){return K0([cP(),bP(),vP(e),PP(),MP()])}const HP={};function zP(e){const t=this,n=e||HP,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(UP(n)),u.push(oP()),l.push(uP(n))}const La=()=>I.jsx("span",{className:`${te}-blinking-cursor`,children:I.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:I.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),kE=({globalClassName:e,message:t})=>{const{isLoading:n,isResponseLoading:r}=yi(),o=n&&r(t.eventSourceId||"")&&t.name==="partial_inquiry";return I.jsx(ov,{remarkPlugins:[zP],rehypePlugins:[PI],components:{h1:({children:u})=>I.jsx("h1",{className:ae(e,`${te}-header h1`),children:u}),h2:({children:u})=>I.jsx("h2",{className:ae(e,`${te}-header h2`),children:u}),h3:({children:u})=>I.jsx("h3",{className:ae(e,`${te}-header h3`),children:u}),ul:({children:u})=>I.jsx("ul",{className:ae(e,`${te}-ul`),children:u}),ol:({children:u})=>I.jsx("ol",{className:ae(e,`${te}-ol`),children:u}),li:({children:u})=>I.jsx("li",{className:ae(e,`${te}-li`),children:u}),a:({href:u,children:l})=>I.jsx("a",He(G({className:ae(e,`${te}-link`)},u?{href:u,target:"_blank"}:{}),{rel:"noopener noreferrer",children:l})),table:({children:u})=>I.jsx("table",{className:ae(e,`${te}-table`),children:u}),thead:({children:u})=>I.jsx("thead",{className:ae(e,`${te}-thead`),children:u}),tbody:({children:u})=>I.jsx("tbody",{className:ae(e,`${te}-tbody`),children:u}),tr:({children:u})=>I.jsx("tr",{className:ae(e,`${te}-tr`),children:u}),th:({children:u})=>I.jsx("th",{className:ae(e,`${te}-th`),children:u}),td:({children:u})=>I.jsx("td",{className:ae(e,`${te}-td`),children:u}),span:({className:u,children:l})=>u===`${te}-blinking-cursor`?I.jsx(La,{}):I.jsx("span",{children:l})},children:t.message+(o?`<span className='${te}-blinking-cursor'></span>`:"")})},jP=({globalClassName:e,message:t})=>{const[n,r]=K.useState(!1),o=t.tool_name||t.toolName,u=!!t.thought,l=!!o,c=()=>{r(d=>!d)};return I.jsxs("div",{children:[I.jsxs("div",{className:ae(e,`${te}-progress-message`,"standalone"),children:[I.jsx("span",{className:ae(e,`${te}-message-icon`,"progress-icon","standalone"),children:I.jsx(g0,{})}),I.jsx("p",{className:ae(e,`${te}-progress-text`,"standalone"),children:t.message})]}),(u||l)&&I.jsxs(I.Fragment,{children:[I.jsx(Jc,{className:ae(e,`${te}-thought-context-button`),onClick:c,children:n?I.jsxs(I.Fragment,{children:["Hide ",I.jsx(Jx,{})]}):I.jsxs(I.Fragment,{children:["Context ",I.jsx(Zx,{})]})}),n&&I.jsx("div",{className:ae(e,`${te}-thought-container`),children:u&&I.jsx("p",{className:ae(e,`${te}-progress-thought`),children:t.thought})})]})]})},$P=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?I.jsx(jP,{globalClassName:e,message:t}):I.jsxs("div",{className:ae(e,`${te}-progress-message`,"embedded"),title:t.message,children:[I.jsx("span",{className:ae(e,`${te}-message-icon`,"progress-icon","embedded"),children:I.jsx(g0,{})}),I.jsx("i",{className:ae(e,`${te}-progress-text`,"embedded"),children:t.message})]}),VP=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var r;return I.jsxs("div",{className:ae(e,`${te}-refined-search`,{embedded:!n,standalone:n}),children:[I.jsxs("div",{className:ae(e,`${te}-refined-search-query`,{embedded:!n,standalone:n}),children:[I.jsx("span",{className:ae(e,`${te}-message-icon`,`${te}-refined-search-icon`,{embedded:!n,standalone:n}),children:I.jsx(ua,{})}),I.jsx("p",{className:ae(e,`${te}-text`,"bold"),children:(r=t.searchParams)==null?void 0:r.query})]}),I.jsx(kE,{message:t})]})},wE=e=>{var c;const{configModule:t}=or(),n=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:r={}}=((c=e.request)==null?void 0:c.searchParams)||{facetFilters:{}},o=Object.fromEntries(Object.entries(r).filter(([d])=>!n.includes(d))),u=Object.keys(o),l=Object.values(o).reduce((d,h)=>d+h.length,0);return{facetFiltersList:u,filterCount:l}},Da=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>I.jsx("span",{className:ae(t,`${te}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filters`}),vE=({globalClassName:e,message:t,facetFiltersList:n})=>{var o,u;if(!n.length)return null;const r=((u=(o=t.request)==null?void 0:o.searchParams)==null?void 0:u.facetFilters)||{};return n.map(l=>{var d;const c=((d=r[l])==null?void 0:d.join(", "))||"";return I.jsxs("div",{className:ae(e,`${te}-facets`),children:[I.jsx("p",{className:ae(e,`${te}-facet-category`),children:l}),I.jsx("p",{className:ae(e,`${te}-facet-values`),children:c})]},l)})},qP=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var u,l;const{facetFiltersList:r,filterCount:o}=wE(t);return n?I.jsxs("div",{children:[I.jsxs("div",{className:ae(e,`${te}-user-message standalone`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-message-icon standalone`),children:I.jsx(E0,{})}),I.jsx("p",{className:ae(e,`${te}-user-message-text`),children:(u=t.request)==null?void 0:u.userPrompt}),r.length>0&&I.jsx(Da,{isWidgetStandalone:!0,globalClassName:e,filterCount:o})]}),I.jsx(vE,{globalClassName:e,facetFiltersList:r,message:t})]}):I.jsxs("div",{className:ae(e,`${te}-user-message embedded`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-message-icon embedded`),children:I.jsx(E0,{})}),I.jsx("p",{children:(l=t.request)==null?void 0:l.userPrompt}),r.length>0&&I.jsx(Da,{isWidgetStandalone:!1,filterCount:o})]})},YP=({globalClassName:e,actionLabel:t,query:n,message:r,facetFiltersList:o,filterCount:u})=>I.jsxs("div",{className:ae(e,`${te}-user-search standalone`),children:[I.jsxs("div",{className:ae(e,`${te}-user-search-query`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-search-icon standalone`),children:I.jsx(ua,{})}),I.jsx("p",{className:ae(e,`${te}-text bold`),children:`${t}: ${n}`}),o.length>0&&I.jsx(Da,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),I.jsx(vE,{globalClassName:e,facetFiltersList:o,message:r})]}),WP=({globalClassName:e,message:t,isWidgetStandalone:n})=>{const{facetFiltersList:r,filterCount:o}=wE(t),{actionLabel:u,query:l}=K.useMemo(()=>{var d,h,g,y;switch(t.name){case"copilot_search":return{actionLabel:"Your search",query:(d=t.request)==null?void 0:d.searchParams.query};case"copilot_browse":return{actionLabel:"Browsing category",query:(g=(h=t.request)==null?void 0:h.browseParams)==null?void 0:g.categoryId};case"product_view":return{actionLabel:"Viewing product",query:(y=t.request)==null?void 0:y.productId};default:return{actionLabel:"",query:""}}},[t]);return!t.isUserAction||!l?null:n?I.jsx(YP,{globalClassName:e,message:t,actionLabel:u,query:l,facetFiltersList:r,filterCount:o}):I.jsxs("div",{className:ae(e,`${te}-user-search embedded`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-search-icon embedded`),children:I.jsx(ua,{})}),I.jsx("p",{children:l}),r.length>0&&I.jsx(Da,{isWidgetStandalone:!1,filterCount:o})]})},NE=["copilot_search","copilot_browse","product_view"],IE=({message:e,globalClassName:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{var u;if(!e)return null;let o=e.name;if(NE.includes(o)&&(e.isInitial||e.isUserAction)&&(o="faceted_navigation"),NE.includes(o)&&!((u=e.request)!=null&&u.userPrompt))return null;switch(o){case"copilot_search":case"copilot_browse":case"product_view":return I.jsx(qP,{globalClassName:t,isWidgetStandalone:n,message:e});case"faceted_navigation":return I.jsx(WP,{globalClassName:t,message:e,isWidgetStandalone:n});case"refined_search":return I.jsx(VP,{globalClassName:t,message:e,isWidgetStandalone:n});case"follow_up":return I.jsx(aC,{globalClassName:t,isWidgetStandalone:n,message:e,handleSuggestionClick:r});case"inquiry":case"partial_inquiry":return I.jsx(kE,{globalClassName:t,message:e});case"error":return I.jsx(sC,{message:e,isWidgetStandalone:n});case"display_products":return I.jsx(iC,{message:e,isWidgetStandalone:n});case"progress":return I.jsx($P,{globalClassName:t,isWidgetStandalone:n,message:e});default:return null}},ud=({isWidgetStandalone:e,messages:t,handleSuggestionClick:n})=>{const{globalClassName:r}=or();return t.map(o=>o.messages&&o.type==="group"?I.jsx("div",{className:ae(r,`${te}-message-group`,e?"standalone":"embedded"),children:o.messages.length>0&&o.messages.map(u=>I.jsx("div",{className:`${te}-message-group-child`,children:I.jsx(IE,{id:u.id,globalClassName:r,isWidgetStandalone:e,message:u,handleSuggestionClick:n})},u.id))},`group-${o.eventSourceId}`):o.type==="individual"&&o.message?I.jsx("div",{className:ae(r,`${te}-message`,e?"standalone":"embedded",{error:o.message.name.includes("error")}),children:I.jsx(IE,{id:o.message.id,globalClassName:r,isWidgetStandalone:e,message:o.message,handleSuggestionClick:n})},o.message.id):null)},OE=()=>{const{globalClassName:e,themeVariables:t}=or(),{status:n}=ia(),{copilot:r,messages:o,groupedMessages:u,isLoading:l,handleUserInput:c,handleSuggestion:d}=yi(),{isOpen:h}=n||{},g=K.useRef(null);return K.useEffect(()=>{g.current&&g.current.scrollIntoView({behavior:"smooth",block:"end"})},[o]),r?!h||u.length===0?null:I.jsxs("div",{className:ae(e,`${te}-container`,`${te}-embedded-chat`),style:t,children:[I.jsxs("div",{className:ae(e,`${te}-message-container`,"embedded"),children:[I.jsx(ud,{isWidgetStandalone:!1,messages:u,handleSuggestionClick:d}),l&&I.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:I.jsx(La,{})}),I.jsx("div",{ref:g})]}),I.jsx(Zc,{componentType:"chat",className:"embedded-chat",isLoading:l,onSubmit:c})]}):I.jsx("div",{children:"Loading Copilot..."})};function GP(e){return Sn({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 KP(e){return Sn({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 QP(e){return Sn({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 XP(e){return Sn({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)}function JP(e){return e==null?[]:Array.isArray(e)?e:[e]}var ZP=e=>e!=null&&typeof e=="object",Ma=e=>typeof e=="string",ys=e=>typeof e=="function",eR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),tR=e=>Object.prototype.toString.call(e),PE=Function.prototype.toString,nR=PE.call(Object),rR=e=>{if(!ZP(e)||tR(e)!="[object Object]"||oR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=eR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&PE.call(n)==nR},iR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,sR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,oR=e=>iR(e)||sR(e),uR=e=>e(),ad=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function RE(e){if(!rR(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]=RE(o))}return n}function ld(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function aR(e,t){if(e==null)throw new Error(t())}var LE=()=>{},Fa=e=>typeof e=="object"&&e!==null,lR=1,cR=9,fR=11,pn=e=>Fa(e)&&e.nodeType===lR&&typeof e.nodeName=="string",cd=e=>Fa(e)&&e.nodeType===cR,dR=e=>Fa(e)&&e===e.window,DE=e=>pn(e)?e.localName||"":"#document";function hR(e){return["html","body","#document"].includes(DE(e))}var pR=e=>Fa(e)&&e.nodeType!==void 0,Ts=e=>pR(e)&&e.nodeType===fR&&"host"in e,mR=e=>pn(e)&&e.localName==="input",gR=e=>pn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1,ER=/(textarea|select)/;function yR(e){if(e==null||!pn(e))return!1;try{return mR(e)&&e.selectionStart!=null||ER.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Ba(e,t){var r;if(!e||!t||!pn(e)||!pn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Ts(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function fr(e){var t;return cd(e)?e:dR(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function TR(e){return fr(e).documentElement}function Fo(e){var t,n,r;return Ts(e)?Fo(e.host):cd(e)?(t=e.defaultView)!=null?t:window:pn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ME(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}function bR(e){if(DE(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ts(e)&&e.host||TR(e);return Ts(t)?t.host:t}var fd=new WeakMap;function FE(e){return fd.has(e)||fd.set(e,Fo(e).getComputedStyle(e)),fd.get(e)}var BE=()=>typeof document!="undefined";function _R(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var dd=e=>BE()&&e.test(_R()),UE=()=>BE()&&!!navigator.maxTouchPoints,SR=()=>dd(/^iPhone/i),xR=()=>dd(/^iPad/i)||HE()&&navigator.maxTouchPoints>1,CR=()=>SR()||xR(),HE=()=>dd(/^Mac/i);function AR(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 kr(e){var n;const t=AR(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var kR=e=>e.button===2||HE()&&e.ctrlKey&&e.button===0,dr=(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)}},zE=e=>pn(e)&&e.tagName==="IFRAME",wR=e=>!Number.isNaN(parseInt(e.getAttribute("tabindex")||"0",10)),vR=e=>parseInt(e.getAttribute("tabindex")||"0",10)<0,hd="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",jE=(e,t=!1)=>{if(!e)return[];const n=Array.from(e.querySelectorAll(hd));(t==!0||t=="if-empty"&&n.length===0)&&pn(e)&&$r(e)&&n.unshift(e);const o=n.filter($r);return o.forEach((u,l)=>{if(zE(u)&&u.contentDocument){const c=u.contentDocument.body;o.splice(l,1,...jE(c))}}),o};function $r(e){return!e||e.closest("[inert]")?!1:e.matches(hd)&&gR(e)}function $E(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll(hd)).filter(ki);return r.forEach((o,u)=>{if(zE(o)&&o.contentDocument){const l=o.contentDocument.body,c=$E(l);r.splice(u,1,...c)}}),r.length,r}function ki(e){return e!=null&&e.tabIndex>0?!0:$r(e)&&!vR(e)}function Bo(e){return e.tabIndex<0&&(/^(audio|video|details)$/.test(e.localName)||yR(e))&&!wR(e)?0:e.tabIndex}function NR(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 wr(e){let t;const n=globalThis.requestAnimationFrame(()=>{t=e()});return()=>{globalThis.cancelAnimationFrame(n),t==null||t()}}function pd(e){const t=bR(e);return hR(t)?fr(t).body:pn(t)&&PR(t)?t:pd(t)}var IR=/auto|scroll|overlay|hidden|clip/,OR=new Set(["inline","contents"]);function PR(e){const t=Fo(e),{overflow:n,overflowX:r,overflowY:o,display:u}=t.getComputedStyle(e);return IR.test(n+o+r)&&!OR.has(u)}function Ua(e,t){if(!e)return LE;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 RR(e,t,n){if(!e)return LE;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 LR(e,t,n){const{signal:r}=t;return[new Promise((l,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(h=>{r.aborted||(clearTimeout(d),l(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function DR(e,t){const{timeout:n,rootNode:r}=t,o=Fo(r),u=fr(r),l=new o.AbortController;return LR(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const g=e();g&&g.isConnected&&(h.disconnect(),c(g))});h.observe(u.body,{childList:!0,subtree:!0})}),l,n)}var MR=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),FR=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,VE=e=>{const t={};let n;for(;n=FR.exec(e);)t[n[1]]=n[2];return t},BR=(e,t)=>{if(Ma(e)){if(Ma(t))return`${e};${t}`;e=VE(e)}else Ma(t)&&(t=VE(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function wi(...e){let t={};for(let n of e){for(let r in t){if(r.startsWith("on")&&typeof t[r]=="function"&&typeof n[r]=="function"){t[r]=ad(n[r],t[r]);continue}if(r==="className"||r==="class"){t[r]=MR(t[r],n[r]);continue}if(r==="style"){t[r]=BR(t[r],n[r]);continue}t[r]=n[r]!==void 0?n[r]:t[r]}for(let r in n)t[r]===void 0&&(t[r]=n[r])}return t}function KD(e){return e}var bs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(bs||{}),md="__init__";function UR(e){const t=()=>{var c,d;return(d=(c=e.getRootNode)==null?void 0:c.call(e))!=null?d:document},n=()=>fr(t()),r=()=>{var c;return(c=n().defaultView)!=null?c:window},o=()=>ME(t()),u=c=>c===o(),l=c=>t().getElementById(c);return He(G({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:u,getById:l})}var gd={exports:{}},mn={},Ed={exports:{}},yd={};/**
53
- * @license React
54
- * scheduler.production.min.js
55
- *
56
- * Copyright (c) Facebook, Inc. and its affiliates.
57
- *
58
- * This source code is licensed under the MIT license found in the
59
- * LICENSE file in the root directory of this source tree.
60
- */var qE;function HR(){return qE||(qE=1,function(e){function t(V,ne){var C=V.length;V.push(ne);e:for(;0<C;){var O=C-1>>>1,Y=V[O];if(0<o(Y,ne))V[O]=ne,V[C]=Y,C=O;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var ne=V[0],C=V.pop();if(C!==ne){V[0]=C;e:for(var O=0,Y=V.length,x=Y>>>1;O<x;){var re=2*(O+1)-1,be=V[re],ye=re+1,Ie=V[ye];if(0>o(be,C))ye<Y&&0>o(Ie,be)?(V[O]=Ie,V[ye]=C,O=ye):(V[O]=be,V[re]=C,O=re);else if(ye<Y&&0>o(Ie,C))V[O]=Ie,V[ye]=C,O=ye;else break e}}return ne}function o(V,ne){var C=V.sortIndex-ne.sortIndex;return C!==0?C:V.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],h=[],g=1,y=null,b=3,T=!1,S=!1,k=!1,P=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(V){for(var ne=n(h);ne!==null;){if(ne.callback===null)r(h);else if(ne.startTime<=V)r(h),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(h)}}function Z(V){if(k=!1,$(V),!S)if(n(d)!==null)S=!0,Pe(he);else{var ne=n(h);ne!==null&&ce(Z,ne.startTime-V)}}function he(V,ne){S=!1,k&&(k=!1,L(ke),ke=-1),T=!0;var C=b;try{for($(ne),y=n(d);y!==null&&(!(y.expirationTime>ne)||V&&!ge());){var O=y.callback;if(typeof O=="function"){y.callback=null,b=y.priorityLevel;var Y=O(y.expirationTime<=ne);ne=e.unstable_now(),typeof Y=="function"?y.callback=Y:y===n(d)&&r(d),$(ne)}else r(d);y=n(d)}if(y!==null)var x=!0;else{var re=n(h);re!==null&&ce(Z,re.startTime-ne),x=!1}return x}finally{y=null,b=C,T=!1}}var M=!1,Ee=null,ke=-1,Ne=5,U=-1;function ge(){return!(e.unstable_now()-U<Ne)}function me(){if(Ee!==null){var V=e.unstable_now();U=V;var ne=!0;try{ne=Ee(!0,V)}finally{ne?pe():(M=!1,Ee=null)}}else M=!1}var pe;if(typeof H=="function")pe=function(){H(me)};else if(typeof MessageChannel!="undefined"){var le=new MessageChannel,_e=le.port2;le.port1.onmessage=me,pe=function(){_e.postMessage(null)}}else pe=function(){P(me,0)};function Pe(V){Ee=V,M||(M=!0,pe())}function ce(V,ne){ke=P(function(){V(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_continueExecution=function(){S||T||(S=!0,Pe(he))},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ne=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(V){switch(b){case 1:case 2:case 3:var ne=3;break;default:ne=b}var C=b;b=ne;try{return V()}finally{b=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(V,ne){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var C=b;b=V;try{return ne()}finally{b=C}},e.unstable_scheduleCallback=function(V,ne,C){var O=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?O+C:O):C=O,V){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=C+Y,V={id:g++,callback:ne,priorityLevel:V,startTime:C,expirationTime:Y,sortIndex:-1},C>O?(V.sortIndex=C,t(h,V),n(d)===null&&V===n(h)&&(k?(L(ke),ke=-1):k=!0,ce(Z,C-O))):(V.sortIndex=Y,t(d,V),S||T||(S=!0,Pe(he))),V},e.unstable_shouldYield=ge,e.unstable_wrapCallback=function(V){var ne=b;return function(){var C=b;b=ne;try{return V.apply(this,arguments)}finally{b=C}}}}(yd)),yd}var YE;function zR(){return YE||(YE=1,Ed.exports=HR()),Ed.exports}/**
61
- * @license React
62
- * react-dom.production.min.js
63
- *
64
- * Copyright (c) Facebook, Inc. and its affiliates.
65
- *
66
- * This source code is licensed under the MIT license found in the
67
- * LICENSE file in the root directory of this source tree.
68
- */var WE;function jR(){if(WE)return mn;WE=1;var e=$i(),t=zR();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,a=1;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a]);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 u(i,s){l(i,s),l(i+"Capture",s)}function l(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,h=/^[: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]*$/,g={},y={};function b(i){return d.call(y,i)?!0:d.call(g,i)?!1:h.test(i)?y[i]=!0:(g[i]=!0,!1)}function T(i,s,a,f){if(a!==null&&a.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:a!==null?!a.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function S(i,s,a,f){if(s===null||typeof s=="undefined"||T(i,s,a,f))return!0;if(f)return!1;if(a!==null)switch(a.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 k(i,s,a,f,m,E,_){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=m,this.mustUseProperty=a,this.propertyName=i,this.type=s,this.sanitizeURL=E,this.removeEmptyString=_}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){P[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];P[s]=new k(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){P[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){P[i]=new k(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){P[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){P[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){P[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){P[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){P[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function H(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(L,H);P[s]=new k(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(L,H);P[s]=new k(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(L,H);P[s]=new k(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){P[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),P.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){P[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function $(i,s,a,f){var m=P.hasOwnProperty(s)?P[s]:null;(m!==null?m.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(S(s,a,m,f)&&(a=null),f||m===null?b(s)&&(a===null?i.removeAttribute(s):i.setAttribute(s,""+a)):m.mustUseProperty?i[m.propertyName]=a===null?m.type===3?!1:"":a:(s=m.attributeName,f=m.attributeNamespace,a===null?i.removeAttribute(s):(m=m.type,a=m===3||m===4&&a===!0?"":""+a,f?i.setAttributeNS(f,s,a):i.setAttribute(s,a))))}var Z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,he=Symbol.for("react.element"),M=Symbol.for("react.portal"),Ee=Symbol.for("react.fragment"),ke=Symbol.for("react.strict_mode"),Ne=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),ge=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),_e=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),ce=Symbol.for("react.offscreen"),V=Symbol.iterator;function ne(i){return i===null||typeof i!="object"?null:(i=V&&i[V]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,O;function Y(i){if(O===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);O=s&&s[1]||""}return`
69
- `+O+i}var x=!1;function re(i,s){if(!i||x)return"";x=!0;var a=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 f=j}Reflect.construct(i,[],s)}else{try{s.call()}catch(j){f=j}i.call(s.prototype)}else{try{throw Error()}catch(j){f=j}i()}}catch(j){if(j&&f&&typeof j.stack=="string"){for(var m=j.stack.split(`
70
- `),E=f.stack.split(`
71
- `),_=m.length-1,v=E.length-1;1<=_&&0<=v&&m[_]!==E[v];)v--;for(;1<=_&&0<=v;_--,v--)if(m[_]!==E[v]){if(_!==1||v!==1)do if(_--,v--,0>v||m[_]!==E[v]){var R=`
72
- `+m[_].replace(" at new "," at ");return i.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",i.displayName)),R}while(1<=_&&0<=v);break}}}finally{x=!1,Error.prepareStackTrace=a}return(i=i?i.displayName||i.name:"")?Y(i):""}function be(i){switch(i.tag){case 5:return Y(i.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return i=re(i.type,!1),i;case 11:return i=re(i.type.render,!1),i;case 1:return i=re(i.type,!0),i;default:return""}}function ye(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case Ee:return"Fragment";case M:return"Portal";case Ne:return"Profiler";case ke:return"StrictMode";case pe:return"Suspense";case le:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ge:return(i.displayName||"Context")+".Consumer";case U:return(i._context.displayName||"Context")+".Provider";case me:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case _e:return s=i.displayName||null,s!==null?s:ye(i.type)||"Memo";case Pe:s=i._payload,i=i._init;try{return ye(i(s))}catch(a){}}return null}function Ie(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 ye(s);case 8:return s===ke?"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 Fe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function ze(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Ke(i){var s=ze(i)?"checked":"value",a=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof a!="undefined"&&typeof a.get=="function"&&typeof a.set=="function"){var m=a.get,E=a.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return m.call(this)},set:function(_){f=""+_,E.call(this,_)}}),Object.defineProperty(i,s,{enumerable:a.enumerable}),{getValue:function(){return f},setValue:function(_){f=""+_},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Bt(i){i._valueTracker||(i._valueTracker=Ke(i))}function Ct(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var a=s.getValue(),f="";return i&&(f=ze(i)?i.checked?"true":"false":i.value),i=f,i!==a?(s.setValue(i),!0):!1}function It(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 qo(i,s){var a=s.checked;return C({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a!=null?a:i._wrapperState.initialChecked})}function Yo(i,s){var a=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;a=Fe(s.value!=null?s.value:a),i._wrapperState={initialChecked:f,initialValue:a,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Wo(i,s){s=s.checked,s!=null&&$(i,"checked",s,!1)}function xs(i,s){Wo(i,s);var a=Fe(s.value),f=s.type;if(a!=null)f==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+a):i.value!==""+a&&(i.value=""+a);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Cs(i,s.type,a):s.hasOwnProperty("defaultValue")&&Cs(i,s.type,Fe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Wa(i,s,a){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,a||s===i.value||(i.value=s),i.defaultValue=s}a=i.name,a!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,a!==""&&(i.name=a)}function Cs(i,s,a){(s!=="number"||It(i.ownerDocument)!==i)&&(a==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+a&&(i.defaultValue=""+a))}var Vr=Array.isArray;function qr(i,s,a,f){if(i=i.options,s){s={};for(var m=0;m<a.length;m++)s["$"+a[m]]=!0;for(a=0;a<i.length;a++)m=s.hasOwnProperty("$"+i[a].value),i[a].selected!==m&&(i[a].selected=m),m&&f&&(i[a].defaultSelected=!0)}else{for(a=""+Fe(a),s=null,m=0;m<i.length;m++){if(i[m].value===a){i[m].selected=!0,f&&(i[m].defaultSelected=!0);return}s!==null||i[m].disabled||(s=i[m])}s!==null&&(s.selected=!0)}}function Go(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Ga(i,s){var a=s.value;if(a==null){if(a=s.children,s=s.defaultValue,a!=null){if(s!=null)throw Error(n(92));if(Vr(a)){if(1<a.length)throw Error(n(93));a=a[0]}s=a}s==null&&(s=""),a=s}i._wrapperState={initialValue:Fe(a)}}function Ka(i,s){var a=Fe(s.value),f=Fe(s.defaultValue);a!=null&&(a=""+a,a!==i.value&&(i.value=a),s.defaultValue==null&&i.defaultValue!==a&&(i.defaultValue=a)),f!=null&&(i.defaultValue=""+f)}function Qa(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function Q(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 de(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?Q(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Be,Ye=function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,a,f,m){MSApp.execUnsafeLocalFunction(function(){return i(s,a,f,m)})}:i}(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Je(i,s){if(s){var a=i.firstChild;if(a&&a===i.lastChild&&a.nodeType===3){a.nodeValue=s;return}}i.textContent=s}var Vt={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},vr=["Webkit","ms","Moz","O"];Object.keys(Vt).forEach(function(i){vr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Vt[s]=Vt[i]})});function Mn(i,s,a){return s==null||typeof s=="boolean"||s===""?"":a||typeof s!="number"||s===0||Vt.hasOwnProperty(i)&&Vt[i]?(""+s).trim():s+"px"}function Yr(i,s){i=i.style;for(var a in s)if(s.hasOwnProperty(a)){var f=a.indexOf("--")===0,m=Mn(a,s[a],f);a==="float"&&(a="cssFloat"),f?i.setProperty(a,m):i[a]=m}}var Ni=C({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 qt(i,s){if(s){if(Ni[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 hr(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 kn=null;function Od(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Pd=null,As=null,ks=null;function ky(i){if(i=gu(i)){if(typeof Pd!="function")throw Error(n(280));var s=i.stateNode;s&&(s=Tl(s),Pd(i.stateNode,i.type,s))}}function wy(i){As?ks?ks.push(i):ks=[i]:As=i}function vy(){if(As){var i=As,s=ks;if(ks=As=null,ky(i),s)for(i=0;i<s.length;i++)ky(s[i])}}function Ny(i,s){return i(s)}function Iy(){}var Rd=!1;function Oy(i,s,a){if(Rd)return i(s,a);Rd=!0;try{return Ny(i,s,a)}finally{Rd=!1,(As!==null||ks!==null)&&(Iy(),vy())}}function Ko(i,s){var a=i.stateNode;if(a===null)return null;var f=Tl(a);if(f===null)return null;a=f[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":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(a&&typeof a!="function")throw Error(n(231,s,typeof a));return a}var Ld=!1;if(c)try{var Qo={};Object.defineProperty(Qo,"passive",{get:function(){Ld=!0}}),window.addEventListener("test",Qo,Qo),window.removeEventListener("test",Qo,Qo)}catch(i){Ld=!1}function e6(i,s,a,f,m,E,_,v,R){var j=Array.prototype.slice.call(arguments,3);try{s.apply(a,j)}catch(ee){this.onError(ee)}}var Xo=!1,Xa=null,Ja=!1,Dd=null,t6={onError:function(i){Xo=!0,Xa=i}};function n6(i,s,a,f,m,E,_,v,R){Xo=!1,Xa=null,e6.apply(t6,arguments)}function r6(i,s,a,f,m,E,_,v,R){if(n6.apply(this,arguments),Xo){if(Xo){var j=Xa;Xo=!1,Xa=null}else throw Error(n(198));Ja||(Ja=!0,Dd=j)}}function Ii(i){var s=i,a=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(a=s.return),i=s.return;while(i)}return s.tag===3?a:null}function Py(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 Ry(i){if(Ii(i)!==i)throw Error(n(188))}function i6(i){var s=i.alternate;if(!s){if(s=Ii(i),s===null)throw Error(n(188));return s!==i?null:i}for(var a=i,f=s;;){var m=a.return;if(m===null)break;var E=m.alternate;if(E===null){if(f=m.return,f!==null){a=f;continue}break}if(m.child===E.child){for(E=m.child;E;){if(E===a)return Ry(m),i;if(E===f)return Ry(m),s;E=E.sibling}throw Error(n(188))}if(a.return!==f.return)a=m,f=E;else{for(var _=!1,v=m.child;v;){if(v===a){_=!0,a=m,f=E;break}if(v===f){_=!0,f=m,a=E;break}v=v.sibling}if(!_){for(v=E.child;v;){if(v===a){_=!0,a=E,f=m;break}if(v===f){_=!0,f=E,a=m;break}v=v.sibling}if(!_)throw Error(n(189))}}if(a.alternate!==f)throw Error(n(190))}if(a.tag!==3)throw Error(n(188));return a.stateNode.current===a?i:s}function Ly(i){return i=i6(i),i!==null?Dy(i):null}function Dy(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Dy(i);if(s!==null)return s;i=i.sibling}return null}var My=t.unstable_scheduleCallback,Fy=t.unstable_cancelCallback,s6=t.unstable_shouldYield,o6=t.unstable_requestPaint,At=t.unstable_now,u6=t.unstable_getCurrentPriorityLevel,Md=t.unstable_ImmediatePriority,By=t.unstable_UserBlockingPriority,Za=t.unstable_NormalPriority,a6=t.unstable_LowPriority,Uy=t.unstable_IdlePriority,el=null,pr=null;function l6(i){if(pr&&typeof pr.onCommitFiberRoot=="function")try{pr.onCommitFiberRoot(el,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Kn=Math.clz32?Math.clz32:d6,c6=Math.log,f6=Math.LN2;function d6(i){return i>>>=0,i===0?32:31-(c6(i)/f6|0)|0}var tl=64,nl=4194304;function Jo(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 rl(i,s){var a=i.pendingLanes;if(a===0)return 0;var f=0,m=i.suspendedLanes,E=i.pingedLanes,_=a&268435455;if(_!==0){var v=_&~m;v!==0?f=Jo(v):(E&=_,E!==0&&(f=Jo(E)))}else _=a&~m,_!==0?f=Jo(_):E!==0&&(f=Jo(E));if(f===0)return 0;if(s!==0&&s!==f&&(s&m)===0&&(m=f&-f,E=s&-s,m>=E||m===16&&(E&4194240)!==0))return s;if((f&4)!==0&&(f|=a&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0<s;)a=31-Kn(s),m=1<<a,f|=i[a],s&=~m;return f}function h6(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 p6(i,s){for(var a=i.suspendedLanes,f=i.pingedLanes,m=i.expirationTimes,E=i.pendingLanes;0<E;){var _=31-Kn(E),v=1<<_,R=m[_];R===-1?((v&a)===0||(v&f)!==0)&&(m[_]=h6(v,s)):R<=s&&(i.expiredLanes|=v),E&=~v}}function Fd(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Hy(){var i=tl;return tl<<=1,(tl&4194240)===0&&(tl=64),i}function Bd(i){for(var s=[],a=0;31>a;a++)s.push(i);return s}function Zo(i,s,a){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Kn(s),i[s]=a}function m6(i,s){var a=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 f=i.eventTimes;for(i=i.expirationTimes;0<a;){var m=31-Kn(a),E=1<<m;s[m]=0,f[m]=-1,i[m]=-1,a&=~E}}function Ud(i,s){var a=i.entangledLanes|=s;for(i=i.entanglements;a;){var f=31-Kn(a),m=1<<f;m&s|i[f]&s&&(i[f]|=s),a&=~m}}var nt=0;function zy(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var jy,Hd,$y,Vy,qy,zd=!1,il=[],Wr=null,Gr=null,Kr=null,eu=new Map,tu=new Map,Qr=[],g6="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 Yy(i,s){switch(i){case"focusin":case"focusout":Wr=null;break;case"dragenter":case"dragleave":Gr=null;break;case"mouseover":case"mouseout":Kr=null;break;case"pointerover":case"pointerout":eu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":tu.delete(s.pointerId)}}function nu(i,s,a,f,m,E){return i===null||i.nativeEvent!==E?(i={blockedOn:s,domEventName:a,eventSystemFlags:f,nativeEvent:E,targetContainers:[m]},s!==null&&(s=gu(s),s!==null&&Hd(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,m!==null&&s.indexOf(m)===-1&&s.push(m),i)}function E6(i,s,a,f,m){switch(s){case"focusin":return Wr=nu(Wr,i,s,a,f,m),!0;case"dragenter":return Gr=nu(Gr,i,s,a,f,m),!0;case"mouseover":return Kr=nu(Kr,i,s,a,f,m),!0;case"pointerover":var E=m.pointerId;return eu.set(E,nu(eu.get(E)||null,i,s,a,f,m)),!0;case"gotpointercapture":return E=m.pointerId,tu.set(E,nu(tu.get(E)||null,i,s,a,f,m)),!0}return!1}function Wy(i){var s=Oi(i.target);if(s!==null){var a=Ii(s);if(a!==null){if(s=a.tag,s===13){if(s=Py(a),s!==null){i.blockedOn=s,qy(i.priority,function(){$y(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){i.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}i.blockedOn=null}function sl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var a=$d(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(a===null){a=i.nativeEvent;var f=new a.constructor(a.type,a);kn=f,a.target.dispatchEvent(f),kn=null}else return s=gu(a),s!==null&&Hd(s),i.blockedOn=a,!1;s.shift()}return!0}function Gy(i,s,a){sl(i)&&a.delete(s)}function y6(){zd=!1,Wr!==null&&sl(Wr)&&(Wr=null),Gr!==null&&sl(Gr)&&(Gr=null),Kr!==null&&sl(Kr)&&(Kr=null),eu.forEach(Gy),tu.forEach(Gy)}function ru(i,s){i.blockedOn===s&&(i.blockedOn=null,zd||(zd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,y6)))}function iu(i){function s(m){return ru(m,i)}if(0<il.length){ru(il[0],i);for(var a=1;a<il.length;a++){var f=il[a];f.blockedOn===i&&(f.blockedOn=null)}}for(Wr!==null&&ru(Wr,i),Gr!==null&&ru(Gr,i),Kr!==null&&ru(Kr,i),eu.forEach(s),tu.forEach(s),a=0;a<Qr.length;a++)f=Qr[a],f.blockedOn===i&&(f.blockedOn=null);for(;0<Qr.length&&(a=Qr[0],a.blockedOn===null);)Wy(a),a.blockedOn===null&&Qr.shift()}var ws=Z.ReactCurrentBatchConfig,ol=!0;function T6(i,s,a,f){var m=nt,E=ws.transition;ws.transition=null;try{nt=1,jd(i,s,a,f)}finally{nt=m,ws.transition=E}}function b6(i,s,a,f){var m=nt,E=ws.transition;ws.transition=null;try{nt=4,jd(i,s,a,f)}finally{nt=m,ws.transition=E}}function jd(i,s,a,f){if(ol){var m=$d(i,s,a,f);if(m===null)oh(i,s,f,ul,a),Yy(i,f);else if(E6(m,i,s,a,f))f.stopPropagation();else if(Yy(i,f),s&4&&-1<g6.indexOf(i)){for(;m!==null;){var E=gu(m);if(E!==null&&jy(E),E=$d(i,s,a,f),E===null&&oh(i,s,f,ul,a),E===m)break;m=E}m!==null&&f.stopPropagation()}else oh(i,s,f,null,a)}}var ul=null;function $d(i,s,a,f){if(ul=null,i=Od(f),i=Oi(i),i!==null)if(s=Ii(i),s===null)i=null;else if(a=s.tag,a===13){if(i=Py(s),i!==null)return i;i=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return ul=i,null}function Ky(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(u6()){case Md:return 1;case By:return 4;case Za:case a6:return 16;case Uy:return 536870912;default:return 16}default:return 16}}var Xr=null,Vd=null,al=null;function Qy(){if(al)return al;var i,s=Vd,a=s.length,f,m="value"in Xr?Xr.value:Xr.textContent,E=m.length;for(i=0;i<a&&s[i]===m[i];i++);var _=a-i;for(f=1;f<=_&&s[a-f]===m[E-f];f++);return al=m.slice(i,1<f?1-f:void 0)}function ll(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 cl(){return!0}function Xy(){return!1}function wn(i){function s(a,f,m,E,_){this._reactName=a,this._targetInst=m,this.type=f,this.nativeEvent=E,this.target=_,this.currentTarget=null;for(var v in i)i.hasOwnProperty(v)&&(a=i[v],this[v]=a?a(E):E[v]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?cl:Xy,this.isPropagationStopped=Xy,this}return C(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=cl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=cl)},persist:function(){},isPersistent:cl}),s}var vs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qd=wn(vs),su=C({},vs,{view:0,detail:0}),_6=wn(su),Yd,Wd,ou,fl=C({},su,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kd,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!==ou&&(ou&&i.type==="mousemove"?(Yd=i.screenX-ou.screenX,Wd=i.screenY-ou.screenY):Wd=Yd=0,ou=i),Yd)},movementY:function(i){return"movementY"in i?i.movementY:Wd}}),Jy=wn(fl),S6=C({},fl,{dataTransfer:0}),x6=wn(S6),C6=C({},su,{relatedTarget:0}),Gd=wn(C6),A6=C({},vs,{animationName:0,elapsedTime:0,pseudoElement:0}),k6=wn(A6),w6=C({},vs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),v6=wn(w6),N6=C({},vs,{data:0}),Zy=wn(N6),I6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},O6={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"},P6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function R6(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=P6[i])?!!s[i]:!1}function Kd(){return R6}var L6=C({},su,{key:function(i){if(i.key){var s=I6[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=ll(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?O6[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kd,charCode:function(i){return i.type==="keypress"?ll(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?ll(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),D6=wn(L6),M6=C({},fl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eT=wn(M6),F6=C({},su,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kd}),B6=wn(F6),U6=C({},vs,{propertyName:0,elapsedTime:0,pseudoElement:0}),H6=wn(U6),z6=C({},fl,{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}),j6=wn(z6),$6=[9,13,27,32],Qd=c&&"CompositionEvent"in window,uu=null;c&&"documentMode"in document&&(uu=document.documentMode);var V6=c&&"TextEvent"in window&&!uu,tT=c&&(!Qd||uu&&8<uu&&11>=uu),nT=" ",rT=!1;function iT(i,s){switch(i){case"keyup":return $6.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sT(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ns=!1;function q6(i,s){switch(i){case"compositionend":return sT(s);case"keypress":return s.which!==32?null:(rT=!0,nT);case"textInput":return i=s.data,i===nT&&rT?null:i;default:return null}}function Y6(i,s){if(Ns)return i==="compositionend"||!Qd&&iT(i,s)?(i=Qy(),al=Vd=Xr=null,Ns=!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 tT&&s.locale!=="ko"?null:s.data;default:return null}}var W6={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 oT(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!W6[i.type]:s==="textarea"}function uT(i,s,a,f){wy(f),s=gl(s,"onChange"),0<s.length&&(a=new qd("onChange","change",null,a,f),i.push({event:a,listeners:s}))}var au=null,lu=null;function G6(i){AT(i,0)}function dl(i){var s=Ls(i);if(Ct(s))return i}function K6(i,s){if(i==="change")return s}var aT=!1;if(c){var Xd;if(c){var Jd="oninput"in document;if(!Jd){var lT=document.createElement("div");lT.setAttribute("oninput","return;"),Jd=typeof lT.oninput=="function"}Xd=Jd}else Xd=!1;aT=Xd&&(!document.documentMode||9<document.documentMode)}function cT(){au&&(au.detachEvent("onpropertychange",fT),lu=au=null)}function fT(i){if(i.propertyName==="value"&&dl(lu)){var s=[];uT(s,lu,i,Od(i)),Oy(G6,s)}}function Q6(i,s,a){i==="focusin"?(cT(),au=s,lu=a,au.attachEvent("onpropertychange",fT)):i==="focusout"&&cT()}function X6(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return dl(lu)}function J6(i,s){if(i==="click")return dl(s)}function Z6(i,s){if(i==="input"||i==="change")return dl(s)}function e4(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Qn=typeof Object.is=="function"?Object.is:e4;function cu(i,s){if(Qn(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var a=Object.keys(i),f=Object.keys(s);if(a.length!==f.length)return!1;for(f=0;f<a.length;f++){var m=a[f];if(!d.call(s,m)||!Qn(i[m],s[m]))return!1}return!0}function dT(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function hT(i,s){var a=dT(i);i=0;for(var f;a;){if(a.nodeType===3){if(f=i+a.textContent.length,i<=s&&f>=s)return{node:a,offset:s-i};i=f}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=dT(a)}}function pT(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?pT(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function mT(){for(var i=window,s=It();s instanceof i.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch(f){a=!1}if(a)i=s.contentWindow;else break;s=It(i.document)}return s}function Zd(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 t4(i){var s=mT(),a=i.focusedElem,f=i.selectionRange;if(s!==a&&a&&a.ownerDocument&&pT(a.ownerDocument.documentElement,a)){if(f!==null&&Zd(a)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in a)a.selectionStart=s,a.selectionEnd=Math.min(i,a.value.length);else if(i=(s=a.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var m=a.textContent.length,E=Math.min(f.start,m);f=f.end===void 0?E:Math.min(f.end,m),!i.extend&&E>f&&(m=f,f=E,E=m),m=hT(a,E);var _=hT(a,f);m&&_&&(i.rangeCount!==1||i.anchorNode!==m.node||i.anchorOffset!==m.offset||i.focusNode!==_.node||i.focusOffset!==_.offset)&&(s=s.createRange(),s.setStart(m.node,m.offset),i.removeAllRanges(),E>f?(i.addRange(s),i.extend(_.node,_.offset)):(s.setEnd(_.node,_.offset),i.addRange(s)))}}for(s=[],i=a;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<s.length;a++)i=s[a],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var n4=c&&"documentMode"in document&&11>=document.documentMode,Is=null,eh=null,fu=null,th=!1;function gT(i,s,a){var f=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;th||Is==null||Is!==It(f)||(f=Is,"selectionStart"in f&&Zd(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),fu&&cu(fu,f)||(fu=f,f=gl(eh,"onSelect"),0<f.length&&(s=new qd("onSelect","select",null,s,a),i.push({event:s,listeners:f}),s.target=Is)))}function hl(i,s){var a={};return a[i.toLowerCase()]=s.toLowerCase(),a["Webkit"+i]="webkit"+s,a["Moz"+i]="moz"+s,a}var Os={animationend:hl("Animation","AnimationEnd"),animationiteration:hl("Animation","AnimationIteration"),animationstart:hl("Animation","AnimationStart"),transitionend:hl("Transition","TransitionEnd")},nh={},ET={};c&&(ET=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function pl(i){if(nh[i])return nh[i];if(!Os[i])return i;var s=Os[i],a;for(a in s)if(s.hasOwnProperty(a)&&a in ET)return nh[i]=s[a];return i}var yT=pl("animationend"),TT=pl("animationiteration"),bT=pl("animationstart"),_T=pl("transitionend"),ST=new Map,xT="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 Jr(i,s){ST.set(i,s),u(s,[i])}for(var rh=0;rh<xT.length;rh++){var ih=xT[rh],r4=ih.toLowerCase(),i4=ih[0].toUpperCase()+ih.slice(1);Jr(r4,"on"+i4)}Jr(yT,"onAnimationEnd"),Jr(TT,"onAnimationIteration"),Jr(bT,"onAnimationStart"),Jr("dblclick","onDoubleClick"),Jr("focusin","onFocus"),Jr("focusout","onBlur"),Jr(_T,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var du="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(" "),s4=new Set("cancel close invalid load scroll toggle".split(" ").concat(du));function CT(i,s,a){var f=i.type||"unknown-event";i.currentTarget=a,r6(f,s,void 0,i),i.currentTarget=null}function AT(i,s){s=(s&4)!==0;for(var a=0;a<i.length;a++){var f=i[a],m=f.event;f=f.listeners;e:{var E=void 0;if(s)for(var _=f.length-1;0<=_;_--){var v=f[_],R=v.instance,j=v.currentTarget;if(v=v.listener,R!==E&&m.isPropagationStopped())break e;CT(m,v,j),E=R}else for(_=0;_<f.length;_++){if(v=f[_],R=v.instance,j=v.currentTarget,v=v.listener,R!==E&&m.isPropagationStopped())break e;CT(m,v,j),E=R}}}if(Ja)throw i=Dd,Ja=!1,Dd=null,i}function at(i,s){var a=s[dh];a===void 0&&(a=s[dh]=new Set);var f=i+"__bubble";a.has(f)||(kT(s,i,2,!1),a.add(f))}function sh(i,s,a){var f=0;s&&(f|=4),kT(a,i,f,s)}var ml="_reactListening"+Math.random().toString(36).slice(2);function hu(i){if(!i[ml]){i[ml]=!0,r.forEach(function(a){a!=="selectionchange"&&(s4.has(a)||sh(a,!1,i),sh(a,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[ml]||(s[ml]=!0,sh("selectionchange",!1,s))}}function kT(i,s,a,f){switch(Ky(s)){case 1:var m=T6;break;case 4:m=b6;break;default:m=jd}a=m.bind(null,s,a,i),m=void 0,!Ld||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(m=!0),f?m!==void 0?i.addEventListener(s,a,{capture:!0,passive:m}):i.addEventListener(s,a,!0):m!==void 0?i.addEventListener(s,a,{passive:m}):i.addEventListener(s,a,!1)}function oh(i,s,a,f,m){var E=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var _=f.tag;if(_===3||_===4){var v=f.stateNode.containerInfo;if(v===m||v.nodeType===8&&v.parentNode===m)break;if(_===4)for(_=f.return;_!==null;){var R=_.tag;if((R===3||R===4)&&(R=_.stateNode.containerInfo,R===m||R.nodeType===8&&R.parentNode===m))return;_=_.return}for(;v!==null;){if(_=Oi(v),_===null)return;if(R=_.tag,R===5||R===6){f=E=_;continue e}v=v.parentNode}}f=f.return}Oy(function(){var j=E,ee=Od(a),se=[];e:{var X=ST.get(i);if(X!==void 0){var Te=qd,xe=i;switch(i){case"keypress":if(ll(a)===0)break e;case"keydown":case"keyup":Te=D6;break;case"focusin":xe="focus",Te=Gd;break;case"focusout":xe="blur",Te=Gd;break;case"beforeblur":case"afterblur":Te=Gd;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Te=Jy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Te=x6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Te=B6;break;case yT:case TT:case bT:Te=k6;break;case _T:Te=H6;break;case"scroll":Te=_6;break;case"wheel":Te=j6;break;case"copy":case"cut":case"paste":Te=v6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Te=eT}var Ce=(s&4)!==0,kt=!Ce&&i==="scroll",F=Ce?X!==null?X+"Capture":null:X;Ce=[];for(var D=j,z;D!==null;){z=D;var fe=z.stateNode;if(z.tag===5&&fe!==null&&(z=fe,F!==null&&(fe=Ko(D,F),fe!=null&&Ce.push(pu(D,fe,z)))),kt)break;D=D.return}0<Ce.length&&(X=new Te(X,xe,null,a,ee),se.push({event:X,listeners:Ce}))}}if((s&7)===0){e:{if(X=i==="mouseover"||i==="pointerover",Te=i==="mouseout"||i==="pointerout",X&&a!==kn&&(xe=a.relatedTarget||a.fromElement)&&(Oi(xe)||xe[Nr]))break e;if((Te||X)&&(X=ee.window===ee?ee:(X=ee.ownerDocument)?X.defaultView||X.parentWindow:window,Te?(xe=a.relatedTarget||a.toElement,Te=j,xe=xe?Oi(xe):null,xe!==null&&(kt=Ii(xe),xe!==kt||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(Te=null,xe=j),Te!==xe)){if(Ce=Jy,fe="onMouseLeave",F="onMouseEnter",D="mouse",(i==="pointerout"||i==="pointerover")&&(Ce=eT,fe="onPointerLeave",F="onPointerEnter",D="pointer"),kt=Te==null?X:Ls(Te),z=xe==null?X:Ls(xe),X=new Ce(fe,D+"leave",Te,a,ee),X.target=kt,X.relatedTarget=z,fe=null,Oi(ee)===j&&(Ce=new Ce(F,D+"enter",xe,a,ee),Ce.target=z,Ce.relatedTarget=kt,fe=Ce),kt=fe,Te&&xe)t:{for(Ce=Te,F=xe,D=0,z=Ce;z;z=Ps(z))D++;for(z=0,fe=F;fe;fe=Ps(fe))z++;for(;0<D-z;)Ce=Ps(Ce),D--;for(;0<z-D;)F=Ps(F),z--;for(;D--;){if(Ce===F||F!==null&&Ce===F.alternate)break t;Ce=Ps(Ce),F=Ps(F)}Ce=null}else Ce=null;Te!==null&&wT(se,X,Te,Ce,!1),xe!==null&&kt!==null&&wT(se,kt,xe,Ce,!0)}}e:{if(X=j?Ls(j):window,Te=X.nodeName&&X.nodeName.toLowerCase(),Te==="select"||Te==="input"&&X.type==="file")var Ae=K6;else if(oT(X))if(aT)Ae=Z6;else{Ae=X6;var Re=Q6}else(Te=X.nodeName)&&Te.toLowerCase()==="input"&&(X.type==="checkbox"||X.type==="radio")&&(Ae=J6);if(Ae&&(Ae=Ae(i,j))){uT(se,Ae,a,ee);break e}Re&&Re(i,X,j),i==="focusout"&&(Re=X._wrapperState)&&Re.controlled&&X.type==="number"&&Cs(X,"number",X.value)}switch(Re=j?Ls(j):window,i){case"focusin":(oT(Re)||Re.contentEditable==="true")&&(Is=Re,eh=j,fu=null);break;case"focusout":fu=eh=Is=null;break;case"mousedown":th=!0;break;case"contextmenu":case"mouseup":case"dragend":th=!1,gT(se,a,ee);break;case"selectionchange":if(n4)break;case"keydown":case"keyup":gT(se,a,ee)}var Le;if(Qd)e:{switch(i){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Ns?iT(i,a)&&(Ue="onCompositionEnd"):i==="keydown"&&a.keyCode===229&&(Ue="onCompositionStart");Ue&&(tT&&a.locale!=="ko"&&(Ns||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Ns&&(Le=Qy()):(Xr=ee,Vd="value"in Xr?Xr.value:Xr.textContent,Ns=!0)),Re=gl(j,Ue),0<Re.length&&(Ue=new Zy(Ue,i,null,a,ee),se.push({event:Ue,listeners:Re}),Le?Ue.data=Le:(Le=sT(a),Le!==null&&(Ue.data=Le)))),(Le=V6?q6(i,a):Y6(i,a))&&(j=gl(j,"onBeforeInput"),0<j.length&&(ee=new Zy("onBeforeInput","beforeinput",null,a,ee),se.push({event:ee,listeners:j}),ee.data=Le))}AT(se,s)})}function pu(i,s,a){return{instance:i,listener:s,currentTarget:a}}function gl(i,s){for(var a=s+"Capture",f=[];i!==null;){var m=i,E=m.stateNode;m.tag===5&&E!==null&&(m=E,E=Ko(i,a),E!=null&&f.unshift(pu(i,E,m)),E=Ko(i,s),E!=null&&f.push(pu(i,E,m))),i=i.return}return f}function Ps(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function wT(i,s,a,f,m){for(var E=s._reactName,_=[];a!==null&&a!==f;){var v=a,R=v.alternate,j=v.stateNode;if(R!==null&&R===f)break;v.tag===5&&j!==null&&(v=j,m?(R=Ko(a,E),R!=null&&_.unshift(pu(a,R,v))):m||(R=Ko(a,E),R!=null&&_.push(pu(a,R,v)))),a=a.return}_.length!==0&&i.push({event:s,listeners:_})}var o4=/\r\n?/g,u4=/\u0000|\uFFFD/g;function vT(i){return(typeof i=="string"?i:""+i).replace(o4,`
73
- `).replace(u4,"")}function El(i,s,a){if(s=vT(s),vT(i)!==s&&a)throw Error(n(425))}function yl(){}var uh=null,ah=null;function lh(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 ch=typeof setTimeout=="function"?setTimeout:void 0,a4=typeof clearTimeout=="function"?clearTimeout:void 0,NT=typeof Promise=="function"?Promise:void 0,l4=typeof queueMicrotask=="function"?queueMicrotask:typeof NT!="undefined"?function(i){return NT.resolve(null).then(i).catch(c4)}:ch;function c4(i){setTimeout(function(){throw i})}function fh(i,s){var a=s,f=0;do{var m=a.nextSibling;if(i.removeChild(a),m&&m.nodeType===8)if(a=m.data,a==="/$"){if(f===0){i.removeChild(m),iu(s);return}f--}else a!=="$"&&a!=="$?"&&a!=="$!"||f++;a=m}while(a);iu(s)}function Zr(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 IT(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var a=i.data;if(a==="$"||a==="$!"||a==="$?"){if(s===0)return i;s--}else a==="/$"&&s++}i=i.previousSibling}return null}var Rs=Math.random().toString(36).slice(2),mr="__reactFiber$"+Rs,mu="__reactProps$"+Rs,Nr="__reactContainer$"+Rs,dh="__reactEvents$"+Rs,f4="__reactListeners$"+Rs,d4="__reactHandles$"+Rs;function Oi(i){var s=i[mr];if(s)return s;for(var a=i.parentNode;a;){if(s=a[Nr]||a[mr]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(i=IT(i);i!==null;){if(a=i[mr])return a;i=IT(i)}return s}i=a,a=i.parentNode}return null}function gu(i){return i=i[mr]||i[Nr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Ls(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Tl(i){return i[mu]||null}var hh=[],Ds=-1;function ei(i){return{current:i}}function lt(i){0>Ds||(i.current=hh[Ds],hh[Ds]=null,Ds--)}function ut(i,s){Ds++,hh[Ds]=i.current,i.current=s}var ti={},Jt=ei(ti),gn=ei(!1),Pi=ti;function Ms(i,s){var a=i.type.contextTypes;if(!a)return ti;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var m={},E;for(E in a)m[E]=s[E];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=m),m}function En(i){return i=i.childContextTypes,i!=null}function bl(){lt(gn),lt(Jt)}function OT(i,s,a){if(Jt.current!==ti)throw Error(n(168));ut(Jt,s),ut(gn,a)}function PT(i,s,a){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return a;f=f.getChildContext();for(var m in f)if(!(m in s))throw Error(n(108,Ie(i)||"Unknown",m));return C({},a,f)}function _l(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||ti,Pi=Jt.current,ut(Jt,i),ut(gn,gn.current),!0}function RT(i,s,a){var f=i.stateNode;if(!f)throw Error(n(169));a?(i=PT(i,s,Pi),f.__reactInternalMemoizedMergedChildContext=i,lt(gn),lt(Jt),ut(Jt,i)):lt(gn),ut(gn,a)}var Ir=null,Sl=!1,ph=!1;function LT(i){Ir===null?Ir=[i]:Ir.push(i)}function h4(i){Sl=!0,LT(i)}function ni(){if(!ph&&Ir!==null){ph=!0;var i=0,s=nt;try{var a=Ir;for(nt=1;i<a.length;i++){var f=a[i];do f=f(!0);while(f!==null)}Ir=null,Sl=!1}catch(m){throw Ir!==null&&(Ir=Ir.slice(i+1)),My(Md,ni),m}finally{nt=s,ph=!1}}return null}var Fs=[],Bs=0,xl=null,Cl=0,Fn=[],Bn=0,Ri=null,Or=1,Pr="";function Li(i,s){Fs[Bs++]=Cl,Fs[Bs++]=xl,xl=i,Cl=s}function DT(i,s,a){Fn[Bn++]=Or,Fn[Bn++]=Pr,Fn[Bn++]=Ri,Ri=i;var f=Or;i=Pr;var m=32-Kn(f)-1;f&=~(1<<m),a+=1;var E=32-Kn(s)+m;if(30<E){var _=m-m%5;E=(f&(1<<_)-1).toString(32),f>>=_,m-=_,Or=1<<32-Kn(s)+m|a<<m|f,Pr=E+i}else Or=1<<E|a<<m|f,Pr=i}function mh(i){i.return!==null&&(Li(i,1),DT(i,1,0))}function gh(i){for(;i===xl;)xl=Fs[--Bs],Fs[Bs]=null,Cl=Fs[--Bs],Fs[Bs]=null;for(;i===Ri;)Ri=Fn[--Bn],Fn[Bn]=null,Pr=Fn[--Bn],Fn[Bn]=null,Or=Fn[--Bn],Fn[Bn]=null}var vn=null,Nn=null,dt=!1,Xn=null;function MT(i,s){var a=jn(5,null,null,0);a.elementType="DELETED",a.stateNode=s,a.return=i,s=i.deletions,s===null?(i.deletions=[a],i.flags|=16):s.push(a)}function FT(i,s){switch(i.tag){case 5:var a=i.type;return s=s.nodeType!==1||a.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,vn=i,Nn=Zr(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,vn=i,Nn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(a=Ri!==null?{id:Or,overflow:Pr}:null,i.memoizedState={dehydrated:s,treeContext:a,retryLane:1073741824},a=jn(18,null,null,0),a.stateNode=s,a.return=i,i.child=a,vn=i,Nn=null,!0):!1;default:return!1}}function Eh(i){return(i.mode&1)!==0&&(i.flags&128)===0}function yh(i){if(dt){var s=Nn;if(s){var a=s;if(!FT(i,s)){if(Eh(i))throw Error(n(418));s=Zr(a.nextSibling);var f=vn;s&&FT(i,s)?MT(f,a):(i.flags=i.flags&-4097|2,dt=!1,vn=i)}}else{if(Eh(i))throw Error(n(418));i.flags=i.flags&-4097|2,dt=!1,vn=i}}}function BT(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;vn=i}function Al(i){if(i!==vn)return!1;if(!dt)return BT(i),dt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!lh(i.type,i.memoizedProps)),s&&(s=Nn)){if(Eh(i))throw UT(),Error(n(418));for(;s;)MT(i,s),s=Zr(s.nextSibling)}if(BT(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 a=i.data;if(a==="/$"){if(s===0){Nn=Zr(i.nextSibling);break e}s--}else a!=="$"&&a!=="$!"&&a!=="$?"||s++}i=i.nextSibling}Nn=null}}else Nn=vn?Zr(i.stateNode.nextSibling):null;return!0}function UT(){for(var i=Nn;i;)i=Zr(i.nextSibling)}function Us(){Nn=vn=null,dt=!1}function Th(i){Xn===null?Xn=[i]:Xn.push(i)}var p4=Z.ReactCurrentBatchConfig;function Eu(i,s,a){if(i=a.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(n(309));var f=a.stateNode}if(!f)throw Error(n(147,i));var m=f,E=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===E?s.ref:(s=function(_){var v=m.refs;_===null?delete v[E]:v[E]=_},s._stringRef=E,s)}if(typeof i!="string")throw Error(n(284));if(!a._owner)throw Error(n(290,i))}return i}function kl(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function HT(i){var s=i._init;return s(i._payload)}function zT(i){function s(F,D){if(i){var z=F.deletions;z===null?(F.deletions=[D],F.flags|=16):z.push(D)}}function a(F,D){if(!i)return null;for(;D!==null;)s(F,D),D=D.sibling;return null}function f(F,D){for(F=new Map;D!==null;)D.key!==null?F.set(D.key,D):F.set(D.index,D),D=D.sibling;return F}function m(F,D){return F=ci(F,D),F.index=0,F.sibling=null,F}function E(F,D,z){return F.index=z,i?(z=F.alternate,z!==null?(z=z.index,z<D?(F.flags|=2,D):z):(F.flags|=2,D)):(F.flags|=1048576,D)}function _(F){return i&&F.alternate===null&&(F.flags|=2),F}function v(F,D,z,fe){return D===null||D.tag!==6?(D=cp(z,F.mode,fe),D.return=F,D):(D=m(D,z),D.return=F,D)}function R(F,D,z,fe){var Ae=z.type;return Ae===Ee?ee(F,D,z.props.children,fe,z.key):D!==null&&(D.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===Pe&&HT(Ae)===D.type)?(fe=m(D,z.props),fe.ref=Eu(F,D,z),fe.return=F,fe):(fe=Ql(z.type,z.key,z.props,null,F.mode,fe),fe.ref=Eu(F,D,z),fe.return=F,fe)}function j(F,D,z,fe){return D===null||D.tag!==4||D.stateNode.containerInfo!==z.containerInfo||D.stateNode.implementation!==z.implementation?(D=fp(z,F.mode,fe),D.return=F,D):(D=m(D,z.children||[]),D.return=F,D)}function ee(F,D,z,fe,Ae){return D===null||D.tag!==7?(D=ji(z,F.mode,fe,Ae),D.return=F,D):(D=m(D,z),D.return=F,D)}function se(F,D,z){if(typeof D=="string"&&D!==""||typeof D=="number")return D=cp(""+D,F.mode,z),D.return=F,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case he:return z=Ql(D.type,D.key,D.props,null,F.mode,z),z.ref=Eu(F,null,D),z.return=F,z;case M:return D=fp(D,F.mode,z),D.return=F,D;case Pe:var fe=D._init;return se(F,fe(D._payload),z)}if(Vr(D)||ne(D))return D=ji(D,F.mode,z,null),D.return=F,D;kl(F,D)}return null}function X(F,D,z,fe){var Ae=D!==null?D.key:null;if(typeof z=="string"&&z!==""||typeof z=="number")return Ae!==null?null:v(F,D,""+z,fe);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case he:return z.key===Ae?R(F,D,z,fe):null;case M:return z.key===Ae?j(F,D,z,fe):null;case Pe:return Ae=z._init,X(F,D,Ae(z._payload),fe)}if(Vr(z)||ne(z))return Ae!==null?null:ee(F,D,z,fe,null);kl(F,z)}return null}function Te(F,D,z,fe,Ae){if(typeof fe=="string"&&fe!==""||typeof fe=="number")return F=F.get(z)||null,v(D,F,""+fe,Ae);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case he:return F=F.get(fe.key===null?z:fe.key)||null,R(D,F,fe,Ae);case M:return F=F.get(fe.key===null?z:fe.key)||null,j(D,F,fe,Ae);case Pe:var Re=fe._init;return Te(F,D,z,Re(fe._payload),Ae)}if(Vr(fe)||ne(fe))return F=F.get(z)||null,ee(D,F,fe,Ae,null);kl(D,fe)}return null}function xe(F,D,z,fe){for(var Ae=null,Re=null,Le=D,Ue=D=0,zt=null;Le!==null&&Ue<z.length;Ue++){Le.index>Ue?(zt=Le,Le=null):zt=Le.sibling;var et=X(F,Le,z[Ue],fe);if(et===null){Le===null&&(Le=zt);break}i&&Le&&et.alternate===null&&s(F,Le),D=E(et,D,Ue),Re===null?Ae=et:Re.sibling=et,Re=et,Le=zt}if(Ue===z.length)return a(F,Le),dt&&Li(F,Ue),Ae;if(Le===null){for(;Ue<z.length;Ue++)Le=se(F,z[Ue],fe),Le!==null&&(D=E(Le,D,Ue),Re===null?Ae=Le:Re.sibling=Le,Re=Le);return dt&&Li(F,Ue),Ae}for(Le=f(F,Le);Ue<z.length;Ue++)zt=Te(Le,F,Ue,z[Ue],fe),zt!==null&&(i&&zt.alternate!==null&&Le.delete(zt.key===null?Ue:zt.key),D=E(zt,D,Ue),Re===null?Ae=zt:Re.sibling=zt,Re=zt);return i&&Le.forEach(function(fi){return s(F,fi)}),dt&&Li(F,Ue),Ae}function Ce(F,D,z,fe){var Ae=ne(z);if(typeof Ae!="function")throw Error(n(150));if(z=Ae.call(z),z==null)throw Error(n(151));for(var Re=Ae=null,Le=D,Ue=D=0,zt=null,et=z.next();Le!==null&&!et.done;Ue++,et=z.next()){Le.index>Ue?(zt=Le,Le=null):zt=Le.sibling;var fi=X(F,Le,et.value,fe);if(fi===null){Le===null&&(Le=zt);break}i&&Le&&fi.alternate===null&&s(F,Le),D=E(fi,D,Ue),Re===null?Ae=fi:Re.sibling=fi,Re=fi,Le=zt}if(et.done)return a(F,Le),dt&&Li(F,Ue),Ae;if(Le===null){for(;!et.done;Ue++,et=z.next())et=se(F,et.value,fe),et!==null&&(D=E(et,D,Ue),Re===null?Ae=et:Re.sibling=et,Re=et);return dt&&Li(F,Ue),Ae}for(Le=f(F,Le);!et.done;Ue++,et=z.next())et=Te(Le,F,Ue,et.value,fe),et!==null&&(i&&et.alternate!==null&&Le.delete(et.key===null?Ue:et.key),D=E(et,D,Ue),Re===null?Ae=et:Re.sibling=et,Re=et);return i&&Le.forEach(function(W4){return s(F,W4)}),dt&&Li(F,Ue),Ae}function kt(F,D,z,fe){if(typeof z=="object"&&z!==null&&z.type===Ee&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case he:e:{for(var Ae=z.key,Re=D;Re!==null;){if(Re.key===Ae){if(Ae=z.type,Ae===Ee){if(Re.tag===7){a(F,Re.sibling),D=m(Re,z.props.children),D.return=F,F=D;break e}}else if(Re.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===Pe&&HT(Ae)===Re.type){a(F,Re.sibling),D=m(Re,z.props),D.ref=Eu(F,Re,z),D.return=F,F=D;break e}a(F,Re);break}else s(F,Re);Re=Re.sibling}z.type===Ee?(D=ji(z.props.children,F.mode,fe,z.key),D.return=F,F=D):(fe=Ql(z.type,z.key,z.props,null,F.mode,fe),fe.ref=Eu(F,D,z),fe.return=F,F=fe)}return _(F);case M:e:{for(Re=z.key;D!==null;){if(D.key===Re)if(D.tag===4&&D.stateNode.containerInfo===z.containerInfo&&D.stateNode.implementation===z.implementation){a(F,D.sibling),D=m(D,z.children||[]),D.return=F,F=D;break e}else{a(F,D);break}else s(F,D);D=D.sibling}D=fp(z,F.mode,fe),D.return=F,F=D}return _(F);case Pe:return Re=z._init,kt(F,D,Re(z._payload),fe)}if(Vr(z))return xe(F,D,z,fe);if(ne(z))return Ce(F,D,z,fe);kl(F,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,D!==null&&D.tag===6?(a(F,D.sibling),D=m(D,z),D.return=F,F=D):(a(F,D),D=cp(z,F.mode,fe),D.return=F,F=D),_(F)):a(F,D)}return kt}var Hs=zT(!0),jT=zT(!1),wl=ei(null),vl=null,zs=null,bh=null;function _h(){bh=zs=vl=null}function Sh(i){var s=wl.current;lt(wl),i._currentValue=s}function xh(i,s,a){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===a)break;i=i.return}}function js(i,s){vl=i,bh=zs=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(yn=!0),i.firstContext=null)}function Un(i){var s=i._currentValue;if(bh!==i)if(i={context:i,memoizedValue:s,next:null},zs===null){if(vl===null)throw Error(n(308));zs=i,vl.dependencies={lanes:0,firstContext:i}}else zs=zs.next=i;return s}var Di=null;function Ch(i){Di===null?Di=[i]:Di.push(i)}function $T(i,s,a,f){var m=s.interleaved;return m===null?(a.next=a,Ch(s)):(a.next=m.next,m.next=a),s.interleaved=a,Rr(i,f)}function Rr(i,s){i.lanes|=s;var a=i.alternate;for(a!==null&&(a.lanes|=s),a=i,i=i.return;i!==null;)i.childLanes|=s,a=i.alternate,a!==null&&(a.childLanes|=s),a=i,i=i.return;return a.tag===3?a.stateNode:null}var ri=!1;function Ah(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function VT(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 Lr(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function ii(i,s,a){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Ze&2)!==0){var m=f.pending;return m===null?s.next=s:(s.next=m.next,m.next=s),f.pending=s,Rr(i,a)}return m=f.interleaved,m===null?(s.next=s,Ch(f)):(s.next=m.next,m.next=s),f.interleaved=s,Rr(i,a)}function Nl(i,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,a|=f,s.lanes=a,Ud(i,a)}}function qT(i,s){var a=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,a===f)){var m=null,E=null;if(a=a.firstBaseUpdate,a!==null){do{var _={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};E===null?m=E=_:E=E.next=_,a=a.next}while(a!==null);E===null?m=E=s:E=E.next=s}else m=E=s;a={baseState:f.baseState,firstBaseUpdate:m,lastBaseUpdate:E,shared:f.shared,effects:f.effects},i.updateQueue=a;return}i=a.lastBaseUpdate,i===null?a.firstBaseUpdate=s:i.next=s,a.lastBaseUpdate=s}function Il(i,s,a,f){var m=i.updateQueue;ri=!1;var E=m.firstBaseUpdate,_=m.lastBaseUpdate,v=m.shared.pending;if(v!==null){m.shared.pending=null;var R=v,j=R.next;R.next=null,_===null?E=j:_.next=j,_=R;var ee=i.alternate;ee!==null&&(ee=ee.updateQueue,v=ee.lastBaseUpdate,v!==_&&(v===null?ee.firstBaseUpdate=j:v.next=j,ee.lastBaseUpdate=R))}if(E!==null){var se=m.baseState;_=0,ee=j=R=null,v=E;do{var X=v.lane,Te=v.eventTime;if((f&X)===X){ee!==null&&(ee=ee.next={eventTime:Te,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var xe=i,Ce=v;switch(X=s,Te=a,Ce.tag){case 1:if(xe=Ce.payload,typeof xe=="function"){se=xe.call(Te,se,X);break e}se=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Ce.payload,X=typeof xe=="function"?xe.call(Te,se,X):xe,X==null)break e;se=C({},se,X);break e;case 2:ri=!0}}v.callback!==null&&v.lane!==0&&(i.flags|=64,X=m.effects,X===null?m.effects=[v]:X.push(v))}else Te={eventTime:Te,lane:X,tag:v.tag,payload:v.payload,callback:v.callback,next:null},ee===null?(j=ee=Te,R=se):ee=ee.next=Te,_|=X;if(v=v.next,v===null){if(v=m.shared.pending,v===null)break;X=v,v=X.next,X.next=null,m.lastBaseUpdate=X,m.shared.pending=null}}while(!0);if(ee===null&&(R=se),m.baseState=R,m.firstBaseUpdate=j,m.lastBaseUpdate=ee,s=m.shared.interleaved,s!==null){m=s;do _|=m.lane,m=m.next;while(m!==s)}else E===null&&(m.shared.lanes=0);Bi|=_,i.lanes=_,i.memoizedState=se}}function YT(i,s,a){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var f=i[s],m=f.callback;if(m!==null){if(f.callback=null,f=a,typeof m!="function")throw Error(n(191,m));m.call(f)}}}var yu={},gr=ei(yu),Tu=ei(yu),bu=ei(yu);function Mi(i){if(i===yu)throw Error(n(174));return i}function kh(i,s){switch(ut(bu,s),ut(Tu,i),ut(gr,yu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:de(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=de(s,i)}lt(gr),ut(gr,s)}function $s(){lt(gr),lt(Tu),lt(bu)}function WT(i){Mi(bu.current);var s=Mi(gr.current),a=de(s,i.type);s!==a&&(ut(Tu,i),ut(gr,a))}function wh(i){Tu.current===i&&(lt(gr),lt(Tu))}var mt=ei(0);function Ol(i){for(var s=i;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.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 vh=[];function Nh(){for(var i=0;i<vh.length;i++)vh[i]._workInProgressVersionPrimary=null;vh.length=0}var Pl=Z.ReactCurrentDispatcher,Ih=Z.ReactCurrentBatchConfig,Fi=0,gt=null,Pt=null,Ut=null,Rl=!1,_u=!1,Su=0,m4=0;function Zt(){throw Error(n(321))}function Oh(i,s){if(s===null)return!1;for(var a=0;a<s.length&&a<i.length;a++)if(!Qn(i[a],s[a]))return!1;return!0}function Ph(i,s,a,f,m,E){if(Fi=E,gt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Pl.current=i===null||i.memoizedState===null?T4:b4,i=a(f,m),_u){E=0;do{if(_u=!1,Su=0,25<=E)throw Error(n(301));E+=1,Ut=Pt=null,s.updateQueue=null,Pl.current=_4,i=a(f,m)}while(_u)}if(Pl.current=Ml,s=Pt!==null&&Pt.next!==null,Fi=0,Ut=Pt=gt=null,Rl=!1,s)throw Error(n(300));return i}function Rh(){var i=Su!==0;return Su=0,i}function Er(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?gt.memoizedState=Ut=i:Ut=Ut.next=i,Ut}function Hn(){if(Pt===null){var i=gt.alternate;i=i!==null?i.memoizedState:null}else i=Pt.next;var s=Ut===null?gt.memoizedState:Ut.next;if(s!==null)Ut=s,Pt=i;else{if(i===null)throw Error(n(310));Pt=i,i={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},Ut===null?gt.memoizedState=Ut=i:Ut=Ut.next=i}return Ut}function xu(i,s){return typeof s=="function"?s(i):s}function Lh(i){var s=Hn(),a=s.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=i;var f=Pt,m=f.baseQueue,E=a.pending;if(E!==null){if(m!==null){var _=m.next;m.next=E.next,E.next=_}f.baseQueue=m=E,a.pending=null}if(m!==null){E=m.next,f=f.baseState;var v=_=null,R=null,j=E;do{var ee=j.lane;if((Fi&ee)===ee)R!==null&&(R=R.next={lane:0,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),f=j.hasEagerState?j.eagerState:i(f,j.action);else{var se={lane:ee,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null};R===null?(v=R=se,_=f):R=R.next=se,gt.lanes|=ee,Bi|=ee}j=j.next}while(j!==null&&j!==E);R===null?_=f:R.next=v,Qn(f,s.memoizedState)||(yn=!0),s.memoizedState=f,s.baseState=_,s.baseQueue=R,a.lastRenderedState=f}if(i=a.interleaved,i!==null){m=i;do E=m.lane,gt.lanes|=E,Bi|=E,m=m.next;while(m!==i)}else m===null&&(a.lanes=0);return[s.memoizedState,a.dispatch]}function Dh(i){var s=Hn(),a=s.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=i;var f=a.dispatch,m=a.pending,E=s.memoizedState;if(m!==null){a.pending=null;var _=m=m.next;do E=i(E,_.action),_=_.next;while(_!==m);Qn(E,s.memoizedState)||(yn=!0),s.memoizedState=E,s.baseQueue===null&&(s.baseState=E),a.lastRenderedState=E}return[E,f]}function GT(){}function KT(i,s){var a=gt,f=Hn(),m=s(),E=!Qn(f.memoizedState,m);if(E&&(f.memoizedState=m,yn=!0),f=f.queue,Mh(JT.bind(null,a,f,i),[i]),f.getSnapshot!==s||E||Ut!==null&&Ut.memoizedState.tag&1){if(a.flags|=2048,Cu(9,XT.bind(null,a,f,m,s),void 0,null),Ht===null)throw Error(n(349));(Fi&30)!==0||QT(a,s,m)}return m}function QT(i,s,a){i.flags|=16384,i={getSnapshot:s,value:a},s=gt.updateQueue,s===null?(s={lastEffect:null,stores:null},gt.updateQueue=s,s.stores=[i]):(a=s.stores,a===null?s.stores=[i]:a.push(i))}function XT(i,s,a,f){s.value=a,s.getSnapshot=f,ZT(s)&&eb(i)}function JT(i,s,a){return a(function(){ZT(s)&&eb(i)})}function ZT(i){var s=i.getSnapshot;i=i.value;try{var a=s();return!Qn(i,a)}catch(f){return!0}}function eb(i){var s=Rr(i,1);s!==null&&tr(s,i,1,-1)}function tb(i){var s=Er();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xu,lastRenderedState:i},s.queue=i,i=i.dispatch=y4.bind(null,gt,i),[s.memoizedState,i]}function Cu(i,s,a,f){return i={tag:i,create:s,destroy:a,deps:f,next:null},s=gt.updateQueue,s===null?(s={lastEffect:null,stores:null},gt.updateQueue=s,s.lastEffect=i.next=i):(a=s.lastEffect,a===null?s.lastEffect=i.next=i:(f=a.next,a.next=i,i.next=f,s.lastEffect=i)),i}function nb(){return Hn().memoizedState}function Ll(i,s,a,f){var m=Er();gt.flags|=i,m.memoizedState=Cu(1|s,a,void 0,f===void 0?null:f)}function Dl(i,s,a,f){var m=Hn();f=f===void 0?null:f;var E=void 0;if(Pt!==null){var _=Pt.memoizedState;if(E=_.destroy,f!==null&&Oh(f,_.deps)){m.memoizedState=Cu(s,a,E,f);return}}gt.flags|=i,m.memoizedState=Cu(1|s,a,E,f)}function rb(i,s){return Ll(8390656,8,i,s)}function Mh(i,s){return Dl(2048,8,i,s)}function ib(i,s){return Dl(4,2,i,s)}function sb(i,s){return Dl(4,4,i,s)}function ob(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 ub(i,s,a){return a=a!=null?a.concat([i]):null,Dl(4,4,ob.bind(null,s,i),a)}function Fh(){}function ab(i,s){var a=Hn();s=s===void 0?null:s;var f=a.memoizedState;return f!==null&&s!==null&&Oh(s,f[1])?f[0]:(a.memoizedState=[i,s],i)}function lb(i,s){var a=Hn();s=s===void 0?null:s;var f=a.memoizedState;return f!==null&&s!==null&&Oh(s,f[1])?f[0]:(i=i(),a.memoizedState=[i,s],i)}function cb(i,s,a){return(Fi&21)===0?(i.baseState&&(i.baseState=!1,yn=!0),i.memoizedState=a):(Qn(a,s)||(a=Hy(),gt.lanes|=a,Bi|=a,i.baseState=!0),s)}function g4(i,s){var a=nt;nt=a!==0&&4>a?a:4,i(!0);var f=Ih.transition;Ih.transition={};try{i(!1),s()}finally{nt=a,Ih.transition=f}}function fb(){return Hn().memoizedState}function E4(i,s,a){var f=ai(i);if(a={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null},db(i))hb(s,a);else if(a=$T(i,s,a,f),a!==null){var m=on();tr(a,i,f,m),pb(a,s,f)}}function y4(i,s,a){var f=ai(i),m={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null};if(db(i))hb(s,m);else{var E=i.alternate;if(i.lanes===0&&(E===null||E.lanes===0)&&(E=s.lastRenderedReducer,E!==null))try{var _=s.lastRenderedState,v=E(_,a);if(m.hasEagerState=!0,m.eagerState=v,Qn(v,_)){var R=s.interleaved;R===null?(m.next=m,Ch(s)):(m.next=R.next,R.next=m),s.interleaved=m;return}}catch(j){}finally{}a=$T(i,s,m,f),a!==null&&(m=on(),tr(a,i,f,m),pb(a,s,f))}}function db(i){var s=i.alternate;return i===gt||s!==null&&s===gt}function hb(i,s){_u=Rl=!0;var a=i.pending;a===null?s.next=s:(s.next=a.next,a.next=s),i.pending=s}function pb(i,s,a){if((a&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,a|=f,s.lanes=a,Ud(i,a)}}var Ml={readContext:Un,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useInsertionEffect:Zt,useLayoutEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useMutableSource:Zt,useSyncExternalStore:Zt,useId:Zt,unstable_isNewReconciler:!1},T4={readContext:Un,useCallback:function(i,s){return Er().memoizedState=[i,s===void 0?null:s],i},useContext:Un,useEffect:rb,useImperativeHandle:function(i,s,a){return a=a!=null?a.concat([i]):null,Ll(4194308,4,ob.bind(null,s,i),a)},useLayoutEffect:function(i,s){return Ll(4194308,4,i,s)},useInsertionEffect:function(i,s){return Ll(4,2,i,s)},useMemo:function(i,s){var a=Er();return s=s===void 0?null:s,i=i(),a.memoizedState=[i,s],i},useReducer:function(i,s,a){var f=Er();return s=a!==void 0?a(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=E4.bind(null,gt,i),[f.memoizedState,i]},useRef:function(i){var s=Er();return i={current:i},s.memoizedState=i},useState:tb,useDebugValue:Fh,useDeferredValue:function(i){return Er().memoizedState=i},useTransition:function(){var i=tb(!1),s=i[0];return i=g4.bind(null,i[1]),Er().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,a){var f=gt,m=Er();if(dt){if(a===void 0)throw Error(n(407));a=a()}else{if(a=s(),Ht===null)throw Error(n(349));(Fi&30)!==0||QT(f,s,a)}m.memoizedState=a;var E={value:a,getSnapshot:s};return m.queue=E,rb(JT.bind(null,f,E,i),[i]),f.flags|=2048,Cu(9,XT.bind(null,f,E,a,s),void 0,null),a},useId:function(){var i=Er(),s=Ht.identifierPrefix;if(dt){var a=Pr,f=Or;a=(f&~(1<<32-Kn(f)-1)).toString(32)+a,s=":"+s+"R"+a,a=Su++,0<a&&(s+="H"+a.toString(32)),s+=":"}else a=m4++,s=":"+s+"r"+a.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},b4={readContext:Un,useCallback:ab,useContext:Un,useEffect:Mh,useImperativeHandle:ub,useInsertionEffect:ib,useLayoutEffect:sb,useMemo:lb,useReducer:Lh,useRef:nb,useState:function(){return Lh(xu)},useDebugValue:Fh,useDeferredValue:function(i){var s=Hn();return cb(s,Pt.memoizedState,i)},useTransition:function(){var i=Lh(xu)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:GT,useSyncExternalStore:KT,useId:fb,unstable_isNewReconciler:!1},_4={readContext:Un,useCallback:ab,useContext:Un,useEffect:Mh,useImperativeHandle:ub,useInsertionEffect:ib,useLayoutEffect:sb,useMemo:lb,useReducer:Dh,useRef:nb,useState:function(){return Dh(xu)},useDebugValue:Fh,useDeferredValue:function(i){var s=Hn();return Pt===null?s.memoizedState=i:cb(s,Pt.memoizedState,i)},useTransition:function(){var i=Dh(xu)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:GT,useSyncExternalStore:KT,useId:fb,unstable_isNewReconciler:!1};function Jn(i,s){if(i&&i.defaultProps){s=C({},s),i=i.defaultProps;for(var a in i)s[a]===void 0&&(s[a]=i[a]);return s}return s}function Bh(i,s,a,f){s=i.memoizedState,a=a(f,s),a=a==null?s:C({},s,a),i.memoizedState=a,i.lanes===0&&(i.updateQueue.baseState=a)}var Fl={isMounted:function(i){return(i=i._reactInternals)?Ii(i)===i:!1},enqueueSetState:function(i,s,a){i=i._reactInternals;var f=on(),m=ai(i),E=Lr(f,m);E.payload=s,a!=null&&(E.callback=a),s=ii(i,E,m),s!==null&&(tr(s,i,m,f),Nl(s,i,m))},enqueueReplaceState:function(i,s,a){i=i._reactInternals;var f=on(),m=ai(i),E=Lr(f,m);E.tag=1,E.payload=s,a!=null&&(E.callback=a),s=ii(i,E,m),s!==null&&(tr(s,i,m,f),Nl(s,i,m))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var a=on(),f=ai(i),m=Lr(a,f);m.tag=2,s!=null&&(m.callback=s),s=ii(i,m,f),s!==null&&(tr(s,i,f,a),Nl(s,i,f))}};function mb(i,s,a,f,m,E,_){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,E,_):s.prototype&&s.prototype.isPureReactComponent?!cu(a,f)||!cu(m,E):!0}function gb(i,s,a){var f=!1,m=ti,E=s.contextType;return typeof E=="object"&&E!==null?E=Un(E):(m=En(s)?Pi:Jt.current,f=s.contextTypes,E=(f=f!=null)?Ms(i,m):ti),s=new s(a,E),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Fl,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=m,i.__reactInternalMemoizedMaskedChildContext=E),s}function Eb(i,s,a,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,f),s.state!==i&&Fl.enqueueReplaceState(s,s.state,null)}function Uh(i,s,a,f){var m=i.stateNode;m.props=a,m.state=i.memoizedState,m.refs={},Ah(i);var E=s.contextType;typeof E=="object"&&E!==null?m.context=Un(E):(E=En(s)?Pi:Jt.current,m.context=Ms(i,E)),m.state=i.memoizedState,E=s.getDerivedStateFromProps,typeof E=="function"&&(Bh(i,s,E,a),m.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(s=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),s!==m.state&&Fl.enqueueReplaceState(m,m.state,null),Il(i,a,m,f),m.state=i.memoizedState),typeof m.componentDidMount=="function"&&(i.flags|=4194308)}function Vs(i,s){try{var a="",f=s;do a+=be(f),f=f.return;while(f);var m=a}catch(E){m=`
74
- Error generating stack: `+E.message+`
75
- `+E.stack}return{value:i,source:s,stack:m,digest:null}}function Hh(i,s,a){return{value:i,source:null,stack:a!=null?a:null,digest:s!=null?s:null}}function zh(i,s){try{console.error(s.value)}catch(a){setTimeout(function(){throw a})}}var S4=typeof WeakMap=="function"?WeakMap:Map;function yb(i,s,a){a=Lr(-1,a),a.tag=3,a.payload={element:null};var f=s.value;return a.callback=function(){Vl||(Vl=!0,np=f),zh(i,s)},a}function Tb(i,s,a){a=Lr(-1,a),a.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var m=s.value;a.payload=function(){return f(m)},a.callback=function(){zh(i,s)}}var E=i.stateNode;return E!==null&&typeof E.componentDidCatch=="function"&&(a.callback=function(){zh(i,s),typeof f!="function"&&(oi===null?oi=new Set([this]):oi.add(this));var _=s.stack;this.componentDidCatch(s.value,{componentStack:_!==null?_:""})}),a}function bb(i,s,a){var f=i.pingCache;if(f===null){f=i.pingCache=new S4;var m=new Set;f.set(s,m)}else m=f.get(s),m===void 0&&(m=new Set,f.set(s,m));m.has(a)||(m.add(a),i=M4.bind(null,i,s,a),s.then(i,i))}function _b(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 Sb(i,s,a,f,m){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(s=Lr(-1,1),s.tag=2,ii(a,s,1))),a.lanes|=1),i):(i.flags|=65536,i.lanes=m,i)}var x4=Z.ReactCurrentOwner,yn=!1;function sn(i,s,a,f){s.child=i===null?jT(s,null,a,f):Hs(s,i.child,a,f)}function xb(i,s,a,f,m){a=a.render;var E=s.ref;return js(s,m),f=Ph(i,s,a,f,E,m),a=Rh(),i!==null&&!yn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~m,Dr(i,s,m)):(dt&&a&&mh(s),s.flags|=1,sn(i,s,f,m),s.child)}function Cb(i,s,a,f,m){if(i===null){var E=a.type;return typeof E=="function"&&!lp(E)&&E.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(s.tag=15,s.type=E,Ab(i,s,E,f,m)):(i=Ql(a.type,null,f,s,s.mode,m),i.ref=s.ref,i.return=s,s.child=i)}if(E=i.child,(i.lanes&m)===0){var _=E.memoizedProps;if(a=a.compare,a=a!==null?a:cu,a(_,f)&&i.ref===s.ref)return Dr(i,s,m)}return s.flags|=1,i=ci(E,f),i.ref=s.ref,i.return=s,s.child=i}function Ab(i,s,a,f,m){if(i!==null){var E=i.memoizedProps;if(cu(E,f)&&i.ref===s.ref)if(yn=!1,s.pendingProps=f=E,(i.lanes&m)!==0)(i.flags&131072)!==0&&(yn=!0);else return s.lanes=i.lanes,Dr(i,s,m)}return jh(i,s,a,f,m)}function kb(i,s,a){var f=s.pendingProps,m=f.children,E=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ut(Ys,In),In|=a;else{if((a&1073741824)===0)return i=E!==null?E.baseLanes|a:a,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ut(Ys,In),In|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=E!==null?E.baseLanes:a,ut(Ys,In),In|=f}else E!==null?(f=E.baseLanes|a,s.memoizedState=null):f=a,ut(Ys,In),In|=f;return sn(i,s,m,a),s.child}function wb(i,s){var a=s.ref;(i===null&&a!==null||i!==null&&i.ref!==a)&&(s.flags|=512,s.flags|=2097152)}function jh(i,s,a,f,m){var E=En(a)?Pi:Jt.current;return E=Ms(s,E),js(s,m),a=Ph(i,s,a,f,E,m),f=Rh(),i!==null&&!yn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~m,Dr(i,s,m)):(dt&&f&&mh(s),s.flags|=1,sn(i,s,a,m),s.child)}function vb(i,s,a,f,m){if(En(a)){var E=!0;_l(s)}else E=!1;if(js(s,m),s.stateNode===null)Ul(i,s),gb(s,a,f),Uh(s,a,f,m),f=!0;else if(i===null){var _=s.stateNode,v=s.memoizedProps;_.props=v;var R=_.context,j=a.contextType;typeof j=="object"&&j!==null?j=Un(j):(j=En(a)?Pi:Jt.current,j=Ms(s,j));var ee=a.getDerivedStateFromProps,se=typeof ee=="function"||typeof _.getSnapshotBeforeUpdate=="function";se||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(v!==f||R!==j)&&Eb(s,_,f,j),ri=!1;var X=s.memoizedState;_.state=X,Il(s,f,_,m),R=s.memoizedState,v!==f||X!==R||gn.current||ri?(typeof ee=="function"&&(Bh(s,a,ee,f),R=s.memoizedState),(v=ri||mb(s,a,v,f,X,R,j))?(se||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=R),_.props=f,_.state=R,_.context=j,f=v):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{_=s.stateNode,VT(i,s),v=s.memoizedProps,j=s.type===s.elementType?v:Jn(s.type,v),_.props=j,se=s.pendingProps,X=_.context,R=a.contextType,typeof R=="object"&&R!==null?R=Un(R):(R=En(a)?Pi:Jt.current,R=Ms(s,R));var Te=a.getDerivedStateFromProps;(ee=typeof Te=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(v!==se||X!==R)&&Eb(s,_,f,R),ri=!1,X=s.memoizedState,_.state=X,Il(s,f,_,m);var xe=s.memoizedState;v!==se||X!==xe||gn.current||ri?(typeof Te=="function"&&(Bh(s,a,Te,f),xe=s.memoizedState),(j=ri||mb(s,a,j,f,X,xe,R)||!1)?(ee||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(f,xe,R),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(f,xe,R)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||v===i.memoizedProps&&X===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||v===i.memoizedProps&&X===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=xe),_.props=f,_.state=xe,_.context=R,f=j):(typeof _.componentDidUpdate!="function"||v===i.memoizedProps&&X===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||v===i.memoizedProps&&X===i.memoizedState||(s.flags|=1024),f=!1)}return $h(i,s,a,f,E,m)}function $h(i,s,a,f,m,E){wb(i,s);var _=(s.flags&128)!==0;if(!f&&!_)return m&&RT(s,a,!1),Dr(i,s,E);f=s.stateNode,x4.current=s;var v=_&&typeof a.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&_?(s.child=Hs(s,i.child,null,E),s.child=Hs(s,null,v,E)):sn(i,s,v,E),s.memoizedState=f.state,m&&RT(s,a,!0),s.child}function Nb(i){var s=i.stateNode;s.pendingContext?OT(i,s.pendingContext,s.pendingContext!==s.context):s.context&&OT(i,s.context,!1),kh(i,s.containerInfo)}function Ib(i,s,a,f,m){return Us(),Th(m),s.flags|=256,sn(i,s,a,f),s.child}var Vh={dehydrated:null,treeContext:null,retryLane:0};function qh(i){return{baseLanes:i,cachePool:null,transitions:null}}function Ob(i,s,a){var f=s.pendingProps,m=mt.current,E=!1,_=(s.flags&128)!==0,v;if((v=_)||(v=i!==null&&i.memoizedState===null?!1:(m&2)!==0),v?(E=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(m|=1),ut(mt,m&1),i===null)return yh(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):(_=f.children,i=f.fallback,E?(f=s.mode,E=s.child,_={mode:"hidden",children:_},(f&1)===0&&E!==null?(E.childLanes=0,E.pendingProps=_):E=Xl(_,f,0,null),i=ji(i,f,a,null),E.return=s,i.return=s,E.sibling=i,s.child=E,s.child.memoizedState=qh(a),s.memoizedState=Vh,i):Yh(s,_));if(m=i.memoizedState,m!==null&&(v=m.dehydrated,v!==null))return C4(i,s,_,f,v,m,a);if(E){E=f.fallback,_=s.mode,m=i.child,v=m.sibling;var R={mode:"hidden",children:f.children};return(_&1)===0&&s.child!==m?(f=s.child,f.childLanes=0,f.pendingProps=R,s.deletions=null):(f=ci(m,R),f.subtreeFlags=m.subtreeFlags&14680064),v!==null?E=ci(v,E):(E=ji(E,_,a,null),E.flags|=2),E.return=s,f.return=s,f.sibling=E,s.child=f,f=E,E=s.child,_=i.child.memoizedState,_=_===null?qh(a):{baseLanes:_.baseLanes|a,cachePool:null,transitions:_.transitions},E.memoizedState=_,E.childLanes=i.childLanes&~a,s.memoizedState=Vh,f}return E=i.child,i=E.sibling,f=ci(E,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=a),f.return=s,f.sibling=null,i!==null&&(a=s.deletions,a===null?(s.deletions=[i],s.flags|=16):a.push(i)),s.child=f,s.memoizedState=null,f}function Yh(i,s){return s=Xl({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Bl(i,s,a,f){return f!==null&&Th(f),Hs(s,i.child,null,a),i=Yh(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function C4(i,s,a,f,m,E,_){if(a)return s.flags&256?(s.flags&=-257,f=Hh(Error(n(422))),Bl(i,s,_,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(E=f.fallback,m=s.mode,f=Xl({mode:"visible",children:f.children},m,0,null),E=ji(E,m,_,null),E.flags|=2,f.return=s,E.return=s,f.sibling=E,s.child=f,(s.mode&1)!==0&&Hs(s,i.child,null,_),s.child.memoizedState=qh(_),s.memoizedState=Vh,E);if((s.mode&1)===0)return Bl(i,s,_,null);if(m.data==="$!"){if(f=m.nextSibling&&m.nextSibling.dataset,f)var v=f.dgst;return f=v,E=Error(n(419)),f=Hh(E,f,void 0),Bl(i,s,_,f)}if(v=(_&i.childLanes)!==0,yn||v){if(f=Ht,f!==null){switch(_&-_){case 4:m=2;break;case 16:m=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:m=32;break;case 536870912:m=268435456;break;default:m=0}m=(m&(f.suspendedLanes|_))!==0?0:m,m!==0&&m!==E.retryLane&&(E.retryLane=m,Rr(i,m),tr(f,i,m,-1))}return ap(),f=Hh(Error(n(421))),Bl(i,s,_,f)}return m.data==="$?"?(s.flags|=128,s.child=i.child,s=F4.bind(null,i),m._reactRetry=s,null):(i=E.treeContext,Nn=Zr(m.nextSibling),vn=s,dt=!0,Xn=null,i!==null&&(Fn[Bn++]=Or,Fn[Bn++]=Pr,Fn[Bn++]=Ri,Or=i.id,Pr=i.overflow,Ri=s),s=Yh(s,f.children),s.flags|=4096,s)}function Pb(i,s,a){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),xh(i.return,s,a)}function Wh(i,s,a,f,m){var E=i.memoizedState;E===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:a,tailMode:m}:(E.isBackwards=s,E.rendering=null,E.renderingStartTime=0,E.last=f,E.tail=a,E.tailMode=m)}function Rb(i,s,a){var f=s.pendingProps,m=f.revealOrder,E=f.tail;if(sn(i,s,f.children,a),f=mt.current,(f&2)!==0)f=f&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&&Pb(i,a,s);else if(i.tag===19)Pb(i,a,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}f&=1}if(ut(mt,f),(s.mode&1)===0)s.memoizedState=null;else switch(m){case"forwards":for(a=s.child,m=null;a!==null;)i=a.alternate,i!==null&&Ol(i)===null&&(m=a),a=a.sibling;a=m,a===null?(m=s.child,s.child=null):(m=a.sibling,a.sibling=null),Wh(s,!1,m,a,E);break;case"backwards":for(a=null,m=s.child,s.child=null;m!==null;){if(i=m.alternate,i!==null&&Ol(i)===null){s.child=m;break}i=m.sibling,m.sibling=a,a=m,m=i}Wh(s,!0,a,null,E);break;case"together":Wh(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Ul(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Dr(i,s,a){if(i!==null&&(s.dependencies=i.dependencies),Bi|=s.lanes,(a&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,a=ci(i,i.pendingProps),s.child=a,a.return=s;i.sibling!==null;)i=i.sibling,a=a.sibling=ci(i,i.pendingProps),a.return=s;a.sibling=null}return s.child}function A4(i,s,a){switch(s.tag){case 3:Nb(s),Us();break;case 5:WT(s);break;case 1:En(s.type)&&_l(s);break;case 4:kh(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,m=s.memoizedProps.value;ut(wl,f._currentValue),f._currentValue=m;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ut(mt,mt.current&1),s.flags|=128,null):(a&s.child.childLanes)!==0?Ob(i,s,a):(ut(mt,mt.current&1),i=Dr(i,s,a),i!==null?i.sibling:null);ut(mt,mt.current&1);break;case 19:if(f=(a&s.childLanes)!==0,(i.flags&128)!==0){if(f)return Rb(i,s,a);s.flags|=128}if(m=s.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),ut(mt,mt.current),f)break;return null;case 22:case 23:return s.lanes=0,kb(i,s,a)}return Dr(i,s,a)}var Lb,Gh,Db,Mb;Lb=function(i,s){for(var a=s.child;a!==null;){if(a.tag===5||a.tag===6)i.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Gh=function(){},Db=function(i,s,a,f){var m=i.memoizedProps;if(m!==f){i=s.stateNode,Mi(gr.current);var E=null;switch(a){case"input":m=qo(i,m),f=qo(i,f),E=[];break;case"select":m=C({},m,{value:void 0}),f=C({},f,{value:void 0}),E=[];break;case"textarea":m=Go(i,m),f=Go(i,f),E=[];break;default:typeof m.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=yl)}qt(a,f);var _;a=null;for(j in m)if(!f.hasOwnProperty(j)&&m.hasOwnProperty(j)&&m[j]!=null)if(j==="style"){var v=m[j];for(_ in v)v.hasOwnProperty(_)&&(a||(a={}),a[_]="")}else j!=="dangerouslySetInnerHTML"&&j!=="children"&&j!=="suppressContentEditableWarning"&&j!=="suppressHydrationWarning"&&j!=="autoFocus"&&(o.hasOwnProperty(j)?E||(E=[]):(E=E||[]).push(j,null));for(j in f){var R=f[j];if(v=m!=null?m[j]:void 0,f.hasOwnProperty(j)&&R!==v&&(R!=null||v!=null))if(j==="style")if(v){for(_ in v)!v.hasOwnProperty(_)||R&&R.hasOwnProperty(_)||(a||(a={}),a[_]="");for(_ in R)R.hasOwnProperty(_)&&v[_]!==R[_]&&(a||(a={}),a[_]=R[_])}else a||(E||(E=[]),E.push(j,a)),a=R;else j==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,v=v?v.__html:void 0,R!=null&&v!==R&&(E=E||[]).push(j,R)):j==="children"?typeof R!="string"&&typeof R!="number"||(E=E||[]).push(j,""+R):j!=="suppressContentEditableWarning"&&j!=="suppressHydrationWarning"&&(o.hasOwnProperty(j)?(R!=null&&j==="onScroll"&&at("scroll",i),E||v===R||(E=[])):(E=E||[]).push(j,R))}a&&(E=E||[]).push("style",a);var j=E;(s.updateQueue=j)&&(s.flags|=4)}},Mb=function(i,s,a,f){a!==f&&(s.flags|=4)};function Au(i,s){if(!dt)switch(i.tailMode){case"hidden":s=i.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?i.tail=null:a.sibling=null;break;case"collapsed":a=i.tail;for(var f=null;a!==null;)a.alternate!==null&&(f=a),a=a.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function en(i){var s=i.alternate!==null&&i.alternate.child===i.child,a=0,f=0;if(s)for(var m=i.child;m!==null;)a|=m.lanes|m.childLanes,f|=m.subtreeFlags&14680064,f|=m.flags&14680064,m.return=i,m=m.sibling;else for(m=i.child;m!==null;)a|=m.lanes|m.childLanes,f|=m.subtreeFlags,f|=m.flags,m.return=i,m=m.sibling;return i.subtreeFlags|=f,i.childLanes=a,s}function k4(i,s,a){var f=s.pendingProps;switch(gh(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return en(s),null;case 1:return En(s.type)&&bl(),en(s),null;case 3:return f=s.stateNode,$s(),lt(gn),lt(Jt),Nh(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Al(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Xn!==null&&(sp(Xn),Xn=null))),Gh(i,s),en(s),null;case 5:wh(s);var m=Mi(bu.current);if(a=s.type,i!==null&&s.stateNode!=null)Db(i,s,a,f,m),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return en(s),null}if(i=Mi(gr.current),Al(s)){f=s.stateNode,a=s.type;var E=s.memoizedProps;switch(f[mr]=s,f[mu]=E,i=(s.mode&1)!==0,a){case"dialog":at("cancel",f),at("close",f);break;case"iframe":case"object":case"embed":at("load",f);break;case"video":case"audio":for(m=0;m<du.length;m++)at(du[m],f);break;case"source":at("error",f);break;case"img":case"image":case"link":at("error",f),at("load",f);break;case"details":at("toggle",f);break;case"input":Yo(f,E),at("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!E.multiple},at("invalid",f);break;case"textarea":Ga(f,E),at("invalid",f)}qt(a,E),m=null;for(var _ in E)if(E.hasOwnProperty(_)){var v=E[_];_==="children"?typeof v=="string"?f.textContent!==v&&(E.suppressHydrationWarning!==!0&&El(f.textContent,v,i),m=["children",v]):typeof v=="number"&&f.textContent!==""+v&&(E.suppressHydrationWarning!==!0&&El(f.textContent,v,i),m=["children",""+v]):o.hasOwnProperty(_)&&v!=null&&_==="onScroll"&&at("scroll",f)}switch(a){case"input":Bt(f),Wa(f,E,!0);break;case"textarea":Bt(f),Qa(f);break;case"select":case"option":break;default:typeof E.onClick=="function"&&(f.onclick=yl)}f=m,s.updateQueue=f,f!==null&&(s.flags|=4)}else{_=m.nodeType===9?m:m.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Q(a)),i==="http://www.w3.org/1999/xhtml"?a==="script"?(i=_.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=_.createElement(a,{is:f.is}):(i=_.createElement(a),a==="select"&&(_=i,f.multiple?_.multiple=!0:f.size&&(_.size=f.size))):i=_.createElementNS(i,a),i[mr]=s,i[mu]=f,Lb(i,s,!1,!1),s.stateNode=i;e:{switch(_=hr(a,f),a){case"dialog":at("cancel",i),at("close",i),m=f;break;case"iframe":case"object":case"embed":at("load",i),m=f;break;case"video":case"audio":for(m=0;m<du.length;m++)at(du[m],i);m=f;break;case"source":at("error",i),m=f;break;case"img":case"image":case"link":at("error",i),at("load",i),m=f;break;case"details":at("toggle",i),m=f;break;case"input":Yo(i,f),m=qo(i,f),at("invalid",i);break;case"option":m=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},m=C({},f,{value:void 0}),at("invalid",i);break;case"textarea":Ga(i,f),m=Go(i,f),at("invalid",i);break;default:m=f}qt(a,m),v=m;for(E in v)if(v.hasOwnProperty(E)){var R=v[E];E==="style"?Yr(i,R):E==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&Ye(i,R)):E==="children"?typeof R=="string"?(a!=="textarea"||R!=="")&&Je(i,R):typeof R=="number"&&Je(i,""+R):E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&E!=="autoFocus"&&(o.hasOwnProperty(E)?R!=null&&E==="onScroll"&&at("scroll",i):R!=null&&$(i,E,R,_))}switch(a){case"input":Bt(i),Wa(i,f,!1);break;case"textarea":Bt(i),Qa(i);break;case"option":f.value!=null&&i.setAttribute("value",""+Fe(f.value));break;case"select":i.multiple=!!f.multiple,E=f.value,E!=null?qr(i,!!f.multiple,E,!1):f.defaultValue!=null&&qr(i,!!f.multiple,f.defaultValue,!0);break;default:typeof m.onClick=="function"&&(i.onclick=yl)}switch(a){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return en(s),null;case 6:if(i&&s.stateNode!=null)Mb(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(a=Mi(bu.current),Mi(gr.current),Al(s)){if(f=s.stateNode,a=s.memoizedProps,f[mr]=s,(E=f.nodeValue!==a)&&(i=vn,i!==null))switch(i.tag){case 3:El(f.nodeValue,a,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&El(f.nodeValue,a,(i.mode&1)!==0)}E&&(s.flags|=4)}else f=(a.nodeType===9?a:a.ownerDocument).createTextNode(f),f[mr]=s,s.stateNode=f}return en(s),null;case 13:if(lt(mt),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(dt&&Nn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)UT(),Us(),s.flags|=98560,E=!1;else if(E=Al(s),f!==null&&f.dehydrated!==null){if(i===null){if(!E)throw Error(n(318));if(E=s.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(n(317));E[mr]=s}else Us(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;en(s),E=!1}else Xn!==null&&(sp(Xn),Xn=null),E=!0;if(!E)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=a,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(mt.current&1)!==0?Rt===0&&(Rt=3):ap())),s.updateQueue!==null&&(s.flags|=4),en(s),null);case 4:return $s(),Gh(i,s),i===null&&hu(s.stateNode.containerInfo),en(s),null;case 10:return Sh(s.type._context),en(s),null;case 17:return En(s.type)&&bl(),en(s),null;case 19:if(lt(mt),E=s.memoizedState,E===null)return en(s),null;if(f=(s.flags&128)!==0,_=E.rendering,_===null)if(f)Au(E,!1);else{if(Rt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(_=Ol(i),_!==null){for(s.flags|=128,Au(E,!1),f=_.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=a,a=s.child;a!==null;)E=a,i=f,E.flags&=14680066,_=E.alternate,_===null?(E.childLanes=0,E.lanes=i,E.child=null,E.subtreeFlags=0,E.memoizedProps=null,E.memoizedState=null,E.updateQueue=null,E.dependencies=null,E.stateNode=null):(E.childLanes=_.childLanes,E.lanes=_.lanes,E.child=_.child,E.subtreeFlags=0,E.deletions=null,E.memoizedProps=_.memoizedProps,E.memoizedState=_.memoizedState,E.updateQueue=_.updateQueue,E.type=_.type,i=_.dependencies,E.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),a=a.sibling;return ut(mt,mt.current&1|2),s.child}i=i.sibling}E.tail!==null&&At()>Ws&&(s.flags|=128,f=!0,Au(E,!1),s.lanes=4194304)}else{if(!f)if(i=Ol(_),i!==null){if(s.flags|=128,f=!0,a=i.updateQueue,a!==null&&(s.updateQueue=a,s.flags|=4),Au(E,!0),E.tail===null&&E.tailMode==="hidden"&&!_.alternate&&!dt)return en(s),null}else 2*At()-E.renderingStartTime>Ws&&a!==1073741824&&(s.flags|=128,f=!0,Au(E,!1),s.lanes=4194304);E.isBackwards?(_.sibling=s.child,s.child=_):(a=E.last,a!==null?a.sibling=_:s.child=_,E.last=_)}return E.tail!==null?(s=E.tail,E.rendering=s,E.tail=s.sibling,E.renderingStartTime=At(),s.sibling=null,a=mt.current,ut(mt,f?a&1|2:a&1),s):(en(s),null);case 22:case 23:return up(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(In&1073741824)!==0&&(en(s),s.subtreeFlags&6&&(s.flags|=8192)):en(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function w4(i,s){switch(gh(s),s.tag){case 1:return En(s.type)&&bl(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return $s(),lt(gn),lt(Jt),Nh(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return wh(s),null;case 13:if(lt(mt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Us()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return lt(mt),null;case 4:return $s(),null;case 10:return Sh(s.type._context),null;case 22:case 23:return up(),null;case 24:return null;default:return null}}var Hl=!1,tn=!1,v4=typeof WeakSet=="function"?WeakSet:Set,Se=null;function qs(i,s){var a=i.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(f){yt(i,s,f)}else a.current=null}function Kh(i,s,a){try{a()}catch(f){yt(i,s,f)}}var Fb=!1;function N4(i,s){if(uh=ol,i=mT(),Zd(i)){if("selectionStart"in i)var a={start:i.selectionStart,end:i.selectionEnd};else e:{a=(a=i.ownerDocument)&&a.defaultView||window;var f=a.getSelection&&a.getSelection();if(f&&f.rangeCount!==0){a=f.anchorNode;var m=f.anchorOffset,E=f.focusNode;f=f.focusOffset;try{a.nodeType,E.nodeType}catch(fe){a=null;break e}var _=0,v=-1,R=-1,j=0,ee=0,se=i,X=null;t:for(;;){for(var Te;se!==a||m!==0&&se.nodeType!==3||(v=_+m),se!==E||f!==0&&se.nodeType!==3||(R=_+f),se.nodeType===3&&(_+=se.nodeValue.length),(Te=se.firstChild)!==null;)X=se,se=Te;for(;;){if(se===i)break t;if(X===a&&++j===m&&(v=_),X===E&&++ee===f&&(R=_),(Te=se.nextSibling)!==null)break;se=X,X=se.parentNode}se=Te}a=v===-1||R===-1?null:{start:v,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(ah={focusedElem:i,selectionRange:a},ol=!1,Se=s;Se!==null;)if(s=Se,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Se=i;else for(;Se!==null;){s=Se;try{var xe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var Ce=xe.memoizedProps,kt=xe.memoizedState,F=s.stateNode,D=F.getSnapshotBeforeUpdate(s.elementType===s.type?Ce:Jn(s.type,Ce),kt);F.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var z=s.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(fe){yt(s,s.return,fe)}if(i=s.sibling,i!==null){i.return=s.return,Se=i;break}Se=s.return}return xe=Fb,Fb=!1,xe}function ku(i,s,a){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var m=f=f.next;do{if((m.tag&i)===i){var E=m.destroy;m.destroy=void 0,E!==void 0&&Kh(s,a,E)}m=m.next}while(m!==f)}}function zl(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var a=s=s.next;do{if((a.tag&i)===i){var f=a.create;a.destroy=f()}a=a.next}while(a!==s)}}function Qh(i){var s=i.ref;if(s!==null){var a=i.stateNode;switch(i.tag){case 5:i=a;break;default:i=a}typeof s=="function"?s(i):s.current=i}}function Bb(i){var s=i.alternate;s!==null&&(i.alternate=null,Bb(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[mr],delete s[mu],delete s[dh],delete s[f4],delete s[d4])),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 Ub(i){return i.tag===5||i.tag===3||i.tag===4}function Hb(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Ub(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 Xh(i,s,a){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?a.nodeType===8?a.parentNode.insertBefore(i,s):a.insertBefore(i,s):(a.nodeType===8?(s=a.parentNode,s.insertBefore(i,a)):(s=a,s.appendChild(i)),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=yl));else if(f!==4&&(i=i.child,i!==null))for(Xh(i,s,a),i=i.sibling;i!==null;)Xh(i,s,a),i=i.sibling}function Jh(i,s,a){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?a.insertBefore(i,s):a.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(Jh(i,s,a),i=i.sibling;i!==null;)Jh(i,s,a),i=i.sibling}var Yt=null,Zn=!1;function si(i,s,a){for(a=a.child;a!==null;)zb(i,s,a),a=a.sibling}function zb(i,s,a){if(pr&&typeof pr.onCommitFiberUnmount=="function")try{pr.onCommitFiberUnmount(el,a)}catch(v){}switch(a.tag){case 5:tn||qs(a,s);case 6:var f=Yt,m=Zn;Yt=null,si(i,s,a),Yt=f,Zn=m,Yt!==null&&(Zn?(i=Yt,a=a.stateNode,i.nodeType===8?i.parentNode.removeChild(a):i.removeChild(a)):Yt.removeChild(a.stateNode));break;case 18:Yt!==null&&(Zn?(i=Yt,a=a.stateNode,i.nodeType===8?fh(i.parentNode,a):i.nodeType===1&&fh(i,a),iu(i)):fh(Yt,a.stateNode));break;case 4:f=Yt,m=Zn,Yt=a.stateNode.containerInfo,Zn=!0,si(i,s,a),Yt=f,Zn=m;break;case 0:case 11:case 14:case 15:if(!tn&&(f=a.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){m=f=f.next;do{var E=m,_=E.destroy;E=E.tag,_!==void 0&&((E&2)!==0||(E&4)!==0)&&Kh(a,s,_),m=m.next}while(m!==f)}si(i,s,a);break;case 1:if(!tn&&(qs(a,s),f=a.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=a.memoizedProps,f.state=a.memoizedState,f.componentWillUnmount()}catch(v){yt(a,s,v)}si(i,s,a);break;case 21:si(i,s,a);break;case 22:a.mode&1?(tn=(f=tn)||a.memoizedState!==null,si(i,s,a),tn=f):si(i,s,a);break;default:si(i,s,a)}}function jb(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var a=i.stateNode;a===null&&(a=i.stateNode=new v4),s.forEach(function(f){var m=B4.bind(null,i,f);a.has(f)||(a.add(f),f.then(m,m))})}}function er(i,s){var a=s.deletions;if(a!==null)for(var f=0;f<a.length;f++){var m=a[f];try{var E=i,_=s,v=_;e:for(;v!==null;){switch(v.tag){case 5:Yt=v.stateNode,Zn=!1;break e;case 3:Yt=v.stateNode.containerInfo,Zn=!0;break e;case 4:Yt=v.stateNode.containerInfo,Zn=!0;break e}v=v.return}if(Yt===null)throw Error(n(160));zb(E,_,m),Yt=null,Zn=!1;var R=m.alternate;R!==null&&(R.return=null),m.return=null}catch(j){yt(m,s,j)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)$b(s,i),s=s.sibling}function $b(i,s){var a=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(er(s,i),yr(i),f&4){try{ku(3,i,i.return),zl(3,i)}catch(Ce){yt(i,i.return,Ce)}try{ku(5,i,i.return)}catch(Ce){yt(i,i.return,Ce)}}break;case 1:er(s,i),yr(i),f&512&&a!==null&&qs(a,a.return);break;case 5:if(er(s,i),yr(i),f&512&&a!==null&&qs(a,a.return),i.flags&32){var m=i.stateNode;try{Je(m,"")}catch(Ce){yt(i,i.return,Ce)}}if(f&4&&(m=i.stateNode,m!=null)){var E=i.memoizedProps,_=a!==null?a.memoizedProps:E,v=i.type,R=i.updateQueue;if(i.updateQueue=null,R!==null)try{v==="input"&&E.type==="radio"&&E.name!=null&&Wo(m,E),hr(v,_);var j=hr(v,E);for(_=0;_<R.length;_+=2){var ee=R[_],se=R[_+1];ee==="style"?Yr(m,se):ee==="dangerouslySetInnerHTML"?Ye(m,se):ee==="children"?Je(m,se):$(m,ee,se,j)}switch(v){case"input":xs(m,E);break;case"textarea":Ka(m,E);break;case"select":var X=m._wrapperState.wasMultiple;m._wrapperState.wasMultiple=!!E.multiple;var Te=E.value;Te!=null?qr(m,!!E.multiple,Te,!1):X!==!!E.multiple&&(E.defaultValue!=null?qr(m,!!E.multiple,E.defaultValue,!0):qr(m,!!E.multiple,E.multiple?[]:"",!1))}m[mu]=E}catch(Ce){yt(i,i.return,Ce)}}break;case 6:if(er(s,i),yr(i),f&4){if(i.stateNode===null)throw Error(n(162));m=i.stateNode,E=i.memoizedProps;try{m.nodeValue=E}catch(Ce){yt(i,i.return,Ce)}}break;case 3:if(er(s,i),yr(i),f&4&&a!==null&&a.memoizedState.isDehydrated)try{iu(s.containerInfo)}catch(Ce){yt(i,i.return,Ce)}break;case 4:er(s,i),yr(i);break;case 13:er(s,i),yr(i),m=i.child,m.flags&8192&&(E=m.memoizedState!==null,m.stateNode.isHidden=E,!E||m.alternate!==null&&m.alternate.memoizedState!==null||(tp=At())),f&4&&jb(i);break;case 22:if(ee=a!==null&&a.memoizedState!==null,i.mode&1?(tn=(j=tn)||ee,er(s,i),tn=j):er(s,i),yr(i),f&8192){if(j=i.memoizedState!==null,(i.stateNode.isHidden=j)&&!ee&&(i.mode&1)!==0)for(Se=i,ee=i.child;ee!==null;){for(se=Se=ee;Se!==null;){switch(X=Se,Te=X.child,X.tag){case 0:case 11:case 14:case 15:ku(4,X,X.return);break;case 1:qs(X,X.return);var xe=X.stateNode;if(typeof xe.componentWillUnmount=="function"){f=X,a=X.return;try{s=f,xe.props=s.memoizedProps,xe.state=s.memoizedState,xe.componentWillUnmount()}catch(Ce){yt(f,a,Ce)}}break;case 5:qs(X,X.return);break;case 22:if(X.memoizedState!==null){Yb(se);continue}}Te!==null?(Te.return=X,Se=Te):Yb(se)}ee=ee.sibling}e:for(ee=null,se=i;;){if(se.tag===5){if(ee===null){ee=se;try{m=se.stateNode,j?(E=m.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none"):(v=se.stateNode,R=se.memoizedProps.style,_=R!=null&&R.hasOwnProperty("display")?R.display:null,v.style.display=Mn("display",_))}catch(Ce){yt(i,i.return,Ce)}}}else if(se.tag===6){if(ee===null)try{se.stateNode.nodeValue=j?"":se.memoizedProps}catch(Ce){yt(i,i.return,Ce)}}else if((se.tag!==22&&se.tag!==23||se.memoizedState===null||se===i)&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===i)break e;for(;se.sibling===null;){if(se.return===null||se.return===i)break e;ee===se&&(ee=null),se=se.return}ee===se&&(ee=null),se.sibling.return=se.return,se=se.sibling}}break;case 19:er(s,i),yr(i),f&4&&jb(i);break;case 21:break;default:er(s,i),yr(i)}}function yr(i){var s=i.flags;if(s&2){try{e:{for(var a=i.return;a!==null;){if(Ub(a)){var f=a;break e}a=a.return}throw Error(n(160))}switch(f.tag){case 5:var m=f.stateNode;f.flags&32&&(Je(m,""),f.flags&=-33);var E=Hb(i);Jh(i,E,m);break;case 3:case 4:var _=f.stateNode.containerInfo,v=Hb(i);Xh(i,v,_);break;default:throw Error(n(161))}}catch(R){yt(i,i.return,R)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function I4(i,s,a){Se=i,Vb(i)}function Vb(i,s,a){for(var f=(i.mode&1)!==0;Se!==null;){var m=Se,E=m.child;if(m.tag===22&&f){var _=m.memoizedState!==null||Hl;if(!_){var v=m.alternate,R=v!==null&&v.memoizedState!==null||tn;v=Hl;var j=tn;if(Hl=_,(tn=R)&&!j)for(Se=m;Se!==null;)_=Se,R=_.child,_.tag===22&&_.memoizedState!==null?Wb(m):R!==null?(R.return=_,Se=R):Wb(m);for(;E!==null;)Se=E,Vb(E),E=E.sibling;Se=m,Hl=v,tn=j}qb(i)}else(m.subtreeFlags&8772)!==0&&E!==null?(E.return=m,Se=E):qb(i)}}function qb(i){for(;Se!==null;){var s=Se;if((s.flags&8772)!==0){var a=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:tn||zl(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!tn)if(a===null)f.componentDidMount();else{var m=s.elementType===s.type?a.memoizedProps:Jn(s.type,a.memoizedProps);f.componentDidUpdate(m,a.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var E=s.updateQueue;E!==null&&YT(s,E,f);break;case 3:var _=s.updateQueue;if(_!==null){if(a=null,s.child!==null)switch(s.child.tag){case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}YT(s,_,a)}break;case 5:var v=s.stateNode;if(a===null&&s.flags&4){a=v;var R=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&a.focus();break;case"img":R.src&&(a.src=R.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 ee=j.memoizedState;if(ee!==null){var se=ee.dehydrated;se!==null&&iu(se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}tn||s.flags&512&&Qh(s)}catch(X){yt(s,s.return,X)}}if(s===i){Se=null;break}if(a=s.sibling,a!==null){a.return=s.return,Se=a;break}Se=s.return}}function Yb(i){for(;Se!==null;){var s=Se;if(s===i){Se=null;break}var a=s.sibling;if(a!==null){a.return=s.return,Se=a;break}Se=s.return}}function Wb(i){for(;Se!==null;){var s=Se;try{switch(s.tag){case 0:case 11:case 15:var a=s.return;try{zl(4,s)}catch(R){yt(s,a,R)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var m=s.return;try{f.componentDidMount()}catch(R){yt(s,m,R)}}var E=s.return;try{Qh(s)}catch(R){yt(s,E,R)}break;case 5:var _=s.return;try{Qh(s)}catch(R){yt(s,_,R)}}}catch(R){yt(s,s.return,R)}if(s===i){Se=null;break}var v=s.sibling;if(v!==null){v.return=s.return,Se=v;break}Se=s.return}}var O4=Math.ceil,jl=Z.ReactCurrentDispatcher,Zh=Z.ReactCurrentOwner,zn=Z.ReactCurrentBatchConfig,Ze=0,Ht=null,Ot=null,Wt=0,In=0,Ys=ei(0),Rt=0,wu=null,Bi=0,$l=0,ep=0,vu=null,Tn=null,tp=0,Ws=1/0,Mr=null,Vl=!1,np=null,oi=null,ql=!1,ui=null,Yl=0,Nu=0,rp=null,Wl=-1,Gl=0;function on(){return(Ze&6)!==0?At():Wl!==-1?Wl:Wl=At()}function ai(i){return(i.mode&1)===0?1:(Ze&2)!==0&&Wt!==0?Wt&-Wt:p4.transition!==null?(Gl===0&&(Gl=Hy()),Gl):(i=nt,i!==0||(i=window.event,i=i===void 0?16:Ky(i.type)),i)}function tr(i,s,a,f){if(50<Nu)throw Nu=0,rp=null,Error(n(185));Zo(i,a,f),((Ze&2)===0||i!==Ht)&&(i===Ht&&((Ze&2)===0&&($l|=a),Rt===4&&li(i,Wt)),bn(i,f),a===1&&Ze===0&&(s.mode&1)===0&&(Ws=At()+500,Sl&&ni()))}function bn(i,s){var a=i.callbackNode;p6(i,s);var f=rl(i,i===Ht?Wt:0);if(f===0)a!==null&&Fy(a),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(a!=null&&Fy(a),s===1)i.tag===0?h4(Kb.bind(null,i)):LT(Kb.bind(null,i)),l4(function(){(Ze&6)===0&&ni()}),a=null;else{switch(zy(f)){case 1:a=Md;break;case 4:a=By;break;case 16:a=Za;break;case 536870912:a=Uy;break;default:a=Za}a=r_(a,Gb.bind(null,i))}i.callbackPriority=s,i.callbackNode=a}}function Gb(i,s){if(Wl=-1,Gl=0,(Ze&6)!==0)throw Error(n(327));var a=i.callbackNode;if(Gs()&&i.callbackNode!==a)return null;var f=rl(i,i===Ht?Wt:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=Kl(i,f);else{s=f;var m=Ze;Ze|=2;var E=Xb();(Ht!==i||Wt!==s)&&(Mr=null,Ws=At()+500,Hi(i,s));do try{L4();break}catch(v){Qb(i,v)}while(!0);_h(),jl.current=E,Ze=m,Ot!==null?s=0:(Ht=null,Wt=0,s=Rt)}if(s!==0){if(s===2&&(m=Fd(i),m!==0&&(f=m,s=ip(i,m))),s===1)throw a=wu,Hi(i,0),li(i,f),bn(i,At()),a;if(s===6)li(i,f);else{if(m=i.current.alternate,(f&30)===0&&!P4(m)&&(s=Kl(i,f),s===2&&(E=Fd(i),E!==0&&(f=E,s=ip(i,E))),s===1))throw a=wu,Hi(i,0),li(i,f),bn(i,At()),a;switch(i.finishedWork=m,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:zi(i,Tn,Mr);break;case 3:if(li(i,f),(f&130023424)===f&&(s=tp+500-At(),10<s)){if(rl(i,0)!==0)break;if(m=i.suspendedLanes,(m&f)!==f){on(),i.pingedLanes|=i.suspendedLanes&m;break}i.timeoutHandle=ch(zi.bind(null,i,Tn,Mr),s);break}zi(i,Tn,Mr);break;case 4:if(li(i,f),(f&4194240)===f)break;for(s=i.eventTimes,m=-1;0<f;){var _=31-Kn(f);E=1<<_,_=s[_],_>m&&(m=_),f&=~E}if(f=m,f=At()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*O4(f/1960))-f,10<f){i.timeoutHandle=ch(zi.bind(null,i,Tn,Mr),f);break}zi(i,Tn,Mr);break;case 5:zi(i,Tn,Mr);break;default:throw Error(n(329))}}}return bn(i,At()),i.callbackNode===a?Gb.bind(null,i):null}function ip(i,s){var a=vu;return i.current.memoizedState.isDehydrated&&(Hi(i,s).flags|=256),i=Kl(i,s),i!==2&&(s=Tn,Tn=a,s!==null&&sp(s)),i}function sp(i){Tn===null?Tn=i:Tn.push.apply(Tn,i)}function P4(i){for(var s=i;;){if(s.flags&16384){var a=s.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var f=0;f<a.length;f++){var m=a[f],E=m.getSnapshot;m=m.value;try{if(!Qn(E(),m))return!1}catch(_){return!1}}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;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 li(i,s){for(s&=~ep,s&=~$l,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var a=31-Kn(s),f=1<<a;i[a]=-1,s&=~f}}function Kb(i){if((Ze&6)!==0)throw Error(n(327));Gs();var s=rl(i,0);if((s&1)===0)return bn(i,At()),null;var a=Kl(i,s);if(i.tag!==0&&a===2){var f=Fd(i);f!==0&&(s=f,a=ip(i,f))}if(a===1)throw a=wu,Hi(i,0),li(i,s),bn(i,At()),a;if(a===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,zi(i,Tn,Mr),bn(i,At()),null}function op(i,s){var a=Ze;Ze|=1;try{return i(s)}finally{Ze=a,Ze===0&&(Ws=At()+500,Sl&&ni())}}function Ui(i){ui!==null&&ui.tag===0&&(Ze&6)===0&&Gs();var s=Ze;Ze|=1;var a=zn.transition,f=nt;try{if(zn.transition=null,nt=1,i)return i()}finally{nt=f,zn.transition=a,Ze=s,(Ze&6)===0&&ni()}}function up(){In=Ys.current,lt(Ys)}function Hi(i,s){i.finishedWork=null,i.finishedLanes=0;var a=i.timeoutHandle;if(a!==-1&&(i.timeoutHandle=-1,a4(a)),Ot!==null)for(a=Ot.return;a!==null;){var f=a;switch(gh(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&bl();break;case 3:$s(),lt(gn),lt(Jt),Nh();break;case 5:wh(f);break;case 4:$s();break;case 13:lt(mt);break;case 19:lt(mt);break;case 10:Sh(f.type._context);break;case 22:case 23:up()}a=a.return}if(Ht=i,Ot=i=ci(i.current,null),Wt=In=s,Rt=0,wu=null,ep=$l=Bi=0,Tn=vu=null,Di!==null){for(s=0;s<Di.length;s++)if(a=Di[s],f=a.interleaved,f!==null){a.interleaved=null;var m=f.next,E=a.pending;if(E!==null){var _=E.next;E.next=m,f.next=_}a.pending=f}Di=null}return i}function Qb(i,s){do{var a=Ot;try{if(_h(),Pl.current=Ml,Rl){for(var f=gt.memoizedState;f!==null;){var m=f.queue;m!==null&&(m.pending=null),f=f.next}Rl=!1}if(Fi=0,Ut=Pt=gt=null,_u=!1,Su=0,Zh.current=null,a===null||a.return===null){Rt=1,wu=s,Ot=null;break}e:{var E=i,_=a.return,v=a,R=s;if(s=Wt,v.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var j=R,ee=v,se=ee.tag;if((ee.mode&1)===0&&(se===0||se===11||se===15)){var X=ee.alternate;X?(ee.updateQueue=X.updateQueue,ee.memoizedState=X.memoizedState,ee.lanes=X.lanes):(ee.updateQueue=null,ee.memoizedState=null)}var Te=_b(_);if(Te!==null){Te.flags&=-257,Sb(Te,_,v,E,s),Te.mode&1&&bb(E,j,s),s=Te,R=j;var xe=s.updateQueue;if(xe===null){var Ce=new Set;Ce.add(R),s.updateQueue=Ce}else xe.add(R);break e}else{if((s&1)===0){bb(E,j,s),ap();break e}R=Error(n(426))}}else if(dt&&v.mode&1){var kt=_b(_);if(kt!==null){(kt.flags&65536)===0&&(kt.flags|=256),Sb(kt,_,v,E,s),Th(Vs(R,v));break e}}E=R=Vs(R,v),Rt!==4&&(Rt=2),vu===null?vu=[E]:vu.push(E),E=_;do{switch(E.tag){case 3:E.flags|=65536,s&=-s,E.lanes|=s;var F=yb(E,R,s);qT(E,F);break e;case 1:v=R;var D=E.type,z=E.stateNode;if((E.flags&128)===0&&(typeof D.getDerivedStateFromError=="function"||z!==null&&typeof z.componentDidCatch=="function"&&(oi===null||!oi.has(z)))){E.flags|=65536,s&=-s,E.lanes|=s;var fe=Tb(E,v,s);qT(E,fe);break e}}E=E.return}while(E!==null)}Zb(a)}catch(Ae){s=Ae,Ot===a&&a!==null&&(Ot=a=a.return);continue}break}while(!0)}function Xb(){var i=jl.current;return jl.current=Ml,i===null?Ml:i}function ap(){(Rt===0||Rt===3||Rt===2)&&(Rt=4),Ht===null||(Bi&268435455)===0&&($l&268435455)===0||li(Ht,Wt)}function Kl(i,s){var a=Ze;Ze|=2;var f=Xb();(Ht!==i||Wt!==s)&&(Mr=null,Hi(i,s));do try{R4();break}catch(m){Qb(i,m)}while(!0);if(_h(),Ze=a,jl.current=f,Ot!==null)throw Error(n(261));return Ht=null,Wt=0,Rt}function R4(){for(;Ot!==null;)Jb(Ot)}function L4(){for(;Ot!==null&&!s6();)Jb(Ot)}function Jb(i){var s=n_(i.alternate,i,In);i.memoizedProps=i.pendingProps,s===null?Zb(i):Ot=s,Zh.current=null}function Zb(i){var s=i;do{var a=s.alternate;if(i=s.return,(s.flags&32768)===0){if(a=k4(a,s,In),a!==null){Ot=a;return}}else{if(a=w4(a,s),a!==null){a.flags&=32767,Ot=a;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Rt=6,Ot=null;return}}if(s=s.sibling,s!==null){Ot=s;return}Ot=s=i}while(s!==null);Rt===0&&(Rt=5)}function zi(i,s,a){var f=nt,m=zn.transition;try{zn.transition=null,nt=1,D4(i,s,a,f)}finally{zn.transition=m,nt=f}return null}function D4(i,s,a,f){do Gs();while(ui!==null);if((Ze&6)!==0)throw Error(n(327));a=i.finishedWork;var m=i.finishedLanes;if(a===null)return null;if(i.finishedWork=null,i.finishedLanes=0,a===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var E=a.lanes|a.childLanes;if(m6(i,E),i===Ht&&(Ot=Ht=null,Wt=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||ql||(ql=!0,r_(Za,function(){return Gs(),null})),E=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||E){E=zn.transition,zn.transition=null;var _=nt;nt=1;var v=Ze;Ze|=4,Zh.current=null,N4(i,a),$b(a,i),t4(ah),ol=!!uh,ah=uh=null,i.current=a,I4(a),o6(),Ze=v,nt=_,zn.transition=E}else i.current=a;if(ql&&(ql=!1,ui=i,Yl=m),E=i.pendingLanes,E===0&&(oi=null),l6(a.stateNode),bn(i,At()),s!==null)for(f=i.onRecoverableError,a=0;a<s.length;a++)m=s[a],f(m.value,{componentStack:m.stack,digest:m.digest});if(Vl)throw Vl=!1,i=np,np=null,i;return(Yl&1)!==0&&i.tag!==0&&Gs(),E=i.pendingLanes,(E&1)!==0?i===rp?Nu++:(Nu=0,rp=i):Nu=0,ni(),null}function Gs(){if(ui!==null){var i=zy(Yl),s=zn.transition,a=nt;try{if(zn.transition=null,nt=16>i?16:i,ui===null)var f=!1;else{if(i=ui,ui=null,Yl=0,(Ze&6)!==0)throw Error(n(331));var m=Ze;for(Ze|=4,Se=i.current;Se!==null;){var E=Se,_=E.child;if((Se.flags&16)!==0){var v=E.deletions;if(v!==null){for(var R=0;R<v.length;R++){var j=v[R];for(Se=j;Se!==null;){var ee=Se;switch(ee.tag){case 0:case 11:case 15:ku(8,ee,E)}var se=ee.child;if(se!==null)se.return=ee,Se=se;else for(;Se!==null;){ee=Se;var X=ee.sibling,Te=ee.return;if(Bb(ee),ee===j){Se=null;break}if(X!==null){X.return=Te,Se=X;break}Se=Te}}}var xe=E.alternate;if(xe!==null){var Ce=xe.child;if(Ce!==null){xe.child=null;do{var kt=Ce.sibling;Ce.sibling=null,Ce=kt}while(Ce!==null)}}Se=E}}if((E.subtreeFlags&2064)!==0&&_!==null)_.return=E,Se=_;else e:for(;Se!==null;){if(E=Se,(E.flags&2048)!==0)switch(E.tag){case 0:case 11:case 15:ku(9,E,E.return)}var F=E.sibling;if(F!==null){F.return=E.return,Se=F;break e}Se=E.return}}var D=i.current;for(Se=D;Se!==null;){_=Se;var z=_.child;if((_.subtreeFlags&2064)!==0&&z!==null)z.return=_,Se=z;else e:for(_=D;Se!==null;){if(v=Se,(v.flags&2048)!==0)try{switch(v.tag){case 0:case 11:case 15:zl(9,v)}}catch(Ae){yt(v,v.return,Ae)}if(v===_){Se=null;break e}var fe=v.sibling;if(fe!==null){fe.return=v.return,Se=fe;break e}Se=v.return}}if(Ze=m,ni(),pr&&typeof pr.onPostCommitFiberRoot=="function")try{pr.onPostCommitFiberRoot(el,i)}catch(Ae){}f=!0}return f}finally{nt=a,zn.transition=s}}return!1}function e_(i,s,a){s=Vs(a,s),s=yb(i,s,1),i=ii(i,s,1),s=on(),i!==null&&(Zo(i,1,s),bn(i,s))}function yt(i,s,a){if(i.tag===3)e_(i,i,a);else for(;s!==null;){if(s.tag===3){e_(s,i,a);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(oi===null||!oi.has(f))){i=Vs(a,i),i=Tb(s,i,1),s=ii(s,i,1),i=on(),s!==null&&(Zo(s,1,i),bn(s,i));break}}s=s.return}}function M4(i,s,a){var f=i.pingCache;f!==null&&f.delete(s),s=on(),i.pingedLanes|=i.suspendedLanes&a,Ht===i&&(Wt&a)===a&&(Rt===4||Rt===3&&(Wt&130023424)===Wt&&500>At()-tp?Hi(i,0):ep|=a),bn(i,s)}function t_(i,s){s===0&&((i.mode&1)===0?s=1:(s=nl,nl<<=1,(nl&130023424)===0&&(nl=4194304)));var a=on();i=Rr(i,s),i!==null&&(Zo(i,s,a),bn(i,a))}function F4(i){var s=i.memoizedState,a=0;s!==null&&(a=s.retryLane),t_(i,a)}function B4(i,s){var a=0;switch(i.tag){case 13:var f=i.stateNode,m=i.memoizedState;m!==null&&(a=m.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),t_(i,a)}var n_;n_=function(i,s,a){if(i!==null)if(i.memoizedProps!==s.pendingProps||gn.current)yn=!0;else{if((i.lanes&a)===0&&(s.flags&128)===0)return yn=!1,A4(i,s,a);yn=(i.flags&131072)!==0}else yn=!1,dt&&(s.flags&1048576)!==0&&DT(s,Cl,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;Ul(i,s),i=s.pendingProps;var m=Ms(s,Jt.current);js(s,a),m=Ph(null,s,f,i,m,a);var E=Rh();return s.flags|=1,typeof m=="object"&&m!==null&&typeof m.render=="function"&&m.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,En(f)?(E=!0,_l(s)):E=!1,s.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,Ah(s),m.updater=Fl,s.stateNode=m,m._reactInternals=s,Uh(s,f,i,a),s=$h(null,s,f,!0,E,a)):(s.tag=0,dt&&E&&mh(s),sn(null,s,m,a),s=s.child),s;case 16:f=s.elementType;e:{switch(Ul(i,s),i=s.pendingProps,m=f._init,f=m(f._payload),s.type=f,m=s.tag=H4(f),i=Jn(f,i),m){case 0:s=jh(null,s,f,i,a);break e;case 1:s=vb(null,s,f,i,a);break e;case 11:s=xb(null,s,f,i,a);break e;case 14:s=Cb(null,s,f,Jn(f.type,i),a);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,m=s.pendingProps,m=s.elementType===f?m:Jn(f,m),jh(i,s,f,m,a);case 1:return f=s.type,m=s.pendingProps,m=s.elementType===f?m:Jn(f,m),vb(i,s,f,m,a);case 3:e:{if(Nb(s),i===null)throw Error(n(387));f=s.pendingProps,E=s.memoizedState,m=E.element,VT(i,s),Il(s,f,null,a);var _=s.memoizedState;if(f=_.element,E.isDehydrated)if(E={element:f,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},s.updateQueue.baseState=E,s.memoizedState=E,s.flags&256){m=Vs(Error(n(423)),s),s=Ib(i,s,f,a,m);break e}else if(f!==m){m=Vs(Error(n(424)),s),s=Ib(i,s,f,a,m);break e}else for(Nn=Zr(s.stateNode.containerInfo.firstChild),vn=s,dt=!0,Xn=null,a=jT(s,null,f,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Us(),f===m){s=Dr(i,s,a);break e}sn(i,s,f,a)}s=s.child}return s;case 5:return WT(s),i===null&&yh(s),f=s.type,m=s.pendingProps,E=i!==null?i.memoizedProps:null,_=m.children,lh(f,m)?_=null:E!==null&&lh(f,E)&&(s.flags|=32),wb(i,s),sn(i,s,_,a),s.child;case 6:return i===null&&yh(s),null;case 13:return Ob(i,s,a);case 4:return kh(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=Hs(s,null,f,a):sn(i,s,f,a),s.child;case 11:return f=s.type,m=s.pendingProps,m=s.elementType===f?m:Jn(f,m),xb(i,s,f,m,a);case 7:return sn(i,s,s.pendingProps,a),s.child;case 8:return sn(i,s,s.pendingProps.children,a),s.child;case 12:return sn(i,s,s.pendingProps.children,a),s.child;case 10:e:{if(f=s.type._context,m=s.pendingProps,E=s.memoizedProps,_=m.value,ut(wl,f._currentValue),f._currentValue=_,E!==null)if(Qn(E.value,_)){if(E.children===m.children&&!gn.current){s=Dr(i,s,a);break e}}else for(E=s.child,E!==null&&(E.return=s);E!==null;){var v=E.dependencies;if(v!==null){_=E.child;for(var R=v.firstContext;R!==null;){if(R.context===f){if(E.tag===1){R=Lr(-1,a&-a),R.tag=2;var j=E.updateQueue;if(j!==null){j=j.shared;var ee=j.pending;ee===null?R.next=R:(R.next=ee.next,ee.next=R),j.pending=R}}E.lanes|=a,R=E.alternate,R!==null&&(R.lanes|=a),xh(E.return,a,s),v.lanes|=a;break}R=R.next}}else if(E.tag===10)_=E.type===s.type?null:E.child;else if(E.tag===18){if(_=E.return,_===null)throw Error(n(341));_.lanes|=a,v=_.alternate,v!==null&&(v.lanes|=a),xh(_,a,s),_=E.sibling}else _=E.child;if(_!==null)_.return=E;else for(_=E;_!==null;){if(_===s){_=null;break}if(E=_.sibling,E!==null){E.return=_.return,_=E;break}_=_.return}E=_}sn(i,s,m.children,a),s=s.child}return s;case 9:return m=s.type,f=s.pendingProps.children,js(s,a),m=Un(m),f=f(m),s.flags|=1,sn(i,s,f,a),s.child;case 14:return f=s.type,m=Jn(f,s.pendingProps),m=Jn(f.type,m),Cb(i,s,f,m,a);case 15:return Ab(i,s,s.type,s.pendingProps,a);case 17:return f=s.type,m=s.pendingProps,m=s.elementType===f?m:Jn(f,m),Ul(i,s),s.tag=1,En(f)?(i=!0,_l(s)):i=!1,js(s,a),gb(s,f,m),Uh(s,f,m,a),$h(null,s,f,!0,i,a);case 19:return Rb(i,s,a);case 22:return kb(i,s,a)}throw Error(n(156,s.tag))};function r_(i,s){return My(i,s)}function U4(i,s,a,f){this.tag=i,this.key=a,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=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(i,s,a,f){return new U4(i,s,a,f)}function lp(i){return i=i.prototype,!(!i||!i.isReactComponent)}function H4(i){if(typeof i=="function")return lp(i)?1:0;if(i!=null){if(i=i.$$typeof,i===me)return 11;if(i===_e)return 14}return 2}function ci(i,s){var a=i.alternate;return a===null?(a=jn(i.tag,s,i.key,i.mode),a.elementType=i.elementType,a.type=i.type,a.stateNode=i.stateNode,a.alternate=i,i.alternate=a):(a.pendingProps=s,a.type=i.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=i.flags&14680064,a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,s=i.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=i.sibling,a.index=i.index,a.ref=i.ref,a}function Ql(i,s,a,f,m,E){var _=2;if(f=i,typeof i=="function")lp(i)&&(_=1);else if(typeof i=="string")_=5;else e:switch(i){case Ee:return ji(a.children,m,E,s);case ke:_=8,m|=8;break;case Ne:return i=jn(12,a,s,m|2),i.elementType=Ne,i.lanes=E,i;case pe:return i=jn(13,a,s,m),i.elementType=pe,i.lanes=E,i;case le:return i=jn(19,a,s,m),i.elementType=le,i.lanes=E,i;case ce:return Xl(a,m,E,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case U:_=10;break e;case ge:_=9;break e;case me:_=11;break e;case _e:_=14;break e;case Pe:_=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=jn(_,a,s,m),s.elementType=i,s.type=f,s.lanes=E,s}function ji(i,s,a,f){return i=jn(7,i,f,s),i.lanes=a,i}function Xl(i,s,a,f){return i=jn(22,i,f,s),i.elementType=ce,i.lanes=a,i.stateNode={isHidden:!1},i}function cp(i,s,a){return i=jn(6,i,null,s),i.lanes=a,i}function fp(i,s,a){return s=jn(4,i.children!==null?i.children:[],i.key,s),s.lanes=a,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function z4(i,s,a,f,m){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=Bd(0),this.expirationTimes=Bd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bd(0),this.identifierPrefix=f,this.onRecoverableError=m,this.mutableSourceEagerHydrationData=null}function dp(i,s,a,f,m,E,_,v,R){return i=new z4(i,s,a,v,R),s===1?(s=1,E===!0&&(s|=8)):s=0,E=jn(3,null,null,s),i.current=E,E.stateNode=i,E.memoizedState={element:f,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ah(E),i}function j4(i,s,a){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:f==null?null:""+f,children:i,containerInfo:s,implementation:a}}function i_(i){if(!i)return ti;i=i._reactInternals;e:{if(Ii(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(En(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var a=i.type;if(En(a))return PT(i,a,s)}return s}function s_(i,s,a,f,m,E,_,v,R){return i=dp(a,f,!0,i,m,E,_,v,R),i.context=i_(null),a=i.current,f=on(),m=ai(a),E=Lr(f,m),E.callback=s!=null?s:null,ii(a,E,m),i.current.lanes=m,Zo(i,m,f),bn(i,f),i}function Jl(i,s,a,f){var m=s.current,E=on(),_=ai(m);return a=i_(a),s.context===null?s.context=a:s.pendingContext=a,s=Lr(E,_),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=ii(m,s,_),i!==null&&(tr(i,m,_,E),Nl(i,m,_)),_}function Zl(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function o_(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var a=i.retryLane;i.retryLane=a!==0&&a<s?a:s}}function hp(i,s){o_(i,s),(i=i.alternate)&&o_(i,s)}function $4(){return null}var u_=typeof reportError=="function"?reportError:function(i){console.error(i)};function pp(i){this._internalRoot=i}ec.prototype.render=pp.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Jl(i,s,null,null)},ec.prototype.unmount=pp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Ui(function(){Jl(null,i,null,null)}),s[Nr]=null}};function ec(i){this._internalRoot=i}ec.prototype.unstable_scheduleHydration=function(i){if(i){var s=Vy();i={blockedOn:null,target:i,priority:s};for(var a=0;a<Qr.length&&s!==0&&s<Qr[a].priority;a++);Qr.splice(a,0,i),a===0&&Wy(i)}};function mp(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function tc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function a_(){}function V4(i,s,a,f,m){if(m){if(typeof f=="function"){var E=f;f=function(){var j=Zl(_);E.call(j)}}var _=s_(s,f,i,0,null,!1,!1,"",a_);return i._reactRootContainer=_,i[Nr]=_.current,hu(i.nodeType===8?i.parentNode:i),Ui(),_}for(;m=i.lastChild;)i.removeChild(m);if(typeof f=="function"){var v=f;f=function(){var j=Zl(R);v.call(j)}}var R=dp(i,0,!1,null,null,!1,!1,"",a_);return i._reactRootContainer=R,i[Nr]=R.current,hu(i.nodeType===8?i.parentNode:i),Ui(function(){Jl(s,R,a,f)}),R}function nc(i,s,a,f,m){var E=a._reactRootContainer;if(E){var _=E;if(typeof m=="function"){var v=m;m=function(){var R=Zl(_);v.call(R)}}Jl(s,_,i,m)}else _=V4(a,s,i,m,f);return Zl(_)}jy=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var a=Jo(s.pendingLanes);a!==0&&(Ud(s,a|1),bn(s,At()),(Ze&6)===0&&(Ws=At()+500,ni()))}break;case 13:Ui(function(){var f=Rr(i,1);if(f!==null){var m=on();tr(f,i,1,m)}}),hp(i,1)}},Hd=function(i){if(i.tag===13){var s=Rr(i,134217728);if(s!==null){var a=on();tr(s,i,134217728,a)}hp(i,134217728)}},$y=function(i){if(i.tag===13){var s=ai(i),a=Rr(i,s);if(a!==null){var f=on();tr(a,i,s,f)}hp(i,s)}},Vy=function(){return nt},qy=function(i,s){var a=nt;try{return nt=i,s()}finally{nt=a}},Pd=function(i,s,a){switch(s){case"input":if(xs(i,a),s=a.name,a.type==="radio"&&s!=null){for(a=i;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<a.length;s++){var f=a[s];if(f!==i&&f.form===i.form){var m=Tl(f);if(!m)throw Error(n(90));Ct(f),xs(f,m)}}}break;case"textarea":Ka(i,a);break;case"select":s=a.value,s!=null&&qr(i,!!a.multiple,s,!1)}},Ny=op,Iy=Ui;var q4={usingClientEntryPoint:!1,Events:[gu,Ls,Tl,wy,vy,op]},Iu={findFiberByHostInstance:Oi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Y4={bundleType:Iu.bundleType,version:Iu.version,rendererPackageName:Iu.rendererPackageName,rendererConfig:Iu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Z.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Ly(i),i===null?null:i.stateNode},findFiberByHostInstance:Iu.findFiberByHostInstance||$4,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 rc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rc.isDisabled&&rc.supportsFiber)try{el=rc.inject(Y4),pr=rc}catch(i){}}return mn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q4,mn.createPortal=function(i,s){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mp(s))throw Error(n(200));return j4(i,s,null,a)},mn.createRoot=function(i,s){if(!mp(i))throw Error(n(299));var a=!1,f="",m=u_;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(m=s.onRecoverableError)),s=dp(i,1,!1,null,null,a,!1,f,m),i[Nr]=s.current,hu(i.nodeType===8?i.parentNode:i),new pp(s)},mn.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=Ly(s),i=i===null?null:i.stateNode,i},mn.flushSync=function(i){return Ui(i)},mn.hydrate=function(i,s,a){if(!tc(s))throw Error(n(200));return nc(null,i,s,!0,a)},mn.hydrateRoot=function(i,s,a){if(!mp(i))throw Error(n(405));var f=a!=null&&a.hydratedSources||null,m=!1,E="",_=u_;if(a!=null&&(a.unstable_strictMode===!0&&(m=!0),a.identifierPrefix!==void 0&&(E=a.identifierPrefix),a.onRecoverableError!==void 0&&(_=a.onRecoverableError)),s=s_(s,null,i,1,a!=null?a:null,m,!1,E,_),i[Nr]=s.current,hu(i),f)for(i=0;i<f.length;i++)a=f[i],m=a._getVersion,m=m(a._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[a,m]:s.mutableSourceEagerHydrationData.push(a,m);return new ec(s)},mn.render=function(i,s,a){if(!tc(s))throw Error(n(200));return nc(null,i,s,!1,a)},mn.unmountComponentAtNode=function(i){if(!tc(i))throw Error(n(40));return i._reactRootContainer?(Ui(function(){nc(null,null,i,!1,function(){i._reactRootContainer=null,i[Nr]=null})}),!0):!1},mn.unstable_batchedUpdates=op,mn.unstable_renderSubtreeIntoContainer=function(i,s,a,f){if(!tc(a))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return nc(i,s,a,!1,f)},mn.version="18.3.1-next-f1338f8080-20240426",mn}var GE;function KE(){if(GE)return gd.exports;GE=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(),gd.exports=jR(),gd.exports}var Ha=KE();function $R(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var QE=()=>e=>Array.from(new Set(e)),XE=typeof globalThis.document!="undefined"?K.useLayoutEffect:K.useEffect;function za(e){var y,b;const t=(y=e().value)!=null?y:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=K.useState(t),[o,u]=K.useState(r),l=e().value!==void 0,c=K.useRef(o);c.current=l?e().value:o;const d=K.useRef(c.current);XE(()=>{d.current=c.current},[o,e().value]);const h=T=>{var P,L;const S=d.current,k=ys(T)?T(S):T;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:k,prev:S}),l||u(k),n(k,S)||(L=(P=e()).onChange)==null||L.call(P,k,S)};function g(){return l?e().value:o}return{initial:r,ref:c,get:g,set(T){(e().sync?Ha.flushSync:uR)(()=>h(T))},invoke(T,S){var k,P;(P=(k=e()).onChange)==null||P.call(k,T,S)},hash(T){var S,k,P;return(P=(k=(S=e()).hash)==null?void 0:k.call(S,T))!=null?P:String(T)}}}za.cleanup=e=>{K.useEffect(()=>e,[])},za.ref=e=>{const t=K.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function VR(e){const t=K.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var qR=(e,t)=>{const n=K.useRef(!1),r=K.useRef(!1);K.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),K.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function JE(e,t={}){var ge,me,pe,le,_e,Pe;const n=K.useMemo(()=>{const{id:ce,ids:V,getRootNode:ne}=t;return UR({id:ce,ids:V,getRootNode:ne})},[t]),r=(...ce)=>{e.debug&&console.log(...ce)},o=(me=(ge=e.props)==null?void 0:ge.call(e,{props:RE(t),scope:n}))!=null?me:t,u=YR(o),l=(pe=e.context)==null?void 0:pe.call(e,{prop:u,bindable:za,scope:n,flush:ey,getContext(){return d},getComputed(){return he},getRefs(){return k},getEvent(){return T()}}),c=ZE(l),d={get(ce){var V;return(V=c.current)==null?void 0:V[ce].ref.current},set(ce,V){var ne;(ne=c.current)==null||ne[ce].set(V)},initial(ce){var V;return(V=c.current)==null?void 0:V[ce].initial},hash(ce){var ne,C;const V=(ne=c.current)==null?void 0:ne[ce].get();return(C=c.current)==null?void 0:C[ce].hash(V)}},h=K.useRef(new Map),g=K.useRef(null),y=K.useRef(null),b=K.useRef({type:""}),T=()=>He(G({},b.current),{current(){return b.current},previous(){return y.current}}),S=()=>He(G({},M),{matches(...ce){return ce.includes(M.ref.current)},hasTag(ce){var V,ne;return!!((ne=(V=e.states[M.ref.current])==null?void 0:V.tags)!=null&&ne.includes(ce))}}),k=VR((_e=(le=e.refs)==null?void 0:le.call(e,{prop:u,context:d}))!=null?_e:{}),P=()=>({state:S(),context:d,event:T(),prop:u,send:U,action:L,guard:H,track:qR,refs:k,computed:he,flush:ey,scope:n,choose:Z}),L=ce=>{const V=ys(ce)?ce(P()):ce;if(!V)return;const ne=V.map(C=>{var Y,x;const O=(x=(Y=e.implementations)==null?void 0:Y.actions)==null?void 0:x[C];return O||ld(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),O});for(const C of ne)C==null||C(P())},H=ce=>{var V,ne;return ys(ce)?ce(P()):(ne=(V=e.implementations)==null?void 0:V.guards)==null?void 0:ne[ce](P())},$=ce=>{const V=ys(ce)?ce(P()):ce;if(!V)return;const ne=V.map(O=>{var x,re;const Y=(re=(x=e.implementations)==null?void 0:x.effects)==null?void 0:re[O];return Y||ld(`[zag-js] No implementation found for effect "${JSON.stringify(O)}"`),Y}),C=[];for(const O of ne){const Y=O==null?void 0:O(P());Y&&C.push(Y)}return()=>C.forEach(O=>O==null?void 0:O())},Z=ce=>JP(ce).find(V=>{let ne=!V.guard;return Ma(V.guard)?ne=!!H(V.guard):ys(V.guard)&&(ne=V.guard(P())),ne}),he=ce=>{aR(e.computed,()=>"[zag-js] No computed object found on machine");const V=e.computed[ce];return V({context:d,event:T(),prop:u,refs:k,scope:n,computed:he})},M=za(()=>({defaultValue:e.initialState({prop:u}),onChange(ce,V){var C,O,Y,x;if(V){const re=h.current.get(V);re==null||re(),h.current.delete(V)}V&&L((C=e.states[V])==null?void 0:C.exit),L((O=g.current)==null?void 0:O.actions);const ne=$((Y=e.states[ce])==null?void 0:Y.effects);if(ne&&h.current.set(ce,ne),V===md){L(e.entry);const re=$(e.effects);re&&h.current.set(md,re)}L((x=e.states[ce])==null?void 0:x.entry)}})),Ee=K.useRef(void 0),ke=K.useRef(bs.NotStarted);XE(()=>{queueMicrotask(()=>{var O;const ne=ke.current===bs.Started;ke.current=bs.Started,r(ne?"rehydrating...":"initializing...");const C=(O=Ee.current)!=null?O:M.initial;M.invoke(C,ne?M.get():md)});const ce=h.current,V=M.ref.current;return()=>{r("unmounting..."),Ee.current=V,ke.current=bs.Stopped,ce.forEach(ne=>ne==null?void 0:ne()),h.current=new Map,g.current=null,queueMicrotask(()=>{L(e.exit)})}},[]);const Ne=()=>"ref"in M?M.ref.current:M.get(),U=ce=>{queueMicrotask(()=>{var x,re,be,ye,Ie;if(ke.current!==bs.Started)return;y.current=b.current,b.current=ce,r("send",ce);let V=Ne();const ne=(be=(x=e.states[V].on)==null?void 0:x[ce.type])!=null?be:(re=e.on)==null?void 0:re[ce.type],C=Z(ne);if(!C)return;g.current=C;const O=(ye=C.target)!=null?ye:V;r("transition",C);const Y=O!==V;Y?Ha.flushSync(()=>M.set(O)):C.reenter&&!Y?M.invoke(V,V):L((Ie=C.actions)!=null?Ie:[])})};return(Pe=e.watch)==null||Pe.call(e,P()),{state:S(),send:U,context:d,prop:u,scope:n,refs:k,computed:he,event:T(),getStatus:()=>ke.current}}function ZE(e){const t=K.useRef(e);return t.current=e,t}function YR(e){const t=ZE(e);return function(r){return t.current[r]}}function ey(e){queueMicrotask(()=>{Ha.flushSync(()=>e())})}var WR=$R(e=>e);function Td(...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 GR(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Uo(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:u,defaultValue:l}=e,c=K.createContext(l);c.displayName=t;function d(){var g;const h=K.useContext(c);if(!h&&n){const y=new Error(u!=null?u:GR(r,o));throw y.name="ContextError",(g=Error.captureStackTrace)==null||g.call(Error,y,d),y}return h}return[c.Provider,d,c]}const ty=()=>(e,t)=>t.reduce((n,r)=>{const[o,u]=n,l=r;return u[l]!==void 0&&(o[l]=u[l]),delete u[l],[o,u]},[{},G({},e)]),[KR,QR]=Uo({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),XR=e=>ty()(e,["lazyMount","unmountOnExit"]);function JR(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 bd=e=>{const t=K.memo(K.forwardRef((n,r)=>{const h=n,{asChild:o,children:u}=h,l=nr(h,["asChild","children"]);if(!o)return K.createElement(e,He(G({},l),{ref:r}),u);if(!K.isValidElement(u))return null;const c=K.Children.only(u),d=JR(c);return K.cloneElement(c,He(G({},wi(l,c.props)),{ref:r?Td(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Ho=(()=>{const e=new Map;return new Proxy(bd,{apply(t,n,r){return bd(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,bd(r)),e.get(r)}})})();function ZR(e,t){const{state:n,send:r,context:o}=e,u=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:u,setNode(l){l&&r({type:"NODE.SET",node:l})},unmount(){r({type:"UNMOUNT"})}}}var eL={props({props:e}){return He(G({},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,action:t,prop:n}){e([()=>n("present")],()=>{t(["setInitial","syncPresence"])})},on:{"NODE.SET":{actions:["setNode","setStyles"]}},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)},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setNode:({refs:e,event:t})=>{e.set("node",t.node)},setStyles:({refs:e,event:t})=>{e.set("styles",FE(t.node))},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const u=t.get("node");if(!o&&(u==null?void 0:u.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});wr(()=>{var c,d;const l=ja(t.get("styles"));e.set("unmountAnimationName",l),l==="none"||l===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})=>{wr(()=>{e.set("prevAnimationName",ja(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n})=>{const r=t.get("node");if(!r)return;const o=c=>{var h,g,y;((y=(g=(h=c.composedPath)==null?void 0:h.call(c))==null?void 0:g[0])!=null?y:c.target)===r&&e.set("prevAnimationName",ja(t.get("styles")))},u=c=>{const d=ja(t.get("styles"));kr(c)===r&&d===e.get("unmountAnimationName")&&n({type:"UNMOUNT",src:"animationend"})};r.addEventListener("animationstart",o),r.addEventListener("animationcancel",u),r.addEventListener("animationend",u);const l=Ua(r,{animationFillMode:"forwards"});return()=>{r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",u),r.removeEventListener("animationend",u),NR(()=>l())}}}}};function ja(e){return(e==null?void 0:e.animationName)||"none"}QE()(["onExitComplete","present","immediate"]);function tL(e,t={}){const{sync:n=!1}=t,r=nL(e);return K.useCallback((...o)=>{var u;return n?queueMicrotask(()=>{var l;return(l=r.current)==null?void 0:l.call(r,...o)}):(u=r.current)==null?void 0:u.call(r,...o)},[n,r])}function nL(e){const t=K.useRef(e);return t.current=e,t}const ny=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,u=nr(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),l=K.useRef(!1),c=He(G({},u),{present:r,onExitComplete:tL(e.onExitComplete)}),d=JE(eL,c),h=ZR(d);h.present&&(l.current=!0);const g=!h.present&&!l.current&&t||n&&!h.present&&l.current,y=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:y,present:h.present,unmounted:g}},[rL,zo]=Uo({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),ry=K.forwardRef((e,t)=>{const n=zo(),r=QR(),o=ny(He(G({},r),{present:n.open})),u=wi(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:I.jsx(Ho.div,He(G({},u),{ref:Td(o.ref,t)}))});ry.displayName="DialogBackdrop";const[iL,iy]=Uo({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),_d=K.forwardRef((e,t)=>{const n=zo(),r=iy(),o=wi(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:I.jsx(Ho.div,He(G({},o),{ref:Td(r.ref,t)}))});_d.displayName="DialogContent";const Sd=K.forwardRef((e,t)=>{const n=zo(),r=wi(n.getDescriptionProps(),e);return I.jsx(Ho.div,He(G({},r),{ref:t}))});Sd.displayName="DialogDescription";const xd=K.forwardRef((e,t)=>{const n=zo(),r=wi(n.getPositionerProps(),e);return iy().unmounted?null:I.jsx(Ho.div,He(G({},r),{ref:t}))});xd.displayName="DialogPositioner";const sL=e=>ty()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);var jo=(e,t=[])=>({parts:(...n)=>{if(oL(t))return jo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>jo(e,[...t,...n]),omit:(...n)=>jo(e,t.filter(r=>!n.includes(r))),rename:n=>jo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${_s(e)}"][data-part="${_s(r)}"]`,`& [data-scope="${_s(e)}"][data-part="${_s(r)}"]`].join(", "),attrs:{"data-scope":_s(e),"data-part":_s(r)}}}),{})}),_s=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),oL=e=>e.length===0,Ss=new WeakMap,$a=new WeakMap,Va={},Cd=0,sy=e=>e&&(e.host||sy(e.parentNode)),uL=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=sy(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),aL=new Set(["script","output","status","next-route-announcer"]),lL=e=>aL.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),cL=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o}=t,u=uL(n,Array.isArray(e)?e:[e]);Va[r]||(Va[r]=new WeakMap);const l=Va[r],c=[],d=new Set,h=new Set(u),g=b=>{!b||d.has(b)||(d.add(b),g(b.parentNode))};u.forEach(g);const y=b=>{!b||h.has(b)||Array.prototype.forEach.call(b.children,T=>{if(d.has(T))y(T);else try{if(lL(T))return;const k=T.getAttribute(o)==="true",P=(Ss.get(T)||0)+1,L=(l.get(T)||0)+1;Ss.set(T,P),l.set(T,L),c.push(T),P===1&&k&&$a.set(T,!0),L===1&&T.setAttribute(r,""),k||T.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",T,S)}})};return y(n),d.clear(),Cd++,()=>{c.forEach(b=>{const T=Ss.get(b)-1,S=l.get(b)-1;Ss.set(b,T),l.set(b,S),T||($a.has(b)||b.removeAttribute(o),$a.delete(b)),S||b.removeAttribute(r)}),Cd--,Cd||(Ss=new WeakMap,Ss=new WeakMap,$a=new WeakMap,Va={})}},fL=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,dL=(e,t=fL(e),n="data-aria-hidden")=>{if(t)return cL(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden"})},hL=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function pL(e,t={}){const{defer:n=!0}=t,r=n?hL:u=>u(),o=[];return o.push(r(()=>{const l=(typeof e=="function"?e():e).filter(Boolean);l.length!==0&&o.push(dL(l))})),()=>{o.forEach(u=>u==null?void 0:u())}}function mL(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const u=e.frames[o];u&&n(u)}},addEventListener(n,r,o){return t.each(u=>{try{u.document.addEventListener(n,r,o)}catch(l){}}),()=>{try{t.removeEventListener(n,r,o)}catch(u){}}},removeEventListener(n,r,o){t.each(u=>{try{u.document.removeEventListener(n,r,o)}catch(l){}})}};return t}function gL(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(u){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(u){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(u){}}}}var oy="pointerdown.outside",uy="focus.outside";function EL(e){for(const t of e)if(pn(t)&&$r(t))return!0;return!1}var ay=e=>"clientY"in e;function yL(e,t){if(!ay(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 TL(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function ly(e,t){if(!t||!ay(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,u=o&&e.clientY>t.offsetTop+t.clientHeight,l={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 TL(l,c)?r||u:!1}function bL(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:u,defer:l}=t;if(!e)return;const c=fr(e),d=Fo(e),h=mL(d),g=gL(d);function y(H,$){if(!pn($)||!$.isConnected||Ba(e,$)||yL(e,H))return!1;const Z=c.querySelector(`[aria-controls="${e.id}"]`);if(Z){const M=pd(Z);if(ly(H,M))return!1}const he=pd(e);return ly(H,he)?!1:!(n!=null&&n($))}const b=new Set,T=Ts(e==null?void 0:e.getRootNode());function S(H){function $(Z){var ke,Ne;const he=l&&!UE()?wr:U=>U(),M=Z!=null?Z:H,Ee=(Ne=(ke=M==null?void 0:M.composedPath)==null?void 0:ke.call(M))!=null?Ne:[M==null?void 0:M.target];he(()=>{const U=T?Ee[0]:kr(H);if(!(!e||!y(H,U))){if(o||u){const ge=ad(o,u);e.addEventListener(oy,ge,{once:!0})}cy(e,oy,{bubbles:!1,cancelable:!0,detail:{originalEvent:M,contextmenu:kR(M),focusable:EL(Ee),target:U}})}})}H.pointerType==="touch"?(b.forEach(Z=>Z()),b.add(dr(c,"click",$,{once:!0})),b.add(g.addEventListener("click",$,{once:!0})),b.add(h.addEventListener("click",$,{once:!0}))):$()}const k=new Set,P=setTimeout(()=>{k.add(dr(c,"pointerdown",S,!0)),k.add(g.addEventListener("pointerdown",S,!0)),k.add(h.addEventListener("pointerdown",S,!0))},0);function L(H){(l?wr:Z=>Z())(()=>{const Z=kr(H);if(!(!e||!y(H,Z))){if(r||u){const he=ad(r,u);e.addEventListener(uy,he,{once:!0})}cy(e,uy,{bubbles:!1,cancelable:!0,detail:{originalEvent:H,contextmenu:!1,focusable:$r(Z),target:Z}})}})}return UE()||(k.add(dr(c,"focusin",L,!0)),k.add(g.addEventListener("focusin",L,!0)),k.add(h.addEventListener("focusin",L,!0))),()=>{clearTimeout(P),b.forEach(H=>H()),k.forEach(H=>H())}}function _L(e,t){const{defer:n}=t,r=n?wr:u=>u(),o=[];return o.push(r(()=>{const u=typeof e=="function"?e():e;o.push(bL(u,t))})),()=>{o.forEach(u=>u==null?void 0:u())}}function cy(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function SL(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return dr(fr(e),"keydown",n,{capture:!0})}var Gn={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Ba(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ba(t,e))},add(e){const t=this.layers.push(e);e.node.style.setProperty("--layer-index",`${t}`)},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>r.dismiss()),this.layers.splice(t,1),e.style.removeProperty("--layer-index"))},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e){var t;(t=this.layers[this.indexOf(e)])==null||t.dismiss()},clear(){this.remove(this.layers[0].node)}},fy;function dy(){Gn.layers.forEach(({node:e})=>{e.style.pointerEvents=Gn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function xL(e){e.style.pointerEvents=""}function CL(e,t){const n=fr(e),r=[];return Gn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(fy=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[u,l]=DR(()=>{const c=o();return pn(c)?c:null},{timeout:1e3});u.then(c=>r.push(Ua(c,{pointerEvents:"auto"}))),r.push(l)}),()=>{Gn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=fy,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function AL(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){ld("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,pointerBlocking:o,exclude:u,debug:l}=t,c={dismiss:r,node:e,pointerBlocking:o};Gn.add(c),dy();function d(T){var k,P;const S=kr(T.detail.originalEvent);Gn.isBelowPointerBlockingLayer(e)||Gn.isInBranch(S)||((k=t.onPointerDownOutside)==null||k.call(t,T),(P=t.onInteractOutside)==null||P.call(t,T),!T.defaultPrevented&&(l&&console.log("onPointerDownOutside:",T.detail.originalEvent),r==null||r()))}function h(T){var k,P;const S=kr(T.detail.originalEvent);Gn.isInBranch(S)||((k=t.onFocusOutside)==null||k.call(t,T),(P=t.onInteractOutside)==null||P.call(t,T),!T.defaultPrevented&&(l&&console.log("onFocusOutside:",T.detail.originalEvent),r==null||r()))}function g(T){var S;Gn.isTopMost(e)&&((S=t.onEscapeKeyDown)==null||S.call(t,T),!T.defaultPrevented&&r&&(T.preventDefault(),r()))}function y(T){var L;if(!e)return!1;const S=typeof u=="function"?u():u,k=Array.isArray(S)?S:[S],P=(L=t.persistentElements)==null?void 0:L.map(H=>H()).filter(pn);return P&&k.push(...P),k.some(H=>Ba(H,T))||Gn.isInNestedLayer(e,T)}const b=[o?CL(e,t.persistentElements):void 0,SL(e,g),_L(e,{exclude:y,onFocusOutside:h,onPointerDownOutside:d,defer:t.defer})];return()=>{Gn.remove(e),dy(),xL(e),b.forEach(T=>T==null?void 0:T())}}function kL(e,t){const{defer:n}=t,r=n?wr:u=>u(),o=[];return o.push(r(()=>{const u=ys(e)?e():e;o.push(AL(u,t))})),()=>{o.forEach(u=>u==null?void 0:u())}}var wL=Object.defineProperty,vL=(e,t,n)=>t in e?wL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pt=(e,t,n)=>vL(e,typeof t!="symbol"?t+"":t,n),hy={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()}},NL=[],IL=class{constructor(e,t){pt(this,"trapStack"),pt(this,"config"),pt(this,"doc"),pt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),pt(this,"listenerCleanups",[]),pt(this,"handleFocus",r=>{const o=kr(r),u=this.findContainerIndex(o,r)>=0;if(u||cd(o))u&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let l,c=!0;if(this.state.mostRecentlyFocusedNode)if(Bo(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[d];if(h.length>0){const g=h.findIndex(y=>y===this.state.mostRecentlyFocusedNode);g>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?g+1<h.length&&(l=h[g+1],c=!1):g-1>=0&&(l=h[g-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(h=>Bo(h)>0))||(c=!1);else c=!1;c&&(l=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),l?this.tryFocus(l):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),pt(this,"handlePointerDown",r=>{const o=kr(r);if(!(this.findContainerIndex(o,r)>=0)){if(Vo(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Vo(this.config.allowOutsideClick,r)||r.preventDefault()}}),pt(this,"handleClick",r=>{const o=kr(r);this.findContainerIndex(o,r)>=0||Vo(this.config.clickOutsideDeactivates,r)||Vo(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),pt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),u=this.findNextNavNode({event:r,isBackward:o});if(!u)return;$o(r)&&r.preventDefault(),this.tryFocus(u)}}),pt(this,"handleEscapeKey",r=>{OL(r)&&Vo(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),pt(this,"_mutationObserver"),pt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(l=>Array.from(l.removedNodes).some(d=>d===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode())})}),pt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&this.state.containers.map(o=>{var u;(u=this._mutationObserver)==null||u.observe(o,{subtree:!0,childList:!0})})}),pt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!$r(r))if(this.findContainerIndex(this.doc.activeElement)>=0)r=this.doc.activeElement;else{const o=this.state.tabbableGroups[0];r=o&&o.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}),pt(this,"tryFocus",r=>{if(r!==!1&&r!==ME(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,PL(r)&&r.select()}}),pt(this,"deactivate",r=>{if(!this.state.active)return this;const o=G({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(),hy.deactivateTrap(this.trapStack,this);const u=this.getOption(o,"onDeactivate"),l=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");u==null||u();const h=()=>{py(()=>{if(d){const g=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(g)}l==null||l()})};if(d&&c){const g=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(g).then(h,h),this}return h(),this}),pt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),u=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),u==null||u(),this}),pt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),u=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),u==null||u(),this}),pt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),pt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),pt(this,"getOption",(r,o,u)=>r&&r[o]!==void 0?r[o]:this.config[u||o]),pt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:u=[]}={})=>{let l=this.config[r];if(typeof l=="function"&&(l=l(...u)),l===!0&&(l=void 0),!l){if(l===void 0||l===!1)return l;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=l;if(typeof l=="string"){try{c=this.doc.querySelector(l)}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}),pt(this,"findNextNavNode",r=>{const{event:o,isBackward:u=!1}=r,l=r.target||kr(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(l,o),h=d>=0?this.state.containerGroups[d]:void 0;if(d<0)u?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(u){let g=this.state.tabbableGroups.findIndex(({firstTabbableNode:y})=>l===y);if(g<0&&((h==null?void 0:h.container)===l||$r(l)&&!ki(l)&&!(h!=null&&h.nextTabbableNode(l,!1)))&&(g=d),g>=0){const y=g===0?this.state.tabbableGroups.length-1:g-1,b=this.state.tabbableGroups[y];c=Bo(l)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else $o(o)||(c=h==null?void 0:h.nextTabbableNode(l,!1))}else{let g=this.state.tabbableGroups.findIndex(({lastTabbableNode:y})=>l===y);if(g<0&&((h==null?void 0:h.container)===l||$r(l)&&!ki(l)&&!(h!=null&&h.nextTabbableNode(l)))&&(g=d),g>=0){const y=g===this.state.tabbableGroups.length-1?0:g+1,b=this.state.tabbableGroups[y];c=Bo(l)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else $o(o)||(c=h==null?void 0:h.nextTabbableNode(l))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||NL;const n=G({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward(r){return $o(r)&&!r.shiftKey},isKeyBackward(r){return $o(r)&&r.shiftKey}},t);this.doc=n.document||fr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}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(u=>u===e))}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=$E(e),n=jE(e),r=t.length>0?t[0]:void 0,o=t.length>0?t[t.length-1]:void 0,u=n.find(h=>ki(h)),l=n.slice().reverse().find(h=>ki(h)),c=!!t.find(h=>Bo(h)>0);function d(h,g=!0){const y=t.indexOf(h);return y<0?g?n.slice(n.indexOf(h)+1).find(b=>ki(b)):n.slice(0,n.indexOf(h)).reverse().find(b=>ki(b)):t[y+(g?1:-1)]}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:u,lastDomTabbableNode:l,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 hy.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?py(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(dr(this.doc,"focusin",this.handleFocus,!0),dr(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),dr(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),dr(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),dr(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),dr(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=this.doc.activeElement||null,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)}},$o=e=>e.key==="Tab",Vo=(e,...t)=>typeof e=="function"?e(...t):e,OL=e=>!e.isComposing&&e.key==="Escape",py=e=>setTimeout(e,0),PL=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function RL(e,t={}){let n;const r=wr(()=>{const o=typeof e=="function"?e():e;if(o){n=new IL(o,He(G({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:fr(o)}));try{n.activate()}catch(u){}}});return function(){n==null||n.deactivate(),r()}}var Ad="data-scroll-lock";function LL(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function DL(e){var b;const t=e!=null?e:document,n=(b=t.defaultView)!=null?b:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Ad))return;const l=n.innerWidth-r.clientWidth;o.setAttribute(Ad,"");const c=()=>RR(r,"--scrollbar-width",`${l}px`),d=LL(r),h=()=>Ua(o,{overflow:"hidden",[d]:`${l}px`}),g=()=>{var $,Z;const{scrollX:T,scrollY:S,visualViewport:k}=n,P=($=k==null?void 0:k.offsetLeft)!=null?$:0,L=(Z=k==null?void 0:k.offsetTop)!=null?Z:0,H=Ua(o,{position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(L))}px`,left:`${-(T-Math.floor(P))}px`,right:"0",[d]:`${l}px`});return()=>{H==null||H(),n.scrollTo({left:T,top:S,behavior:"instant"})}},y=[c(),CR()?g():h()];return()=>{y.forEach(T=>T==null?void 0:T()),o.removeAttribute(Ad)}}var ML=jo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),vi=ML.build(),my=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},gy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},kd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Ey=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},wd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},vd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},yy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},qa=e=>e.getById(kd(e)),FL=e=>e.getById(my(e)),BL=e=>e.getById(gy(e)),UL=e=>e.getById(Ey(e)),HL=e=>e.getById(wd(e)),zL=e=>e.getById(vd(e)),jL=e=>e.getById(yy(e));function $L(e,t){const{state:n,send:r,context:o,prop:u,scope:l}=e,c=u("aria-label"),d=n.matches("open");return{open:d,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(He(G({},vi.trigger.attrs),{dir:u("dir"),id:Ey(l),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":kd(l),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(He(G({},vi.backdrop.attrs),{dir:u("dir"),hidden:!d,id:gy(l),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(He(G({},vi.positioner.attrs),{dir:u("dir"),id:my(l),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(He(G({},vi.content.attrs),{dir:u("dir"),role:u("role"),hidden:!d,id:kd(l),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:wd(l),"aria-describedby":h.description?vd(l):void 0}))},getTitleProps(){return t.element(He(G({},vi.title.attrs),{dir:u("dir"),id:wd(l)}))},getDescriptionProps(){return t.element(He(G({},vi.description.attrs),{dir:u("dir"),id:vd(l)}))},getCloseTriggerProps(){return t.button(He(G({},vi.closeTrigger.attrs),{dir:u("dir"),id:yy(l),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var VL={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>jL(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return G({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 kL(()=>qa(e),{defer:!0,pointerBlocking:n("modal"),exclude:[UL(e)],onInteractOutside(o){var u;(u=n("onInteractOutside"))==null||u(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onEscapeKeyDown(o){var u;(u=n("onEscapeKeyDown"))==null||u(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return DL(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?RL(()=>qa(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,u;return(u=(o=t("finalFocusEl"))==null?void 0:o())!=null?u:r}}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?pL(()=>[qa(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){wr(()=>{e.set("rendered",{title:!!HL(t),description:!!zL(t)})})},syncZIndex({scope:e}){wr(()=>{const t=qa(e);if(!t)return;const n=FE(t);[FL(e),BL(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})}}}};QE()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const[XD,Ty]=Uo({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[JD,qL]=Uo({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),YL=e=>{const t=K.useId(),{getRootNode:n}=Ty(),{dir:r}=qL(),o=G({id:t,getRootNode:n,dir:r},e),u=JE(VL,o);return $L(u,WR)},by=e=>{const[t,c]=sL(e),d=c,{children:n}=d,r=nr(d,["children"]),[o]=XR(t),u=YL(r),l=ny(wi({present:u.open},t));return I.jsx(rL,{value:u,children:I.jsx(KR,{value:o,children:I.jsx(iL,{value:l,children:n})})})},Nd=K.forwardRef((e,t)=>{const n=zo(),r=wi(n.getTitleProps(),e);return I.jsx(Ho.h2,He(G({},r),{ref:t}))});Nd.displayName="DialogTitle";const _y=e=>{var d;const{children:t,disabled:n}=e,[r,o]=K.useState((d=e.container)==null?void 0:d.current),u=K.useSyncExternalStore(GL,()=>!1,()=>!0),{getRootNode:l}=Ty();if(K.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),u||n)return I.jsx(I.Fragment,{children:t});const c=r!=null?r:WL(l);return I.jsx(I.Fragment,{children:K.Children.map(t,h=>Ha.createPortal(h,c))})},WL=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Ts(n)?n:fr(t).body},GL=()=>()=>{},Sy=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=or(),{mode:o,status:u,dialogPosition:l}=ia(),{copilot:c,messages:d,groupedMessages:h,isLoading:g,handleUserInput:y,handleSuggestion:b}=yi(),T=K.useRef(null),{isOpen:S}=u||{},k=o==="standalone";K.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const P=({open:Z})=>{lo(Z)},L=()=>{s0(l==="bottom-left"?"bottom-right":"bottom-left")},H=()=>{Qc("modal")},$=()=>{lo(!1)};return!S||h.length===0?null:c?I.jsx(by,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:S,onOpenChange:P,children:I.jsx(_y,{children:I.jsx(xd,{className:ae(n,`${te}-container`,`${te}-dialog`,l),style:r,children:I.jsxs(_d,{className:ae(n,`${te}-dialog-content`,{standalone:k,embedded:!k}),children:[I.jsxs("div",{className:ae(n,`${te}-dialog-header`,{standalone:k,embedded:!k}),children:[e&&I.jsx("img",{alt:"",role:"img",className:ae(n,`${te}-dialog-logo`,{standalone:k,embedded:!k}),src:e}),I.jsx(Nd,{className:ae(n,`${te}-dialog-title`,{standalone:k,embedded:!k}),children:t}),I.jsxs("div",{className:ae(n,`${te}-dialog-controls`),children:[I.jsx(co,{ariaLabel:"Toggle left or right position",icon:l==="bottom-left"?I.jsx(KP,{}):I.jsx(GP,{}),onClick:L}),I.jsx(co,{ariaLabel:"Toggle Modal",icon:I.jsx(XP,{}),onClick:H}),I.jsx(y0,{className:`dialog ${n}`,onClick:$})]})]}),I.jsxs(Sd,{className:ae(n,`${te}-message-container`,{standalone:k,embedded:!k}),children:[I.jsx(ud,{isWidgetStandalone:k,messages:h,handleSuggestionClick:b}),g&&I.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:I.jsx(La,{})}),I.jsx("div",{ref:T})]}),I.jsx(Zc,{componentType:"dialog",isLoading:g,onSubmit:y})]})})})}):I.jsx("div",{children:"Loading Copilot..."})},xy=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=or(),{mode:o,status:u,isModalFullscreen:l}=ia(),{copilot:c,messages:d,groupedMessages:h,isLoading:g,handleUserInput:y,handleSuggestion:b}=yi(),T=K.useRef(null),{isOpen:S}=u||{},k=o==="standalone";K.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const P=({open:Z})=>{lo(Z)},L=()=>{i0(!l)},H=()=>{Qc("dialog")},$=()=>{lo(!1)};return!S||h.length===0?null:c?I.jsx(by,{lazyMount:!0,open:S,onOpenChange:P,children:I.jsx(_y,{children:I.jsxs("div",{className:ae(n,`${te}-modal-container`),style:r,children:[I.jsx(ry,{className:ae(n,`${te}-modal-backdrop`)}),I.jsx(xd,{className:ae(n,`${te}-container`,`${te}-modal`,{fullscreen:l,standalone:k,embedded:!k}),children:I.jsxs(_d,{className:ae(n,`${te}-modal-content`,{standalone:k,embedded:!k}),children:[I.jsxs("div",{className:ae(n,`${te}-modal-header`,{standalone:k,embedded:!k}),children:[e&&I.jsx("img",{alt:"",role:"img",className:ae(n,`${te}-modal-logo`,{standalone:k,embedded:!k}),src:e}),I.jsx(Nd,{className:ae(n,`${te}-modal-title`,{standalone:k,embedded:!k}),children:t}),I.jsxs("div",{className:ae(n,`${te}-modal-controls`),children:[I.jsx(co,{ariaLabel:"Toggle Fullscreen",className:ae(n,`${te}-modal-fullscreen-button`),icon:l?I.jsx(eC,{}):I.jsx(tC,{}),onClick:L}),I.jsx(co,{ariaLabel:"Toggle Dialog",className:ae(n,`${te}-modal-toggle-dialog-button`),icon:I.jsx(QP,{}),onClick:H}),I.jsx(y0,{className:`modal ${n}`,onClick:$})]})]}),I.jsxs(Sd,{className:ae(n,`${te}-message-container`,{standalone:k,embedded:!k}),children:[I.jsx(ud,{isWidgetStandalone:k,messages:h,handleSuggestionClick:b}),g&&I.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:I.jsx(La,{})}),I.jsx("div",{ref:T})]}),I.jsx(Zc,{componentType:"modal",isLoading:g,onSubmit:y})]})})]})})}):I.jsx("div",{children:"Loading Copilot..."})},KL=()=>{const e=ia(),{status:{type:t}}=e||{status:{}};return t==="dialog"?I.jsx(Sy,{}):t==="modal"?I.jsx(xy,{}):I.jsx(OE,{})},Id=e=>I.jsx(c0,He(G({},e),{children:I.jsx(KL,{})}));var Ya={},Cy;function QL(){if(Cy)return Ya;Cy=1;var e=KE();return Ya.createRoot=e.createRoot,Ya.hydrateRoot=e.hydrateRoot,Ya}var Ay=QL();const XL=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=nr(o,["elementId","timeout"]);let u;const l=(d,h)=>{var g;for(const y of d)if(y.type==="childList"&&y.addedNodes.length)for(const b of y.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Ji(!0,"log","Target element found, rendering Copilot Widget"),h.disconnect(),clearTimeout(u),(g=Ay.createRoot(b))==null||g.render(I.jsx(Id,G({},n))))},c=new MutationObserver(l);return c.observe(document.body,{childList:!0,subtree:!0}),u=setTimeout(()=>{c.disconnect(),Ji(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},JL=r=>{var o=r,{timeout:e,elementId:t}=o,n=nr(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ji(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const u=document.getElementById(t);if(!u){Ji(!0,"warn","Container element not found for id:",t),Ji(!0,"warn","Beginning observation for element"),XL(G({elementId:t,timeout:e},n));return}Ay.createRoot(u).render(I.jsx(Id,G({},n)))},ZL={search:Cx,browse:Ax,pdp:{setPdpContext:wx,updatePdpProductId:vx,updatePdpLink:Nx},components:{toggleWidgetOpen:lo,toggleModalFullscreen:i0,setWidgetType:Qc,setWidgetDialogPosition:s0}};we.CopilotDialog=Sy,we.CopilotEmbed=OE,we.CopilotModal=xy,we.CopilotWidget=Id,we.WidgetProvider=c0,we.eventHandlers=ZL,we.injectCopilotWidget=JL,we.useCopilot=yi,Object.defineProperty(we,Symbol.toStringTag,{value:"Module"})});
40
+ `))+1))}const a="#".repeat(o),c=n.enter("headingAtx"),f=n.enter("phrasing");u.move(a+" ");let h=n.containerPhrasing(e,U({before:"# ",after:`
41
+ `},u.current()));return/^[\t ]/.test(h)&&(h=_u(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),f(),c(),h}BT.peek=fD;function BT(e){return e.value||""}function fD(){return"<"}UT.peek=dD;function UT(e,t,n,r){const o=Nh(n),u=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const f=n.createTracker(r);let h=f.move("![");return h+=f.move(n.safe(e.alt,U({before:h,after:"]"},f.current()))),h+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,U({before:h,after:">"},f.current()))),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,U({before:h,after:e.title?" ":")"},f.current())))),c(),e.title&&(c=n.enter(`title${u}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,U({before:h,after:o},f.current()))),h+=f.move(o),c()),h+=f.move(")"),a(),h}function dD(){return"!"}HT.peek=hD;function HT(e,t,n,r){const o=e.referenceType,u=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(r);let f=c.move("![");const h=n.safe(e.alt,U({before:f,after:"]"},c.current()));f+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const E=n.safe(n.associationId(e),U({before:f,after:"]"},c.current()));return a(),n.stack=m,u(),o==="full"||!h||h!==E?f+=c.move(E+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function hD(){return"!"}zT.peek=pD;function zT(e,t,n){let r=e.value||"",o="`",u=-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+" ");++u<n.unsafe.length;){const a=n.unsafe[u],c=n.compilePattern(a);let f;if(a.atBreak)for(;f=c.exec(r);){let h=f.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(f.index+1)}}return o+r+o}function pD(){return"`"}function jT(e,t){const n=Ud(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))}$T.peek=mD;function $T(e,t,n,r){const o=Nh(n),u=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let c,f;if(jT(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let E=a.move("<");return E+=a.move(n.containerPhrasing(e,U({before:E,after:">"},a.current()))),E+=a.move(">"),c(),n.stack=m,E}c=n.enter("link"),f=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,U({before:h,after:"]("},a.current()))),h+=a.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,U({before:h,after:">"},a.current()))),h+=a.move(">")):(f=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,U({before:h,after:e.title?" ":")"},a.current())))),f(),e.title&&(f=n.enter(`title${u}`),h+=a.move(" "+o),h+=a.move(n.safe(e.title,U({before:h,after:o},a.current()))),h+=a.move(o),f()),h+=a.move(")"),c(),h}function mD(e,t,n){return jT(e,n)?"<":"["}VT.peek=gD;function VT(e,t,n,r){const o=e.referenceType,u=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(r);let f=c.move("[");const h=n.containerPhrasing(e,U({before:f,after:"]"},c.current()));f+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const E=n.safe(n.associationId(e),U({before:f,after:"]"},c.current()));return a(),n.stack=m,u(),o==="full"||!h||h!==E?f+=c.move(E+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function gD(){return"["}function Oh(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 ED(e){const t=Oh(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 yD(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 qT(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 TD(e,t,n,r){const o=n.enter("list"),u=n.bulletCurrent;let a=e.ordered?yD(n):Oh(n);const c=e.ordered?a==="."?")":".":ED(n);let f=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),qT(n)===a&&m){let E=-1;for(;++E<e.children.length;){const b=e.children[E];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(a=c),n.bulletCurrent=a;const h=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=u,o(),h}function bD(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 _D(e,t,n,r){const o=bD(n);let u=n.bulletCurrent||Oh(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let a=u.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(r);c.move(u+" ".repeat(a-u.length)),c.shift(a);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return f(),h;function m(E,b,T){return b?(T?"":" ".repeat(a))+E:(T?u:u+" ".repeat(a-u.length))+E}}function xD(e,t,n,r){const o=n.enter("paragraph"),u=n.enter("phrasing"),a=n.containerPhrasing(e,r);return u(),o(),a}const SD=ml(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wD(e,t,n,r){return(e.children.some(function(a){return SD(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function CD(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}YT.peek=AD;function YT(e,t,n,r){const o=CD(n),u=n.enter("strong"),a=n.createTracker(r),c=a.move(o+o);let f=a.move(n.containerPhrasing(e,U({after:o,before:c},a.current())));const h=f.charCodeAt(0),m=Nl(r.before.charCodeAt(r.before.length-1),h,o);m.inside&&(f=_u(h)+f.slice(1));const E=f.charCodeAt(f.length-1),b=Nl(r.after.charCodeAt(0),E,o);b.inside&&(f=f.slice(0,-1)+_u(E));const T=a.move(o+o);return u(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+T}function AD(e,t,n){return n.options.strong||"*"}function vD(e,t,n,r){return n.safe(e.value,r)}function kD(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 ND(e,t,n){const r=(qT(n)+(n.options.ruleSpaces?" ":"")).repeat(kD(n));return n.options.ruleSpaces?r.slice(0,-1):r}const WT={blockquote:J4,break:MT,code:iD,definition:oD,emphasis:FT,hardBreak:MT,heading:cD,html:BT,image:UT,imageReference:HT,inlineCode:zT,link:$T,linkReference:VT,list:TD,listItem:_D,paragraph:xD,root:wD,strong:YT,text:vD,thematicBreak:ND};function OD(){return{enter:{table:ID,tableData:GT,tableHeader:GT,tableRow:RD},exit:{codeText:LD,table:PD,tableData:Ih,tableHeader:Ih,tableRow:Ih}}}function ID(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 PD(e){this.exit(e),this.data.inTable=void 0}function RD(e){this.enter({type:"tableRow",children:[]},e)}function Ih(e){this.exit(e)}function GT(e){this.enter({type:"tableCell",children:[]},e)}function LD(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,DD));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function DD(e,t){return t==="|"?t:e}function MD(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
42
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:a,tableCell:f,tableRow:c}};function a(T,_,S,C){return h(m(T,S,C),T.align)}function c(T,_,S,C){const I=E(T,S,C),B=h([I]);return B.slice(0,B.indexOf(`
43
+ `))}function f(T,_,S,C){const I=S.enter("tableCell"),B=S.enter("phrasing"),L=S.containerPhrasing(T,Te(U({},C),{before:u,after:u}));return B(),I(),L}function h(T,_){return Q4(T,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function m(T,_,S){const C=T.children;let I=-1;const B=[],L=_.enter("table");for(;++I<C.length;)B[I]=E(C[I],_,S);return L(),B}function E(T,_,S){const C=T.children;let I=-1;const B=[],L=_.enter("tableRow");for(;++I<C.length;)B[I]=f(C[I],T,_,S);return L(),B}function b(T,_,S){let C=WT.inlineCode(T,_,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function FD(){return{exit:{taskListCheckValueChecked:KT,taskListCheckValueUnchecked:KT,paragraph:UD}}}function BD(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:HD}}}function KT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function UD(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 u=-1,a;for(;++u<o.length;){const c=o[u];if(c.type==="paragraph"){a=c;break}}a===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 HD(e,t,n,r){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);u&&c.move(a);let f=WT.listItem(e,t,n,U(U({},r),c.current()));return u&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(m){return m+a}}function zD(){return[T4(),H4(),V4(),OD(),FD()]}function jD(e){return{extensions:[b4(),z4(e),q4(),MD(e),BD()]}}const $D={tokenize:KD,partial:!0},QT={tokenize:QD,partial:!0},XT={tokenize:XD,partial:!0},JT={tokenize:JD,partial:!0},VD={tokenize:ZD,partial:!0},ZT={name:"wwwAutolink",tokenize:WD,previous:tb},eb={name:"protocolAutolink",tokenize:GD,previous:nb},Vr={name:"emailAutolink",tokenize:YD,previous:rb},Ar={};function qD(){return{text:Ar}}let Wi=48;for(;Wi<123;)Ar[Wi]=Vr,Wi++,Wi===58?Wi=65:Wi===91&&(Wi=97);Ar[43]=Vr,Ar[45]=Vr,Ar[46]=Vr,Ar[95]=Vr,Ar[72]=[Vr,eb],Ar[104]=[Vr,eb],Ar[87]=[Vr,ZT],Ar[119]=[Vr,ZT];function YD(e,t,n){const r=this;let o,u;return a;function a(E){return!Ph(E)||!rb.call(r,r.previous)||Rh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return Ph(E)?(e.consume(E),c):E===64?(e.consume(E),f):n(E)}function f(E){return E===46?e.check(VD,m,h)(E):E===45||E===95||Zt(E)?(u=!0,e.consume(E),f):m(E)}function h(E){return e.consume(E),o=!0,f}function m(E){return u&&o&&ln(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function WD(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!tb.call(r,r.previous)||Rh(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($D,e.attempt(QT,e.attempt(XT,u),n),n)(a))}function u(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function GD(e,t,n){const r=this;let o="",u=!1;return a;function a(E){return(E===72||E===104)&&nb.call(r,r.previous)&&!Rh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(ln(E)&&o.length<5)return o+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(E),f}return n(E)}function f(E){return E===47?(e.consume(E),u?h:(u=!0,f)):n(E)}function h(E){return E===null||ul(E)||st(E)||ji(E)||al(E)?n(E):e.attempt(QT,e.attempt(XT,m),n)(E)}function m(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function KD(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),u):n(a)}function u(a){return a===null?n(a):t(a)}}function QD(e,t,n){let r,o,u;return a;function a(h){return h===46||h===95?e.check(JT,f,c)(h):h===null||st(h)||ji(h)||h!==45&&al(h)?f(h):(u=!0,e.consume(h),a)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),a}function f(h){return o||r||!u?n(h):t(h)}}function XD(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?u(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(JT,t,u)(a):a===null||st(a)||ji(a)?t(a):(e.consume(a),o)}function u(a){return a===41&&r++,e.consume(a),o}}function JD(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),u):c===93?(e.consume(c),o):c===60||c===null||st(c)||ji(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||st(c)||ji(c)?t(c):r(c)}function u(c){return ln(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),r):ln(c)?(e.consume(c),a):n(c)}}function ZD(e,t,n){return r;function r(u){return e.consume(u),o}function o(u){return Zt(u)?n(u):t(u)}}function tb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function nb(e){return!ln(e)}function rb(e){return!(e===47||Ph(e))}function Ph(e){return e===43||e===45||e===46||e===95||Zt(e)}function Rh(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 e5={tokenize:a5,partial:!0};function t5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:s5,continuation:{tokenize:o5},exit:u5}},text:{91:{name:"gfmFootnoteCall",tokenize:i5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:n5,resolveTo:r5}}}}function n5(e,t,n){const r=this;let o=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const f=r.events[o][1];if(f.type==="labelImage"){a=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!a||!a._balanced)return n(f);const h=sr(r.sliceSerialize({start:a.end,end:r.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function r5(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 u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",u,t],["enter",a,t],["exit",a,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function i5(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,a;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),f}function f(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(E){if(u>999||E===93&&!a||E===null||E===91||st(E))return n(E);if(E===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(sr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return st(E)||(a=!0),u++,e.consume(E),E===92?m:h}function m(E){return E===91||E===92||E===93?(e.consume(E),u++,h):h(E)}}function s5(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,a=0,c;return f;function f(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(_)}function m(_){if(a>999||_===93&&!c||_===null||_===91||st(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return u=sr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return st(_)||(c=!0),a++,e.consume(_),_===92?E:m}function E(_){return _===91||_===92||_===93?(e.consume(_),a++,m):m(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(u)||o.push(u),Xe(e,T,"gfmFootnoteDefinitionWhitespace")):n(_)}function T(_){return t(_)}}function o5(e,t,n){return e.check(ru,t,e.attempt(e5,t,n))}function u5(e){e.exit("gfmFootnoteDefinition")}function a5(e,t,n){const r=this;return Xe(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(u):n(u)}}function l5(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,c){let f=-1;for(;++f<a.length;)if(a[f][0]==="enter"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._close){let h=f;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[f][1].end.offset-a[f][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[f][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[f][1].end)},E={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[f][1].start)},b=[["enter",m,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",E,c]],T=c.parser.constructs.insideSpan.null;T&&In(b,b.length,0,ll(T,a.slice(h+1,f),c)),In(b,b.length,0,[["exit",E,c],["enter",a[f][1],c],["exit",a[f][1],c],["exit",m,c]]),In(a,h-1,f-h+3,b),f=h+b.length-2;break}}for(f=-1;++f<a.length;)a[f][1].type==="strikethroughSequenceTemporary"&&(a[f][1].type="data");return a}function u(a,c,f){const h=this.previous,m=this.events;let E=0;return b;function b(_){return h===126&&m[m.length-1][1].type!=="characterEscape"?f(_):(a.enter("strikethroughSequenceTemporary"),T(_))}function T(_){const S=zs(h);if(_===126)return E>1?f(_):(a.consume(_),E++,T);if(E<2&&!n)return f(_);const C=a.exit("strikethroughSequenceTemporary"),I=zs(_);return C._open=!I||I===2&&!!S,C._close=!S||S===2&&!!I,c(_)}}}class c5{constructor(){this.map=[]}add(t,n,r){f5(this,t,n,r)}consume(t){if(this.map.sort(function(u,a){return u[0]-a[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 u of o)t.push(u);o=r.pop()}this.map.length=0}}function f5(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 d5(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 u=r.length-1;r[u]=r[u]==="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 h5(){return{flow:{null:{name:"table",tokenize:p5,resolveAll:m5}}}}function p5(e,t,n){const r=this;let o=0,u=0,a;return c;function c(H){let ae=r.events.length-1;for(;ae>-1;){const de=r.events[ae][1].type;if(de==="lineEnding"||de==="linePrefix")ae--;else break}const he=ae>-1?r.events[ae][1].type:null,fe=he==="tableHead"||he==="tableRow"?F:f;return fe===F&&r.parser.lazy[r.now().line]?n(H):fe(H)}function f(H){return e.enter("tableHead"),e.enter("tableRow"),h(H)}function h(H){return H===124||(a=!0,u+=1),m(H)}function m(H){return H===null?n(H):Re(H)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),T):n(H):Ke(H)?Xe(e,m,"whitespace")(H):(u+=1,a&&(a=!1,o+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),E(H)))}function E(H){return H===null||H===124||st(H)?(e.exit("data"),m(H)):(e.consume(H),H===92?b:E)}function b(H){return H===92||H===124?(e.consume(H),E):E(H)}function T(H){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(H):(e.enter("tableDelimiterRow"),a=!1,Ke(H)?Xe(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):_(H))}function _(H){return H===45||H===58?C(H):H===124?(a=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),S):X(H)}function S(H){return Ke(H)?Xe(e,C,"whitespace")(H):C(H)}function C(H){return H===58?(u+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),I):H===45?(u+=1,I(H)):H===null||Re(H)?q(H):X(H)}function I(H){return H===45?(e.enter("tableDelimiterFiller"),B(H)):X(H)}function B(H){return H===45?(e.consume(H),B):H===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(H))}function L(H){return Ke(H)?Xe(e,q,"whitespace")(H):q(H)}function q(H){return H===124?_(H):H===null||Re(H)?!a||o!==u?X(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):X(H)}function X(H){return n(H)}function F(H){return e.enter("tableRow"),ee(H)}function ee(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),ee):H===null||Re(H)?(e.exit("tableRow"),t(H)):Ke(H)?Xe(e,ee,"whitespace")(H):(e.enter("data"),be(H))}function be(H){return H===null||H===124||st(H)?(e.exit("data"),ee(H)):(e.consume(H),H===92?we:be)}function we(H){return H===92||H===124?(e.consume(H),be):be(H)}}function m5(e,t){let n=-1,r=!0,o=0,u=[0,0,0,0],a=[0,0,0,0],c=!1,f=0,h,m,E;const b=new c5;for(;++n<e.length;){const T=e[n],_=T[1];T[0]==="enter"?_.type==="tableHead"?(c=!1,f!==0&&(ib(b,t,f,h,m),m=void 0,f=0),h={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",h,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,E=void 0,u=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",m,t]])),o=_.type==="tableDelimiterRow"?2:m?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(u[1]!==0&&(a[0]=a[1],E=Ol(b,t,u,o,void 0,E),u=[0,0,0,0]),a[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(a[0]=a[1],E=Ol(b,t,u,o,void 0,E)),u=a,a=[u[1],n,0,0])):_.type==="tableHead"?(c=!0,f=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(f=n,u[1]!==0?(a[0]=a[1],E=Ol(b,t,u,o,n,E)):a[1]!==0&&(E=Ol(b,t,a,o,n,E)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(a[3]=n)}for(f!==0&&ib(b,t,f,h,m),b.consume(t.events),n=-1;++n<t.events.length;){const T=t.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=d5(t.events,n))}return e}function Ol(e,t,n,r,o,u){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(u.end=Object.assign({},Xs(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const f=Xs(t.events,n[1]);if(u={type:a,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const h=Xs(t.events,n[2]),m=Xs(t.events,n[3]),E={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",E,t]]),r!==2){const b=t.events[n[2]],T=t.events[n[3]];if(b[1].end=Object.assign({},T[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",E,t]])}return o!==void 0&&(u.end=Object.assign({},Xs(t.events,o)),e.add(o,0,[["exit",u,t]]),u=void 0),u}function ib(e,t,n,r,o){const u=[],a=Xs(t.events,n);o&&(o.end=Object.assign({},a),u.push(["exit",o,t])),r.end=Object.assign({},a),u.push(["exit",r,t]),e.add(n+1,0,u)}function Xs(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const g5={name:"tasklistCheck",tokenize:y5};function E5(){return{text:{91:g5}}}function y5(e,t,n){const r=this;return o;function o(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),u)}function u(f){return st(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),a):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),a):n(f)}function a(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return Re(f)?t(f):Ke(f)?e.check({tokenize:T5},t,n)(f):n(f)}}function T5(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function b5(e){return kE([qD(),t5(),l5(e),h5(),E5()])}const _5={};function x5(e){const t=this,n=e||_5,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(b5(n)),u.push(zD()),a.push(jD(n))}const Il=()=>O.jsx("span",{className:`${Z}-blinking-cursor`,children:O.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),sb=({globalClassName:e,message:t})=>{const{isLoading:n,isResponseLoading:r}=ti(),o=n&&r((t==null?void 0:t.eventSourceId)||"")&&t.name==="partial_inquiry";return O.jsx(zP,{remarkPlugins:[x5],rehypePlugins:[h4],components:{h1:({children:u})=>O.jsx("h1",{className:ue(e,`${Z}-header h1`),children:u}),h2:({children:u})=>O.jsx("h2",{className:ue(e,`${Z}-header h2`),children:u}),h3:({children:u})=>O.jsx("h3",{className:ue(e,`${Z}-header h3`),children:u}),ul:({children:u})=>O.jsx("ul",{className:ue(e,`${Z}-ul`),children:u}),ol:({children:u})=>O.jsx("ol",{className:ue(e,`${Z}-ol`),children:u}),li:({children:u})=>O.jsx("li",{className:ue(e,`${Z}-li`),children:u}),a:({href:u,children:a})=>O.jsx("a",Te(U({className:ue(e,`${Z}-link`)},u?{href:u,target:"_blank"}:{}),{rel:"noopener noreferrer",children:a})),table:({children:u})=>O.jsx("table",{className:ue(e,`${Z}-table`),children:u}),thead:({children:u})=>O.jsx("thead",{className:ue(e,`${Z}-thead`),children:u}),tbody:({children:u})=>O.jsx("tbody",{className:ue(e,`${Z}-tbody`),children:u}),tr:({children:u})=>O.jsx("tr",{className:ue(e,`${Z}-tr`),children:u}),th:({children:u})=>O.jsx("th",{className:ue(e,`${Z}-th`),children:u}),td:({children:u})=>O.jsx("td",{className:ue(e,`${Z}-td`),children:u}),span:({className:u,children:a})=>u===`${Z}-blinking-cursor`?O.jsx(Il,{}):O.jsx("span",{children:a})},children:t.message+(o?`<span className='${Z}-blinking-cursor'></span>`:"")})},S5=({globalClassName:e,message:t})=>{const[n,r]=G.useState(!1),o=t.tool_name||t.toolName,u=!!t.thought,a=!!o,c=()=>{r(f=>!f)};return O.jsxs("div",{children:[O.jsxs("div",{className:ue(e,`${Z}-progress-message`,"standalone"),children:[O.jsx("span",{className:ue(e,`${Z}-message-icon`,"progress-icon","standalone"),children:O.jsx(kg,{})}),O.jsx("p",{className:ue(e,`${Z}-progress-text`,"standalone"),children:t.message})]}),(u||a)&&O.jsxs(O.Fragment,{children:[O.jsx(jf,{className:ue(e,`${Z}-thought-context-button`),onClick:c,children:n?O.jsxs(O.Fragment,{children:["Hide ",O.jsx(nA,{})]}):O.jsxs(O.Fragment,{children:["Context ",O.jsx(rA,{})]})}),n&&O.jsx("div",{className:ue(e,`${Z}-thought-container`),children:u&&O.jsx("p",{className:ue(e,`${Z}-progress-thought`),children:t.thought})})]})]})},w5=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?O.jsx(S5,{globalClassName:e,message:t}):O.jsxs("div",{className:ue(e,`${Z}-progress-message`,"embedded"),title:t.message,children:[O.jsx("span",{className:ue(e,`${Z}-message-icon`,"progress-icon","embedded"),children:O.jsx(kg,{})}),O.jsx("i",{className:ue(e,`${Z}-progress-text`,"embedded"),children:t.message})]}),C5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var r;return O.jsxs("div",{className:ue(e,`${Z}-refined-search`,{embedded:!n,standalone:n}),children:[O.jsxs("div",{className:ue(e,`${Z}-refined-search-query`,{embedded:!n,standalone:n}),children:[O.jsx("span",{className:ue(e,`${Z}-message-icon`,`${Z}-refined-search-icon`,{embedded:!n,standalone:n}),children:O.jsx(Ma,{})}),O.jsx("p",{className:ue(e,`${Z}-text`,"bold"),children:(r=t.searchParams)==null?void 0:r.query})]}),O.jsx(sb,{message:t})]})},ob=e=>{var c;const{configModule:t}=er(),n=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:r={}}=((c=e.request)==null?void 0:c.searchParams)||{facetFilters:{}},o=Object.fromEntries(Object.entries(r).filter(([f])=>!n.includes(f))),u=Object.keys(o),a=Object.values(o).reduce((f,h)=>f+h.length,0);return{facetFiltersList:u,filterCount:a}},Pl=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>O.jsx("span",{className:ue(t,`${Z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filters`}),ub=({globalClassName:e,message:t,facetFiltersList:n})=>{var o,u;if(!n.length)return null;const r=((u=(o=t.request)==null?void 0:o.searchParams)==null?void 0:u.facetFilters)||{};return n.map(a=>{var f;const c=((f=r[a])==null?void 0:f.join(", "))||"";return O.jsxs("div",{className:ue(e,`${Z}-facets`),children:[O.jsx("p",{className:ue(e,`${Z}-facet-category`),children:a}),O.jsx("p",{className:ue(e,`${Z}-facet-values`),children:c})]},a)})},A5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var u,a;const{facetFiltersList:r,filterCount:o}=ob(t);return n?O.jsxs("div",{children:[O.jsxs("div",{className:ue(e,`${Z}-user-message standalone`),children:[O.jsx("span",{className:ue(e,`${Z}-message-icon user-message-icon standalone`),children:O.jsx(Ng,{})}),O.jsx("p",{className:ue(e,`${Z}-user-message-text`),children:(u=t.request)==null?void 0:u.userPrompt}),r.length>0&&O.jsx(Pl,{isWidgetStandalone:!0,globalClassName:e,filterCount:o})]}),O.jsx(ub,{globalClassName:e,facetFiltersList:r,message:t})]}):O.jsxs("div",{className:ue(e,`${Z}-user-message embedded`),children:[O.jsx("span",{className:ue(e,`${Z}-message-icon user-message-icon embedded`),children:O.jsx(Ng,{})}),O.jsx("p",{children:(a=t.request)==null?void 0:a.userPrompt}),r.length>0&&O.jsx(Pl,{isWidgetStandalone:!1,filterCount:o})]})},v5=({globalClassName:e,actionLabel:t,query:n,message:r,facetFiltersList:o,filterCount:u})=>O.jsxs("div",{className:ue(e,`${Z}-user-search standalone`),children:[O.jsxs("div",{className:ue(e,`${Z}-user-search-query`),children:[O.jsx("span",{className:ue(e,`${Z}-message-icon user-search-icon standalone`),children:O.jsx(Ma,{})}),O.jsx("p",{className:ue(e,`${Z}-text bold`),children:`${t}: ${n}`}),o.length>0&&O.jsx(Pl,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),O.jsx(ub,{globalClassName:e,facetFiltersList:o,message:r})]}),k5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{const{facetFiltersList:r,filterCount:o}=ob(t),{actionLabel:u,query:a}=G.useMemo(()=>{var f,h,m,E;switch(t.name){case"copilot_search":return{actionLabel:"Your search",query:(f=t.request)==null?void 0:f.searchParams.query};case"copilot_browse":return{actionLabel:"Browsing category",query:(m=(h=t.request)==null?void 0:h.browseParams)==null?void 0:m.categoryId};case"product_view":return{actionLabel:"Viewing product",query:(E=t.request)==null?void 0:E.productId};default:return{actionLabel:"",query:""}}},[t]);return!t.isUserAction||!a?null:n?O.jsx(v5,{globalClassName:e,message:t,actionLabel:u,query:a,facetFiltersList:r,filterCount:o}):O.jsxs("div",{className:ue(e,`${Z}-user-search embedded`),children:[O.jsx("span",{className:ue(e,`${Z}-message-icon user-search-icon embedded`),children:O.jsx(Ma,{})}),O.jsx("p",{children:a}),r.length>0&&O.jsx(Pl,{isWidgetStandalone:!1,filterCount:o})]})},ab=["copilot_search","copilot_browse","product_view"],lb=({message:e,globalClassName:t,resetConversationMessage:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var a;if(!e)return null;let u=e.name;if(ab.includes(u)&&(e.isInitial||e.isUserAction)&&(u="faceted_navigation"),ab.includes(u)&&!((a=e.request)!=null&&a.userPrompt))return null;switch(u){case"copilot_search":case"copilot_browse":case"product_view":return O.jsx(A5,{globalClassName:t,isWidgetStandalone:r,message:e});case"faceted_navigation":return O.jsx(k5,{globalClassName:t,message:e,isWidgetStandalone:r});case"refined_search":return O.jsx(C5,{globalClassName:t,message:e,isWidgetStandalone:r});case"follow_up":return O.jsx($N,{globalClassName:t,isWidgetStandalone:r,message:e,handleSuggestionClick:o});case"inquiry":case"partial_inquiry":return O.jsx(sb,{globalClassName:t,message:e});case"error":return O.jsx(HN,{message:e,isWidgetStandalone:r});case"display_products":return O.jsx(UN,{message:e,isWidgetStandalone:r});case"progress":return O.jsx(w5,{globalClassName:t,isWidgetStandalone:r,message:e});case"conversation_reset":return O.jsxs(O.Fragment,{children:[O.jsx("p",{className:ue(t,`${Z}-reset-message`),children:"This conversation has been reset."}),O.jsx("p",{className:ue(t,`${Z}-start-search-message`),children:n})]});default:return null}},Lh=({isWidgetStandalone:e,messages:t,handleSuggestionClick:n})=>{const{globalClassName:r,resetConversationMessage:o}=er();return t.map(u=>u.messages&&u.type==="group"?O.jsx("div",{className:ue(r,`${Z}-message-group`,e?"standalone":"embedded"),children:u.messages.length>0&&u.messages.map(a=>O.jsx("div",{className:`${Z}-message-group-child`,children:O.jsx(lb,{id:a.id,globalClassName:r,isWidgetStandalone:e,message:a,resetConversationMessage:o,handleSuggestionClick:n})},a.id))},`group-${u.eventSourceId}`):u.type==="individual"&&u.message?O.jsx("div",{className:ue(r,`${Z}-message`,e?"standalone":"embedded",{error:u.message.name.includes("error")}),children:O.jsx(lb,{id:u.message.id,globalClassName:r,isWidgetStandalone:e,message:u.message,resetConversationMessage:o,handleSuggestionClick:n})},u.message.id):null)},cb=()=>{const{globalClassName:e,themeVariables:t}=er(),{status:n}=Ho(),{copilot:r,messages:o,groupedMessages:u,isLoading:a,handleUserInput:c,handleSuggestion:f}=ti(),{isOpen:h}=n||{},m=G.useRef(null);return G.useEffect(()=>{m.current&&m.current.scrollIntoView({behavior:"smooth",block:"end"})},[o]),r?!h||u.length===0?null:O.jsxs("div",{className:ue(e,`${Z}-container`,`${Z}-embedded-chat`),style:t,children:[O.jsxs("div",{className:ue(e,`${Z}-message-container`,"embedded"),children:[O.jsx(Lh,{isWidgetStandalone:!1,messages:u,handleSuggestionClick:f}),a&&O.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:O.jsx(Il,{})}),O.jsx("div",{ref:m})]}),O.jsx($f,{componentType:"chat",className:"embedded-chat",isLoading:a,onSubmit:c}),O.jsx("div",{className:ue(`${Z}-embedded-chat-menu`),children:O.jsx(vd,{componentType:"chat",children:O.jsx(X1,{componentType:"chat"})})})]}):O.jsx("div",{children:"Loading Copilot..."})},[N5,O5]=As({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),I5=e=>n1()(e,["lazyMount","unmountOnExit"]),[P5,xu]=As({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),fb=G.forwardRef((e,t)=>{const n=xu(),r=O5(),o=ld(Te(U({},r),{present:n.open})),u=nr(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:O.jsx(ni.div,Te(U({},u),{ref:Wa(o.ref,t)}))});fb.displayName="DialogBackdrop";const Dh=G.forwardRef((e,t)=>{const n=xu(),r=Vo(),o=nr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:O.jsx(ni.div,Te(U({},o),{ref:Wa(r.ref,t)}))});Dh.displayName="DialogContent";const Mh=G.forwardRef((e,t)=>{const n=xu(),r=nr(n.getDescriptionProps(),e);return O.jsx(ni.div,Te(U({},r),{ref:t}))});Mh.displayName="DialogDescription";const Fh=G.forwardRef((e,t)=>{const n=xu(),r=nr(n.getPositionerProps(),e);return Vo().unmounted?null:O.jsx(ni.div,Te(U({},r),{ref:t}))});Fh.displayName="DialogPositioner";var R5=vs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Gi=R5.build(),db=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},hb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Bh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},pb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Hh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},mb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Rl=e=>e.getById(Bh(e)),L5=e=>e.getById(db(e)),D5=e=>e.getById(hb(e)),M5=e=>e.getById(pb(e)),F5=e=>e.getById(Uh(e)),B5=e=>e.getById(Hh(e)),U5=e=>e.getById(mb(e));function H5(e,t){const{state:n,send:r,context:o,prop:u,scope:a}=e,c=u("aria-label"),f=n.matches("open");return{open:f,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(Te(U({},Gi.trigger.attrs),{dir:u("dir"),id:pb(a),"aria-haspopup":"dialog",type:"button","aria-expanded":f,"data-state":f?"open":"closed","aria-controls":Bh(a),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(Te(U({},Gi.backdrop.attrs),{dir:u("dir"),hidden:!f,id:hb(a),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(Te(U({},Gi.positioner.attrs),{dir:u("dir"),id:db(a),style:{pointerEvents:f?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(Te(U({},Gi.content.attrs),{dir:u("dir"),role:u("role"),hidden:!f,id:Bh(a),tabIndex:-1,"data-state":f?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:Uh(a),"aria-describedby":h.description?Hh(a):void 0}))},getTitleProps(){return t.element(Te(U({},Gi.title.attrs),{dir:u("dir"),id:Uh(a)}))},getDescriptionProps(){return t.element(Te(U({},Gi.description.attrs),{dir:u("dir"),id:Hh(a)}))},getCloseTriggerProps(){return t.button(Te(U({},Gi.closeTrigger.attrs),{dir:u("dir"),id:mb(a),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var z5={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>U5(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return U({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 M1(()=>Rl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[M5(e)],onInteractOutside(o){var u;(u=n("onInteractOutside"))==null||u(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var u;(u=n("onEscapeKeyDown"))==null||u(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return z1(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?U1(()=>Rl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,u;return(u=(o=t("finalFocusEl"))==null?void 0:o())!=null?u:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?v1(()=>[Rl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){gn(()=>{e.set("rendered",{title:!!F5(t),description:!!B5(t)})})},syncZIndex({scope:e}){gn(()=>{const t=Rl(e);if(!t)return;const n=ja(t);[L5(e),D5(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})}}}};sd()(["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 j5=e=>{const t=G.useId(),{getRootNode:n}=Ad(),{dir:r}=W1(),o=U({id:t,getRootNode:n,dir:r},e),u=od(z5,o);return H5(u,Jg)},gb=e=>{const[t,c]=r1(e),f=c,{children:n}=f,r=Yt(f,["children"]),[o]=I5(t),u=j5(r),a=ld(nr({present:u.open},t));return O.jsx(P5,{value:u,children:O.jsx(N5,{value:o,children:O.jsx(Zg,{value:a,children:n})})})},zh=G.forwardRef((e,t)=>{const n=xu(),r=nr(n.getTitleProps(),e);return O.jsx(ni.h2,Te(U({},r),{ref:t}))});zh.displayName="DialogTitle";const Eb=e=>{var f;const{children:t,disabled:n}=e,[r,o]=G.useState((f=e.container)==null?void 0:f.current),u=G.useSyncExternalStore(V5,()=>!1,()=>!0),{getRootNode:a}=Ad();if(G.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),u||n)return O.jsx(O.Fragment,{children:t});const c=r!=null?r:$5(a);return O.jsx(O.Fragment,{children:G.Children.map(t,h=>qa.createPortal(h,c))})},$5=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Bi(n)?n:Er(t).body},V5=()=>()=>{},q5=()=>{const{dialogPosition:e}=Ho(),t=e==="bottom-left",n=()=>{Eg(t?"bottom-right":"bottom-left")},r=t?RN:PN,o=t?"Move right":"Move left";return O.jsxs("button",{className:ue(`${Z}-overflow-menu-button`,"left-right-toggle-button","dialog"),onClick:n,children:[O.jsx(r,{}),o]})},yb=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=er(),{mode:o,status:u,dialogPosition:a}=Ho(),{copilot:c,messages:f,groupedMessages:h,isLoading:m,handleUserInput:E,handleSuggestion:b}=ti(),T=G.useRef(null),{isOpen:_}=u||{},S=o==="standalone";G.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[f]);const C=()=>{Ra(!1)};return!_||h.length===0?null:c?O.jsx(gb,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:O.jsx(Eb,{children:O.jsx(Fh,{className:ue(n,`${Z}-container`,`${Z}-dialog`,a),style:r,children:O.jsxs(Dh,{className:ue(n,`${Z}-dialog-content`,{standalone:S,embedded:!S}),children:[O.jsxs("div",{className:ue(n,`${Z}-dialog-header`,{standalone:S,embedded:!S}),children:[e&&O.jsx("img",{alt:"",role:"img",className:ue(n,`${Z}-dialog-logo`,{standalone:S,embedded:!S}),src:e}),O.jsx(zh,{className:ue(n,`${Z}-dialog-title`,{standalone:S,embedded:!S}),children:t}),O.jsxs("div",{className:ue(n,`${Z}-dialog-controls`),children:[O.jsx(X1,{componentType:"dialog",isIcon:!0}),O.jsx(vd,{componentType:"dialog",children:O.jsx(q5,{})}),O.jsx(Q1,{className:`dialog ${n}`,onClick:C})]})]}),O.jsxs(Mh,{className:ue(n,`${Z}-message-container`,{standalone:S,embedded:!S}),children:[O.jsx(Lh,{isWidgetStandalone:S,messages:h,handleSuggestionClick:b}),m&&O.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:O.jsx(Il,{})}),O.jsx("div",{ref:T})]}),O.jsx($f,{componentType:"dialog",isLoading:m,onSubmit:E})]})})})}):O.jsx("div",{children:"Loading Copilot..."})},Tb=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=er(),{mode:o,status:u,isModalFullscreen:a,previousComponentType:c}=Ho(),{copilot:f,messages:h,groupedMessages:m,isLoading:E,handleUserInput:b,handleSuggestion:T}=ti(),_=G.useRef(null),{isOpen:S}=u||{},C=o==="standalone";G.useEffect(()=>{_.current&&_.current.scrollIntoView({behavior:"smooth",block:"end"})},[h]);const I=({open:X})=>{Ra(X)},B=()=>{gg(!a)},L=()=>{Hf(c||"dialog")},q=()=>{Ra(!1)};return!S||m.length===0?null:f?O.jsx(gb,{lazyMount:!0,open:S,onOpenChange:I,children:O.jsx(Eb,{children:O.jsxs("div",{className:ue(n,`${Z}-modal-container`),style:r,children:[O.jsx(fb,{className:ue(n,`${Z}-modal-backdrop`)}),O.jsx(Fh,{className:ue(n,`${Z}-container`,`${Z}-modal`,{fullscreen:a,standalone:C,embedded:!C}),children:O.jsxs(Dh,{className:ue(n,`${Z}-modal-content`,{standalone:C,embedded:!C}),children:[O.jsxs("div",{className:ue(n,`${Z}-modal-header`,{standalone:C,embedded:!C}),children:[e&&O.jsx("img",{alt:"",role:"img",className:ue(n,`${Z}-modal-logo`,{standalone:C,embedded:!C}),src:e}),O.jsx(zh,{className:ue(n,`${Z}-modal-title`,{standalone:C,embedded:!C}),children:t}),O.jsxs("div",{className:ue(n,`${Z}-modal-controls`),children:[O.jsx(Fa,{ariaLabel:"Toggle Fullscreen",className:ue(n,`${Z}-modal-fullscreen-button`),icon:a?O.jsx(iA,{}):O.jsx(sA,{}),onClick:B}),O.jsx(Fa,{ariaLabel:"Toggle Dialog",className:ue(n,`${Z}-modal-toggle-dialog-button`),onClick:L,icon:O.jsx(FN,{})}),O.jsx(vd,{componentType:"modal"}),O.jsx(Q1,{className:`modal ${n}`,onClick:q})]})]}),O.jsxs(Mh,{className:ue(n,`${Z}-message-container`,{standalone:C,embedded:!C}),children:[O.jsx(Lh,{isWidgetStandalone:C,messages:m,handleSuggestionClick:T}),E&&O.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:O.jsx(Il,{})}),O.jsx("div",{ref:_})]}),O.jsx($f,{componentType:"modal",isLoading:E,onSubmit:b})]})})]})})}):O.jsx("div",{children:"Loading Copilot..."})},Y5=()=>{const e=Ho(),{status:{type:t}}=e||{status:{}};return t==="dialog"?O.jsx(yb,{}):t==="modal"?O.jsx(Tb,{}):O.jsx(cb,{})},jh=e=>O.jsx(xg,Te(U({},e),{children:O.jsx(Y5,{})}));var Ll={},bb;function W5(){if(bb)return Ll;bb=1;var e=Gg();return Ll.createRoot=e.createRoot,Ll.hydrateRoot=e.hydrateRoot,Ll}var _b=W5();const G5=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=Yt(o,["elementId","timeout"]);let u;const a=(f,h)=>{var m;for(const E of f)if(E.type==="childList"&&E.addedNodes.length)for(const b of E.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(ys(!0,"log","Target element found, rendering Copilot Widget"),h.disconnect(),clearTimeout(u),(m=_b.createRoot(b))==null||m.render(O.jsx(jh,U({},n))))},c=new MutationObserver(a);return c.observe(document.body,{childList:!0,subtree:!0}),u=setTimeout(()=>{c.disconnect(),ys(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},K5=r=>{var o=r,{timeout:e,elementId:t}=o,n=Yt(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){ys(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const u=document.getElementById(t);if(!u){ys(!0,"warn","Container element not found for id:",t),ys(!0,"warn","Beginning observation for element"),G5(U({elementId:t,timeout:e},n));return}_b.createRoot(u).render(O.jsx(jh,U({},n)))},Q5={search:vC,browse:kC,pdp:{setPdpContext:OC,updatePdpProductId:IC,updatePdpLink:PC},components:{toggleWidgetOpen:Ra,toggleModalFullscreen:gg,setWidgetType:Hf,setWidgetDialogPosition:Eg},session:{resetConversation:RC}};Ie.CopilotDialog=yb,Ie.CopilotEmbed=cb,Ie.CopilotModal=Tb,Ie.CopilotWidget=jh,Ie.WidgetProvider=xg,Ie.eventHandlers=Q5,Ie.injectCopilotWidget=K5,Ie.useCopilot=ti,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})});