@cimulate/copilot-widget 0.30.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,43 +1,43 @@
1
- (function(Oe,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Oe=typeof globalThis!="undefined"?globalThis:Oe||self,Fe(Oe["cimulate-copilot-widget"]={}))})(this,function(Oe){"use strict";var yF=Object.defineProperty,TF=Object.defineProperties;var bF=Object.getOwnPropertyDescriptors;var Kc=Object.getOwnPropertySymbols;var E2=Object.prototype.hasOwnProperty,y2=Object.prototype.propertyIsEnumerable;var Po=(Oe,Fe)=>(Fe=Symbol[Oe])?Fe:Symbol.for("Symbol."+Oe),_F=Oe=>{throw TypeError(Oe)},Qc=Math.pow,Om=(Oe,Fe,Ge)=>Fe in Oe?yF(Oe,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Oe[Fe]=Ge,U=(Oe,Fe)=>{for(var Ge in Fe||(Fe={}))E2.call(Fe,Ge)&&Om(Oe,Ge,Fe[Ge]);if(Kc)for(var Ge of Kc(Fe))y2.call(Fe,Ge)&&Om(Oe,Ge,Fe[Ge]);return Oe},ye=(Oe,Fe)=>TF(Oe,bF(Fe));var Zt=(Oe,Fe)=>{var Ge={};for(var ut in Oe)E2.call(Oe,ut)&&Fe.indexOf(ut)<0&&(Ge[ut]=Oe[ut]);if(Oe!=null&&Kc)for(var ut of Kc(Oe))Fe.indexOf(ut)<0&&y2.call(Oe,ut)&&(Ge[ut]=Oe[ut]);return Ge};var ve=(Oe,Fe,Ge)=>Om(Oe,typeof Fe!="symbol"?Fe+"":Fe,Ge);var st=(Oe,Fe,Ge)=>new Promise((ut,vt)=>{var yt=Ot=>{try{zt(Ge.next(Ot))}catch(gn){vt(gn)}},Pe=Ot=>{try{zt(Ge.throw(Ot))}catch(gn){vt(gn)}},zt=Ot=>Ot.done?ut(Ot.value):Promise.resolve(Ot.value).then(yt,Pe);zt((Ge=Ge.apply(Oe,Fe)).next())}),Hr=function(Oe,Fe){this[0]=Oe,this[1]=Fe},Xc=(Oe,Fe,Ge)=>{var ut=(Pe,zt,Ot,gn)=>{try{var bs=Ge[Pe](zt),Ro=(zt=bs.value)instanceof Hr,Jc=bs.done;Promise.resolve(Ro?zt[0]:zt).then(ir=>Ro?ut(Pe==="return"?Pe:"next",zt[1]?{done:ir.done,value:ir.value}:ir,Ot,gn):Ot({value:ir,done:Jc})).catch(ir=>ut("throw",ir,Ot,gn))}catch(ir){gn(ir)}},vt=Pe=>yt[Pe]=zt=>new Promise((Ot,gn)=>ut(Pe,zt,Ot,gn)),yt={};return Ge=Ge.apply(Oe,Fe),yt[Po("asyncIterator")]=()=>yt,vt("next"),vt("throw"),vt("return"),yt},Im=Oe=>{var Fe=Oe[Po("asyncIterator")],Ge=!1,ut,vt={};return Fe==null?(Fe=Oe[Po("iterator")](),ut=yt=>vt[yt]=Pe=>Fe[yt](Pe)):(Fe=Fe.call(Oe),ut=yt=>vt[yt]=Pe=>{if(Ge){if(Ge=!1,yt==="throw")throw Pe;return Pe}return Ge=!0,{done:!1,value:new Hr(new Promise(zt=>{var Ot=Fe[yt](Pe);Ot instanceof Object||_F("Object expected"),zt(Ot)}),1)}}),vt[Po("iterator")]=()=>vt,ut("next"),"throw"in Fe?ut("throw"):vt.throw=yt=>{throw yt},"return"in Fe&&ut("return"),vt},T2=(Oe,Fe,Ge)=>(Fe=Oe[Po("asyncIterator")])?Fe.call(Oe):(Oe=Oe[Po("iterator")](),Fe={},Ge=(ut,vt)=>(vt=Oe[ut])&&(Fe[ut]=yt=>new Promise((Pe,zt,Ot)=>(yt=vt.call(Oe,yt),Ot=yt.done,Promise.resolve(yt.value).then(gn=>Pe({value:gn,done:Ot}),zt)))),Ge("next"),Ge("return"),Fe);var Fe=document.createElement("style");Fe.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-clear-chat-icon-button{min-height:32px}.cim-widget-toggle-modal-button.dialog{display:none}@media (min-width: 576px){.cim-widget-toggle-modal-button.dialog{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media (max-width: 576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media (max-width: 768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;color:var(--cim-widget-primary-color)}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-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}.standalone .cim-widget-user-message-text{font-size:1.125rem}.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;font-size:1.125rem;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-left-right-toggle-button{display:none}@media (min-width: 576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;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}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media (max-width: 576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media (min-width: 576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;overflow-y:auto;padding:1rem 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(Fe);function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ut={exports:{}},vt={},yt={exports:{}},Pe={};var zt;function Ot(){if(zt)return Pe;zt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),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,Q,k){this.props=R,this.context=Q,this.refs=S,this.updater=k||T}C.prototype.isReactComponent={},C.prototype.setState=function(R,Q){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,Q,"setState")},C.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function I(){}I.prototype=C.prototype;function F(R,Q,k){this.props=R,this.context=Q,this.refs=S,this.updater=k||T}var D=F.prototype=new I;D.constructor=F,_(D,C.prototype),D.isPureReactComponent=!0;var G=Array.isArray,W=Object.prototype.hasOwnProperty,B={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function be(R,Q,k){var xe,Be={},Ie=null,Ye=null;if(Q!=null)for(xe in Q.ref!==void 0&&(Ye=Q.ref),Q.key!==void 0&&(Ie=""+Q.key),Q)W.call(Q,xe)&&!te.hasOwnProperty(xe)&&(Be[xe]=Q[xe]);var Ve=arguments.length-2;if(Ve===1)Be.children=k;else if(1<Ve){for(var Je=Array(Ve),wt=0;wt<Ve;wt++)Je[wt]=arguments[wt+2];Be.children=Je}if(R&&R.defaultProps)for(xe in Ve=R.defaultProps,Ve)Be[xe]===void 0&&(Be[xe]=Ve[xe]);return{$$typeof:e,type:R,key:Ie,ref:Ye,props:Be,_owner:B.current}}function he(R,Q){return{$$typeof:e,type:R.type,key:Q,ref:R.ref,props:R.props,_owner:R._owner}}function H(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function le(R){var Q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(k){return Q[k]})}var de=/\/+/g;function ce(R,Q){return typeof R=="object"&&R!==null&&R.key!=null?le(""+R.key):Q.toString(36)}function fe(R,Q,k,xe,Be){var Ie=typeof R;(Ie==="undefined"||Ie==="boolean")&&(R=null);var Ye=!1;if(R===null)Ye=!0;else switch(Ie){case"string":case"number":Ye=!0;break;case"object":switch(R.$$typeof){case e:case t:Ye=!0}}if(Ye)return Ye=R,Be=Be(Ye),R=xe===""?"."+ce(Ye,0):xe,G(Be)?(k="",R!=null&&(k=R.replace(de,"$&/")+"/"),fe(Be,Q,k,"",function(wt){return wt})):Be!=null&&(H(Be)&&(Be=he(Be,k+(!Be.key||Ye&&Ye.key===Be.key?"":(""+Be.key).replace(de,"$&/")+"/")+R)),Q.push(Be)),1;if(Ye=0,xe=xe===""?".":xe+":",G(R))for(var Ve=0;Ve<R.length;Ve++){Ie=R[Ve];var Je=xe+ce(Ie,Ve);Ye+=fe(Ie,Q,k,Je,Be)}else if(Je=b(R),typeof Je=="function")for(R=Je.call(R),Ve=0;!(Ie=R.next()).done;)Ie=Ie.value,Je=xe+ce(Ie,Ve++),Ye+=fe(Ie,Q,k,Je,Be);else if(Ie==="object")throw Q=String(R),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return Ye}function Te(R,Q,k){if(R==null)return R;var xe=[],Be=0;return fe(R,xe,"","",function(Ie){return Q.call(k,Ie,Be++)}),xe}function we(R){if(R._status===-1){var Q=R._result;Q=Q(),Q.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=Q)}if(R._status===1)return R._result.default;throw R._result}var oe={current:null},$={transition:null},ee={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:$,ReactCurrentOwner:B};function w(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:Te,forEach:function(R,Q,k){Te(R,function(){Q.apply(this,arguments)},k)},count:function(R){var Q=0;return Te(R,function(){Q++}),Q},toArray:function(R){return Te(R,function(Q){return Q})||[]},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=F,Pe.StrictMode=r,Pe.Suspense=f,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,Pe.act=w,Pe.cloneElement=function(R,Q,k){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var xe=_({},R.props),Be=R.key,Ie=R.ref,Ye=R._owner;if(Q!=null){if(Q.ref!==void 0&&(Ie=Q.ref,Ye=B.current),Q.key!==void 0&&(Be=""+Q.key),R.type&&R.type.defaultProps)var Ve=R.type.defaultProps;for(Je in Q)W.call(Q,Je)&&!te.hasOwnProperty(Je)&&(xe[Je]=Q[Je]===void 0&&Ve!==void 0?Ve[Je]:Q[Je])}var Je=arguments.length-2;if(Je===1)xe.children=k;else if(1<Je){Ve=Array(Je);for(var wt=0;wt<Je;wt++)Ve[wt]=arguments[wt+2];xe.children=Ve}return{$$typeof:e,type:R.type,key:Be,ref:Ie,props:xe,_owner:Ye}},Pe.createContext=function(R){return R={$$typeof:u,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:a,_context:R},R.Consumer=R},Pe.createElement=be,Pe.createFactory=function(R){var Q=be.bind(null,R);return Q.type=R,Q},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(R){return{$$typeof:c,render:R}},Pe.isValidElement=H,Pe.lazy=function(R){return{$$typeof:m,_payload:{_status:-1,_result:R},_init:we}},Pe.memo=function(R,Q){return{$$typeof:h,type:R,compare:Q===void 0?null:Q}},Pe.startTransition=function(R){var Q=$.transition;$.transition={};try{R()}finally{$.transition=Q}},Pe.unstable_act=w,Pe.useCallback=function(R,Q){return oe.current.useCallback(R,Q)},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,Q){return oe.current.useEffect(R,Q)},Pe.useId=function(){return oe.current.useId()},Pe.useImperativeHandle=function(R,Q,k){return oe.current.useImperativeHandle(R,Q,k)},Pe.useInsertionEffect=function(R,Q){return oe.current.useInsertionEffect(R,Q)},Pe.useLayoutEffect=function(R,Q){return oe.current.useLayoutEffect(R,Q)},Pe.useMemo=function(R,Q){return oe.current.useMemo(R,Q)},Pe.useReducer=function(R,Q,k){return oe.current.useReducer(R,Q,k)},Pe.useRef=function(R){return oe.current.useRef(R)},Pe.useState=function(R){return oe.current.useState(R)},Pe.useSyncExternalStore=function(R,Q,k){return oe.current.useSyncExternalStore(R,Q,k)},Pe.useTransition=function(){return oe.current.useTransition()},Pe.version="18.3.1",Pe}var gn;function bs(){return gn||(gn=1,yt.exports=Ot()),yt.exports}var Ro;function Jc(){if(Ro)return vt;Ro=1;var e=bs(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,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)&&!a.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 vt.Fragment=n,vt.jsx=u,vt.jsxs=u,vt}var ir;function S2(){return ir||(ir=1,ut.exports=Jc()),ut.exports}var N=S2();const _r=Object.create(null);_r.open="0",_r.close="1",_r.ping="2",_r.pong="3",_r.message="4",_r.upgrade="5",_r.noop="6";const hu=Object.create(null);Object.keys(_r).forEach(e=>{hu[_r[e]]=e});const Zc={type:"error",data:"parser error"},Pm=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Rm=typeof ArrayBuffer=="function",Lm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ef=({type:e,data:t},n,r)=>Pm&&t instanceof Blob?n?r(t):Dm(t,r):Rm&&(t instanceof ArrayBuffer||Lm(t))?n?r(t):Dm(new Blob([t]),r):r(_r[e]+(t||"")),Dm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Mm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let tf;function w2(e,t){if(Pm&&e.data instanceof Blob)return e.data.arrayBuffer().then(Mm).then(t);if(Rm&&(e.data instanceof ArrayBuffer||Lm(e.data)))return t(Mm(e.data));ef(e,!1,n=>{tf||(tf=new TextEncoder),t(tf.encode(n))})}const Fm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Fm.length;e++)Lo[Fm.charCodeAt(e)]=e;const C2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,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)a=Lo[e.charCodeAt(r)],u=Lo[e.charCodeAt(r+1)],c=Lo[e.charCodeAt(r+2)],f=Lo[e.charCodeAt(r+3)],m[o++]=a<<2|u>>4,m[o++]=(u&15)<<4|c>>2,m[o++]=(c&3)<<6|f&63;return h},A2=typeof ArrayBuffer=="function",nf=(e,t)=>{if(typeof e!="string")return{type:"message",data:Bm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:v2(e.substring(1),t)}:hu[n]?e.length>1?{type:hu[n],data:e.substring(1)}:{type:hu[n]}:Zc},v2=(e,t)=>{if(A2){const n=C2(e);return Bm(n,t)}else return{base64:!0,data:e}},Bm=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Um="",k2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{ef(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Um))})})},N2=(e,t)=>{const n=e.split(Um),r=[];for(let o=0;o<n.length;o++){const a=nf(n[o],t);if(r.push(a),a.type==="error")break}return r};function O2(){return new TransformStream({transform(e,t){w2(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let rf;function pu(e){return e.reduce((t,n)=>t+n.length,0)}function mu(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 I2(e,t){rf||(rf=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(pu(n)<1)break;const f=mu(n,1);a=(f[0]&128)===128,o=f[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(pu(n)<2)break;const f=mu(n,2);o=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),r=3}else if(r===2){if(pu(n)<8)break;const f=mu(n,8),h=new DataView(f.buffer,f.byteOffset,f.length),m=h.getUint32(0);if(m>Math.pow(2,21)-1){c.enqueue(Zc);break}o=m*Math.pow(2,32)+h.getUint32(4),r=3}else{if(pu(n)<o)break;const f=mu(n,o);c.enqueue(nf(a?f:rf.decode(f),t)),r=0}if(o===0||o>e){c.enqueue(Zc);break}}}})}const Hm=4;function Dt(e){if(e)return P2(e)}function P2(e){for(var t in Dt.prototype)e[t]=Dt.prototype[t];return e}Dt.prototype.on=Dt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Dt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.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},Dt.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},Dt.prototype.emitReserved=Dt.prototype.emit,Dt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Dt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const gu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),$n=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),R2="arraybuffer";function xF(){}function zm(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const L2=$n.setTimeout,D2=$n.clearTimeout;function Eu(e,t){t.useNativeTimers?(e.setTimeoutFn=L2.bind($n),e.clearTimeoutFn=D2.bind($n)):(e.setTimeoutFn=$n.setTimeout.bind($n),e.clearTimeoutFn=$n.clearTimeout.bind($n))}const M2=1.33;function F2(e){return typeof e=="string"?B2(e):Math.ceil((e.byteLength||e.size)*M2)}function B2(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 jm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function U2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function H2(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class z2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class sf extends Dt{constructor(t){super(),this.writable=!1,Eu(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 z2(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=nf(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=U2(t);return n.length?"?"+n:""}}class j2 extends sf{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)};N2(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,k2(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]=jm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let $m=!1;try{$m=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const $2=$m;function V2(){}class q2 extends j2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class xr extends Dt{constructor(t,n,r){super(),this.createRequest=t,Eu(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=zm(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=xr.requestsCount++,xr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=V2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete xr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(xr.requestsCount=0,xr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Vm);else if(typeof addEventListener=="function"){const e="onpagehide"in $n?"pagehide":"unload";addEventListener(e,Vm,!1)}}function Vm(){for(let e in xr.requests)xr.requests.hasOwnProperty(e)&&xr.requests[e].abort()}const Y2=function(){const e=qm({xdomain:!1});return e&&e.responseType!==null}();class W2 extends q2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Y2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xr(qm,this.uri(),t)}}function qm(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||$2))return new XMLHttpRequest}catch(n){}if(!t)try{return new $n[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Ym=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class G2 extends sf{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Ym?{}:zm(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;ef(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&gu(()=>{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]=jm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const of=$n.WebSocket||$n.MozWebSocket;class K2 extends G2{createSocket(t,n,r){return Ym?new of(t,n,r):n?new of(t,n):new of(t)}doWrite(t,n){this.ws.send(n)}}class Q2 extends sf{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=I2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=O2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:f})=>{c||(this.onPacket(f),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&gu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const X2={websocket:K2,webtransport:Q2,polling:W2},J2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Z2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function af(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=J2.exec(e||""),a={},u=14;for(;u--;)a[Z2[u]]=o[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=eS(a,a.path),a.queryKey=tS(a,a.query),a}function eS(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 tS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const uf=typeof addEventListener=="function"&&typeof removeEventListener=="function",yu=[];uf&&addEventListener("offline",()=>{yu.forEach(e=>e())},!1);class ui extends Dt{constructor(t,n){if(super(),this.binaryType=R2,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=af(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=af(n.host).host);Eu(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=H2(this.opts.query)),uf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},yu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Hm,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&&ui.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",ui.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+=F2(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,gu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ui.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(),uf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=yu.indexOf(this._offlineEventListener);r!==-1&&yu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ui.protocol=Hm;class nS extends ui{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;ui.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;ui.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 a(){r||(r=!0,m(),n.close(),n=null)}const u=E=>{const b=new Error("probe error: "+E);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function f(){u("socket closed")}function h(E){n&&E.name!==n.name&&a()}const m=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",f),this.off("upgrading",h)};n.once("open",o),n.once("error",u),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 rS=class extends nS{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=>X2[o]).filter(o=>!!o)),super(t,r)}};function iS(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=af(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const sS=typeof ArrayBuffer=="function",oS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Wm=Object.prototype.toString,aS=typeof Blob=="function"||typeof Blob!="undefined"&&Wm.call(Blob)==="[object BlobConstructor]",uS=typeof File=="function"||typeof File!="undefined"&&Wm.call(File)==="[object FileConstructor]";function lf(e){return sS&&(e instanceof ArrayBuffer||oS(e))||aS&&e instanceof Blob||uS&&e instanceof File}function Tu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Tu(e[n]))return!0;return!1}if(lf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Tu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Tu(e[n]))return!0;return!1}function lS(e){const t=[],n=e.data,r=e;return r.data=cf(n,t),r.attachments=t.length,{packet:r,buffers:t}}function cf(e,t){if(!e)return e;if(lf(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]=cf(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]=cf(e[r],t));return n}return e}function cS(e,t){return e.data=ff(e.data,t),delete e.attachments,e}function ff(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]=ff(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ff(e[n],t));return e}const fS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],dS=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 hS{constructor(t){this.replacer=t}encode(t){return(t.type===Qe.EVENT||t.type===Qe.ACK)&&Tu(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=lS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Gm(e){return Object.prototype.toString.call(e)==="[object Object]"}class df extends Dt{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 pS(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(lf(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 a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(u)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(df.isPayloadValid(r.type,a))r.data=a;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 Gm(n);case Qe.DISCONNECT:return n===void 0;case Qe.CONNECT_ERROR:return typeof n=="string"||Gm(n);case Qe.EVENT:case Qe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&fS.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 pS{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=cS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const mS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:df,Encoder:hS,get PacketType(){return Qe},protocol:dS},Symbol.toStringTag,{value:"Module"}));function sr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const gS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Km extends Dt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[sr(t,"open",this.onopen.bind(this)),sr(t,"packet",this.onpacket.bind(this)),sr(t,"error",this.onerror.bind(this)),sr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(gS.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:Qe.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,E=n.pop();this._registerAckCallback(m,E),u.id=m}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(f?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type: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 _s(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}_s.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},_s.prototype.reset=function(){this.attempts=0},_s.prototype.setMin=function(e){this.ms=e},_s.prototype.setMax=function(e){this.max=e},_s.prototype.setJitter=function(e){this.jitter=e};class hf extends Dt{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,Eu(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 _s({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||mS;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 rS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=sr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=sr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,f=this.setTimeoutFn(()=>{o(),a(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(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(sr(t,"ping",this.onping.bind(this)),sr(t,"data",this.ondata.bind(this)),sr(t,"error",this.onerror.bind(this)),sr(t,"close",this.onclose.bind(this)),sr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){gu(()=>{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 Km(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 Do={};function bu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=iS(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Do[o]&&a in Do[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let f;return c?f=new hf(r,t):(Do[o]||(Do[o]=new hf(r,t)),f=Do[o]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(bu,{Manager:hf,Socket:Km,io:bu,connect:bu});var ES=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===yS}(t)}(e)},yS=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Mo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?xs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function TS(e,t,n){return e.concat(t).map(function(r){return Mo(r,n)})}function Qm(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 Xm(e,t){try{return t in e}catch(n){return!1}}function bS(e,t,n){var r={};return n.isMergeableObject(e)&&Qm(e).forEach(function(o){r[o]=Mo(e[o],n)}),Qm(t).forEach(function(o){(function(a,u){return Xm(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(Xm(e,o)&&n.isMergeableObject(t[o])?r[o]=function(a,u){if(!u.customMerge)return xs;var c=u.customMerge(a);return typeof c=="function"?c:xs}(o,n)(e[o],t[o],n):r[o]=Mo(t[o],n))}),r}function xs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||TS,n.isMergeableObject=n.isMergeableObject||ES,n.cloneUnlessOtherwiseSpecified=Mo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):bS(e,t,n):Mo(t,n)}xs.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,r){return xs(n,r,t)},{})};var _S=xs;class xS{constructor(t){Object.assign(this,t)}}function fn(e){if(e)return function(t){for(var n in fn.prototype)t[n]=fn.prototype[n];return t}(e)}fn.prototype.on=fn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},fn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},fn.prototype.off=fn.prototype.removeListener=fn.prototype.removeAllListeners=fn.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},fn.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},fn.prototype.emitReserved=fn.prototype.emit,fn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},fn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const SS=typeof ArrayBuffer=="function",Jm=Object.prototype.toString,wS=typeof Blob=="function"||typeof Blob!="undefined"&&Jm.call(Blob)==="[object BlobConstructor]",CS=typeof File=="function"||typeof File!="undefined"&&Jm.call(File)==="[object FileConstructor]";function pf(e){return SS&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||wS&&e instanceof Blob||CS&&e instanceof File}function _u(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(_u(e[n]))return!0;return!1}if(pf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return _u(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&_u(e[n]))return!0;return!1}function AS(e){const t=[],n=e.data,r=e;return r.data=mf(n,t),r.attachments=t.length,{packet:r,buffers:t}}function mf(e,t){if(!e)return e;if(pf(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]=mf(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]=mf(e[r],t));return n}return e}function vS(e,t){return e.data=gf(e.data,t),delete e.attachments,e}function gf(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]=gf(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=gf(e[n],t));return e}const kS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var xt;(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"})(xt||(xt={}));class NS{constructor(t){this.replacer=t}encode(t){return t.type!==xt.EVENT&&t.type!==xt.ACK||!_u(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===xt.EVENT?xt.BINARY_EVENT:xt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==xt.BINARY_EVENT&&t.type!==xt.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=AS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Zm(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ef extends fn{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===xt.BINARY_EVENT;r||n.type===xt.BINARY_ACK?(n.type=r?xt.EVENT:xt.ACK,this.reconstructor=new OS(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!pf(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(xt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===xt.BINARY_EVENT||r.type===xt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(u)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Ef.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case xt.CONNECT:return Zm(n);case xt.DISCONNECT:return n===void 0;case xt.CONNECT_ERROR:return typeof n=="string"||Zm(n);case xt.EVENT:case xt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&kS.indexOf(n[0])===-1);case xt.ACK:case xt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class OS{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=vS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const e0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],t0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).map(([c,f])=>{const h=[...a,t(c)];return[e(c),f instanceof Object&&!(n!=null&&n.includes(h.join(".")))?r(f,h):f]});return Array.isArray(o)?u.map(c=>c[1]):Object.fromEntries(u)},n0=e=>e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),IS=t0(e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),e=>e,e0),PS=t0(n0,n0,e0),RS={Encoder:class extends NS{encode(e){var t,n;return super.encode(ye(U({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],IS(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 Ef{constructor(){super((e,t)=>e==""&&Array.isArray(t)?t.map(n=>n instanceof Object?PS(n):n):t)}}},LS={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class DS{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:a={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=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 u=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const f=[LS,a,{parser:RS,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=bu(u,_S.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*Qc(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 st(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return st(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return st(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 st(this,null,function*(){return this.asyncResponse("product_view",t,n)})}requestSessionInformation(t){return st(this,null,function*(){return new Promise(n=>{this.socket.emit("session_info",r=>{t&&t(r),n(r)})})})}getConversationEvents(t,n){return st(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 st(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=function(u){return Xc(this,null,function*(){const c=[];let f=!1,h=null;const m=yield new Hr(u({emit:E=>{c.push(E),h&&(h(),h=null)},cancel:()=>{f=!0}}));try{for(;!f;)c.length>0?yield c.shift():yield new Hr(new Promise(E=>{h=E}));for(;c.length>0;)yield c.shift()}finally{yield new Hr(m==null?void 0:m())}})}(({emit:u,cancel:c})=>{const f=(h,m)=>{["done","error"].includes(m.name)&&c(),m.eventSourceId==o&&u(m)};return this.socket.onAny(f),()=>st(this,null,function*(){this.socket.offAny(f)})});return{result:yield new Promise((u,c)=>this.socket.emit(t,n,f=>{f.name==="error"?c(new xS(f)):(o=f==null?void 0:f.id,u(f))})),events:a}})}}var q=bs();const zi=Ge(q);function r0(e,t){return function(){return e.apply(t,arguments)}}const{toString:MS}=Object.prototype,{getPrototypeOf:yf}=Object,{iterator:xu,toStringTag:i0}=Symbol,Su=(e=>t=>{const n=MS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),or=e=>(e=e.toLowerCase(),t=>Su(t)===e),wu=e=>t=>typeof t===e,{isArray:Ss}=Array,ws=wu("undefined");function Fo(e){return e!==null&&!ws(e)&&e.constructor!==null&&!ws(e.constructor)&&En(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const s0=or("ArrayBuffer");function FS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&s0(e.buffer),t}const BS=wu("string"),En=wu("function"),o0=wu("number"),Bo=e=>e!==null&&typeof e=="object",US=e=>e===!0||e===!1,Cu=e=>{if(Su(e)!=="object")return!1;const t=yf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(i0 in e)&&!(xu in e)},HS=e=>{if(!Bo(e)||Fo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},zS=or("Date"),jS=or("File"),$S=or("Blob"),VS=or("FileList"),qS=e=>Bo(e)&&En(e.pipe),YS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||En(e.append)&&((t=Su(e))==="formdata"||t==="object"&&En(e.toString)&&e.toString()==="[object FormData]"))},WS=or("URLSearchParams"),[GS,KS,QS,XS]=["ReadableStream","Request","Response","Headers"].map(or),JS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Uo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Ss(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Fo(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function a0(e,t){if(Fo(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 ji=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,u0=e=>!ws(e)&&e!==ji;function Tf(){const{caseless:e,skipUndefined:t}=u0(this)&&this||{},n={},r=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=e&&a0(n,a)||a;Cu(n[u])&&Cu(o)?n[u]=Tf(n[u],o):Cu(o)?n[u]=Tf({},o):Ss(o)?n[u]=o.slice():(!t||!ws(o))&&(n[u]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&Uo(arguments[o],r);return n}const ZS=(e,t,n,{allOwnKeys:r}={})=>(Uo(t,(o,a)=>{n&&En(o)?Object.defineProperty(e,a,{value:r0(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),ew=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},nw=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&yf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rw=(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},iw=e=>{if(!e)return null;if(Ss(e))return e;let t=e.length;if(!o0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sw=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&yf(Uint8Array)),ow=(e,t)=>{const r=(e&&e[xu]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},aw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},uw=or("HTMLFormElement"),lw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),l0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cw=or("RegExp"),c0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Uo(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},fw=e=>{c0(e,(t,n)=>{if(En(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(En(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+"'")})}})},dw=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Ss(e)?r(e):r(String(e).split(t)),n},hw=()=>{},pw=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function mw(e){return!!(e&&En(e.append)&&e[i0]==="FormData"&&e[xu])}const gw=e=>{const t=new Array(10),n=(r,o)=>{if(Bo(r)){if(t.indexOf(r)>=0)return;if(Fo(r))return r;if(!("toJSON"in r)){t[o]=r;const a=Ss(r)?[]:{};return Uo(r,(u,c)=>{const f=n(u,o+1);!ws(f)&&(a[c]=f)}),t[o]=void 0,a}}return r};return n(e,0)},Ew=or("AsyncFunction"),yw=e=>e&&(Bo(e)||En(e))&&En(e.then)&&En(e.catch),f0=((e,t)=>e?setImmediate:t?((n,r)=>(ji.addEventListener("message",({source:o,data:a})=>{o===ji&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ji.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",En(ji.postMessage)),Tw=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ji):typeof process!="undefined"&&process.nextTick||f0,K={isArray:Ss,isArrayBuffer:s0,isBuffer:Fo,isFormData:YS,isArrayBufferView:FS,isString:BS,isNumber:o0,isBoolean:US,isObject:Bo,isPlainObject:Cu,isEmptyObject:HS,isReadableStream:GS,isRequest:KS,isResponse:QS,isHeaders:XS,isUndefined:ws,isDate:zS,isFile:jS,isBlob:$S,isRegExp:cw,isFunction:En,isStream:qS,isURLSearchParams:WS,isTypedArray:sw,isFileList:VS,forEach:Uo,merge:Tf,extend:ZS,trim:JS,stripBOM:ew,inherits:tw,toFlatObject:nw,kindOf:Su,kindOfTest:or,endsWith:rw,toArray:iw,forEachEntry:ow,matchAll:aw,isHTMLForm:uw,hasOwnProperty:l0,hasOwnProp:l0,reduceDescriptors:c0,freezeMethods:fw,toObjectSet:dw,toCamelCase:lw,noop:hw,toFiniteNumber:pw,findKey:a0,global:ji,isContextDefined:u0,isSpecCompliantForm:mw,toJSONObject:gw,isAsyncFn:Ew,isThenable:yw,setImmediate:f0,asap:Tw,isIterable:e=>e!=null&&En(e[xu])};let Ue=class b2 extends Error{static from(t,n,r,o,a,u){const c=new b2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}};Ue.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ue.ERR_BAD_OPTION="ERR_BAD_OPTION",Ue.ECONNABORTED="ECONNABORTED",Ue.ETIMEDOUT="ETIMEDOUT",Ue.ERR_NETWORK="ERR_NETWORK",Ue.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ue.ERR_DEPRECATED="ERR_DEPRECATED",Ue.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ue.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ue.ERR_CANCELED="ERR_CANCELED",Ue.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ue.ERR_INVALID_URL="ERR_INVALID_URL";const bw=null;function bf(e){return K.isPlainObject(e)||K.isArray(e)}function d0(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function h0(e,t,n){return e?e.concat(t).map(function(o,a){return o=d0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function _w(e){return K.isArray(e)&&!e.some(bf)}const xw=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function Au(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,C){return!K.isUndefined(C[S])});const r=n.metaTokens,o=n.visitor||m,a=n.dots,u=n.indexes,f=(n.Blob||typeof Blob!="undefined"&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function h(_){if(_===null)return"";if(K.isDate(_))return _.toISOString();if(K.isBoolean(_))return _.toString();if(!f&&K.isBlob(_))throw new Ue("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(_)||K.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,S,C){let I=_;if(_&&!C&&typeof _=="object"){if(K.endsWith(S,"{}"))S=r?S:S.slice(0,-2),_=JSON.stringify(_);else if(K.isArray(_)&&_w(_)||(K.isFileList(_)||K.endsWith(S,"[]"))&&(I=K.toArray(_)))return S=d0(S),I.forEach(function(D,G){!(K.isUndefined(D)||D===null)&&t.append(u===!0?h0([S],G,a):u===null?S:S+"[]",h(D))}),!1}return bf(_)?!0:(t.append(h0(C,S,a),h(_)),!1)}const E=[],b=Object.assign(xw,{defaultVisitor:m,convertValue:h,isVisitable:bf});function T(_,S){if(!K.isUndefined(_)){if(E.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));E.push(_),K.forEach(_,function(I,F){(!(K.isUndefined(I)||I===null)&&o.call(t,I,K.isString(F)?F.trim():F,S,b))===!0&&T(I,S?S.concat(F):[F])}),E.pop()}}if(!K.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 _f(e,t){this._pairs=[],e&&Au(e,this,t)}const m0=_f.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 Sw(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||Sw,o=K.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=K.isURLSearchParams(t)?t.toString():new _f(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),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){K.forEach(this.handlers,function(r){r!==null&&t(r)})}}const xf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ww={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:_f,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Sf=typeof window!="undefined"&&typeof document!="undefined",wf=typeof navigator=="object"&&navigator||void 0,Cw=Sf&&(!wf||["ReactNative","NativeScript","NS"].indexOf(wf.product)<0),Aw=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vw=Sf&&window.location.href||"http://localhost",en=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Sf,hasStandardBrowserEnv:Cw,hasStandardBrowserWebWorkerEnv:Aw,navigator:wf,origin:vw},Symbol.toStringTag,{value:"Module"}))),ww);function kw(e,t){return Au(e,new en.classes.URLSearchParams,U({visitor:function(n,r,o,a){return en.isNode&&K.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Nw(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ow(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function y0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),f=a>=n.length;return u=!u&&K.isArray(o)?o.length:u,f?(K.hasOwnProp(o,u)?o[u]=[o[u],r]:o[u]=r,!c):((!o[u]||!K.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&K.isArray(o[u])&&(o[u]=Ow(o[u])),!c)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(r,o)=>{t(Nw(r),o,n,0)}),n}return null}function Iw(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ho={transitional:xf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=K.isObject(t);if(a&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return o?JSON.stringify(y0(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return kw(t,this.formSerializer).toString();if((c=K.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Au(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Iw(t)):t}],transformResponse:[function(t){const n=this.transitional||Ho.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.isString(t)&&(r&&!this.responseType||o)){const u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(u)throw c.name==="SyntaxError"?Ue.from(c,Ue.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:en.classes.FormData,Blob:en.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],e=>{Ho.headers[e]={}});const Pw=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rw=e=>{const t={};let n,r,o;return e&&e.split(`
3
- `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&Pw[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},T0=Symbol("internals");function zo(e){return e&&String(e).trim().toLowerCase()}function vu(e){return e===!1||e==null?e:K.isArray(e)?e.map(vu):String(e)}function Lw(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 Dw=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Cf(e,t,n,r,o){if(K.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!K.isString(t)){if(K.isString(r))return t.indexOf(r)!==-1;if(K.isRegExp(r))return r.test(t)}}function Mw(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Fw(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let yn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,f,h){const m=zo(f);if(!m)throw new Error("header name must be a non-empty string");const E=K.findKey(o,m);(!E||o[E]===void 0||h===!0||h===void 0&&o[E]!==!1)&&(o[E||f]=vu(c))}const u=(c,f)=>K.forEach(c,(h,m)=>a(h,m,f));if(K.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(K.isString(t)&&(t=t.trim())&&!Dw(t))u(Rw(t),n);else if(K.isObject(t)&&K.isIterable(t)){let c={},f,h;for(const m of t){if(!K.isArray(m))throw TypeError("Object iterator must return a key-value pair");c[h=m[0]]=(f=c[h])?K.isArray(f)?[...f,m[1]]:[f,m[1]]:m[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=zo(t),t){const r=K.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Lw(o);if(K.isFunction(n))return n.call(this,o,r);if(K.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=zo(t),t){const r=K.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Cf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=zo(u),u){const c=K.findKey(r,u);c&&(!n||Cf(r,r[c],c,n))&&(delete r[c],o=!0)}}return K.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||Cf(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return K.forEach(this,(o,a)=>{const u=K.findKey(r,a);if(u){n[u]=vu(o),delete n[a];return}const c=t?Mw(a):String(a).trim();c!==a&&delete n[a],n[c]=vu(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return K.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&K.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[T0]=this[T0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=zo(u);r[c]||(Fw(o,u),r[c]=!0)}return K.isArray(t)?t.forEach(a):a(t),this}};yn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(yn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),K.freezeMethods(yn);function Af(e,t){const n=this||Ho,r=t||n,o=yn.from(r.headers);let a=r.data;return K.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function b0(e){return!!(e&&e.__CANCEL__)}let jo=class extends Ue{constructor(t,n,r){super(t==null?"canceled":t,Ue.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function _0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ue("Request failed with status code "+n.status,[Ue.ERR_BAD_REQUEST,Ue.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Bw(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Uw(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(f){const h=Date.now(),m=r[a];u||(u=h),n[o]=f,r[o]=h;let E=a,b=0;for(;E!==o;)b+=n[E++],E=E%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),h-u<t)return;const T=m&&h-m;return T?Math.round(b*1e3/T):void 0}}function Hw(e,t){let n=0,r=1e3/t,o,a;const u=(h,m=Date.now())=>{n=m,o=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const m=Date.now(),E=m-n;E>=r?u(h,m):(o=h,a||(a=setTimeout(()=>{a=null,u(o)},r-E)))},()=>o&&u(o)]}const ku=(e,t,n=3)=>{let r=0;const o=Uw(50,250);return Hw(a=>{const u=a.loaded,c=a.lengthComputable?a.total:void 0,f=u-r,h=o(f),m=u<=c;r=u;const E={loaded:u,total:c,progress:c?u/c:void 0,bytes:f,rate:h||void 0,estimated:h&&c&&m?(c-u)/h:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},x0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},S0=e=>(...t)=>K.asap(()=>e(...t)),zw=en.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,en.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(en.origin),en.navigator&&/(msie|trident)/i.test(en.navigator.userAgent)):()=>!0,jw=en.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];K.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),K.isString(r)&&c.push(`path=${r}`),K.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),K.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function $w(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Vw(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function w0(e,t,n){let r=!$w(t);return e&&(r||n==!1)?Vw(e,t):t}const C0=e=>e instanceof yn?U({},e):e;function $i(e,t){t=t||{};const n={};function r(h,m,E,b){return K.isPlainObject(h)&&K.isPlainObject(m)?K.merge.call({caseless:b},h,m):K.isPlainObject(m)?K.merge({},m):K.isArray(m)?m.slice():m}function o(h,m,E,b){if(K.isUndefined(m)){if(!K.isUndefined(h))return r(void 0,h,E,b)}else return r(h,m,E,b)}function a(h,m){if(!K.isUndefined(m))return r(void 0,m)}function u(h,m){if(K.isUndefined(m)){if(!K.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:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c,headers:(h,m,E)=>o(C0(h),C0(m),E,!0)};return K.forEach(Object.keys(U(U({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const E=K.hasOwnProp(f,m)?f[m]:o,b=E(e[m],t[m],m);K.isUndefined(b)&&E!==c||(n[m]=b)}),n}const A0=e=>{const t=$i({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:c}=t;if(t.headers=u=yn.from(u),t.url=g0(w0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),K.isFormData(n)){if(en.hasStandardBrowserEnv||en.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(K.isFunction(n.getHeaders)){const f=n.getHeaders(),h=["content-type","content-length"];Object.entries(f).forEach(([m,E])=>{h.includes(m.toLowerCase())&&u.set(m,E)})}}if(en.hasStandardBrowserEnv&&(r&&K.isFunction(r)&&(r=r(t)),r||r!==!1&&zw(t.url))){const f=o&&a&&jw.read(a);f&&u.set(o,f)}return t},qw=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=A0(e);let a=o.data;const u=yn.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 D=yn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),W={data:!c||c==="text"||c==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:D,config:e,request:C};_0(function(te){n(te),S()},function(te){r(te),S()},W),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 Ue("Request aborted",Ue.ECONNABORTED,e,C)),C=null)},C.onerror=function(G){const W=G&&G.message?G.message:"Network Error",B=new Ue(W,Ue.ERR_NETWORK,e,C);B.event=G||null,r(B),C=null},C.ontimeout=function(){let G=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const W=o.transitional||xf;o.timeoutErrorMessage&&(G=o.timeoutErrorMessage),r(new Ue(G,W.clarifyTimeoutError?Ue.ETIMEDOUT:Ue.ECONNABORTED,e,C)),C=null},a===void 0&&u.setContentType(null),"setRequestHeader"in C&&K.forEach(u.toJSON(),function(G,W){C.setRequestHeader(W,G)}),K.isUndefined(o.withCredentials)||(C.withCredentials=!!o.withCredentials),c&&c!=="json"&&(C.responseType=o.responseType),h&&([b,_]=ku(h,!0),C.addEventListener("progress",b)),f&&C.upload&&([E,T]=ku(f),C.upload.addEventListener("progress",E),C.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(m=D=>{C&&(r(!D||D.type?new jo(null,e,C):D),C.abort(),C=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const F=Bw(o.url);if(F&&en.protocols.indexOf(F)===-1){r(new Ue("Unsupported protocol "+F+":",Ue.ERR_BAD_REQUEST,e));return}C.send(a||null)})},Yw=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(h){if(!o){o=!0,c();const m=h instanceof Error?h:this.reason;r.abort(m instanceof Ue?m:new jo(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,a(new Ue(`timeout of ${t}ms exceeded`,Ue.ETIMEDOUT))},t);const c=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(a):h.removeEventListener("abort",a)}),e=null)};e.forEach(h=>h.addEventListener("abort",a));const{signal:f}=r;return f.unsubscribe=()=>K.asap(c),f}},Ww=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},Gw=function(e,t){return Xc(this,null,function*(){try{for(var n=T2(Kw(e)),r,o,a;r=!(o=yield new Hr(n.next())).done;r=!1){const u=o.value;yield*Im(Ww(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Hr(o.call(n)))}finally{if(a)throw a[0]}}})},Kw=function(e){return Xc(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Im(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Hr(t.read());if(n)break;yield r}}finally{yield new Hr(t.cancel())}})},v0=(e,t,n,r)=>{const o=Gw(e,t);let a=0,u,c=h=>{u||(u=!0,r&&r(h))};return new ReadableStream({pull(h){return st(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=a+=b;n(T)}h.enqueue(new Uint8Array(E))}catch(m){throw c(m),m}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})},k0=64*1024,{isFunction:Nu}=K,Qw=(({Request:e,Response:t})=>({Request:e,Response:t}))(K.global),{ReadableStream:N0,TextEncoder:O0}=K.global,I0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Xw=e=>{e=K.merge.call({skipUndefined:!0},Qw,e);const{fetch:t,Request:n,Response:r}=e,o=t?Nu(t):typeof fetch=="function",a=Nu(n),u=Nu(r);if(!o)return!1;const c=o&&Nu(N0),f=o&&(typeof O0=="function"?(_=>S=>_.encode(S))(new O0):_=>st(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),h=a&&c&&I0(()=>{let _=!1;const S=new n(en.origin,{body:new N0,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!S}),m=u&&c&&I0(()=>K.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 Ue(`Response type '${_}' is not supported`,Ue.ERR_NOT_SUPPORT,C)})});const b=_=>st(null,null,function*(){if(_==null)return 0;if(K.isBlob(_))return _.size;if(K.isSpecCompliantForm(_))return(yield new n(en.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(K.isArrayBufferView(_)||K.isArrayBuffer(_))return _.byteLength;if(K.isURLSearchParams(_)&&(_=_+""),K.isString(_))return(yield f(_)).byteLength}),T=(_,S)=>st(null,null,function*(){const C=K.toFiniteNumber(_.getContentLength());return C==null?b(S):C});return _=>st(null,null,function*(){let{url:S,method:C,data:I,signal:F,cancelToken:D,timeout:G,onDownloadProgress:W,onUploadProgress:B,responseType:te,headers:be,withCredentials:he="same-origin",fetchOptions:H}=A0(_),le=t||fetch;te=te?(te+"").toLowerCase():"text";let de=Yw([F,D&&D.toAbortSignal()],G),ce=null;const fe=de&&de.unsubscribe&&(()=>{de.unsubscribe()});let Te;try{if(B&&h&&C!=="get"&&C!=="head"&&(Te=yield T(be,I))!==0){let R=new n(S,{method:"POST",body:I,duplex:"half"}),Q;if(K.isFormData(I)&&(Q=R.headers.get("content-type"))&&be.setContentType(Q),R.body){const[k,xe]=x0(Te,ku(S0(B)));I=v0(R.body,k0,k,xe)}}K.isString(he)||(he=he?"include":"omit");const we=a&&"credentials"in n.prototype,oe=ye(U({},H),{signal:de,method:C.toUpperCase(),headers:be.normalize().toJSON(),body:I,duplex:"half",credentials:we?he:void 0});ce=a&&new n(S,oe);let $=yield a?le(ce,H):le(S,oe);const ee=m&&(te==="stream"||te==="response");if(m&&(W||ee&&fe)){const R={};["status","statusText","headers"].forEach(Be=>{R[Be]=$[Be]});const Q=K.toFiniteNumber($.headers.get("content-length")),[k,xe]=W&&x0(Q,ku(S0(W),!0))||[];$=new r(v0($.body,k0,k,()=>{xe&&xe(),fe&&fe()}),R)}te=te||"text";let w=yield E[K.findKey(E,te)||"text"]($,_);return!ee&&fe&&fe(),yield new Promise((R,Q)=>{_0(R,Q,{data:w,headers:yn.from($.headers),status:$.status,statusText:$.statusText,config:_,request:ce})})}catch(we){throw fe&&fe(),we&&we.name==="TypeError"&&/Load failed|fetch/i.test(we.message)?Object.assign(new Ue("Network Error",Ue.ERR_NETWORK,_,ce,we&&we.response),{cause:we.cause||we}):Ue.from(we,we&&we.code,_,ce,we&&we.response)}})},Jw=new Map,P0=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,f,h,m=Jw;for(;c--;)f=a[c],h=m.get(f),h===void 0&&m.set(f,h=c?new Map:Xw(t)),m=h;return h};P0();const vf={http:bw,xhr:qw,fetch:{get:P0}};K.forEach(vf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const R0=e=>`- ${e}`,Zw=e=>K.isFunction(e)||e===null||e===!1;function eC(e,t){e=K.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!Zw(r)&&(o=vf[(c=String(r)).toLowerCase()],o===void 0))throw new Ue(`Unknown adapter '${c}'`);if(o&&(K.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([f,h])=>`adapter ${f} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
5
- `+u.map(R0).join(`
6
- `):" "+R0(u[0]):"as no adapter specified";throw new Ue("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const L0={getAdapter:eC,adapters:vf};function kf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new jo(null,e)}function D0(e){return kf(e),e.headers=yn.from(e.headers),e.data=Af.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),L0.getAdapter(e.adapter||Ho.adapter,e)(e).then(function(r){return kf(e),r.data=Af.call(e,e.transformResponse,r),r.headers=yn.from(r.headers),r},function(r){return b0(r)||(kf(e),r&&r.response&&(r.response.data=Af.call(e,e.transformResponse,r.response),r.response.headers=yn.from(r.response.headers))),Promise.reject(r)})}const M0="1.13.5",Ou={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ou[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const F0={};Ou.transitional=function(t,n,r){function o(a,u){return"[Axios v"+M0+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ue(o(u," has been removed"+(n?" in "+n:"")),Ue.ERR_DEPRECATED);return n&&!F0[u]&&(F0[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},Ou.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function tC(e,t,n){if(typeof e!="object")throw new Ue("options must be an object",Ue.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=t[a];if(u){const c=e[a],f=c===void 0||u(c,a,e);if(f!==!0)throw new Ue("option "+a+" must be "+f,Ue.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ue("Unknown option "+a,Ue.ERR_BAD_OPTION)}}const Iu={assertOptions:tC,validators:Ou},Vn=Iu.validators;let Vi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new E0,response:new E0}}request(t,n){return st(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
- `+a):r.stack=a}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$i(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Iu.assertOptions(r,{silentJSONParsing:Vn.transitional(Vn.boolean),forcedJSONParsing:Vn.transitional(Vn.boolean),clarifyTimeoutError:Vn.transitional(Vn.boolean),legacyInterceptorReqResOrdering:Vn.transitional(Vn.boolean)},!1),o!=null&&(K.isFunction(o)?n.paramsSerializer={serialize:o}:Iu.assertOptions(o,{encode:Vn.function,serialize:Vn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Iu.assertOptions(n,{baseUrl:Vn.spelling("baseURL"),withXsrfToken:Vn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&K.merge(a.common,a[n.method]);a&&K.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=yn.concat(u,a);const c=[];let f=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;f=f&&S.synchronous;const C=n.transitional||xf;C&&C.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(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 _=[D0.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=D0.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=$i(this.defaults,t);const n=w0(t.baseURL,t.url,t.allowAbsoluteUrls);return g0(n,t.params,t.paramsSerializer)}};K.forEach(["delete","get","head","options"],function(t){Vi.prototype[t]=function(n,r){return this.request($i(r||{},{method:t,url:n,data:(r||{}).data}))}}),K.forEach(["post","put","patch"],function(t){function n(r){return function(a,u,c){return this.request($i(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Vi.prototype[t]=n(),Vi.prototype[t+"Form"]=n(!0)});let nC=class _2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new jo(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new _2(function(o){t=o}),cancel:t}}};function rC(e){return function(n){return e.apply(null,n)}}function iC(e){return K.isObject(e)&&e.isAxiosError===!0}const Nf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Nf).forEach(([e,t])=>{Nf[t]=e});function B0(e){const t=new Vi(e),n=r0(Vi.prototype.request,t);return K.extend(n,Vi.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return B0($i(e,o))},n}const It=B0(Ho);It.Axios=Vi,It.CanceledError=jo,It.CancelToken=nC,It.isCancel=b0,It.VERSION=M0,It.toFormData=Au,It.AxiosError=Ue,It.Cancel=It.CanceledError,It.all=function(t){return Promise.all(t)},It.spread=rC,It.isAxiosError=iC,It.mergeConfig=$i,It.AxiosHeaders=yn,It.formToJSON=e=>y0(K.isHTMLForm(e)?new FormData(e):e),It.getAdapter=L0.getAdapter,It.HttpStatusCode=Nf,It.default=It;const{Axios:NF,AxiosError:OF,CanceledError:IF,isCancel:PF,CancelToken:RF,VERSION:LF,all:DF,Cancel:MF,isAxiosError:FF,spread:BF,toFormData:UF,AxiosHeaders:HF,HttpStatusCode:zF,formToJSON:jF,getAdapter:$F,mergeConfig:VF}=It;class U0{constructor(t,n,r=!1){ve(this,"CIMULATE_API_HEADER","x-cimulate-api-key");ve(this,"CIMULATE_SEARCH_API_PATH","api/v1");ve(this,"baseApiUrl");ve(this,"headers",{});ve(this,"fetchConfig",()=>st(this,null,function*(){try{const t=yield It.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));if(t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");t?this.headers[this.CIMULATE_API_HEADER]=t:n&&(this.headers.Authorization=`Bearer ${n}`),this.baseApiUrl=r?"https://staging.search.cimulate.ai":"https://prod.search.cimulate.ai"}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}const sC=q.createContext(void 0),oC=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=q.useMemo(()=>new U0(e,t,n),[e,t,n]);return N.jsx(sC.Provider,{value:o,children:r})};var H0=Symbol.for("immer-nothing"),z0=Symbol.for("immer-draftable"),rt=Symbol.for("immer-state");function qn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Cs=Object.getPrototypeOf;function As(e){return!!e&&!!e[rt]}function zr(e){var t;return e?j0(e)||Array.isArray(e)||!!e[z0]||!!((t=e.constructor)!=null&&t[z0])||Ru(e)||Lu(e):!1}var aC=Object.prototype.constructor.toString();function j0(e){if(!e||typeof e!="object")return!1;const t=Cs(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===aC}function $o(e,t){Pu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Pu(e){const t=e[rt];return t?t.type_:Array.isArray(e)?1:Ru(e)?2:Lu(e)?3:0}function Of(e,t){return Pu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $0(e,t,n){const r=Pu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function uC(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ru(e){return e instanceof Map}function Lu(e){return e instanceof Set}function jt(e){return e.copy_||e.base_}function If(e,t){if(Ru(e))return new Map(e);if(Lu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=j0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[rt];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Cs(e),r)}else{const r=Cs(e);if(r!==null&&n)return U({},e);const o=Object.create(r);return Object.assign(o,e)}}function Pf(e,t=!1){return Du(e)||As(e)||!zr(e)||(Pu(e)>1&&(e.set=e.add=e.clear=e.delete=lC),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Pf(r,!0))),e}function lC(){qn(2)}function Du(e){return Object.isFrozen(e)}var Rf={};function qi(e){const t=Rf[e];return t||qn(0,e),t}function cC(e,t){Rf[e]||(Rf[e]=t)}var Vo;function Mu(){return Vo}function fC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function V0(e,t){t&&(qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Lf(e){Df(e),e.drafts_.forEach(dC),e.drafts_=null}function Df(e){e===Vo&&(Vo=e.parent_)}function q0(e){return Vo=fC(Vo,e)}function dC(e){const t=e[rt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Y0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[rt].modified_&&(Lf(t),qn(4)),zr(e)&&(e=Fu(t,e),t.parent_||Bu(t,e)),t.patches_&&qi("Patches").generateReplacementPatches_(n[rt].base_,e,t.patches_,t.inversePatches_)):e=Fu(t,n,[]),Lf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==H0?e:void 0}function Fu(e,t,n){if(Du(t))return t;const r=t[rt];if(!r)return $o(t,(o,a)=>W0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Bu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),$o(a,(c,f)=>W0(e,r,o,c,f,n,u)),Bu(e,o,!1),n&&e.patches_&&qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function W0(e,t,n,r,o,a,u){if(As(o)){const c=a&&t&&t.type_!==3&&!Of(t.assigned_,r)?a.concat(r):void 0,f=Fu(e,o,c);if($0(n,r,f),As(f))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(zr(o)&&!Du(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fu(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Bu(e,o)}}function Bu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Pf(t,n)}function hC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Mu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Mf;n&&(o=[r],a=qo);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Mf={get(e,t){if(t===rt)return e;const n=jt(e);if(!Of(n,t))return pC(e,n,t);const r=n[t];return e.finalized_||!zr(r)?r:r===Ff(e.base_,t)?(Bf(e),e.copy_[t]=Yo(r,e)):r},has(e,t){return t in jt(e)},ownKeys(e){return Reflect.ownKeys(jt(e))},set(e,t,n){const r=G0(jt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Ff(jt(e),t),a=o==null?void 0:o[rt];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(uC(n,o)&&(n!==void 0||Of(e.base_,t)))return!0;Bf(e),jr(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Ff(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Bf(e),jr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=jt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){qn(11)},getPrototypeOf(e){return Cs(e.base_)},setPrototypeOf(){qn(12)}},qo={};$o(Mf,(e,t)=>{qo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),qo.deleteProperty=function(e,t){return qo.set.call(this,e,t,void 0)},qo.set=function(e,t,n){return Mf.set.call(this,e[0],t,n,e[0])};function Ff(e,t){const n=e[rt];return(n?jt(n):e)[t]}function pC(e,t,n){var o;const r=G0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function G0(e,t){if(!(t in e))return;let n=Cs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Cs(n)}}function jr(e){e.modified_||(e.modified_=!0,e.parent_&&jr(e.parent_))}function Bf(e){e.copy_||(e.copy_=If(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var mC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(f=a,...h){return u.produce(f,m=>n.call(this,m,...h))}}typeof n!="function"&&qn(6),r!==void 0&&typeof r!="function"&&qn(7);let o;if(zr(t)){const a=q0(this),u=Yo(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Lf(a):Df(a)}return V0(a,r),Y0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===H0&&(o=void 0),this.autoFreeze_&&Pf(o,!0),r){const a=[],u=[];qi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else qn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,f=>t(f,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){zr(e)||qn(8),As(e)&&(e=gC(e));const t=q0(this),n=Yo(e,void 0);return n[rt].isManual_=!0,Df(t),n}finishDraft(e,t){const n=e&&e[rt];(!n||!n.isManual_)&&qn(9);const{scope_:r}=n;return V0(r,t),Y0(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=qi("Patches").applyPatches_;return As(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Yo(e,t){const n=Ru(e)?qi("MapSet").proxyMap_(e,t):Lu(e)?qi("MapSet").proxySet_(e,t):hC(e,t);return(t?t.scope_:Mu()).drafts_.push(n),n}function gC(e){return As(e)||qn(10,e),K0(e)}function K0(e){if(!zr(e)||Du(e))return e;const t=e[rt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=If(e,t.scope_.immer_.useStrictShallowCopy_)}else n=If(e,!0);return $o(n,(r,o)=>{$0(n,r,K0(o))}),t&&(t.finalized_=!1),n}function EC(){class e extends Map{constructor(f,h){super(),this[rt]={type_:2,parent_:h,scope_:h?h.scope_:Mu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:f,draft_:this,isManual_:!1,revoked_:!1}}get size(){return jt(this[rt]).size}has(f){return jt(this[rt]).has(f)}set(f,h){const m=this[rt];return u(m),(!jt(m).has(f)||jt(m).get(f)!==h)&&(n(m),jr(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[rt];return u(h),n(h),jr(h),h.base_.has(f)?h.assigned_.set(f,!1):h.assigned_.delete(f),h.copy_.delete(f),!0}clear(){const f=this[rt];u(f),jt(f).size&&(n(f),jr(f),f.assigned_=new Map,$o(f.base_,h=>{f.assigned_.set(h,!1)}),f.copy_.clear())}forEach(f,h){const m=this[rt];jt(m).forEach((E,b,T)=>{f.call(h,this.get(b),b,this)})}get(f){const h=this[rt];u(h);const m=jt(h).get(f);if(h.finalized_||!zr(m)||m!==h.base_.get(f))return m;const E=Yo(m,h);return n(h),h.copy_.set(f,E),E}keys(){return jt(this[rt]).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[rt]={type_:3,parent_:h,scope_:h?h.scope_:Mu(),modified_:!1,finalized_:!1,copy_:void 0,base_:f,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return jt(this[rt]).size}has(f){const h=this[rt];return u(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[rt];return u(h),this.has(f)||(a(h),jr(h),h.copy_.add(f)),this}delete(f){if(!this.has(f))return!1;const h=this[rt];return u(h),a(h),jr(h),h.copy_.delete(f)||(h.drafts_.has(f)?h.copy_.delete(h.drafts_.get(f)):!1)}clear(){const f=this[rt];u(f),jt(f).size&&(a(f),jr(f),f.copy_.clear())}values(){const f=this[rt];return u(f),a(f),f.copy_.values()}entries(){const f=this[rt];return u(f),a(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 a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(f=>{if(zr(f)){const h=Yo(f,c);c.drafts_.set(f,h),c.copy_.add(h)}else c.copy_.add(f)}))}function u(c){c.revoked_&&qn(3,JSON.stringify(jt(c)))}cC("MapSet",{proxyMap_:t,proxySet_:o})}var In=new mC,yC=In.produce;In.produceWithPatches.bind(In),In.setAutoFreeze.bind(In),In.setUseStrictShallowCopy.bind(In),In.applyPatches.bind(In),In.createDraft.bind(In),In.finishDraft.bind(In);function TC(e,t,n){var r=q.useMemo(function(){return yC(e)},[e]);return q.useReducer(r,t,n)}const Q0={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"},Tn={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"},Uu={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set},Wo="cimulate",Uf=`${Wo}:pdp-update`,Hf=`${Wo}:browse-update`,zf=`${Wo}:search-update`,jf=`${Wo}:ui-state-update`,$f=`${Wo}:session-state`,Sr=U({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},Q0),bC={"browse-context":Sr.CONTEXT_UPDATED,categoryId:Sr.CATEGORY_ID_CHANGED,categoryName:Sr.CATEGORY_NAME_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},$r=U({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},Q0),_C={"search-context":$r.SEARCH_CONTEXT_UPDATED,query:$r.QUERY_CHANGED,page:$r.PAGE_CHANGED,pageSize:$r.PAGE_SIZE_CHANGED,includeFacets:$r.FACET_FILTERS_CHANGED,facetFilters:$r.FACET_FILTERS_CHANGED,rangeFilters:$r.RANGE_FILTERS_CHANGED,catalogSegment:$r.CATALOG_SEGMENT_CHANGED,pricebooks:$r.PRICEBOOKS_CHANGED},Z="cim-widget",vs=`--${Z}`,Yi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},xC=(e=Yi)=>({[`${vs}-primary-color`]:e.primaryColor||Yi.primaryColor,[`${vs}-secondary-color`]:e.secondaryColor||Yi.secondaryColor,[`${vs}-font-color`]:e.fontColor||Yi.fontColor,[`${vs}-font-family`]:e.fontFamily||Yi.fontFamily,[`${vs}-background-color`]:e.backgroundColor||Yi.backgroundColor,[`${vs}-border-color`]:e.borderColor||Yi.borderColor}),li={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},X0=q.createContext(null),J0=q.createContext(null);class SC{constructor(t,n,r=!1){ve(this,"apiService");ve(this,"config",null);ve(this,"getConfig",()=>st(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));ve(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));ve(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));ve(this,"getDescription",t=>this.getProductFieldValue(t,"description"));ve(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));ve(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));ve(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));ve(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));ve(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));ve(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});ve(this,"getProductField",t=>this.config?this.config[t]:"");ve(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new U0(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 ks=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class wC{constructor(t=!1){ve(this,"isDevelopment");ve(this,"_log",(t,n,...r)=>{ks(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 Z0=q.createContext(null),CC=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",searchPlaceholder:r,searchButtonLabel:o,resetConversationMessage:a="What products would you like to explore today?",apiKey:u,apiToken:c,theme:f,isDevelopment:h,children:m})=>{const E=q.useMemo(()=>new SC(u,c,h),[u,c,h]),b=q.useMemo(()=>new wC(h),[h]);q.useEffect(()=>{E.config||E.getConfig()},[E]);const T=q.useMemo(()=>xC(f),[f]),_=q.useMemo(()=>({configModule:E,logoUrl:e,headerText:t,globalClassName:n,themeVariables:T,logger:b,searchPlaceholder:r,searchButtonLabel:o,resetConversationMessage:a}),[E,e,t,n,r,o,a,b,T]);return N.jsx(Z0.Provider,{value:_,children:m})},bn=()=>{const e=q.useContext(Z0);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class AC{constructor(){ve(this,"initialState",{connected:!1,mode:"embedded",status:{type:"dialog",isOpen:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});ve(this,"connectedProxy");ve(this,"modeProxy");ve(this,"statusProxy");ve(this,"dialogProxy");ve(this,"modalProxy",{isFullscreen:!1});ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return NC(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.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 connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get type(){return this.statusProxy.type}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,status:{type:this.type,isOpen:this.isOpen},dialog:{position:this.position},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const St=new AC,Wi=()=>St.connected,Go=()=>St.isOpen,vC=e=>{window.addEventListener(jf,e)},kC=e=>{window.removeEventListener(jf,e)},NC=(e,t)=>{const n=new CustomEvent(jf,{detail:{property:e,value:t}});window.dispatchEvent(n)},OC=e=>{St.connectedProxy.connected=e},Hu=e=>{if(typeof e!="boolean"){St.statusProxy.isOpen=!St.statusProxy.isOpen;return}St.statusProxy.isOpen=e},eg=e=>{St.modalProxy.isFullscreen=e},Vf=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);St.statusProxy.type=e,e==="dialog"||e==="chat"?St.modeProxy.mode="embedded":St.modeProxy.mode="standalone"},tg=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(", ")}.`);St.dialogProxy.position=e},IC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=bn(),o=q.useCallback(b=>{n({type:Tn.SET_COPILOT,payload:b})},[n]),a=q.useCallback(b=>{OC(b),n({type:Tn.SET_CONNECTED,payload:b})},[n]),u=q.useCallback(()=>{n({type:Tn.RESET_COPILOT,payload:{}})},[n]),c=q.useCallback(()=>{n({type:Tn.RESET_STATE,payload:{}})},[n]),f=q.useCallback(b=>{r==null||r.log(`${b.name} event received`,b),n({type:Tn.ADD_MESSAGE,payload:b}),e==null||e(b)},[e,r,n]),h=q.useCallback(b=>{n({type:Tn.ADD_LOADING_MESSAGE,payload:b})},[n]),m=q.useCallback(b=>{n({type:Tn.REMOVE_LOADING_MESSAGE,payload:b})},[n]),E=q.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:f,addLoadingMessage:h,removeLoadingMessage:m}),[o,a,u,c,f,h,m]);return N.jsx(J0.Provider,{value:E,children:t})};EC();const PC=(e,t)=>{const{type:n,payload:r}=t;if(n===Tn.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(f=>f.id===o.id);if(c!==-1){u[c]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case Tn.RESET_STATE:e.messages=Uu.messages,e.groupedMessages=Uu.groupedMessages,e.loadingMessages=Uu.loadingMessages;break;case Tn.RESET_COPILOT:e.copilot=null;break;case Tn.SET_COPILOT:e.copilot=r;break;case Tn.SET_CONNECTED:e.connected=r;break;case Tn.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case Tn.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break}},RC=({onCopilotEvent:e,children:t})=>{const[n,r]=TC(PC,Uu);return N.jsx(X0.Provider,{value:n,children:N.jsx(IC,{onCopilotEvent:e,dispatch:r,children:t})})};function LC(){var e=q.useRef(!0);return e.current?(e.current=!1,!0):e.current}var DC=function(e){q.useEffect(e,[])},MC=function(e,t){return e===t};function FC(e,t){t===void 0&&(t=MC);var n=q.useRef(),r=q.useRef(e),o=LC();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class BC{constructor(){ve(this,"items",[]);ve(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});ve(this,"remove",()=>this.items.shift());ve(this,"first",()=>this.items.length>0?this.items[0]:null);ve(this,"clear",()=>{this.items.length=0});ve(this,"processQueue",t=>{new Array(tn.size).fill(1).forEach(()=>{const r=tn.first();r&&(t(r),tn.remove())})})}get size(){return this.items.length}}const tn=new BC,ng=e=>{window.addEventListener(zf,e)},rg=e=>{window.removeEventListener(zf,e)},UC=(e,t,n)=>{const r=new CustomEvent(zf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},ig=e=>{window.addEventListener(Hf,e)},sg=e=>{window.removeEventListener(Hf,e)},HC=(e,t,n)=>{const r=new CustomEvent(Hf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},og=e=>{window.addEventListener(Uf,e)},ag=e=>{window.removeEventListener(Uf,e)},ug=(e,t,n)=>{const r=new CustomEvent(Uf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},zC=e=>{window.addEventListener($f,e)},jC=e=>{window.removeEventListener($f,e)},zu=(e,t,n)=>{const r=new CustomEvent($f,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class $C{constructor(){ve(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"categoryIdProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=bC[n];return HC(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ot=new $C,lg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},cg=(e,t,n)=>{var u,c;const r=U({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const f=r[e].filter(h=>h!==t);f.length>0?r[e]=f:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},fg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},dg=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(f=>f.field===e);if(u!==-1){a[u]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},hg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},pg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},VC=e=>{if(!Wi()||!Go()){Wi()&&tn.clear(),tn.add({context:"browse",payload:ye(U({},ot.state),{categoryId:e})});return}ot.categoryIdProxy.categoryId=e},mg=e=>{lg(e,ot)},qC=(e,t)=>{cg(e,t,ot)},gg=e=>{fg(e,ot)},YC=({field:e,value:t})=>{dg({field:e,value:t},ot)},WC=e=>{hg(e,ot)},Eg=e=>{pg(e,ot)},yg=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Wi(),n=Go();if(!t||!n){t&&tn.clear(),tn.add({context:"browse",payload:U({},e)});return}"facetFilters"in e&&mg(e.facetFilters||{}),"rangeFilters"in e&&gg(e.rangeFilters||[]),"catalogSegment"in e&&(ot.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Eg(e.pricebooks||[]),"categoryName"in e&&(ot.categoryIdProxy.categoryName=e.categoryName||""),ot.categoryIdProxy.categoryId=e.categoryId},GC=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:yg,updateBrowseCategoryId:VC,updateCatalogSegment:WC,updateFacetFilter:qC,updateFacetFilters:mg,updatePricebooks:Eg,updateRangeFilter:YC,updateRangeFilters:gg},Symbol.toStringTag,{value:"Module"}));class KC{constructor(){ve(this,"initialParams",{productId:"",productName:"",pdpLink:""});ve(this,"proxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>(ug(n,r),Reflect.set(t,n,r)));ve(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const ar=new KC,Tg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Wi(),n=Go();if(!t||!n){t&&tn.clear(),tn.add({context:"pdp",payload:U({},e)});return}ar.updateProxy(e),ug("pdp-context",e)},QC=e=>{ar.proxy.productId=e,Wi()||tn.add({context:"pdp",payload:U({},ar.state)})},XC=e=>{ar.proxy.pdpLink=e},JC=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{zu("getConversationMessages",{payload:e,callback:t},li.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{zu("getSessionInformation",{callback:e},li.GET_SESSION_INFORMATION)},loadConversation:e=>{zu("loadConversation",e,li.LOAD_CONVERSATION)},resetConversation:()=>{zu("resetConversation",!0,li.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class ZC{constructor(){ve(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"queryProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=_C[n];return UC(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const pt=new ZC,eA=e=>{const t=Go(),n=Wi();if(!n||!t){n&&tn.clear(),tn.add({context:"search",payload:ye(U({},pt.state),{query:e})});return}pt.queryProxy.query=e},bg=e=>{lg(e,pt)},tA=(e,t)=>{cg(e,t,pt)},_g=e=>{fg(e,pt)},nA=({field:e,value:t})=>{dg({field:e,value:t},pt)},rA=e=>{hg(e,pt)},xg=e=>{pg(e,pt)},Sg=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Go(),n=Wi();if(!n||!t){n&&tn.clear(),tn.add({context:"search",payload:U({},e)});return}"facetFilters"in e&&bg(e.facetFilters||{}),"rangeFilters"in e&&_g(e.rangeFilters||[]),"catalogSegment"in e&&(pt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&xg(e.pricebooks||[]),pt.queryProxy.query=e.query},iA=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Sg,updateCatalogSegment:rA,updateFacetFilter:tA,updateFacetFilters:bg,updatePricebooks:xg,updateRangeFilter:nA,updateRangeFilters:_g,updateSearchQuery:eA},Symbol.toStringTag,{value:"Module"})),wg=q.createContext({entryType:"search",setEntryType:()=>{}}),sA=({children:e})=>{const[t,n]=q.useState("search"),r=q.useMemo(()=>({entryType:t,setEntryType:n}),[t,n]);return N.jsx(wg.Provider,{value:r,children:e})},oA=()=>{const e=q.useContext(wg);if(!e)throw new Error("useEntry must be used within an EntryProvider");return e},aA={categoryId:ot.categoryId,categoryName:ot.categoryIdProxy.categoryName||"",facetFilters:ot.facetFilters,rangeFilters:ot.rangeFilters,catalogSegment:ot.catalogSegment,pricebooks:ot.pricebooks},Cg=q.createContext(aA),uA=({children:e})=>{const[t,n]=q.useState(ot.categoryId),[r,o]=q.useState(ot.categoryIdProxy.categoryName||""),[a,u]=q.useState(ot.facetFilters||{}),[c,f]=q.useState(ot.rangeFilters||[]),[h,m]=q.useState(ot.catalogSegment||null),[E,b]=q.useState(ot.pricebooks||null);q.useEffect(()=>{const _=({detail:S})=>{(S==null?void 0:S.property)==="categoryId"&&n(S.value),(S==null?void 0:S.property)==="categoryName"&&o(S.value),(S==null?void 0:S.property)==="facetFilters"&&u(S.value),(S==null?void 0:S.property)==="rangeFilters"&&f(S.value),(S==null?void 0:S.property)==="catalogSegment"&&m(S.value),(S==null?void 0:S.property)==="pricebooks"&&b(S.value)};return ig(_),()=>{sg(_)}},[]);const T=q.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:h,pricebooks:E}),[t,r,a,c,h,E]);return N.jsx(Cg.Provider,{value:T,children:e})},lA=()=>{const e=q.useContext(Cg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},cA={searchQuery:pt.query,facetFilters:pt.facetFilters,rangeFilters:pt.rangeFilters,catalogSegment:pt.catalogSegment,pricebooks:pt.pricebooks},Ag=q.createContext(cA),fA=({children:e})=>{const[t,n]=q.useState(pt.query),[r,o]=q.useState(pt.facetFilters),[a,u]=q.useState(pt.rangeFilters),[c,f]=q.useState(pt.catalogSegment),[h,m]=q.useState(pt.pricebooks);q.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"&&u(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=q.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:h}),[t,r,a,c,h]);return N.jsx(Ag.Provider,{value:E,children:e})},dA=()=>{const e=q.useContext(Ag);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},hA={productId:ar.productId,pdpLink:ar.pdpLink},vg=q.createContext(hA),pA=({children:e})=>{const[t,n]=q.useState(ar.productId),[r,o]=q.useState(ar.pdpLink);q.useEffect(()=>{const u=({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(u),()=>{ag(u)}},[]);const a=q.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return N.jsx(vg.Provider,{value:a,children:e})},mA=()=>{const e=q.useContext(vg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},kg=q.createContext({mode:St.modeProxy.mode,status:St.statusProxy,dialogPosition:St.dialogProxy.position,isModalFullscreen:St.modalProxy.isFullscreen,previousComponentType:St.statusProxy.type}),gA=({componentType:e,children:t})=>{const[n,r]=q.useState(St.modeProxy.mode),[o,a]=q.useState({type:e||St.statusProxy.type,isOpen:St.statusProxy.isOpen}),[u,c]=q.useState(St.dialogProxy.position),[f,h]=q.useState(St.modalProxy.isFullscreen),m=FC(o.type);q.useEffect(()=>{const b=T=>{const{property:_,value:S}=T.detail||{};if(!(!_||S===void 0)){if(_==="mode"){r(S);return}if(_==="isOpen"){a(C=>ye(U({},C),{isOpen:S}));return}if(_==="type"){a(C=>ye(U({},C),{type:S}));return}if(_==="position"){c(S);return}if(_==="isFullscreen"){h(S);return}}};return vC(b),()=>{kC(b)}},[]);const E=q.useMemo(()=>({mode:n,status:o,previousComponentType:m||"dialog",dialogPosition:u,isModalFullscreen:f}),[n,o,m,u,f]);return N.jsx(kg.Provider,{value:E,children:t})},Ns=()=>{const e=q.useContext(kg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},Ng=()=>{const e=q.useContext(J0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Og=()=>{const e=q.useContext(X0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},Ig=q.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),EA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:f}=bn(),Ti=dA(),{searchQuery:h}=Ti,m=Zt(Ti,["searchQuery"]),bi=lA(),{categoryId:E}=bi,b=Zt(bi,["categoryId"]),{productId:T,pdpLink:_}=mA(),{entryType:S,setEntryType:C}=oA(),{setCopilot:I,setConnected:F,resetCopilot:D,resetCopilotState:G,addCopilotEvent:W,addLoadingMessage:B,removeLoadingMessage:te}=Ng(),{connected:be,copilot:he,messages:H,groupedMessages:le,loadingMessages:de}=Og(),{status:ce}=Ns(),fe=q.useRef(!1),Te=q.useRef(!1),we=q.useMemo(()=>de.size>0,[de]),oe=q.useCallback(_e=>de.has(_e),[de]),$=q.useCallback(_e=>{W(_e),B(_e.id)},[W,B]),ee=q.useCallback(({query:_e,facetFilters:He,rangeFilters:it,catalogSegment:dt,pricebooks:mt,userPrompt:kt,isUserAction:on})=>{if(!he){f==null||f.error("Copilot is not initialized");return}if(!_e)return;const nt={searchParams:{query:_e}};kt&&(nt.userPrompt=kt),He&&Object.keys(He).length>0&&(nt.searchParams.facetFilters=He),it&&it.length>0&&(nt.searchParams.rangeFilters=it),dt&&(nt.searchParams.catalogSegment=dt),mt&&(nt.searchParams.pricebooks=mt);const Jr=!fe.current;C("search"),he.search(nt,Fn=>{const J=U({},Fn);Jr&&(J.isInitial=!0,J.isUserAction=!0),on&&(J.isUserAction=on),fe.current=!0,$(J)})},[f,C,$,he]),w=q.useCallback(({categoryId:_e,categoryName:He,facetFilters:it,rangeFilters:dt,catalogSegment:mt,pricebooks:kt,userPrompt:on,isUserAction:nt})=>{if(!he){f==null||f.error("Copilot is not initialized");return}const Jr=it&&Object.keys(it).length>0;if(_e===""&&!Jr){f==null||f.error("Browse event must include facetFilters when categoryId is empty");return}const Fn={browseParams:{categoryId:_e||""}};on&&(Fn.userPrompt=on),Jr&&(Fn.browseParams.facetFilters=it),dt&&dt.length>0&&(Fn.browseParams.rangeFilters=dt),mt&&(Fn.browseParams.catalogSegment=mt),Array.isArray(kt)&&kt.length>0&&(Fn.browseParams.pricebooks=kt);const J=!Te.current;C("browse"),he.browse(Fn,Ee=>{const Re=U({},Ee);J&&(Re.isInitial=!0,Re.isUserAction=!0),nt&&(Re.isUserAction=nt),He&&Re.request&&(Re.request.label=He),Te.current=!0,$(Re)})},[f,C,$,he]),R=q.useCallback(({productId:_e,productName:He,pdpLink:it,userPrompt:dt,isUserAction:mt})=>{if(!he){f==null||f.error("Copilot is not initialized");return}if(!_e)return;const kt={productId:_e};dt&&(kt.userPrompt=dt),it&&(kt.pdpLink=it),C("pdp"),he.productView(kt,on=>{const nt=U({},on);mt&&(nt.isUserAction=mt),He&&nt.request&&(nt.request.label=He),$(nt)})},[f,C,he,$]),Q=q.useCallback(_e=>{const He=ye(U({},_e),{id:_e.inquiryLinkId||_e.id});W(He)},[W]),k=q.useCallback(_e=>{W(_e),a==null||a(_e)},[W,a]),xe=q.useCallback(_e=>{W(_e),u==null||u(_e)},[W,u]),Be=q.useCallback(_e=>{o==null||o(_e),F(!0)},[o,F]);q.useEffect(()=>{!he||!be||!ce.isOpen||tn.size>0&&tn.processQueue(_e=>{if(_e.context==="search"){const He=ye(U({},_e.payload),{isUserAction:!0});Sg(He)}if(_e.context==="browse"){const He=ye(U({},_e.payload),{isUserAction:!0});yg(He)}if(_e.context==="pdp"){const He=ye(U({},_e.payload),{isUserAction:!0});Tg(He)}})},[ce.isOpen,he,be]);const Ie=q.useCallback(_e=>{he&&he.requestSessionInformation(He=>{f==null||f.log("Retrieved session information: ",He),_e==null||_e(He)})},[he,f]),Ye=q.useCallback((_e,He)=>{he&&_e.conversationId&&he.getConversationEvents(_e,it=>{f==null||f.log("Retrieved conversation messages: ",it),He(it)})},[he,f]),Ve=q.useCallback(_e=>{_e.on("connect_ack",Be),_e.on("follow_up",W),_e.on("inquiry",Q),_e.on("partial_inquiry",Q),_e.on("display_products",W),_e.on("progress",W),_e.on("refined_search",k),_e.on("refined_browse",xe),_e.on("done",He=>{te(He.eventSourceId)}),_e.on("error",He=>{W(He),te(He.eventSourceId)}),_e.onDisconnect(He=>{const it=["io server disconnect","transport error","server shutting down"];if(f==null||f.log("Connection disconnected with reason: ",He),!it.includes(He)){F(!1);return}f==null||f.log("De-registering event listeners");const dt=new Date().toISOString();W({name:"error",message:"Connection was lost. Please try again.",createdAt:dt,id:`error-${dt}`,sessionId:"session"}),_e.off()})},[f,F,te,Q,k,xe,W,Be]);DC(()=>{let _e;n?_e=n:_e=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const He={baseUrl:_e};e?He.apiKey=e:t&&(He.apiToken=t);const it=new DS(He);return I(it),Ve(it),it.connect(),it.requestSessionInformation(dt=>{f==null||f.log("Session Information: ",dt)}),()=>{it.disconnect(),it.off(),D()}});const Je=q.useCallback(_e=>{if(!he)return;const He={eventId:_e,reason:"User cancelled the request"};he.cancelRequest(He,it=>{W(it),te(_e)})},[W,te,he]),wt=q.useCallback(()=>{he&&he.conversationReset({},_e=>{G(),W(_e),he.requestSessionInformation(He=>{f==null||f.log("Session Information: ",He)})})},[he,f,W,G]),Qn=q.useCallback(_e=>{if(_e)switch(S){case"search":ee(ye(U({query:h},m),{userPrompt:_e}));return;case"browse":w(ye(U({categoryId:E},b),{userPrompt:_e}));return;case"pdp":R({productId:T,pdpLink:_||"",userPrompt:_e});return}},[S,h,m,ee,E,b,w,R,T,_]),ss=q.useCallback((_e,He)=>{var kt,on;const dt=_e.params.userPrompt||"";if(!dt)return;const mt=H.find(nt=>nt.id===He);if(mt){if(mt.name==="copilot_search"){const{query:nt}=((kt=mt.request)==null?void 0:kt.searchParams)||{};nt&&ee(ye(U({query:nt||h},m),{userPrompt:dt}));return}if(mt.name==="copilot_browse"){const{categoryId:nt}=((on=mt.request)==null?void 0:on.browseParams)||{};w(ye(U({categoryId:nt||E||""},b),{userPrompt:dt}));return}if(mt.name==="product_view"){const nt=mt.request;nt!=null&&nt.productId&&R(ye(U({},nt),{userPrompt:dt}))}}},[h,m,E,b,H,ee,w,R]),yi=q.useMemo(()=>({copilot:he,messages:H,groupedMessages:le,isLoading:we,isResponseLoading:oe,handleSearch:ee,handleBrowse:w,handlePdp:R,handleUserInput:Qn,handleSuggestion:ss,handleCancel:Je,resetConversation:wt,getSessionInformation:Ie,getConversationMessages:Ye}),[he,H,le,we,oe,ee,w,R,Qn,ss,Je,wt,Ie,Ye]);return N.jsx(Ig.Provider,{value:yi,children:c})},Vr=()=>{const e=q.useContext(Ig);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},yA=()=>{const{resetCopilotState:e,addCopilotEvent:t}=Ng(),{copilot:n,handleSearch:r,handleBrowse:o,handlePdp:a,resetConversation:u,getSessionInformation:c,getConversationMessages:f}=Vr(),h=q.useCallback(({query:b,isUserAction:T})=>{if(!n||!b)return;const{facetFilters:_}=pt.facetFiltersProxy,{rangeFilters:S}=pt.rangeFiltersProxy,{catalogSegment:C}=pt.catalogSegmentProxy,{pricebooks:I}=pt.pricebooksProxy,F={query:b};F.facetFilters=_||{},F.rangeFilters=S||[],F.catalogSegment=C||"",F.pricebooks=I||[],r(ye(U({},F),{isUserAction:T}))},[n,r]),m=q.useCallback(({categoryId:b,isUserAction:T})=>{if(!n)return;const _=ot.categoryIdProxy.categoryName,{facetFilters:S}=ot.facetFiltersProxy,{rangeFilters:C}=ot.rangeFiltersProxy,{catalogSegment:I}=ot.catalogSegmentProxy,{pricebooks:F}=ot.pricebooksProxy,D={categoryId:b};D.categoryName=_||"",D.facetFilters=S||{},D.rangeFilters=C||[],D.catalogSegment=I||"",D.pricebooks=F||[],o(ye(U({},D),{isUserAction:T}))},[n,o]),E=q.useCallback(({productId:b,isUserAction:T})=>{if(!n||!b)return;const _={productId:b,pdpLink:ar.pdpLink,productName:ar.proxy.productName||"",isUserAction:T};a(_)},[n,a]);return q.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&h({query:T.value,isUserAction:!0})};return ng(b),()=>{rg(b)}},[h]),q.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.property)==="pdp-context"){const _=T.value;E({productId:_.productId,isUserAction:!0});return}(T==null?void 0:T.property)==="productId"&&E({productId:T.value,isUserAction:!0})};return og(b),()=>{ag(b)}},[E]),q.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="categoryId"&&m({categoryId:T.value,isUserAction:!0})};return ig(b),()=>{sg(b)}},[m]),q.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.event)==li.RESET_CONVERSATION&&u(),(T==null?void 0:T.event)==li.GET_SESSION_INFORMATION){const _=T.value.callback;c(_)}if((T==null?void 0:T.event)==li.GET_CONVERSATION_MESSAGES){const{payload:_,callback:S}=T.value;if(!_.conversationId||typeof S!="function")return;f(_,S)}if((T==null?void 0:T.event)==li.LOAD_CONVERSATION){const _=T.value;if(!_.conversationId)return;f(_,C=>{e(),C.forEach(I=>{t(I)})})}};return zC(b),()=>{jC(b)}},[u,c,f,e,t]),null},TA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onCopilotEvent:a,onRefinedSearch:u,onRefinedBrowse:c,children:f})=>N.jsx(RC,{onCopilotEvent:a,children:N.jsxs(EA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:u,onRefinedBrowse:c,children:[N.jsx(yA,{}),f]})}),Pg=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:a,globalClassName:u,isDevelopment:c=!1,componentType:f,searchPlaceholder:h,searchButtonLabel:m,resetConversationMessage:E,onConnect:b,onCopilotEvent:T,onRefinedSearch:_,onRefinedBrowse:S,children:C})=>N.jsx(CC,{apiKey:e,logoUrl:r,headerText:o,theme:a,globalClassName:u,searchPlaceholder:h,searchButtonLabel:m,resetConversationMessage:E,isDevelopment:c,children:N.jsx(oC,{apiKey:e,apiToken:t,isDevelopment:c,children:N.jsx(sA,{children:N.jsx(pA,{children:N.jsx(uA,{children:N.jsx(fA,{children:N.jsx(gA,{componentType:f,children:N.jsx(TA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:c,onConnect:b,onCopilotEvent:T,onRefinedSearch:_,onRefinedBrowse:S,children:C})})})})})})})});function Rg(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=Rg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function se(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Rg(e))&&(r&&(r+=" "),r+=t);return r}var Lg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Dg=zi.createContext&&zi.createContext(Lg),bA=["attr","size","title"];function _A(e,t){if(e==null)return{};var n=xA(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xA(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 ju(){return ju=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},ju.apply(this,arguments)}function Mg(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 $u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mg(Object(n),!0).forEach(function(r){SA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SA(e,t,n){return t=wA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wA(e){var t=CA(e,"string");return typeof t=="symbol"?t:t+""}function CA(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 Fg(e){return e&&e.map((t,n)=>zi.createElement(t.tag,$u({key:n},t.attr),Fg(t.child)))}function dn(e){return t=>zi.createElement(AA,ju({attr:$u({},e.attr)},t),Fg(e.child))}function AA(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=_A(e,bA),c=o||n.size||"1em",f;return n.className&&(f=n.className),e.className&&(f=(f?f+" ":"")+e.className),zi.createElement("svg",ju({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:f,style:$u($u({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&zi.createElement("title",null,a),e.children)};return Dg!==void 0?zi.createElement(Dg.Consumer,null,n=>t(n)):t(Lg)}function Bg(e){return dn({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 Vu(e){return dn({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 vA(e){return dn({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 Ug(e){return dn({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 kA(e){return dn({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 NA(e){return dn({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 OA(e){return dn({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 IA(e){return dn({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 qf=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>N.jsx("button",{className:se(`${Z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Os=({className:e,icon:t,type:n="button",ariaLabel:r,disabled:o=!1,onClick:a})=>N.jsx("button",{className:se(e,`${Z}-icon-button`),type:n,"aria-label":r,onClick:a,disabled:o,children:t}),PA=({className:e,searchButtonLabel:t,globalClassName:n,componentType:r,isLoading:o})=>t?N.jsx(qf,{className:se(n,r,e),type:"submit",disabled:o,children:t}):N.jsx(Os,{className:se(n,r,e),type:"submit",disabled:o,ariaLabel:"Search Copilot",icon:N.jsx(Vu,{})}),Yf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o}=Og(),{globalClassName:a,searchPlaceholder:u,searchButtonLabel:c}=bn(),f=q.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 N.jsxs("form",{className:se(a,e,n,`${Z}-search-bar`),name:`${Z}-search-form`,onSubmit:h,children:[N.jsx("span",{role:"status",className:se(`${Z}-connection-status-icon`,E)}),N.jsx("input",{className:se(a,e,n,`${Z}-search-input`),type:"text",ref:f,placeholder:u,name:`${Z}-user-input`}),N.jsx(PA,{searchButtonLabel:c,globalClassName:a,componentType:n,isLoading:t||!m})]})};function RA(e){return e==null?[]:Array.isArray(e)?e:[e]}var LA=e=>e!=null&&typeof e=="object",qu=e=>typeof e=="string",Is=e=>typeof e=="function",DA=e=>e==null,MA=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),FA=e=>Object.prototype.toString.call(e),Hg=Function.prototype.toString,BA=Hg.call(Object),UA=e=>{if(!LA(e)||FA(e)!="[object Object]"||jA(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=MA(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Hg.call(n)==BA},HA=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,zA=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,jA=e=>HA(e)||zA(e),$A=e=>e(),VA=()=>{},Wf=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function Gf(e){if(!UA(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]=Gf(o))}return n}function Kf(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function qA(e,t){if(e==null)throw new Error(t())}var YA=Object.defineProperty,WA=(e,t,n)=>t in e?YA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qf=(e,t,n)=>WA(e,typeof t!="symbol"?t+"":t,n),zg=()=>{},Yu=e=>typeof e=="object"&&e!==null,GA=e=>e?"":void 0,KA=e=>e?"true":void 0,QA=1,XA=9,JA=11,$t=e=>Yu(e)&&e.nodeType===QA&&typeof e.nodeName=="string",Wu=e=>Yu(e)&&e.nodeType===XA,ZA=e=>Yu(e)&&e===e.window,jg=e=>$t(e)?e.localName||"":"#document";function ev(e){return["html","body","#document"].includes(jg(e))}var tv=e=>Yu(e)&&e.nodeType!==void 0,Gi=e=>tv(e)&&e.nodeType===JA&&"host"in e,nv=e=>$t(e)&&e.localName==="input",rv=e=>$t(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ko(e){if(!e)return!1;const t=e.getRootNode();return Rs(t)===e}var iv=/(textarea|select)/;function sv(e){if(e==null||!$t(e))return!1;try{return nv(e)&&e.selectionStart!=null||iv.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Gu(e,t){var r;if(!e||!t||!$t(e)||!$t(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Gi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function wr(e){var t;return Wu(e)?e:ZA(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function ov(e){return wr(e).documentElement}function Ps(e){var t,n,r;return Gi(e)?Ps(e.host):Wu(e)?(t=e.defaultView)!=null?t:window:$t(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Rs(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 av(e){if(jg(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gi(e)&&e.host||ov(e);return Gi(t)?t.host:t}function Xf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Wu(t)||Gi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Jf=new WeakMap;function Ku(e){return Jf.has(e)||Jf.set(e,Ps(e).getComputedStyle(e)),Jf.get(e)}var Zf=new Set(["menu","listbox","dialog","grid","tree","region"]),uv=e=>Zf.has(e),$g=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Vg(e,t){const n=new Set,r=Xf(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const f=$g(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&&uv(E)&&!b&&(m===t||m.contains(t)||o(m)))return!0}}}return!1};return o(e)}function qg(e,t){const n=Xf(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const f=$g(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&&Zf.has(E)&&!b&&(t(m),o(m))}}}};o(e)}function lv(e){const t=new Set;return qg(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function cv(e){const t=e.getAttribute("role");return!!(t&&Zf.has(t))}function fv(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function dv(e){var t;return fv(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function hv(e){if(!e.id)return!1;const t=Xf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&cv(e))}var ed=()=>typeof document!="undefined";function pv(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var td=e=>ed()&&e.test(pv()),mv=e=>ed()&&e.test(navigator.vendor),Yg=()=>ed()&&!!navigator.maxTouchPoints,gv=()=>td(/^iPhone/i),Ev=()=>td(/^iPad/i)||nd()&&navigator.maxTouchPoints>1,Wg=()=>gv()||Ev(),yv=()=>nd()||Wg(),nd=()=>td(/^Mac/i),Tv=()=>yv()&&mv(/apple/i);function bv(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 qr(e){var n;const t=bv(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var _v=e=>e.button===0,xv=e=>e.button===2||nd()&&e.ctrlKey&&e.button===0,ur=(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)}},Gg=e=>$t(e)&&e.tagName==="IFRAME",Sv=/^(audio|video|details)$/;function Kg(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var wv=e=>!Number.isNaN(Kg(e)),Cv=e=>Kg(e)<0;function Av(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 Qg(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((f,h)=>u.set(f,h));let c=0;for(;c<o.length;){const f=o[c++];if(!f||a.has(f))continue;a.add(f);const h=Av(f,t);if(h){const m=Array.from(h.querySelectorAll(Qu)).filter(n),E=u.get(f);if(E!==void 0){const b=E+1;r.splice(b,0,...m),m.forEach((T,_)=>{u.set(T,b+_)});for(let T=b+m.length;T<r.length;T++)u.set(r[T],T)}else{const b=r.length;r.push(...m),m.forEach((T,_)=>{u.set(T,b+_)})}o.push(...m)}}return r}var Qu="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",Xg=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Qu));(n==!0||n=="if-empty"&&o.length===0)&&$t(e)&&Yr(e)&&o.unshift(e);const u=[];for(const c of o)if(Yr(c)){if(Gg(c)&&c.contentDocument){const f=c.contentDocument.body;u.push(...Xg(f,{getShadowRoot:r}));continue}u.push(c)}return r?Qg(u,r,Yr):u};function Yr(e){return!$t(e)||e.closest("[inert]")?!1:e.matches(Qu)&&rv(e)}function Qo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Qu));n&&Ki(e)&&o.unshift(e);const a=[];for(const u of o)if(Ki(u)){if(Gg(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Qo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Qg(a,r,Ki);return!u.length&&n?o:u}return!a.length&&n?o:a}function Ki(e){return $t(e)&&e.tabIndex>0?!0:Yr(e)&&!Cv(e)}function vv(e,t={}){const n=Qo(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function kv(e,t={}){const{current:n,getShadowRoot:r}=t,o=Qo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Rs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Xo(e){return e.tabIndex<0&&(Sv.test(e.localName)||sv(e))&&!wv(e)?0:e.tabIndex}function Jg(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=Qo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var Nv=class x2{constructor(){Qf(this,"id",null),Qf(this,"fn_cleanup"),Qf(this,"cleanup",()=>{this.cancel()})}static create(){return new x2}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 _n(e){const t=Nv.create();return t.request(e),t.cleanup}function Ov(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 rd(e){const t=av(e);return ev(t)?wr(t).body:$t(t)&&Rv(t)?t:rd(t)}var Iv=/auto|scroll|overlay|hidden|clip/,Pv=new Set(["inline","contents"]);function Rv(e){const t=Ps(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return Iv.test(n+o+r)&&!Pv.has(a)}function Lv(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function f(h){if(h.key!=="Tab")return;let m=null;const[E,b]=vv(e,{includeContainer:!0,getShadowRoot:a}),T=kv(c,{current:n,getShadowRoot:a}),_=!E&&!b;h.shiftKey&&Ko(T)?(o==null||o(),m=b):h.shiftKey&&(Ko(E)||_)?m=n:!h.shiftKey&&Ko(n)?(o==null||o(),m=E):!h.shiftKey&&(Ko(b)||_)&&(m=T),m&&(h.preventDefault(),typeof r=="function"?r(m):m.focus())}return ur(u,"keydown",f,!0)}function Dv(e,t){const c=t,{defer:n,triggerElement:r}=c,o=Zt(c,["defer","triggerElement"]),a=n?_n:f=>f(),u=[];return u.push(a(()=>{const f=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(Lv(f,U({triggerElement:h},o)))})),()=>{u.forEach(f=>f==null?void 0:f())}}function Xu(e,t){if(!e)return zg;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 Mv(e,t,n){if(!e)return zg;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((u,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),u(h))}).catch(h=>{r.aborted||(clearTimeout(f),c(h))})}),()=>t.abort()]}function Bv(e,t){const{timeout:n,rootNode:r}=t,o=Ps(r),a=wr(r),u=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(a.body,{childList:!0,subtree:!0})}),u,n)}var Uv=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),Hv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Zg=e=>{const t={};let n;for(;n=Hv.exec(e);)t[n[1]]=n[2];return t},zv=(e,t)=>{if(qu(e)){if(qu(t))return`${e};${t}`;e=Zg(e)}else qu(t)&&(t=Zg(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function lr(...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]=Wf(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=Uv(t[o],n[o]);continue}if(o==="style"){t[o]=zv(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 KF(e){return e}var Ls=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ls||{}),id="__init__";function jv(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>wr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Rs(t()),a=u=>t().getElementById(u);return ye(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Ko,getById:a})}var sd={exports:{}},xn={},od={exports:{}},ad={};var e1;function $v(){return e1||(e1=1,function(e){function t($,ee){var w=$.length;$.push(ee);e:for(;0<w;){var R=w-1>>>1,Q=$[R];if(0<o(Q,ee))$[R]=ee,$[w]=Q,w=R;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var ee=$[0],w=$.pop();if(w!==ee){$[0]=w;e:for(var R=0,Q=$.length,k=Q>>>1;R<k;){var xe=2*(R+1)-1,Be=$[xe],Ie=xe+1,Ye=$[Ie];if(0>o(Be,w))Ie<Q&&0>o(Ye,Be)?($[R]=Ye,$[Ie]=w,R=Ie):($[R]=Be,$[xe]=w,R=xe);else if(Ie<Q&&0>o(Ye,w))$[R]=Ye,$[Ie]=w,R=Ie;else break e}}return ee}function o($,ee){var w=$.sortIndex-ee.sortIndex;return w!==0?w:$.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var 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,F=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D($){for(var ee=n(h);ee!==null;){if(ee.callback===null)r(h);else if(ee.startTime<=$)r(h),ee.sortIndex=ee.expirationTime,t(f,ee);else break;ee=n(h)}}function G($){if(S=!1,D($),!_)if(n(f)!==null)_=!0,we(W);else{var ee=n(h);ee!==null&&oe(G,ee.startTime-$)}}function W($,ee){_=!1,S&&(S=!1,I(be),be=-1),T=!0;var w=b;try{for(D(ee),E=n(f);E!==null&&(!(E.expirationTime>ee)||$&&!le());){var R=E.callback;if(typeof R=="function"){E.callback=null,b=E.priorityLevel;var Q=R(E.expirationTime<=ee);ee=e.unstable_now(),typeof Q=="function"?E.callback=Q:E===n(f)&&r(f),D(ee)}else r(f);E=n(f)}if(E!==null)var k=!0;else{var xe=n(h);xe!==null&&oe(G,xe.startTime-ee),k=!1}return k}finally{E=null,b=w,T=!1}}var B=!1,te=null,be=-1,he=5,H=-1;function le(){return!(e.unstable_now()-H<he)}function de(){if(te!==null){var $=e.unstable_now();H=$;var ee=!0;try{ee=te(!0,$)}finally{ee?ce():(B=!1,te=null)}}else B=!1}var ce;if(typeof F=="function")ce=function(){F(de)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,Te=fe.port2;fe.port1.onmessage=de,ce=function(){Te.postMessage(null)}}else ce=function(){C(de,0)};function we($){te=$,B||(B=!0,ce())}function oe($,ee){be=C(function(){$(e.unstable_now())},ee)}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,we(W))},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"):he=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 ee=3;break;default:ee=b}var w=b;b=ee;try{return $()}finally{b=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,ee){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var w=b;b=$;try{return ee()}finally{b=w}},e.unstable_scheduleCallback=function($,ee,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 Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=w+Q,$={id:m++,callback:ee,priorityLevel:$,startTime:w,expirationTime:Q,sortIndex:-1},w>R?($.sortIndex=w,t(h,$),n(f)===null&&$===n(h)&&(S?(I(be),be=-1):S=!0,oe(G,w-R))):($.sortIndex=Q,t(f,$),_||T||(_=!0,we(W))),$},e.unstable_shouldYield=le,e.unstable_wrapCallback=function($){var ee=b;return function(){var w=b;b=ee;try{return $.apply(this,arguments)}finally{b=w}}}}(ad)),ad}var t1;function Vv(){return t1||(t1=1,od.exports=$v()),od.exports}var n1;function qv(){if(n1)return xn;n1=1;var e=bs(),t=Vv();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),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 F(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(I,F);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,F);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,F);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 D(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 G=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),B=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),be=Symbol.for("react.strict_mode"),he=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),le=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),Te=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),$=Symbol.iterator;function ee(i){return i===null||typeof i!="object"?null:(i=$&&i[$]||i["@@iterator"],typeof i=="function"?i:null)}var w=Object.assign,R;function Q(i){if(R===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);R=s&&s[1]||""}return`
8
- `+R+i}var k=!1;function xe(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(`
1
+ (function(Ie,Be){typeof exports=="object"&&typeof module!="undefined"?Be(exports):typeof define=="function"&&define.amd?define(["exports"],Be):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Be(Ie["cimulate-copilot-widget"]={}))})(this,function(Ie){"use strict";var bF=Object.defineProperty,_F=Object.defineProperties;var xF=Object.getOwnPropertyDescriptors;var Qc=Object.getOwnPropertySymbols;var E2=Object.prototype.hasOwnProperty,y2=Object.prototype.propertyIsEnumerable;var Po=(Ie,Be)=>(Be=Symbol[Ie])?Be:Symbol.for("Symbol."+Ie),SF=Ie=>{throw TypeError(Ie)},Xc=Math.pow,Rm=(Ie,Be,Ge)=>Be in Ie?bF(Ie,Be,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Be]=Ge,U=(Ie,Be)=>{for(var Ge in Be||(Be={}))E2.call(Be,Ge)&&Rm(Ie,Ge,Be[Ge]);if(Qc)for(var Ge of Qc(Be))y2.call(Be,Ge)&&Rm(Ie,Ge,Be[Ge]);return Ie},ye=(Ie,Be)=>_F(Ie,xF(Be));var tn=(Ie,Be)=>{var Ge={};for(var ut in Ie)E2.call(Ie,ut)&&Be.indexOf(ut)<0&&(Ge[ut]=Ie[ut]);if(Ie!=null&&Qc)for(var ut of Qc(Ie))Be.indexOf(ut)<0&&y2.call(Ie,ut)&&(Ge[ut]=Ie[ut]);return Ge};var ve=(Ie,Be,Ge)=>Rm(Ie,typeof Be!="symbol"?Be+"":Be,Ge);var it=(Ie,Be,Ge)=>new Promise((ut,Ct)=>{var Et=kt=>{try{$t(Ge.next(kt))}catch(yn){Ct(yn)}},Pe=kt=>{try{$t(Ge.throw(kt))}catch(yn){Ct(yn)}},$t=kt=>kt.done?ut(kt.value):Promise.resolve(kt.value).then(Et,Pe);$t((Ge=Ge.apply(Ie,Be)).next())}),Ur=function(Ie,Be){this[0]=Ie,this[1]=Be},Jc=(Ie,Be,Ge)=>{var ut=(Pe,$t,kt,yn)=>{try{var bs=Ge[Pe]($t),Ro=($t=bs.value)instanceof Ur,Zc=bs.done;Promise.resolve(Ro?$t[0]:$t).then(rr=>Ro?ut(Pe==="return"?Pe:"next",$t[1]?{done:rr.done,value:rr.value}:rr,kt,yn):kt({value:rr,done:Zc})).catch(rr=>ut("throw",rr,kt,yn))}catch(rr){yn(rr)}},Ct=Pe=>Et[Pe]=$t=>new Promise((kt,yn)=>ut(Pe,$t,kt,yn)),Et={};return Ge=Ge.apply(Ie,Be),Et[Po("asyncIterator")]=()=>Et,Ct("next"),Ct("throw"),Ct("return"),Et},Lm=Ie=>{var Be=Ie[Po("asyncIterator")],Ge=!1,ut,Ct={};return Be==null?(Be=Ie[Po("iterator")](),ut=Et=>Ct[Et]=Pe=>Be[Et](Pe)):(Be=Be.call(Ie),ut=Et=>Ct[Et]=Pe=>{if(Ge){if(Ge=!1,Et==="throw")throw Pe;return Pe}return Ge=!0,{done:!1,value:new Ur(new Promise($t=>{var kt=Be[Et](Pe);kt instanceof Object||SF("Object expected"),$t(kt)}),1)}}),Ct[Po("iterator")]=()=>Ct,ut("next"),"throw"in Be?ut("throw"):Ct.throw=Et=>{throw Et},"return"in Be&&ut("return"),Ct},T2=(Ie,Be,Ge)=>(Be=Ie[Po("asyncIterator")])?Be.call(Ie):(Ie=Ie[Po("iterator")](),Be={},Ge=(ut,Ct)=>(Ct=Ie[ut])&&(Be[ut]=Et=>new Promise((Pe,$t,kt)=>(Et=Ct.call(Ie,Et),kt=Et.done,Promise.resolve(Et.value).then(yn=>Pe({value:yn,done:kt}),$t)))),Ge("next"),Ge("return"),Be);var Be=document.createElement("style");Be.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-clear-chat-icon-button{min-height:32px}.cim-widget-toggle-modal-button.dialog{display:none}@media (min-width: 576px){.cim-widget-toggle-modal-button.dialog{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media (max-width: 576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media (max-width: 768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;color:var(--cim-widget-primary-color)}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;.cim-widget-user-message-row{display:inline-flex}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;border-radius:8px;padding:.5rem 1rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-text{font-weight:700;margin-bottom:.5rem}.standalone .cim-widget-user-message-text{font-size:1.125rem}.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;flex-direction:column}.cim-widget-user-search.embedded{display:inline-flex;align-self:flex-end;border-radius:8px;padding:.5rem 1rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-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-left-right-toggle-button{display:none}@media (min-width: 576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;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}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media (max-width: 576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media (min-width: 576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;overflow-y:auto;padding:1rem 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(Be);function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ut={exports:{}},Ct={},Et={exports:{}},Pe={};var $t;function kt(){if($t)return Pe;$t=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),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,x={};function C(R,K,k){this.props=R,this.context=K,this.refs=x,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 O(){}O.prototype=C.prototype;function F(R,K,k){this.props=R,this.context=K,this.refs=x,this.updater=k||T}var D=F.prototype=new O;D.constructor=F,_(D,C.prototype),D.isPureReactComponent=!0;var G=Array.isArray,W=Object.prototype.hasOwnProperty,B={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function Te(R,K,k){var be,Re={},Oe=null,Ye=null;if(K!=null)for(be in K.ref!==void 0&&(Ye=K.ref),K.key!==void 0&&(Oe=""+K.key),K)W.call(K,be)&&!te.hasOwnProperty(be)&&(Re[be]=K[be]);var Ve=arguments.length-2;if(Ve===1)Re.children=k;else if(1<Ve){for(var Je=Array(Ve),At=0;At<Ve;At++)Je[At]=arguments[At+2];Re.children=Je}if(R&&R.defaultProps)for(be in Ve=R.defaultProps,Ve)Re[be]===void 0&&(Re[be]=Ve[be]);return{$$typeof:e,type:R,key:Oe,ref:Ye,props:Re,_owner:B.current}}function xe(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 ee(R){var K={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(k){return K[k]})}var de=/\/+/g;function fe(R,K){return typeof R=="object"&&R!==null&&R.key!=null?ee(""+R.key):K.toString(36)}function ae(R,K,k,be,Re){var Oe=typeof R;(Oe==="undefined"||Oe==="boolean")&&(R=null);var Ye=!1;if(R===null)Ye=!0;else switch(Oe){case"string":case"number":Ye=!0;break;case"object":switch(R.$$typeof){case e:case t:Ye=!0}}if(Ye)return Ye=R,Re=Re(Ye),R=be===""?"."+fe(Ye,0):be,G(Re)?(k="",R!=null&&(k=R.replace(de,"$&/")+"/"),ae(Re,K,k,"",function(At){return At})):Re!=null&&(H(Re)&&(Re=xe(Re,k+(!Re.key||Ye&&Ye.key===Re.key?"":(""+Re.key).replace(de,"$&/")+"/")+R)),K.push(Re)),1;if(Ye=0,be=be===""?".":be+":",G(R))for(var Ve=0;Ve<R.length;Ve++){Oe=R[Ve];var Je=be+fe(Oe,Ve);Ye+=ae(Oe,K,k,Je,Re)}else if(Je=b(R),typeof Je=="function")for(R=Je.call(R),Ve=0;!(Oe=R.next()).done;)Oe=Oe.value,Je=be+fe(Oe,Ve++),Ye+=ae(Oe,K,k,Je,Re);else if(Oe==="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 Ye}function Ee(R,K,k){if(R==null)return R;var be=[],Re=0;return ae(R,be,"","",function(Oe){return K.call(k,Oe,Re++)}),be}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 ue={current:null},q={transition:null},ne={ReactCurrentDispatcher:ue,ReactCurrentBatchConfig:q,ReactCurrentOwner:B};function w(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:Ee,forEach:function(R,K,k){Ee(R,function(){K.apply(this,arguments)},k)},count:function(R){var K=0;return Ee(R,function(){K++}),K},toArray:function(R){return Ee(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=F,Pe.StrictMode=r,Pe.Suspense=f,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,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 be=_({},R.props),Re=R.key,Oe=R.ref,Ye=R._owner;if(K!=null){if(K.ref!==void 0&&(Oe=K.ref,Ye=B.current),K.key!==void 0&&(Re=""+K.key),R.type&&R.type.defaultProps)var Ve=R.type.defaultProps;for(Je in K)W.call(K,Je)&&!te.hasOwnProperty(Je)&&(be[Je]=K[Je]===void 0&&Ve!==void 0?Ve[Je]:K[Je])}var Je=arguments.length-2;if(Je===1)be.children=k;else if(1<Je){Ve=Array(Je);for(var At=0;At<Je;At++)Ve[At]=arguments[At+2];be.children=Ve}return{$$typeof:e,type:R.type,key:Re,ref:Oe,props:be,_owner:Ye}},Pe.createContext=function(R){return R={$$typeof:u,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:a,_context:R},R.Consumer=R},Pe.createElement=Te,Pe.createFactory=function(R){var K=Te.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=q.transition;q.transition={};try{R()}finally{q.transition=K}},Pe.unstable_act=w,Pe.useCallback=function(R,K){return ue.current.useCallback(R,K)},Pe.useContext=function(R){return ue.current.useContext(R)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(R){return ue.current.useDeferredValue(R)},Pe.useEffect=function(R,K){return ue.current.useEffect(R,K)},Pe.useId=function(){return ue.current.useId()},Pe.useImperativeHandle=function(R,K,k){return ue.current.useImperativeHandle(R,K,k)},Pe.useInsertionEffect=function(R,K){return ue.current.useInsertionEffect(R,K)},Pe.useLayoutEffect=function(R,K){return ue.current.useLayoutEffect(R,K)},Pe.useMemo=function(R,K){return ue.current.useMemo(R,K)},Pe.useReducer=function(R,K,k){return ue.current.useReducer(R,K,k)},Pe.useRef=function(R){return ue.current.useRef(R)},Pe.useState=function(R){return ue.current.useState(R)},Pe.useSyncExternalStore=function(R,K,k){return ue.current.useSyncExternalStore(R,K,k)},Pe.useTransition=function(){return ue.current.useTransition()},Pe.version="18.3.1",Pe}var yn;function bs(){return yn||(yn=1,Et.exports=kt()),Et.exports}var Ro;function Zc(){if(Ro)return Ct;Ro=1;var e=bs(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,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)&&!a.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 Ct.Fragment=n,Ct.jsx=u,Ct.jsxs=u,Ct}var rr;function S2(){return rr||(rr=1,ut.exports=Zc()),ut.exports}var N=S2();const br=Object.create(null);br.open="0",br.close="1",br.ping="2",br.pong="3",br.message="4",br.upgrade="5",br.noop="6";const pu=Object.create(null);Object.keys(br).forEach(e=>{pu[br[e]]=e});const ef={type:"error",data:"parser error"},Dm=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Mm=typeof ArrayBuffer=="function",Fm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,tf=({type:e,data:t},n,r)=>Dm&&t instanceof Blob?n?r(t):Bm(t,r):Mm&&(t instanceof ArrayBuffer||Fm(t))?n?r(t):Bm(new Blob([t]),r):r(br[e]+(t||"")),Bm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Um(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let nf;function w2(e,t){if(Dm&&e.data instanceof Blob)return e.data.arrayBuffer().then(Um).then(t);if(Mm&&(e.data instanceof ArrayBuffer||Fm(e.data)))return t(Um(e.data));tf(e,!1,n=>{nf||(nf=new TextEncoder),t(nf.encode(n))})}const Hm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Hm.length;e++)Lo[Hm.charCodeAt(e)]=e;const C2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,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)a=Lo[e.charCodeAt(r)],u=Lo[e.charCodeAt(r+1)],c=Lo[e.charCodeAt(r+2)],f=Lo[e.charCodeAt(r+3)],m[o++]=a<<2|u>>4,m[o++]=(u&15)<<4|c>>2,m[o++]=(c&3)<<6|f&63;return h},A2=typeof ArrayBuffer=="function",rf=(e,t)=>{if(typeof e!="string")return{type:"message",data:zm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:v2(e.substring(1),t)}:pu[n]?e.length>1?{type:pu[n],data:e.substring(1)}:{type:pu[n]}:ef},v2=(e,t)=>{if(A2){const n=C2(e);return zm(n,t)}else return{base64:!0,data:e}},zm=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},jm="",k2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{tf(a,!1,c=>{r[u]=c,++o===n&&t(r.join(jm))})})},N2=(e,t)=>{const n=e.split(jm),r=[];for(let o=0;o<n.length;o++){const a=rf(n[o],t);if(r.push(a),a.type==="error")break}return r};function O2(){return new TransformStream({transform(e,t){w2(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let sf;function mu(e){return e.reduce((t,n)=>t+n.length,0)}function gu(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 I2(e,t){sf||(sf=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(mu(n)<1)break;const f=gu(n,1);a=(f[0]&128)===128,o=f[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(mu(n)<2)break;const f=gu(n,2);o=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),r=3}else if(r===2){if(mu(n)<8)break;const f=gu(n,8),h=new DataView(f.buffer,f.byteOffset,f.length),m=h.getUint32(0);if(m>Math.pow(2,21)-1){c.enqueue(ef);break}o=m*Math.pow(2,32)+h.getUint32(4),r=3}else{if(mu(n)<o)break;const f=gu(n,o);c.enqueue(rf(a?f:sf.decode(f),t)),r=0}if(o===0||o>e){c.enqueue(ef);break}}}})}const $m=4;function Mt(e){if(e)return P2(e)}function P2(e){for(var t in Mt.prototype)e[t]=Mt.prototype[t];return e}Mt.prototype.on=Mt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Mt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Mt.prototype.off=Mt.prototype.removeListener=Mt.prototype.removeAllListeners=Mt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,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},Mt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Mt.prototype.emitReserved=Mt.prototype.emit,Mt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Mt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Eu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),jn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),R2="arraybuffer";function wF(){}function Vm(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const L2=jn.setTimeout,D2=jn.clearTimeout;function yu(e,t){t.useNativeTimers?(e.setTimeoutFn=L2.bind(jn),e.clearTimeoutFn=D2.bind(jn)):(e.setTimeoutFn=jn.setTimeout.bind(jn),e.clearTimeoutFn=jn.clearTimeout.bind(jn))}const M2=1.33;function F2(e){return typeof e=="string"?B2(e):Math.ceil((e.byteLength||e.size)*M2)}function B2(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 qm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function U2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function H2(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class z2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class of extends Mt{constructor(t){super(),this.writable=!1,yu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new z2(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=rf(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=U2(t);return n.length?"?"+n:""}}class j2 extends of{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)};N2(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,k2(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]=qm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Ym=!1;try{Ym=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const $2=Ym;function V2(){}class q2 extends j2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class _r extends Mt{constructor(t,n,r){super(),this.createRequest=t,yu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Vm(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=_r.requestsCount++,_r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=V2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete _r.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(_r.requestsCount=0,_r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Wm);else if(typeof addEventListener=="function"){const e="onpagehide"in jn?"pagehide":"unload";addEventListener(e,Wm,!1)}}function Wm(){for(let e in _r.requests)_r.requests.hasOwnProperty(e)&&_r.requests[e].abort()}const Y2=function(){const e=Gm({xdomain:!1});return e&&e.responseType!==null}();class W2 extends q2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Y2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _r(Gm,this.uri(),t)}}function Gm(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||$2))return new XMLHttpRequest}catch(n){}if(!t)try{return new jn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Km=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class G2 extends of{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Km?{}:Vm(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;tf(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&Eu(()=>{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]=qm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const af=jn.WebSocket||jn.MozWebSocket;class K2 extends G2{createSocket(t,n,r){return Km?new af(t,n,r):n?new af(t,n):new af(t)}doWrite(t,n){this.ws.send(n)}}class Q2 extends of{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=I2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=O2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:f})=>{c||(this.onPacket(f),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Eu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const X2={websocket:K2,webtransport:Q2,polling:W2},J2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Z2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function uf(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=J2.exec(e||""),a={},u=14;for(;u--;)a[Z2[u]]=o[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=eS(a,a.path),a.queryKey=tS(a,a.query),a}function eS(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 tS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const lf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Tu=[];lf&&addEventListener("offline",()=>{Tu.forEach(e=>e())},!1);class ui extends Mt{constructor(t,n){if(super(),this.binaryType=R2,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=uf(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=uf(n.host).host);yu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=H2(this.opts.query)),lf&&(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"})},Tu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=$m,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&&ui.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",ui.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+=F2(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,Eu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ui.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(),lf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Tu.indexOf(this._offlineEventListener);r!==-1&&Tu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ui.protocol=$m;class nS extends ui{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;ui.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;ui.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 a(){r||(r=!0,m(),n.close(),n=null)}const u=E=>{const b=new Error("probe error: "+E);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function f(){u("socket closed")}function h(E){n&&E.name!==n.name&&a()}const m=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",f),this.off("upgrading",h)};n.once("open",o),n.once("error",u),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 rS=class extends nS{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=>X2[o]).filter(o=>!!o)),super(t,r)}};function iS(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=uf(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const sS=typeof ArrayBuffer=="function",oS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Qm=Object.prototype.toString,aS=typeof Blob=="function"||typeof Blob!="undefined"&&Qm.call(Blob)==="[object BlobConstructor]",uS=typeof File=="function"||typeof File!="undefined"&&Qm.call(File)==="[object FileConstructor]";function cf(e){return sS&&(e instanceof ArrayBuffer||oS(e))||aS&&e instanceof Blob||uS&&e instanceof File}function bu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(bu(e[n]))return!0;return!1}if(cf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return bu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&bu(e[n]))return!0;return!1}function lS(e){const t=[],n=e.data,r=e;return r.data=ff(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ff(e,t){if(!e)return e;if(cf(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]=ff(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]=ff(e[r],t));return n}return e}function cS(e,t){return e.data=df(e.data,t),delete e.attachments,e}function df(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]=df(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=df(e[n],t));return e}const fS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],dS=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 hS{constructor(t){this.replacer=t}encode(t){return(t.type===Qe.EVENT||t.type===Qe.ACK)&&bu(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=lS(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 hf extends Mt{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 pS(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(cf(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 a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(u)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(hf.isPayloadValid(r.type,a))r.data=a;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 Xm(n);case Qe.DISCONNECT:return n===void 0;case Qe.CONNECT_ERROR:return typeof n=="string"||Xm(n);case Qe.EVENT:case Qe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&fS.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 pS{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=cS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const mS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:hf,Encoder:hS,get PacketType(){return Qe},protocol:dS},Symbol.toStringTag,{value:"Module"}));function ir(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const gS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Jm extends Mt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ir(t,"open",this.onopen.bind(this)),ir(t,"packet",this.onpacket.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(gS.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:Qe.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,E=n.pop();this._registerAckCallback(m,E),u.id=m}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(f?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type: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 _s(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}_s.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},_s.prototype.reset=function(){this.attempts=0},_s.prototype.setMin=function(e){this.ms=e},_s.prototype.setMax=function(e){this.max=e},_s.prototype.setJitter=function(e){this.jitter=e};class pf extends Mt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,yu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new _s({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||mS;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 rS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=ir(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=ir(n,"error",a);if(this._timeout!==!1){const c=this._timeout,f=this.setTimeoutFn(()=>{o(),a(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(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ir(t,"ping",this.onping.bind(this)),ir(t,"data",this.ondata.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(t,"close",this.onclose.bind(this)),ir(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Eu(()=>{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 Jm(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 Do={};function _u(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=iS(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Do[o]&&a in Do[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let f;return c?f=new pf(r,t):(Do[o]||(Do[o]=new pf(r,t)),f=Do[o]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(_u,{Manager:pf,Socket:Jm,io:_u,connect:_u});var ES=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===yS}(t)}(e)},yS=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Mo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?xs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function TS(e,t,n){return e.concat(t).map(function(r){return Mo(r,n)})}function Zm(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 e0(e,t){try{return t in e}catch(n){return!1}}function bS(e,t,n){var r={};return n.isMergeableObject(e)&&Zm(e).forEach(function(o){r[o]=Mo(e[o],n)}),Zm(t).forEach(function(o){(function(a,u){return e0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(e0(e,o)&&n.isMergeableObject(t[o])?r[o]=function(a,u){if(!u.customMerge)return xs;var c=u.customMerge(a);return typeof c=="function"?c:xs}(o,n)(e[o],t[o],n):r[o]=Mo(t[o],n))}),r}function xs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||TS,n.isMergeableObject=n.isMergeableObject||ES,n.cloneUnlessOtherwiseSpecified=Mo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):bS(e,t,n):Mo(t,n)}xs.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,r){return xs(n,r,t)},{})};var _S=xs;class xS{constructor(t){Object.assign(this,t)}}function dn(e){if(e)return function(t){for(var n in dn.prototype)t[n]=dn.prototype[n];return t}(e)}dn.prototype.on=dn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},dn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},dn.prototype.off=dn.prototype.removeListener=dn.prototype.removeAllListeners=dn.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},dn.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},dn.prototype.emitReserved=dn.prototype.emit,dn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},dn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const SS=typeof ArrayBuffer=="function",t0=Object.prototype.toString,wS=typeof Blob=="function"||typeof Blob!="undefined"&&t0.call(Blob)==="[object BlobConstructor]",CS=typeof File=="function"||typeof File!="undefined"&&t0.call(File)==="[object FileConstructor]";function mf(e){return SS&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||wS&&e instanceof Blob||CS&&e instanceof File}function xu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(xu(e[n]))return!0;return!1}if(mf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return xu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&xu(e[n]))return!0;return!1}function AS(e){const t=[],n=e.data,r=e;return r.data=gf(n,t),r.attachments=t.length,{packet:r,buffers:t}}function gf(e,t){if(!e)return e;if(mf(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]=gf(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]=gf(e[r],t));return n}return e}function vS(e,t){return e.data=Ef(e.data,t),delete e.attachments,e}function Ef(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]=Ef(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ef(e[n],t));return e}const kS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var _t;(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"})(_t||(_t={}));class NS{constructor(t){this.replacer=t}encode(t){return t.type!==_t.EVENT&&t.type!==_t.ACK||!xu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===_t.EVENT?_t.BINARY_EVENT:_t.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==_t.BINARY_EVENT&&t.type!==_t.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=AS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function n0(e){return Object.prototype.toString.call(e)==="[object Object]"}class yf extends dn{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===_t.BINARY_EVENT;r||n.type===_t.BINARY_ACK?(n.type=r?_t.EVENT:_t.ACK,this.reconstructor=new OS(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!mf(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(_t[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===_t.BINARY_EVENT||r.type===_t.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(u)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!yf.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case _t.CONNECT:return n0(n);case _t.DISCONNECT:return n===void 0;case _t.CONNECT_ERROR:return typeof n=="string"||n0(n);case _t.EVENT:case _t.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&kS.indexOf(n[0])===-1);case _t.ACK:case _t.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class OS{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=vS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const r0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],i0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).map(([c,f])=>{const h=[...a,t(c)];return[e(c),f instanceof Object&&!(n!=null&&n.includes(h.join(".")))?r(f,h):f]});return Array.isArray(o)?u.map(c=>c[1]):Object.fromEntries(u)},s0=e=>e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),IS=i0(e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),e=>e,r0),PS=i0(s0,s0,r0),RS={Encoder:class extends NS{encode(e){var t,n;return super.encode(ye(U({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],IS(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 yf{constructor(){super((e,t)=>e==""&&Array.isArray(t)?t.map(n=>n instanceof Object?PS(n):n):t)}}},LS={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class DS{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:a={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=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 u=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const f=[LS,a,{parser:RS,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=_u(u,_S.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*Xc(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 it(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return it(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return it(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 it(this,null,function*(){return this.asyncResponse("product_view",t,n)})}requestSessionInformation(t){return it(this,null,function*(){return new Promise(n=>{this.socket.emit("session_info",r=>{t&&t(r),n(r)})})})}getConversationEvents(t,n){return it(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 it(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=function(u){return Jc(this,null,function*(){const c=[];let f=!1,h=null;const m=yield new Ur(u({emit:E=>{c.push(E),h&&(h(),h=null)},cancel:()=>{f=!0}}));try{for(;!f;)c.length>0?yield c.shift():yield new Ur(new Promise(E=>{h=E}));for(;c.length>0;)yield c.shift()}finally{yield new Ur(m==null?void 0:m())}})}(({emit:u,cancel:c})=>{const f=(h,m)=>{["done","error"].includes(m.name)&&c(),m.eventSourceId==o&&u(m)};return this.socket.onAny(f),()=>it(this,null,function*(){this.socket.offAny(f)})});return{result:yield new Promise((u,c)=>this.socket.emit(t,n,f=>{f.name==="error"?c(new xS(f)):(o=f==null?void 0:f.id,u(f))})),events:a}})}}var V=bs();const Hi=Ge(V);function o0(e,t){return function(){return e.apply(t,arguments)}}const{toString:MS}=Object.prototype,{getPrototypeOf:Tf}=Object,{iterator:Su,toStringTag:a0}=Symbol,wu=(e=>t=>{const n=MS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),sr=e=>(e=e.toLowerCase(),t=>wu(t)===e),Cu=e=>t=>typeof t===e,{isArray:Ss}=Array,ws=Cu("undefined");function Fo(e){return e!==null&&!ws(e)&&e.constructor!==null&&!ws(e.constructor)&&Tn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const u0=sr("ArrayBuffer");function FS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&u0(e.buffer),t}const BS=Cu("string"),Tn=Cu("function"),l0=Cu("number"),Bo=e=>e!==null&&typeof e=="object",US=e=>e===!0||e===!1,Au=e=>{if(wu(e)!=="object")return!1;const t=Tf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(a0 in e)&&!(Su in e)},HS=e=>{if(!Bo(e)||Fo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},zS=sr("Date"),jS=sr("File"),$S=sr("Blob"),VS=sr("FileList"),qS=e=>Bo(e)&&Tn(e.pipe),YS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tn(e.append)&&((t=wu(e))==="formdata"||t==="object"&&Tn(e.toString)&&e.toString()==="[object FormData]"))},WS=sr("URLSearchParams"),[GS,KS,QS,XS]=["ReadableStream","Request","Response","Headers"].map(sr),JS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Uo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Ss(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Fo(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function c0(e,t){if(Fo(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 zi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,f0=e=>!ws(e)&&e!==zi;function bf(){const{caseless:e,skipUndefined:t}=f0(this)&&this||{},n={},r=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=e&&c0(n,a)||a;Au(n[u])&&Au(o)?n[u]=bf(n[u],o):Au(o)?n[u]=bf({},o):Ss(o)?n[u]=o.slice():(!t||!ws(o))&&(n[u]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&Uo(arguments[o],r);return n}const ZS=(e,t,n,{allOwnKeys:r}={})=>(Uo(t,(o,a)=>{n&&Tn(o)?Object.defineProperty(e,a,{value:o0(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),ew=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},nw=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&Tf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rw=(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},iw=e=>{if(!e)return null;if(Ss(e))return e;let t=e.length;if(!l0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sw=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Tf(Uint8Array)),ow=(e,t)=>{const r=(e&&e[Su]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},aw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},uw=sr("HTMLFormElement"),lw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),d0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cw=sr("RegExp"),h0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Uo(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},fw=e=>{h0(e,(t,n)=>{if(Tn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Tn(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+"'")})}})},dw=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Ss(e)?r(e):r(String(e).split(t)),n},hw=()=>{},pw=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function mw(e){return!!(e&&Tn(e.append)&&e[a0]==="FormData"&&e[Su])}const gw=e=>{const t=new Array(10),n=(r,o)=>{if(Bo(r)){if(t.indexOf(r)>=0)return;if(Fo(r))return r;if(!("toJSON"in r)){t[o]=r;const a=Ss(r)?[]:{};return Uo(r,(u,c)=>{const f=n(u,o+1);!ws(f)&&(a[c]=f)}),t[o]=void 0,a}}return r};return n(e,0)},Ew=sr("AsyncFunction"),yw=e=>e&&(Bo(e)||Tn(e))&&Tn(e.then)&&Tn(e.catch),p0=((e,t)=>e?setImmediate:t?((n,r)=>(zi.addEventListener("message",({source:o,data:a})=>{o===zi&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),zi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Tn(zi.postMessage)),Tw=typeof queueMicrotask!="undefined"?queueMicrotask.bind(zi):typeof process!="undefined"&&process.nextTick||p0,Q={isArray:Ss,isArrayBuffer:u0,isBuffer:Fo,isFormData:YS,isArrayBufferView:FS,isString:BS,isNumber:l0,isBoolean:US,isObject:Bo,isPlainObject:Au,isEmptyObject:HS,isReadableStream:GS,isRequest:KS,isResponse:QS,isHeaders:XS,isUndefined:ws,isDate:zS,isFile:jS,isBlob:$S,isRegExp:cw,isFunction:Tn,isStream:qS,isURLSearchParams:WS,isTypedArray:sw,isFileList:VS,forEach:Uo,merge:bf,extend:ZS,trim:JS,stripBOM:ew,inherits:tw,toFlatObject:nw,kindOf:wu,kindOfTest:sr,endsWith:rw,toArray:iw,forEachEntry:ow,matchAll:aw,isHTMLForm:uw,hasOwnProperty:d0,hasOwnProp:d0,reduceDescriptors:h0,freezeMethods:fw,toObjectSet:dw,toCamelCase:lw,noop:hw,toFiniteNumber:pw,findKey:c0,global:zi,isContextDefined:f0,isSpecCompliantForm:mw,toJSONObject:gw,isAsyncFn:Ew,isThenable:yw,setImmediate:p0,asap:Tw,isIterable:e=>e!=null&&Tn(e[Su])};let Ue=class b2 extends Error{static from(t,n,r,o,a,u){const c=new b2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Q.toJSONObject(this.config),code:this.code,status:this.status}}};Ue.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ue.ERR_BAD_OPTION="ERR_BAD_OPTION",Ue.ECONNABORTED="ECONNABORTED",Ue.ETIMEDOUT="ETIMEDOUT",Ue.ERR_NETWORK="ERR_NETWORK",Ue.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ue.ERR_DEPRECATED="ERR_DEPRECATED",Ue.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ue.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ue.ERR_CANCELED="ERR_CANCELED",Ue.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ue.ERR_INVALID_URL="ERR_INVALID_URL";const bw=null;function _f(e){return Q.isPlainObject(e)||Q.isArray(e)}function m0(e){return Q.endsWith(e,"[]")?e.slice(0,-2):e}function g0(e,t,n){return e?e.concat(t).map(function(o,a){return o=m0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function _w(e){return Q.isArray(e)&&!e.some(_f)}const xw=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(x,C){return!Q.isUndefined(C[x])});const r=n.metaTokens,o=n.visitor||m,a=n.dots,u=n.indexes,f=(n.Blob||typeof Blob!="undefined"&&Blob)&&Q.isSpecCompliantForm(t);if(!Q.isFunction(o))throw new TypeError("visitor must be a function");function h(_){if(_===null)return"";if(Q.isDate(_))return _.toISOString();if(Q.isBoolean(_))return _.toString();if(!f&&Q.isBlob(_))throw new Ue("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(_)||Q.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,x,C){let O=_;if(_&&!C&&typeof _=="object"){if(Q.endsWith(x,"{}"))x=r?x:x.slice(0,-2),_=JSON.stringify(_);else if(Q.isArray(_)&&_w(_)||(Q.isFileList(_)||Q.endsWith(x,"[]"))&&(O=Q.toArray(_)))return x=m0(x),O.forEach(function(D,G){!(Q.isUndefined(D)||D===null)&&t.append(u===!0?g0([x],G,a):u===null?x:x+"[]",h(D))}),!1}return _f(_)?!0:(t.append(g0(C,x,a),h(_)),!1)}const E=[],b=Object.assign(xw,{defaultVisitor:m,convertValue:h,isVisitable:_f});function T(_,x){if(!Q.isUndefined(_)){if(E.indexOf(_)!==-1)throw Error("Circular reference detected in "+x.join("."));E.push(_),Q.forEach(_,function(O,F){(!(Q.isUndefined(O)||O===null)&&o.call(t,O,Q.isString(F)?F.trim():F,x,b))===!0&&T(O,x?x.concat(F):[F])}),E.pop()}}if(!Q.isObject(e))throw new TypeError("data must be an object");return T(e),t}function E0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function xf(e,t){this._pairs=[],e&&vu(e,this,t)}const y0=xf.prototype;y0.append=function(t,n){this._pairs.push([t,n])},y0.toString=function(t){const n=t?function(r){return t.call(this,r,E0)}:E0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Sw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function T0(e,t,n){if(!t)return e;const r=n&&n.encode||Sw,o=Q.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=Q.isURLSearchParams(t)?t.toString():new xf(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class b0{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 Sf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ww={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:xf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},wf=typeof window!="undefined"&&typeof document!="undefined",Cf=typeof navigator=="object"&&navigator||void 0,Cw=wf&&(!Cf||["ReactNative","NativeScript","NS"].indexOf(Cf.product)<0),Aw=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vw=wf&&window.location.href||"http://localhost",nn=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wf,hasStandardBrowserEnv:Cw,hasStandardBrowserWebWorkerEnv:Aw,navigator:Cf,origin:vw},Symbol.toStringTag,{value:"Module"}))),ww);function kw(e,t){return vu(e,new nn.classes.URLSearchParams,U({visitor:function(n,r,o,a){return nn.isNode&&Q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Nw(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ow(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function _0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),f=a>=n.length;return u=!u&&Q.isArray(o)?o.length:u,f?(Q.hasOwnProp(o,u)?o[u]=[o[u],r]:o[u]=r,!c):((!o[u]||!Q.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&Q.isArray(o[u])&&(o[u]=Ow(o[u])),!c)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){const n={};return Q.forEachEntry(e,(r,o)=>{t(Nw(r),o,n,0)}),n}return null}function Iw(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 Ho={transitional:Sf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=Q.isObject(t);if(a&&Q.isHTMLForm(t)&&(t=new FormData(t)),Q.isFormData(t))return o?JSON.stringify(_0(t)):t;if(Q.isArrayBuffer(t)||Q.isBuffer(t)||Q.isStream(t)||Q.isFile(t)||Q.isBlob(t)||Q.isReadableStream(t))return t;if(Q.isArrayBufferView(t))return t.buffer;if(Q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return kw(t,this.formSerializer).toString();if((c=Q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return vu(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Iw(t)):t}],transformResponse:[function(t){const n=this.transitional||Ho.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Q.isResponse(t)||Q.isReadableStream(t))return t;if(t&&Q.isString(t)&&(r&&!this.responseType||o)){const u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(u)throw c.name==="SyntaxError"?Ue.from(c,Ue.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:nn.classes.FormData,Blob:nn.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=>{Ho.headers[e]={}});const Pw=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"]),Rw=e=>{const t={};let n,r,o;return e&&e.split(`
3
+ `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&Pw[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},x0=Symbol("internals");function zo(e){return e&&String(e).trim().toLowerCase()}function ku(e){return e===!1||e==null?e:Q.isArray(e)?e.map(ku):String(e)}function Lw(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 Dw=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Af(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 Mw(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Fw(e,t){const n=Q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let bn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,f,h){const m=zo(f);if(!m)throw new Error("header name must be a non-empty string");const E=Q.findKey(o,m);(!E||o[E]===void 0||h===!0||h===void 0&&o[E]!==!1)&&(o[E||f]=ku(c))}const u=(c,f)=>Q.forEach(c,(h,m)=>a(h,m,f));if(Q.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Q.isString(t)&&(t=t.trim())&&!Dw(t))u(Rw(t),n);else if(Q.isObject(t)&&Q.isIterable(t)){let c={},f,h;for(const m of t){if(!Q.isArray(m))throw TypeError("Object iterator must return a key-value pair");c[h=m[0]]=(f=c[h])?Q.isArray(f)?[...f,m[1]]:[f,m[1]]:m[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=zo(t),t){const r=Q.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Lw(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=zo(t),t){const r=Q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Af(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=zo(u),u){const c=Q.findKey(r,u);c&&(!n||Af(r,r[c],c,n))&&(delete r[c],o=!0)}}return Q.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||Af(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return Q.forEach(this,(o,a)=>{const u=Q.findKey(r,a);if(u){n[u]=ku(o),delete n[a];return}const c=t?Mw(a):String(a).trim();c!==a&&delete n[a],n[c]=ku(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Q.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[x0]=this[x0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=zo(u);r[c]||(Fw(o,u),r[c]=!0)}return Q.isArray(t)?t.forEach(a):a(t),this}};bn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Q.reduceDescriptors(bn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Q.freezeMethods(bn);function vf(e,t){const n=this||Ho,r=t||n,o=bn.from(r.headers);let a=r.data;return Q.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function S0(e){return!!(e&&e.__CANCEL__)}let jo=class extends Ue{constructor(t,n,r){super(t==null?"canceled":t,Ue.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function w0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ue("Request failed with status code "+n.status,[Ue.ERR_BAD_REQUEST,Ue.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Bw(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Uw(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(f){const h=Date.now(),m=r[a];u||(u=h),n[o]=f,r[o]=h;let E=a,b=0;for(;E!==o;)b+=n[E++],E=E%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),h-u<t)return;const T=m&&h-m;return T?Math.round(b*1e3/T):void 0}}function Hw(e,t){let n=0,r=1e3/t,o,a;const u=(h,m=Date.now())=>{n=m,o=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const m=Date.now(),E=m-n;E>=r?u(h,m):(o=h,a||(a=setTimeout(()=>{a=null,u(o)},r-E)))},()=>o&&u(o)]}const Nu=(e,t,n=3)=>{let r=0;const o=Uw(50,250);return Hw(a=>{const u=a.loaded,c=a.lengthComputable?a.total:void 0,f=u-r,h=o(f),m=u<=c;r=u;const E={loaded:u,total:c,progress:c?u/c:void 0,bytes:f,rate:h||void 0,estimated:h&&c&&m?(c-u)/h:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},C0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},A0=e=>(...t)=>Q.asap(()=>e(...t)),zw=nn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,nn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,jw=nn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];Q.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),Q.isString(r)&&c.push(`path=${r}`),Q.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),Q.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function $w(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Vw(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function v0(e,t,n){let r=!$w(t);return e&&(r||n==!1)?Vw(e,t):t}const k0=e=>e instanceof bn?U({},e):e;function ji(e,t){t=t||{};const n={};function r(h,m,E,b){return Q.isPlainObject(h)&&Q.isPlainObject(m)?Q.merge.call({caseless:b},h,m):Q.isPlainObject(m)?Q.merge({},m):Q.isArray(m)?m.slice():m}function o(h,m,E,b){if(Q.isUndefined(m)){if(!Q.isUndefined(h))return r(void 0,h,E,b)}else return r(h,m,E,b)}function a(h,m){if(!Q.isUndefined(m))return r(void 0,m)}function u(h,m){if(Q.isUndefined(m)){if(!Q.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:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c,headers:(h,m,E)=>o(k0(h),k0(m),E,!0)};return Q.forEach(Object.keys(U(U({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const E=Q.hasOwnProp(f,m)?f[m]:o,b=E(e[m],t[m],m);Q.isUndefined(b)&&E!==c||(n[m]=b)}),n}const N0=e=>{const t=ji({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:c}=t;if(t.headers=u=bn.from(u),t.url=T0(v0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Q.isFormData(n)){if(nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(Q.isFunction(n.getHeaders)){const f=n.getHeaders(),h=["content-type","content-length"];Object.entries(f).forEach(([m,E])=>{h.includes(m.toLowerCase())&&u.set(m,E)})}}if(nn.hasStandardBrowserEnv&&(r&&Q.isFunction(r)&&(r=r(t)),r||r!==!1&&zw(t.url))){const f=o&&a&&jw.read(a);f&&u.set(o,f)}return t},qw=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=N0(e);let a=o.data;const u=bn.from(o.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:h}=o,m,E,b,T,_;function x(){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 O(){if(!C)return;const D=bn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),W={data:!c||c==="text"||c==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:D,config:e,request:C};w0(function(te){n(te),x()},function(te){r(te),x()},W),C=null}"onloadend"in C?C.onloadend=O:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(O)},C.onabort=function(){C&&(r(new Ue("Request aborted",Ue.ECONNABORTED,e,C)),C=null)},C.onerror=function(G){const W=G&&G.message?G.message:"Network Error",B=new Ue(W,Ue.ERR_NETWORK,e,C);B.event=G||null,r(B),C=null},C.ontimeout=function(){let G=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const W=o.transitional||Sf;o.timeoutErrorMessage&&(G=o.timeoutErrorMessage),r(new Ue(G,W.clarifyTimeoutError?Ue.ETIMEDOUT:Ue.ECONNABORTED,e,C)),C=null},a===void 0&&u.setContentType(null),"setRequestHeader"in C&&Q.forEach(u.toJSON(),function(G,W){C.setRequestHeader(W,G)}),Q.isUndefined(o.withCredentials)||(C.withCredentials=!!o.withCredentials),c&&c!=="json"&&(C.responseType=o.responseType),h&&([b,_]=Nu(h,!0),C.addEventListener("progress",b)),f&&C.upload&&([E,T]=Nu(f),C.upload.addEventListener("progress",E),C.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(m=D=>{C&&(r(!D||D.type?new jo(null,e,C):D),C.abort(),C=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const F=Bw(o.url);if(F&&nn.protocols.indexOf(F)===-1){r(new Ue("Unsupported protocol "+F+":",Ue.ERR_BAD_REQUEST,e));return}C.send(a||null)})},Yw=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(h){if(!o){o=!0,c();const m=h instanceof Error?h:this.reason;r.abort(m instanceof Ue?m:new jo(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,a(new Ue(`timeout of ${t}ms exceeded`,Ue.ETIMEDOUT))},t);const c=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(a):h.removeEventListener("abort",a)}),e=null)};e.forEach(h=>h.addEventListener("abort",a));const{signal:f}=r;return f.unsubscribe=()=>Q.asap(c),f}},Ww=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},Gw=function(e,t){return Jc(this,null,function*(){try{for(var n=T2(Kw(e)),r,o,a;r=!(o=yield new Ur(n.next())).done;r=!1){const u=o.value;yield*Lm(Ww(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Ur(o.call(n)))}finally{if(a)throw a[0]}}})},Kw=function(e){return Jc(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Lm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Ur(t.read());if(n)break;yield r}}finally{yield new Ur(t.cancel())}})},O0=(e,t,n,r)=>{const o=Gw(e,t);let a=0,u,c=h=>{u||(u=!0,r&&r(h))};return new ReadableStream({pull(h){return it(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=a+=b;n(T)}h.enqueue(new Uint8Array(E))}catch(m){throw c(m),m}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})},I0=64*1024,{isFunction:Ou}=Q,Qw=(({Request:e,Response:t})=>({Request:e,Response:t}))(Q.global),{ReadableStream:P0,TextEncoder:R0}=Q.global,L0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Xw=e=>{e=Q.merge.call({skipUndefined:!0},Qw,e);const{fetch:t,Request:n,Response:r}=e,o=t?Ou(t):typeof fetch=="function",a=Ou(n),u=Ou(r);if(!o)return!1;const c=o&&Ou(P0),f=o&&(typeof R0=="function"?(_=>x=>_.encode(x))(new R0):_=>it(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),h=a&&c&&L0(()=>{let _=!1;const x=new n(nn.origin,{body:new P0,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!x}),m=u&&c&&L0(()=>Q.isReadableStream(new r("").body)),E={stream:m&&(_=>_.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!E[_]&&(E[_]=(x,C)=>{let O=x&&x[_];if(O)return O.call(x);throw new Ue(`Response type '${_}' is not supported`,Ue.ERR_NOT_SUPPORT,C)})});const b=_=>it(null,null,function*(){if(_==null)return 0;if(Q.isBlob(_))return _.size;if(Q.isSpecCompliantForm(_))return(yield new n(nn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(_)||Q.isArrayBuffer(_))return _.byteLength;if(Q.isURLSearchParams(_)&&(_=_+""),Q.isString(_))return(yield f(_)).byteLength}),T=(_,x)=>it(null,null,function*(){const C=Q.toFiniteNumber(_.getContentLength());return C==null?b(x):C});return _=>it(null,null,function*(){let{url:x,method:C,data:O,signal:F,cancelToken:D,timeout:G,onDownloadProgress:W,onUploadProgress:B,responseType:te,headers:Te,withCredentials:xe="same-origin",fetchOptions:H}=N0(_),ee=t||fetch;te=te?(te+"").toLowerCase():"text";let de=Yw([F,D&&D.toAbortSignal()],G),fe=null;const ae=de&&de.unsubscribe&&(()=>{de.unsubscribe()});let Ee;try{if(B&&h&&C!=="get"&&C!=="head"&&(Ee=yield T(Te,O))!==0){let R=new n(x,{method:"POST",body:O,duplex:"half"}),K;if(Q.isFormData(O)&&(K=R.headers.get("content-type"))&&Te.setContentType(K),R.body){const[k,be]=C0(Ee,Nu(A0(B)));O=O0(R.body,I0,k,be)}}Q.isString(xe)||(xe=xe?"include":"omit");const Ce=a&&"credentials"in n.prototype,ue=ye(U({},H),{signal:de,method:C.toUpperCase(),headers:Te.normalize().toJSON(),body:O,duplex:"half",credentials:Ce?xe:void 0});fe=a&&new n(x,ue);let q=yield a?ee(fe,H):ee(x,ue);const ne=m&&(te==="stream"||te==="response");if(m&&(W||ne&&ae)){const R={};["status","statusText","headers"].forEach(Re=>{R[Re]=q[Re]});const K=Q.toFiniteNumber(q.headers.get("content-length")),[k,be]=W&&C0(K,Nu(A0(W),!0))||[];q=new r(O0(q.body,I0,k,()=>{be&&be(),ae&&ae()}),R)}te=te||"text";let w=yield E[Q.findKey(E,te)||"text"](q,_);return!ne&&ae&&ae(),yield new Promise((R,K)=>{w0(R,K,{data:w,headers:bn.from(q.headers),status:q.status,statusText:q.statusText,config:_,request:fe})})}catch(Ce){throw ae&&ae(),Ce&&Ce.name==="TypeError"&&/Load failed|fetch/i.test(Ce.message)?Object.assign(new Ue("Network Error",Ue.ERR_NETWORK,_,fe,Ce&&Ce.response),{cause:Ce.cause||Ce}):Ue.from(Ce,Ce&&Ce.code,_,fe,Ce&&Ce.response)}})},Jw=new Map,D0=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,f,h,m=Jw;for(;c--;)f=a[c],h=m.get(f),h===void 0&&m.set(f,h=c?new Map:Xw(t)),m=h;return h};D0();const kf={http:bw,xhr:qw,fetch:{get:D0}};Q.forEach(kf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const M0=e=>`- ${e}`,Zw=e=>Q.isFunction(e)||e===null||e===!1;function eC(e,t){e=Q.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!Zw(r)&&(o=kf[(c=String(r)).toLowerCase()],o===void 0))throw new Ue(`Unknown adapter '${c}'`);if(o&&(Q.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([f,h])=>`adapter ${f} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
5
+ `+u.map(M0).join(`
6
+ `):" "+M0(u[0]):"as no adapter specified";throw new Ue("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const F0={getAdapter:eC,adapters:kf};function Nf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new jo(null,e)}function B0(e){return Nf(e),e.headers=bn.from(e.headers),e.data=vf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),F0.getAdapter(e.adapter||Ho.adapter,e)(e).then(function(r){return Nf(e),r.data=vf.call(e,e.transformResponse,r),r.headers=bn.from(r.headers),r},function(r){return S0(r)||(Nf(e),r&&r.response&&(r.response.data=vf.call(e,e.transformResponse,r.response),r.response.headers=bn.from(r.response.headers))),Promise.reject(r)})}const U0="1.13.5",Iu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Iu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const H0={};Iu.transitional=function(t,n,r){function o(a,u){return"[Axios v"+U0+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ue(o(u," has been removed"+(n?" in "+n:"")),Ue.ERR_DEPRECATED);return n&&!H0[u]&&(H0[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},Iu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function tC(e,t,n){if(typeof e!="object")throw new Ue("options must be an object",Ue.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=t[a];if(u){const c=e[a],f=c===void 0||u(c,a,e);if(f!==!0)throw new Ue("option "+a+" must be "+f,Ue.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ue("Unknown option "+a,Ue.ERR_BAD_OPTION)}}const Pu={assertOptions:tC,validators:Iu},$n=Pu.validators;let $i=class{constructor(t){this.defaults=t||{},this.interceptors={request:new b0,response:new b0}}request(t,n){return it(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
+ `+a):r.stack=a}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ji(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Pu.assertOptions(r,{silentJSONParsing:$n.transitional($n.boolean),forcedJSONParsing:$n.transitional($n.boolean),clarifyTimeoutError:$n.transitional($n.boolean),legacyInterceptorReqResOrdering:$n.transitional($n.boolean)},!1),o!=null&&(Q.isFunction(o)?n.paramsSerializer={serialize:o}:Pu.assertOptions(o,{encode:$n.function,serialize:$n.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Pu.assertOptions(n,{baseUrl:$n.spelling("baseURL"),withXsrfToken:$n.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Q.merge(a.common,a[n.method]);a&&Q.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=bn.concat(u,a);const c=[];let f=!0;this.interceptors.request.forEach(function(x){if(typeof x.runWhen=="function"&&x.runWhen(n)===!1)return;f=f&&x.synchronous;const C=n.transitional||Sf;C&&C.legacyInterceptorReqResOrdering?c.unshift(x.fulfilled,x.rejected):c.push(x.fulfilled,x.rejected)});const h=[];this.interceptors.response.forEach(function(x){h.push(x.fulfilled,x.rejected)});let m,E=0,b;if(!f){const _=[B0.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++],x=c[E++];try{T=_(T)}catch(C){x.call(this,C);break}}try{m=B0.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=ji(this.defaults,t);const n=v0(t.baseURL,t.url,t.allowAbsoluteUrls);return T0(n,t.params,t.paramsSerializer)}};Q.forEach(["delete","get","head","options"],function(t){$i.prototype[t]=function(n,r){return this.request(ji(r||{},{method:t,url:n,data:(r||{}).data}))}}),Q.forEach(["post","put","patch"],function(t){function n(r){return function(a,u,c){return this.request(ji(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}$i.prototype[t]=n(),$i.prototype[t+"Form"]=n(!0)});let nC=class _2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new jo(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new _2(function(o){t=o}),cancel:t}}};function rC(e){return function(n){return e.apply(null,n)}}function iC(e){return Q.isObject(e)&&e.isAxiosError===!0}const Of={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Of).forEach(([e,t])=>{Of[t]=e});function z0(e){const t=new $i(e),n=o0($i.prototype.request,t);return Q.extend(n,$i.prototype,t,{allOwnKeys:!0}),Q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return z0(ji(e,o))},n}const Nt=z0(Ho);Nt.Axios=$i,Nt.CanceledError=jo,Nt.CancelToken=nC,Nt.isCancel=S0,Nt.VERSION=U0,Nt.toFormData=vu,Nt.AxiosError=Ue,Nt.Cancel=Nt.CanceledError,Nt.all=function(t){return Promise.all(t)},Nt.spread=rC,Nt.isAxiosError=iC,Nt.mergeConfig=ji,Nt.AxiosHeaders=bn,Nt.formToJSON=e=>_0(Q.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=F0.getAdapter,Nt.HttpStatusCode=Of,Nt.default=Nt;const{Axios:IF,AxiosError:PF,CanceledError:RF,isCancel:LF,CancelToken:DF,VERSION:MF,all:FF,Cancel:BF,isAxiosError:UF,spread:HF,toFormData:zF,AxiosHeaders:jF,HttpStatusCode:$F,formToJSON:VF,getAdapter:qF,mergeConfig:YF}=Nt;class j0{constructor(t,n,r=!1){ve(this,"CIMULATE_API_HEADER","x-cimulate-api-key");ve(this,"CIMULATE_SEARCH_API_PATH","api/v1");ve(this,"baseApiUrl");ve(this,"headers",{});ve(this,"fetchConfig",()=>it(this,null,function*(){try{const t=yield Nt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));if(t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");t?this.headers[this.CIMULATE_API_HEADER]=t:n&&(this.headers.Authorization=`Bearer ${n}`),this.baseApiUrl=r?"https://staging.search.cimulate.ai":"https://prod.search.cimulate.ai"}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}const sC=V.createContext(void 0),oC=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=V.useMemo(()=>new j0(e,t,n),[e,t,n]);return N.jsx(sC.Provider,{value:o,children:r})};var $0=Symbol.for("immer-nothing"),V0=Symbol.for("immer-draftable"),rt=Symbol.for("immer-state");function Vn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Cs=Object.getPrototypeOf;function As(e){return!!e&&!!e[rt]}function Hr(e){var t;return e?q0(e)||Array.isArray(e)||!!e[V0]||!!((t=e.constructor)!=null&&t[V0])||Lu(e)||Du(e):!1}var aC=Object.prototype.constructor.toString();function q0(e){if(!e||typeof e!="object")return!1;const t=Cs(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===aC}function $o(e,t){Ru(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ru(e){const t=e[rt];return t?t.type_:Array.isArray(e)?1:Lu(e)?2:Du(e)?3:0}function If(e,t){return Ru(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Y0(e,t,n){const r=Ru(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function uC(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Lu(e){return e instanceof Map}function Du(e){return e instanceof Set}function Vt(e){return e.copy_||e.base_}function Pf(e,t){if(Lu(e))return new Map(e);if(Du(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=q0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[rt];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Cs(e),r)}else{const r=Cs(e);if(r!==null&&n)return U({},e);const o=Object.create(r);return Object.assign(o,e)}}function Rf(e,t=!1){return Mu(e)||As(e)||!Hr(e)||(Ru(e)>1&&(e.set=e.add=e.clear=e.delete=lC),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Rf(r,!0))),e}function lC(){Vn(2)}function Mu(e){return Object.isFrozen(e)}var Lf={};function Vi(e){const t=Lf[e];return t||Vn(0,e),t}function cC(e,t){Lf[e]||(Lf[e]=t)}var Vo;function Fu(){return Vo}function fC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function W0(e,t){t&&(Vi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Df(e){Mf(e),e.drafts_.forEach(dC),e.drafts_=null}function Mf(e){e===Vo&&(Vo=e.parent_)}function G0(e){return Vo=fC(Vo,e)}function dC(e){const t=e[rt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function K0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[rt].modified_&&(Df(t),Vn(4)),Hr(e)&&(e=Bu(t,e),t.parent_||Uu(t,e)),t.patches_&&Vi("Patches").generateReplacementPatches_(n[rt].base_,e,t.patches_,t.inversePatches_)):e=Bu(t,n,[]),Df(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==$0?e:void 0}function Bu(e,t,n){if(Mu(t))return t;const r=t[rt];if(!r)return $o(t,(o,a)=>Q0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Uu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),$o(a,(c,f)=>Q0(e,r,o,c,f,n,u)),Uu(e,o,!1),n&&e.patches_&&Vi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Q0(e,t,n,r,o,a,u){if(As(o)){const c=a&&t&&t.type_!==3&&!If(t.assigned_,r)?a.concat(r):void 0,f=Bu(e,o,c);if(Y0(n,r,f),As(f))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Hr(o)&&!Mu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Bu(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Uu(e,o)}}function Uu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Rf(t,n)}function hC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Fu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Ff;n&&(o=[r],a=qo);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Ff={get(e,t){if(t===rt)return e;const n=Vt(e);if(!If(n,t))return pC(e,n,t);const r=n[t];return e.finalized_||!Hr(r)?r:r===Bf(e.base_,t)?(Uf(e),e.copy_[t]=Yo(r,e)):r},has(e,t){return t in Vt(e)},ownKeys(e){return Reflect.ownKeys(Vt(e))},set(e,t,n){const r=X0(Vt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Bf(Vt(e),t),a=o==null?void 0:o[rt];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(uC(n,o)&&(n!==void 0||If(e.base_,t)))return!0;Uf(e),zr(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 Bf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Uf(e),zr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Vt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Vn(11)},getPrototypeOf(e){return Cs(e.base_)},setPrototypeOf(){Vn(12)}},qo={};$o(Ff,(e,t)=>{qo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),qo.deleteProperty=function(e,t){return qo.set.call(this,e,t,void 0)},qo.set=function(e,t,n){return Ff.set.call(this,e[0],t,n,e[0])};function Bf(e,t){const n=e[rt];return(n?Vt(n):e)[t]}function pC(e,t,n){var o;const r=X0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function X0(e,t){if(!(t in e))return;let n=Cs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Cs(n)}}function zr(e){e.modified_||(e.modified_=!0,e.parent_&&zr(e.parent_))}function Uf(e){e.copy_||(e.copy_=Pf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var mC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(f=a,...h){return u.produce(f,m=>n.call(this,m,...h))}}typeof n!="function"&&Vn(6),r!==void 0&&typeof r!="function"&&Vn(7);let o;if(Hr(t)){const a=G0(this),u=Yo(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Df(a):Mf(a)}return W0(a,r),K0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===$0&&(o=void 0),this.autoFreeze_&&Rf(o,!0),r){const a=[],u=[];Vi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Vn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,f=>t(f,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Hr(e)||Vn(8),As(e)&&(e=gC(e));const t=G0(this),n=Yo(e,void 0);return n[rt].isManual_=!0,Mf(t),n}finishDraft(e,t){const n=e&&e[rt];(!n||!n.isManual_)&&Vn(9);const{scope_:r}=n;return W0(r,t),K0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Vi("Patches").applyPatches_;return As(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Yo(e,t){const n=Lu(e)?Vi("MapSet").proxyMap_(e,t):Du(e)?Vi("MapSet").proxySet_(e,t):hC(e,t);return(t?t.scope_:Fu()).drafts_.push(n),n}function gC(e){return As(e)||Vn(10,e),J0(e)}function J0(e){if(!Hr(e)||Mu(e))return e;const t=e[rt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Pf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Pf(e,!0);return $o(n,(r,o)=>{Y0(n,r,J0(o))}),t&&(t.finalized_=!1),n}function EC(){class e extends Map{constructor(f,h){super(),this[rt]={type_:2,parent_:h,scope_:h?h.scope_:Fu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:f,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Vt(this[rt]).size}has(f){return Vt(this[rt]).has(f)}set(f,h){const m=this[rt];return u(m),(!Vt(m).has(f)||Vt(m).get(f)!==h)&&(n(m),zr(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[rt];return u(h),n(h),zr(h),h.base_.has(f)?h.assigned_.set(f,!1):h.assigned_.delete(f),h.copy_.delete(f),!0}clear(){const f=this[rt];u(f),Vt(f).size&&(n(f),zr(f),f.assigned_=new Map,$o(f.base_,h=>{f.assigned_.set(h,!1)}),f.copy_.clear())}forEach(f,h){const m=this[rt];Vt(m).forEach((E,b,T)=>{f.call(h,this.get(b),b,this)})}get(f){const h=this[rt];u(h);const m=Vt(h).get(f);if(h.finalized_||!Hr(m)||m!==h.base_.get(f))return m;const E=Yo(m,h);return n(h),h.copy_.set(f,E),E}keys(){return Vt(this[rt]).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[rt]={type_:3,parent_:h,scope_:h?h.scope_:Fu(),modified_:!1,finalized_:!1,copy_:void 0,base_:f,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Vt(this[rt]).size}has(f){const h=this[rt];return u(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[rt];return u(h),this.has(f)||(a(h),zr(h),h.copy_.add(f)),this}delete(f){if(!this.has(f))return!1;const h=this[rt];return u(h),a(h),zr(h),h.copy_.delete(f)||(h.drafts_.has(f)?h.copy_.delete(h.drafts_.get(f)):!1)}clear(){const f=this[rt];u(f),Vt(f).size&&(a(f),zr(f),f.copy_.clear())}values(){const f=this[rt];return u(f),a(f),f.copy_.values()}entries(){const f=this[rt];return u(f),a(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 a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(f=>{if(Hr(f)){const h=Yo(f,c);c.drafts_.set(f,h),c.copy_.add(h)}else c.copy_.add(f)}))}function u(c){c.revoked_&&Vn(3,JSON.stringify(Vt(c)))}cC("MapSet",{proxyMap_:t,proxySet_:o})}var In=new mC,yC=In.produce;In.produceWithPatches.bind(In),In.setAutoFreeze.bind(In),In.setUseStrictShallowCopy.bind(In),In.applyPatches.bind(In),In.createDraft.bind(In),In.finishDraft.bind(In);function TC(e,t,n){var r=V.useMemo(function(){return yC(e)},[e]);return V.useReducer(r,t,n)}const Z0={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"},Ft={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS"},Hu={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[]},Wo="cimulate",Hf=`${Wo}:pdp-update`,zf=`${Wo}:browse-update`,jf=`${Wo}:search-update`,$f=`${Wo}:ui-state-update`,Vf=`${Wo}:session-state`,xr=U({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},Z0),bC={"browse-context":xr.CONTEXT_UPDATED,categoryId:xr.CATEGORY_ID_CHANGED,categoryName:xr.CATEGORY_NAME_CHANGED,page:xr.PAGE_CHANGED,pageSize:xr.PAGE_SIZE_CHANGED,includeFacets:xr.FACET_FILTERS_CHANGED,facetFilters:xr.FACET_FILTERS_CHANGED,rangeFilters:xr.RANGE_FILTERS_CHANGED,catalogSegment:xr.CATALOG_SEGMENT_CHANGED,pricebooks:xr.PRICEBOOKS_CHANGED},jr=U({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},Z0),_C={"search-context":jr.SEARCH_CONTEXT_UPDATED,query:jr.QUERY_CHANGED,page:jr.PAGE_CHANGED,pageSize:jr.PAGE_SIZE_CHANGED,includeFacets:jr.FACET_FILTERS_CHANGED,facetFilters:jr.FACET_FILTERS_CHANGED,rangeFilters:jr.RANGE_FILTERS_CHANGED,catalogSegment:jr.CATALOG_SEGMENT_CHANGED,pricebooks:jr.PRICEBOOKS_CHANGED},Z="cim-widget",vs=`--${Z}`,qi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},xC=(e=qi)=>({[`${vs}-primary-color`]:e.primaryColor||qi.primaryColor,[`${vs}-secondary-color`]:e.secondaryColor||qi.secondaryColor,[`${vs}-font-color`]:e.fontColor||qi.fontColor,[`${vs}-font-family`]:e.fontFamily||qi.fontFamily,[`${vs}-background-color`]:e.backgroundColor||qi.backgroundColor,[`${vs}-border-color`]:e.borderColor||qi.borderColor}),li={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},eg=V.createContext(null),tg=V.createContext(null);class SC{constructor(t,n,r=!1){ve(this,"apiService");ve(this,"config",null);ve(this,"getConfig",()=>it(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));ve(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));ve(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));ve(this,"getDescription",t=>this.getProductFieldValue(t,"description"));ve(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));ve(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));ve(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));ve(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));ve(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));ve(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});ve(this,"getProductField",t=>this.config?this.config[t]:"");ve(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new j0(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 ks=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class wC{constructor(t=!1){ve(this,"isDevelopment");ve(this,"_log",(t,n,...r)=>{ks(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 ng=V.createContext(null),CC=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",openLinksInNewTab:r=!1,searchPlaceholder:o,searchButtonLabel:a,conversationHistory:u,resetConversationMessage:c="What products would you like to explore today?",apiKey:f,apiToken:h,theme:m,isDevelopment:E,children:b})=>{const T=V.useMemo(()=>new SC(f,h,E),[f,h,E]),_=V.useMemo(()=>new wC(E),[E]);V.useEffect(()=>{T.config||T.getConfig()},[T]);const x=V.useMemo(()=>xC(m),[m]),C=V.useMemo(()=>({configModule:T,logoUrl:e,headerText:t,globalClassName:n,openLinksInNewTab:r,themeVariables:x,logger:_,searchPlaceholder:o,searchButtonLabel:a,resetConversationMessage:c,conversationHistory:{sinceHours:typeof(u==null?void 0:u.sinceHours)=="number"?u.sinceHours:1,limit:u==null?void 0:u.limit}}),[T,e,t,n,r,o,a,c,_,x,u]);return N.jsx(ng.Provider,{value:C,children:b})},hn=()=>{const e=V.useContext(ng);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class AC{constructor(){ve(this,"initialState",{connected:!1,mode:"embedded",status:{type:"dialog",isOpen:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});ve(this,"connectedProxy");ve(this,"modeProxy");ve(this,"statusProxy");ve(this,"dialogProxy");ve(this,"modalProxy",{isFullscreen:!1});ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return NC(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.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 connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get type(){return this.statusProxy.type}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,status:{type:this.type,isOpen:this.isOpen},dialog:{position:this.position},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const xt=new AC,Yi=()=>xt.connected,Go=()=>xt.isOpen,vC=e=>{window.addEventListener($f,e)},kC=e=>{window.removeEventListener($f,e)},NC=(e,t)=>{const n=new CustomEvent($f,{detail:{property:e,value:t}});window.dispatchEvent(n)},OC=e=>{xt.connectedProxy.connected=e},zu=e=>{if(typeof e!="boolean"){xt.statusProxy.isOpen=!xt.statusProxy.isOpen;return}xt.statusProxy.isOpen=e},rg=e=>{xt.modalProxy.isFullscreen=e},qf=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);xt.statusProxy.type=e,e==="dialog"||e==="chat"?xt.modeProxy.mode="embedded":xt.modeProxy.mode="standalone"},ig=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(", ")}.`);xt.dialogProxy.position=e},IC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=hn(),o=V.useCallback(x=>{n({type:Ft.SET_COPILOT,payload:x})},[n]),a=V.useCallback(x=>{OC(x),n({type:Ft.SET_CONNECTED,payload:x})},[n]),u=V.useCallback(()=>{n({type:Ft.RESET_COPILOT,payload:{}})},[n]),c=V.useCallback(()=>{n({type:Ft.RESET_STATE,payload:{}})},[n]),f=V.useCallback(x=>{r==null||r.log(`${x.name} event received`,x),n({type:Ft.ADD_MESSAGE,payload:x}),e==null||e(x)},[e,r,n]),h=V.useCallback(x=>{n({type:Ft.ADD_LOADING_MESSAGE,payload:x})},[n]),m=V.useCallback(x=>{n({type:Ft.REMOVE_LOADING_MESSAGE,payload:x})},[n]),E=V.useCallback(x=>{n({type:Ft.SET_ACTIVE_CONVERSATION_ID,payload:x})},[n]),b=V.useCallback(x=>{n({type:Ft.ADD_CONVERSATION_ID,payload:x})},[n]),T=V.useCallback(x=>{n({type:Ft.SET_CONVERSATION_IDS,payload:x})},[n]),_=V.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:f,addLoadingMessage:h,removeLoadingMessage:m,setActiveConversationId:E,addConversationId:b,setConversationIds:T}),[o,a,u,c,f,h,m,E,b,T]);return N.jsx(tg.Provider,{value:_,children:t})};EC();const PC=(e,t)=>{const{type:n,payload:r}=t;if(n===Ft.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(f=>f.id===o.id);if(c!==-1){u[c]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case Ft.RESET_STATE:e.messages=Hu.messages,e.groupedMessages=Hu.groupedMessages,e.loadingMessages=Hu.loadingMessages;break;case Ft.RESET_COPILOT:e.copilot=null;break;case Ft.SET_COPILOT:e.copilot=r;break;case Ft.SET_CONNECTED:e.connected=r;break;case Ft.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case Ft.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case Ft.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case Ft.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case Ft.SET_CONVERSATION_IDS:e.conversationIds=r;break}},RC=({onCopilotEvent:e,children:t})=>{const[n,r]=TC(PC,Hu);return N.jsx(eg.Provider,{value:n,children:N.jsx(IC,{onCopilotEvent:e,dispatch:r,children:t})})};function LC(){var e=V.useRef(!0);return e.current?(e.current=!1,!0):e.current}var DC=function(e){V.useEffect(e,[])},MC=function(e,t){return e===t};function FC(e,t){t===void 0&&(t=MC);var n=V.useRef(),r=V.useRef(e),o=LC();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class BC{constructor(){ve(this,"items",[]);ve(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});ve(this,"remove",()=>this.items.shift());ve(this,"first",()=>this.items.length>0?this.items[0]:null);ve(this,"clear",()=>{this.items.length=0});ve(this,"processQueue",t=>{new Array(rn.size).fill(1).forEach(()=>{const r=rn.first();r&&(t(r),rn.remove())})})}get size(){return this.items.length}}const rn=new BC,sg=e=>{window.addEventListener(jf,e)},og=e=>{window.removeEventListener(jf,e)},UC=(e,t,n)=>{const r=new CustomEvent(jf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},ag=e=>{window.addEventListener(zf,e)},ug=e=>{window.removeEventListener(zf,e)},HC=(e,t,n)=>{const r=new CustomEvent(zf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},lg=e=>{window.addEventListener(Hf,e)},cg=e=>{window.removeEventListener(Hf,e)},fg=(e,t,n)=>{const r=new CustomEvent(Hf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},zC=e=>{window.addEventListener(Vf,e)},jC=e=>{window.removeEventListener(Vf,e)},ju=(e,t,n)=>{const r=new CustomEvent(Vf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class $C{constructor(){ve(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"categoryIdProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=bC[n];return HC(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const st=new $C,dg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},hg=(e,t,n)=>{var u,c;const r=U({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const f=r[e].filter(h=>h!==t);f.length>0?r[e]=f:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},pg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},mg=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(f=>f.field===e);if(u!==-1){a[u]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},gg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Eg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},VC=e=>{if(!Yi()||!Go()){Yi()&&rn.clear(),rn.add({context:"browse",payload:ye(U({},st.state),{categoryId:e})});return}st.categoryIdProxy.categoryId=e},yg=e=>{dg(e,st)},qC=(e,t)=>{hg(e,t,st)},Tg=e=>{pg(e,st)},YC=({field:e,value:t})=>{mg({field:e,value:t},st)},WC=e=>{gg(e,st)},bg=e=>{Eg(e,st)},_g=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Yi(),n=Go();if(!t||!n){t&&rn.clear(),rn.add({context:"browse",payload:U({},e)});return}"facetFilters"in e&&yg(e.facetFilters||{}),"rangeFilters"in e&&Tg(e.rangeFilters||[]),"catalogSegment"in e&&(st.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&bg(e.pricebooks||[]),"categoryName"in e&&(st.categoryIdProxy.categoryName=e.categoryName||""),st.categoryIdProxy.categoryId=e.categoryId},GC=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:_g,updateBrowseCategoryId:VC,updateCatalogSegment:WC,updateFacetFilter:qC,updateFacetFilters:yg,updatePricebooks:bg,updateRangeFilter:YC,updateRangeFilters:Tg},Symbol.toStringTag,{value:"Module"}));class KC{constructor(){ve(this,"initialParams",{productId:"",productName:"",pdpLink:""});ve(this,"proxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>(fg(n,r),Reflect.set(t,n,r)));ve(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const or=new KC,xg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Yi(),n=Go();if(!t||!n){t&&rn.clear(),rn.add({context:"pdp",payload:U({},e)});return}or.updateProxy(e),fg("pdp-context",e)},QC=e=>{or.proxy.productId=e,Yi()||rn.add({context:"pdp",payload:U({},or.state)})},XC=e=>{or.proxy.pdpLink=e},JC=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{ju("getConversationMessages",{payload:e,callback:t},li.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{ju("getSessionInformation",{callback:e},li.GET_SESSION_INFORMATION)},loadConversation:e=>{ju("loadConversation",e,li.LOAD_CONVERSATION)},resetConversation:()=>{ju("resetConversation",!0,li.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class ZC{constructor(){ve(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"queryProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=_C[n];return UC(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const pt=new ZC,eA=e=>{const t=Go(),n=Yi();if(!n||!t){n&&rn.clear(),rn.add({context:"search",payload:ye(U({},pt.state),{query:e})});return}pt.queryProxy.query=e},Sg=e=>{dg(e,pt)},tA=(e,t)=>{hg(e,t,pt)},wg=e=>{pg(e,pt)},nA=({field:e,value:t})=>{mg({field:e,value:t},pt)},rA=e=>{gg(e,pt)},Cg=e=>{Eg(e,pt)},Ag=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Go(),n=Yi();if(!n||!t){n&&rn.clear(),rn.add({context:"search",payload:U({},e)});return}"facetFilters"in e&&Sg(e.facetFilters||{}),"rangeFilters"in e&&wg(e.rangeFilters||[]),"catalogSegment"in e&&(pt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Cg(e.pricebooks||[]),pt.queryProxy.query=e.query},iA=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Ag,updateCatalogSegment:rA,updateFacetFilter:tA,updateFacetFilters:Sg,updatePricebooks:Cg,updateRangeFilter:nA,updateRangeFilters:wg,updateSearchQuery:eA},Symbol.toStringTag,{value:"Module"})),vg=V.createContext({entryType:"search",setEntryType:()=>{}}),sA=({children:e})=>{const[t,n]=V.useState("search"),r=V.useMemo(()=>({entryType:t,setEntryType:n}),[t,n]);return N.jsx(vg.Provider,{value:r,children:e})},oA=()=>{const e=V.useContext(vg);if(!e)throw new Error("useEntry must be used within an EntryProvider");return e},aA={categoryId:st.categoryId,categoryName:st.categoryIdProxy.categoryName||"",facetFilters:st.facetFilters,rangeFilters:st.rangeFilters,catalogSegment:st.catalogSegment,pricebooks:st.pricebooks},kg=V.createContext(aA),uA=({children:e})=>{const[t,n]=V.useState(st.categoryId),[r,o]=V.useState(st.categoryIdProxy.categoryName||""),[a,u]=V.useState(st.facetFilters||{}),[c,f]=V.useState(st.rangeFilters||[]),[h,m]=V.useState(st.catalogSegment||null),[E,b]=V.useState(st.pricebooks||null);V.useEffect(()=>{const _=({detail:x})=>{(x==null?void 0:x.property)==="categoryId"&&n(x.value),(x==null?void 0:x.property)==="categoryName"&&o(x.value),(x==null?void 0:x.property)==="facetFilters"&&u(x.value),(x==null?void 0:x.property)==="rangeFilters"&&f(x.value),(x==null?void 0:x.property)==="catalogSegment"&&m(x.value),(x==null?void 0:x.property)==="pricebooks"&&b(x.value)};return ag(_),()=>{ug(_)}},[]);const T=V.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:h,pricebooks:E}),[t,r,a,c,h,E]);return N.jsx(kg.Provider,{value:T,children:e})},lA=()=>{const e=V.useContext(kg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},cA={searchQuery:pt.query,facetFilters:pt.facetFilters,rangeFilters:pt.rangeFilters,catalogSegment:pt.catalogSegment,pricebooks:pt.pricebooks},Ng=V.createContext(cA),fA=({children:e})=>{const[t,n]=V.useState(pt.query),[r,o]=V.useState(pt.facetFilters),[a,u]=V.useState(pt.rangeFilters),[c,f]=V.useState(pt.catalogSegment),[h,m]=V.useState(pt.pricebooks);V.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"&&u(T.value),(T==null?void 0:T.property)==="catalogSegment"&&f(T.value),(T==null?void 0:T.property)==="pricebooks"&&m(T.value)};return sg(b),()=>{og(b)}},[]);const E=V.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:h}),[t,r,a,c,h]);return N.jsx(Ng.Provider,{value:E,children:e})},dA=()=>{const e=V.useContext(Ng);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},hA={productId:or.productId,pdpLink:or.pdpLink},Og=V.createContext(hA),pA=({children:e})=>{const[t,n]=V.useState(or.productId),[r,o]=V.useState(or.pdpLink);V.useEffect(()=>{const u=({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 lg(u),()=>{cg(u)}},[]);const a=V.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return N.jsx(Og.Provider,{value:a,children:e})},mA=()=>{const e=V.useContext(Og);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},Ig=V.createContext({mode:xt.modeProxy.mode,status:xt.statusProxy,dialogPosition:xt.dialogProxy.position,isModalFullscreen:xt.modalProxy.isFullscreen,previousComponentType:xt.statusProxy.type}),gA=({componentType:e,children:t})=>{const[n,r]=V.useState(xt.modeProxy.mode),[o,a]=V.useState({type:e||xt.statusProxy.type,isOpen:xt.statusProxy.isOpen}),[u,c]=V.useState(xt.dialogProxy.position),[f,h]=V.useState(xt.modalProxy.isFullscreen),m=FC(o.type);V.useEffect(()=>{const b=T=>{const{property:_,value:x}=T.detail||{};if(!(!_||x===void 0)){if(_==="mode"){r(x);return}if(_==="isOpen"){a(C=>ye(U({},C),{isOpen:x}));return}if(_==="type"){a(C=>ye(U({},C),{type:x}));return}if(_==="position"){c(x);return}if(_==="isFullscreen"){h(x);return}}};return vC(b),()=>{kC(b)}},[]);const E=V.useMemo(()=>({mode:n,status:o,previousComponentType:m||"dialog",dialogPosition:u,isModalFullscreen:f}),[n,o,m,u,f]);return N.jsx(Ig.Provider,{value:E,children:t})},Ns=()=>{const e=V.useContext(Ig);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},Yf=()=>{const e=V.useContext(tg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Wf=()=>{const e=V.useContext(eg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},EA=({copilot:e})=>{const{logger:t,conversationHistory:n}=hn(),{addCopilotEvent:r}=Yf(),{activeConversationId:o}=Wf(),a=V.useCallback(c=>{e&&e.requestSessionInformation(f=>{t==null||t.log("Retrieved session information: ",f),c==null||c(f)})},[e,t]),u=V.useCallback((c,f)=>{e&&c.conversationId&&e.getConversationEvents(c,h=>{t==null||t.log("Retrieved conversation messages: ",h),f==null||f(h)})},[e,t]);return V.useEffect(()=>{if(!o||n.sinceHours===0||(n==null?void 0:n.limit)===0)return;const c=60*60*1e3*n.sinceHours,f=new Date(Date.now()-c).toISOString(),h={conversationId:o,since:f,excludeEvents:["done","error","connection_error","refined_browse","refined_search"]};typeof n.limit=="number"&&(h.limit=n.limit),u(h,m=>{m.forEach(E=>r(E))})},[o,u,r,n]),{getSessionInformation:a,getConversationMessages:u}},Pg=V.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),yA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:f}=hn(),Ti=dA(),{searchQuery:h}=Ti,m=tn(Ti,["searchQuery"]),Jr=lA(),{categoryId:E}=Jr,b=tn(Jr,["categoryId"]),{productId:T,pdpLink:_}=mA(),{entryType:x,setEntryType:C}=oA(),{setCopilot:O,setConnected:F,resetCopilot:D,resetCopilotState:G,addCopilotEvent:W,addLoadingMessage:B,removeLoadingMessage:te,setActiveConversationId:Te,setConversationIds:xe}=Yf(),{connected:H,copilot:ee,messages:de,groupedMessages:fe,loadingMessages:ae}=Wf(),{status:Ee}=Ns(),Ce=V.useRef(!1),ue=V.useRef(!1),{getConversationMessages:q,getSessionInformation:ne}=EA({copilot:ee}),w=V.useMemo(()=>ae.size>0,[ae]),R=V.useCallback(Se=>ae.has(Se),[ae]),K=V.useCallback(Se=>{W(Se),B(Se.id)},[W,B]),k=V.useCallback(({query:Se,facetFilters:je,rangeFilters:nt,catalogSegment:ot,pricebooks:dt,userPrompt:It})=>{if(!ee){f==null||f.error("Copilot is not initialized");return}if(!Se)return;const Pt={searchParams:{query:Se}};It&&(Pt.userPrompt=It),je&&Object.keys(je).length>0&&(Pt.searchParams.facetFilters=je),nt&&nt.length>0&&(Pt.searchParams.rangeFilters=nt),ot&&(Pt.searchParams.catalogSegment=ot),dt&&(Pt.searchParams.pricebooks=dt),C("search"),ee.search(Pt,Rt=>{const J=U({},Rt);Ce.current=!0,K(J)})},[f,C,K,ee]),be=V.useCallback(({categoryId:Se,categoryName:je,facetFilters:nt,rangeFilters:ot,catalogSegment:dt,pricebooks:It,userPrompt:Pt})=>{if(!ee){f==null||f.error("Copilot is not initialized");return}const Rt=nt&&Object.keys(nt).length>0;if(Se===""&&!Rt){f==null||f.error("Browse event must include facetFilters when categoryId is empty");return}const J={browseParams:{categoryId:Se||""}};Pt&&(J.userPrompt=Pt),Rt&&(J.browseParams.facetFilters=nt),ot&&ot.length>0&&(J.browseParams.rangeFilters=ot),dt&&(J.browseParams.catalogSegment=dt),Array.isArray(It)&&It.length>0&&(J.browseParams.pricebooks=It),C("browse"),ee.browse(J,ge=>{const De=U({},ge);je&&De.request&&(De.request.label=je),ue.current=!0,K(De)})},[f,C,K,ee]),Re=V.useCallback(({productId:Se,productName:je,pdpLink:nt,userPrompt:ot})=>{if(!ee){f==null||f.error("Copilot is not initialized");return}if(!Se)return;const dt={productId:Se};ot&&(dt.userPrompt=ot),nt&&(dt.pdpLink=nt),C("pdp"),ee.productView(dt,It=>{const Pt=U({},It);je&&Pt.request&&(Pt.request.label=je),K(Pt)})},[f,C,ee,K]),Oe=V.useCallback(Se=>{const je=ye(U({},Se),{id:Se.inquiryLinkId||Se.id});W(je)},[W]),Ye=V.useCallback(Se=>{W(Se),a==null||a(Se)},[W,a]),Ve=V.useCallback(Se=>{W(Se),u==null||u(Se)},[W,u]),Je=V.useCallback(Se=>{o==null||o(Se),F(!0)},[o,F]);V.useEffect(()=>{!ee||!H||!Ee.isOpen||rn.size>0&&rn.processQueue(Se=>{if(Se.context==="search"){const je=U({},Se.payload);Ag(je)}if(Se.context==="browse"){const je=U({},Se.payload);_g(je)}if(Se.context==="pdp"){const je=U({},Se.payload);xg(je)}})},[Ee.isOpen,ee,H]);const At=V.useCallback(Se=>{Se.on("connect_ack",Je),Se.on("follow_up",W),Se.on("inquiry",Oe),Se.on("partial_inquiry",Oe),Se.on("display_products",W),Se.on("progress",W),Se.on("refined_search",Ye),Se.on("refined_browse",Ve),Se.on("done",je=>{te(je.eventSourceId)}),Se.on("error",je=>{W(je),te(je.eventSourceId)}),Se.onDisconnect(je=>{const nt=["io server disconnect","transport error","server shutting down"];if(f==null||f.log("Connection disconnected with reason: ",je),!nt.includes(je)){F(!1);return}f==null||f.log("De-registering event listeners");const ot=new Date().toISOString();W({name:"error",message:"Connection was lost. Please try again.",createdAt:ot,id:`error-${ot}`,sessionId:"session"}),Se.off()})},[f,F,te,Oe,Ye,Ve,W,Je]);DC(()=>{let Se;n?Se=n:Se=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const je={baseUrl:Se};e?je.apiKey=e:t&&(je.apiToken=t);const nt=new DS(je);return O(nt),At(nt),nt.connect(),nt.requestSessionInformation(ot=>{f==null||f.log("Session Information: ",ot);const{activeConversationId:dt,conversationIds:It}=ot.data||{};dt&&Te(dt),It!=null&&It.length&&xe(It)}),()=>{nt.disconnect(),nt.off(),D()}});const Kn=V.useCallback(Se=>{if(!ee)return;const je={eventId:Se,reason:"User cancelled the request"};ee.cancelRequest(je,nt=>{W(nt),te(Se)})},[W,te,ee]),is=V.useCallback(()=>{ee&&ee.conversationReset({},Se=>{G(),W(Se),ee.requestSessionInformation(je=>{f==null||f.log("Session Information: ",je)})})},[ee,f,W,G]),Xr=V.useCallback(Se=>{if(Se)switch(x){case"search":k(ye(U({query:h},m),{userPrompt:Se}));return;case"browse":be(ye(U({categoryId:E},b),{userPrompt:Se}));return;case"pdp":Re({productId:T,pdpLink:_||"",userPrompt:Se});return}},[x,h,m,k,E,b,be,Re,T,_]),yi=V.useCallback((Se,je)=>{var It,Pt;const ot=Se.params.userPrompt||"";if(!ot)return;const dt=de.find(Rt=>Rt.id===je);if(dt){if(dt.name==="copilot_search"){const{query:Rt}=((It=dt.request)==null?void 0:It.searchParams)||{};Rt&&k(ye(U({query:Rt||h},m),{userPrompt:ot}));return}if(dt.name==="copilot_browse"){const{categoryId:Rt}=((Pt=dt.request)==null?void 0:Pt.browseParams)||{};be(ye(U({categoryId:Rt||E||""},b),{userPrompt:ot}));return}if(dt.name==="product_view"){const Rt=dt.request;Rt!=null&&Rt.productId&&Re(ye(U({},Rt),{userPrompt:ot}))}}},[h,m,E,b,de,k,be,Re]),ss=V.useMemo(()=>({copilot:ee,messages:de,groupedMessages:fe,isLoading:w,isResponseLoading:R,handleSearch:k,handleBrowse:be,handlePdp:Re,handleUserInput:Xr,handleSuggestion:yi,handleCancel:Kn,resetConversation:is,getSessionInformation:ne,getConversationMessages:q}),[ee,de,fe,w,R,k,be,Re,Xr,yi,Kn,is,ne,q]);return N.jsx(Pg.Provider,{value:ss,children:c})},$r=()=>{const e=V.useContext(Pg);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},TA=()=>{const{resetCopilotState:e,addCopilotEvent:t}=Yf(),{copilot:n,handleSearch:r,handleBrowse:o,handlePdp:a,resetConversation:u,getSessionInformation:c,getConversationMessages:f}=$r(),h=V.useCallback(({query:b})=>{if(!n||!b)return;const{facetFilters:T}=pt.facetFiltersProxy,{rangeFilters:_}=pt.rangeFiltersProxy,{catalogSegment:x}=pt.catalogSegmentProxy,{pricebooks:C}=pt.pricebooksProxy,O={query:b};O.facetFilters=T||{},O.rangeFilters=_||[],O.catalogSegment=x||"",O.pricebooks=C||[],r(U({},O))},[n,r]),m=V.useCallback(({categoryId:b})=>{if(!n)return;const T=st.categoryIdProxy.categoryName,{facetFilters:_}=st.facetFiltersProxy,{rangeFilters:x}=st.rangeFiltersProxy,{catalogSegment:C}=st.catalogSegmentProxy,{pricebooks:O}=st.pricebooksProxy,F={categoryId:b};F.categoryName=T||"",F.facetFilters=_||{},F.rangeFilters=x||[],F.catalogSegment=C||"",F.pricebooks=O||[],o(U({},F))},[n,o]),E=V.useCallback(({productId:b})=>{if(!n||!b)return;const T={productId:b,pdpLink:or.pdpLink,productName:or.proxy.productName||""};a(T)},[n,a]);return V.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&h({query:T.value})};return sg(b),()=>{og(b)}},[h]),V.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.property)==="pdp-context"){const _=T.value;E({productId:_.productId});return}(T==null?void 0:T.property)==="productId"&&E({productId:T.value})};return lg(b),()=>{cg(b)}},[E]),V.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="categoryId"&&m({categoryId:T.value})};return ag(b),()=>{ug(b)}},[m]),V.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.event)==li.RESET_CONVERSATION&&u(),(T==null?void 0:T.event)==li.GET_SESSION_INFORMATION){const _=T.value.callback;c(_)}if((T==null?void 0:T.event)==li.GET_CONVERSATION_MESSAGES){const{payload:_,callback:x}=T.value;if(!_.conversationId||typeof x!="function")return;f(_,x)}if((T==null?void 0:T.event)==li.LOAD_CONVERSATION){const _=T.value;if(!_.conversationId)return;f(_,C=>{e(),C.forEach(O=>{t(O)})})}};return zC(b),()=>{jC(b)}},[u,c,f,e,t]),null},bA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onCopilotEvent:a,onRefinedSearch:u,onRefinedBrowse:c,children:f})=>N.jsx(RC,{onCopilotEvent:a,children:N.jsxs(yA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:u,onRefinedBrowse:c,children:[N.jsx(TA,{}),f]})}),Rg=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:a,openLinksInNewTab:u,globalClassName:c,isDevelopment:f=!1,componentType:h,searchPlaceholder:m,searchButtonLabel:E,resetConversationMessage:b,conversationHistory:T,onConnect:_,onCopilotEvent:x,onRefinedSearch:C,onRefinedBrowse:O,children:F})=>N.jsx(CC,{apiKey:e,logoUrl:r,headerText:o,theme:a,globalClassName:c,openLinksInNewTab:u,searchPlaceholder:m,searchButtonLabel:E,resetConversationMessage:b,conversationHistory:T,isDevelopment:f,children:N.jsx(oC,{apiKey:e,apiToken:t,isDevelopment:f,children:N.jsx(sA,{children:N.jsx(pA,{children:N.jsx(uA,{children:N.jsx(fA,{children:N.jsx(gA,{componentType:h,children:N.jsx(bA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:f,onConnect:_,onCopilotEvent:x,onRefinedSearch:C,onRefinedBrowse:O,children:F})})})})})})})});function Lg(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=Lg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function re(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Lg(e))&&(r&&(r+=" "),r+=t);return r}var Dg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Mg=Hi.createContext&&Hi.createContext(Dg),_A=["attr","size","title"];function xA(e,t){if(e==null)return{};var n=SA(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SA(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 $u(){return $u=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},$u.apply(this,arguments)}function Fg(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 Vu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fg(Object(n),!0).forEach(function(r){wA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wA(e,t,n){return t=CA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CA(e){var t=AA(e,"string");return typeof t=="symbol"?t:t+""}function AA(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 Bg(e){return e&&e.map((t,n)=>Hi.createElement(t.tag,Vu({key:n},t.attr),Bg(t.child)))}function pn(e){return t=>Hi.createElement(vA,$u({attr:Vu({},e.attr)},t),Bg(e.child))}function vA(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=xA(e,_A),c=o||n.size||"1em",f;return n.className&&(f=n.className),e.className&&(f=(f?f+" ":"")+e.className),Hi.createElement("svg",$u({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:f,style:Vu(Vu({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Hi.createElement("title",null,a),e.children)};return Mg!==void 0?Hi.createElement(Mg.Consumer,null,n=>t(n)):t(Dg)}function Ug(e){return pn({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 qu(e){return pn({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 kA(e){return pn({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 Hg(e){return pn({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 pn({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 OA(e){return pn({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 pn({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 PA(e){return pn({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 Gf=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>N.jsx("button",{className:re(`${Z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Os=({className:e,icon:t,type:n="button",ariaLabel:r,disabled:o=!1,onClick:a})=>N.jsx("button",{className:re(e,`${Z}-icon-button`),type:n,"aria-label":r,onClick:a,disabled:o,children:t}),RA=({className:e,searchButtonLabel:t,globalClassName:n,componentType:r,isLoading:o})=>t?N.jsx(Gf,{className:re(n,r,e),type:"submit",disabled:o,children:t}):N.jsx(Os,{className:re(n,r,e),type:"submit",disabled:o,ariaLabel:"Search Copilot",icon:N.jsx(qu,{})}),Kf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o}=Wf(),{globalClassName:a,searchPlaceholder:u,searchButtonLabel:c}=hn(),f=V.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 N.jsxs("form",{className:re(a,e,n,`${Z}-search-bar`),name:`${Z}-search-form`,onSubmit:h,children:[N.jsx("span",{role:"status",className:re(`${Z}-connection-status-icon`,E)}),N.jsx("input",{className:re(a,e,n,`${Z}-search-input`),type:"text",ref:f,placeholder:u,name:`${Z}-user-input`}),N.jsx(RA,{searchButtonLabel:c,globalClassName:a,componentType:n,isLoading:t||!m})]})};function LA(e){return e==null?[]:Array.isArray(e)?e:[e]}var DA=e=>e!=null&&typeof e=="object",Yu=e=>typeof e=="string",Is=e=>typeof e=="function",MA=e=>e==null,FA=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),BA=e=>Object.prototype.toString.call(e),zg=Function.prototype.toString,UA=zg.call(Object),HA=e=>{if(!DA(e)||BA(e)!="[object Object]"||$A(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=FA(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&zg.call(n)==UA},zA=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,jA=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,$A=e=>zA(e)||jA(e),VA=e=>e(),qA=()=>{},Qf=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function Xf(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]=Xf(o))}return n}function Jf(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function YA(e,t){if(e==null)throw new Error(t())}var WA=Object.defineProperty,GA=(e,t,n)=>t in e?WA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zf=(e,t,n)=>GA(e,typeof t!="symbol"?t+"":t,n),jg=()=>{},Wu=e=>typeof e=="object"&&e!==null,KA=e=>e?"":void 0,QA=e=>e?"true":void 0,XA=1,JA=9,ZA=11,qt=e=>Wu(e)&&e.nodeType===XA&&typeof e.nodeName=="string",Gu=e=>Wu(e)&&e.nodeType===JA,ev=e=>Wu(e)&&e===e.window,$g=e=>qt(e)?e.localName||"":"#document";function tv(e){return["html","body","#document"].includes($g(e))}var nv=e=>Wu(e)&&e.nodeType!==void 0,Wi=e=>nv(e)&&e.nodeType===ZA&&"host"in e,rv=e=>qt(e)&&e.localName==="input",iv=e=>qt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ko(e){if(!e)return!1;const t=e.getRootNode();return Rs(t)===e}var sv=/(textarea|select)/;function ov(e){if(e==null||!qt(e))return!1;try{return rv(e)&&e.selectionStart!=null||sv.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Ku(e,t){var r;if(!e||!t||!qt(e)||!qt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Wi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Sr(e){var t;return Gu(e)?e:ev(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function av(e){return Sr(e).documentElement}function Ps(e){var t,n,r;return Wi(e)?Ps(e.host):Gu(e)?(t=e.defaultView)!=null?t:window:qt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Rs(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 uv(e){if($g(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wi(e)&&e.host||av(e);return Wi(t)?t.host:t}function ed(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gu(t)||Wi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var td=new WeakMap;function Qu(e){return td.has(e)||td.set(e,Ps(e).getComputedStyle(e)),td.get(e)}var nd=new Set(["menu","listbox","dialog","grid","tree","region"]),lv=e=>nd.has(e),Vg=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function qg(e,t){const n=new Set,r=ed(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const f=Vg(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&&lv(E)&&!b&&(m===t||m.contains(t)||o(m)))return!0}}}return!1};return o(e)}function Yg(e,t){const n=ed(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const f=Vg(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&&nd.has(E)&&!b&&(t(m),o(m))}}}};o(e)}function cv(e){const t=new Set;return Yg(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function fv(e){const t=e.getAttribute("role");return!!(t&&nd.has(t))}function dv(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function hv(e){var t;return dv(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function pv(e){if(!e.id)return!1;const t=ed(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&fv(e))}var rd=()=>typeof document!="undefined";function mv(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var id=e=>rd()&&e.test(mv()),gv=e=>rd()&&e.test(navigator.vendor),Wg=()=>rd()&&!!navigator.maxTouchPoints,Ev=()=>id(/^iPhone/i),yv=()=>id(/^iPad/i)||sd()&&navigator.maxTouchPoints>1,Gg=()=>Ev()||yv(),Tv=()=>sd()||Gg(),sd=()=>id(/^Mac/i),bv=()=>Tv()&&gv(/apple/i);function _v(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 Vr(e){var n;const t=_v(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var xv=e=>e.button===0,Sv=e=>e.button===2||sd()&&e.ctrlKey&&e.button===0,ar=(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)}},Kg=e=>qt(e)&&e.tagName==="IFRAME",wv=/^(audio|video|details)$/;function Qg(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var Cv=e=>!Number.isNaN(Qg(e)),Av=e=>Qg(e)<0;function vv(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 Xg(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((f,h)=>u.set(f,h));let c=0;for(;c<o.length;){const f=o[c++];if(!f||a.has(f))continue;a.add(f);const h=vv(f,t);if(h){const m=Array.from(h.querySelectorAll(Xu)).filter(n),E=u.get(f);if(E!==void 0){const b=E+1;r.splice(b,0,...m),m.forEach((T,_)=>{u.set(T,b+_)});for(let T=b+m.length;T<r.length;T++)u.set(r[T],T)}else{const b=r.length;r.push(...m),m.forEach((T,_)=>{u.set(T,b+_)})}o.push(...m)}}return r}var Xu="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",Jg=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Xu));(n==!0||n=="if-empty"&&o.length===0)&&qt(e)&&qr(e)&&o.unshift(e);const u=[];for(const c of o)if(qr(c)){if(Kg(c)&&c.contentDocument){const f=c.contentDocument.body;u.push(...Jg(f,{getShadowRoot:r}));continue}u.push(c)}return r?Xg(u,r,qr):u};function qr(e){return!qt(e)||e.closest("[inert]")?!1:e.matches(Xu)&&iv(e)}function Qo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Xu));n&&Gi(e)&&o.unshift(e);const a=[];for(const u of o)if(Gi(u)){if(Kg(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Qo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Xg(a,r,Gi);return!u.length&&n?o:u}return!a.length&&n?o:a}function Gi(e){return qt(e)&&e.tabIndex>0?!0:qr(e)&&!Av(e)}function kv(e,t={}){const n=Qo(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=Qo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Rs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Xo(e){return e.tabIndex<0&&(wv.test(e.localName)||ov(e))&&!Cv(e)?0:e.tabIndex}function Zg(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=Qo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var Ov=class x2{constructor(){Zf(this,"id",null),Zf(this,"fn_cleanup"),Zf(this,"cleanup",()=>{this.cancel()})}static create(){return new x2}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 _n(e){const t=Ov.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 od(e){const t=uv(e);return tv(t)?Sr(t).body:qt(t)&&Lv(t)?t:od(t)}var Pv=/auto|scroll|overlay|hidden|clip/,Rv=new Set(["inline","contents"]);function Lv(e){const t=Ps(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return Pv.test(n+o+r)&&!Rv.has(a)}function Dv(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function f(h){if(h.key!=="Tab")return;let m=null;const[E,b]=kv(e,{includeContainer:!0,getShadowRoot:a}),T=Nv(c,{current:n,getShadowRoot:a}),_=!E&&!b;h.shiftKey&&Ko(T)?(o==null||o(),m=b):h.shiftKey&&(Ko(E)||_)?m=n:!h.shiftKey&&Ko(n)?(o==null||o(),m=E):!h.shiftKey&&(Ko(b)||_)&&(m=T),m&&(h.preventDefault(),typeof r=="function"?r(m):m.focus())}return ar(u,"keydown",f,!0)}function Mv(e,t){const c=t,{defer:n,triggerElement:r}=c,o=tn(c,["defer","triggerElement"]),a=n?_n:f=>f(),u=[];return u.push(a(()=>{const f=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(Dv(f,U({triggerElement:h},o)))})),()=>{u.forEach(f=>f==null?void 0:f())}}function Ju(e,t){if(!e)return jg;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 Fv(e,t,n){if(!e)return jg;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 Bv(e,t,n){const{signal:r}=t;return[new Promise((u,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),u(h))}).catch(h=>{r.aborted||(clearTimeout(f),c(h))})}),()=>t.abort()]}function Uv(e,t){const{timeout:n,rootNode:r}=t,o=Ps(r),a=Sr(r),u=new o.AbortController;return Bv(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(a.body,{childList:!0,subtree:!0})}),u,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(" "),zv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,e1=e=>{const t={};let n;for(;n=zv.exec(e);)t[n[1]]=n[2];return t},jv=(e,t)=>{if(Yu(e)){if(Yu(t))return`${e};${t}`;e=e1(e)}else Yu(t)&&(t=e1(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function ur(...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]=Qf(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=Hv(t[o],n[o]);continue}if(o==="style"){t[o]=jv(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 XF(e){return e}var Ls=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ls||{}),ad="__init__";function $v(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Sr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Rs(t()),a=u=>t().getElementById(u);return ye(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Ko,getById:a})}var ud={exports:{}},xn={},ld={exports:{}},cd={};var t1;function Vv(){return t1||(t1=1,function(e){function t(q,ne){var w=q.length;q.push(ne);e:for(;0<w;){var R=w-1>>>1,K=q[R];if(0<o(K,ne))q[R]=ne,q[w]=K,w=R;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var ne=q[0],w=q.pop();if(w!==ne){q[0]=w;e:for(var R=0,K=q.length,k=K>>>1;R<k;){var be=2*(R+1)-1,Re=q[be],Oe=be+1,Ye=q[Oe];if(0>o(Re,w))Oe<K&&0>o(Ye,Re)?(q[R]=Ye,q[Oe]=w,R=Oe):(q[R]=Re,q[be]=w,R=be);else if(Oe<K&&0>o(Ye,w))q[R]=Ye,q[Oe]=w,R=Oe;else break e}}return ne}function o(q,ne){var w=q.sortIndex-ne.sortIndex;return w!==0?w:q.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var f=[],h=[],m=1,E=null,b=3,T=!1,_=!1,x=!1,C=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(q){for(var ne=n(h);ne!==null;){if(ne.callback===null)r(h);else if(ne.startTime<=q)r(h),ne.sortIndex=ne.expirationTime,t(f,ne);else break;ne=n(h)}}function G(q){if(x=!1,D(q),!_)if(n(f)!==null)_=!0,Ce(W);else{var ne=n(h);ne!==null&&ue(G,ne.startTime-q)}}function W(q,ne){_=!1,x&&(x=!1,O(Te),Te=-1),T=!0;var w=b;try{for(D(ne),E=n(f);E!==null&&(!(E.expirationTime>ne)||q&&!ee());){var R=E.callback;if(typeof R=="function"){E.callback=null,b=E.priorityLevel;var K=R(E.expirationTime<=ne);ne=e.unstable_now(),typeof K=="function"?E.callback=K:E===n(f)&&r(f),D(ne)}else r(f);E=n(f)}if(E!==null)var k=!0;else{var be=n(h);be!==null&&ue(G,be.startTime-ne),k=!1}return k}finally{E=null,b=w,T=!1}}var B=!1,te=null,Te=-1,xe=5,H=-1;function ee(){return!(e.unstable_now()-H<xe)}function de(){if(te!==null){var q=e.unstable_now();H=q;var ne=!0;try{ne=te(!0,q)}finally{ne?fe():(B=!1,te=null)}}else B=!1}var fe;if(typeof F=="function")fe=function(){F(de)};else if(typeof MessageChannel!="undefined"){var ae=new MessageChannel,Ee=ae.port2;ae.port1.onmessage=de,fe=function(){Ee.postMessage(null)}}else fe=function(){C(de,0)};function Ce(q){te=q,B||(B=!0,fe())}function ue(q,ne){Te=C(function(){q(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_continueExecution=function(){_||T||(_=!0,Ce(W))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xe=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(q){switch(b){case 1:case 2:case 3:var ne=3;break;default:ne=b}var w=b;b=ne;try{return q()}finally{b=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,ne){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var w=b;b=q;try{return ne()}finally{b=w}},e.unstable_scheduleCallback=function(q,ne,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,q){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=w+K,q={id:m++,callback:ne,priorityLevel:q,startTime:w,expirationTime:K,sortIndex:-1},w>R?(q.sortIndex=w,t(h,q),n(f)===null&&q===n(h)&&(x?(O(Te),Te=-1):x=!0,ue(G,w-R))):(q.sortIndex=K,t(f,q),_||T||(_=!0,Ce(W))),q},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(q){var ne=b;return function(){var w=b;b=ne;try{return q.apply(this,arguments)}finally{b=w}}}}(cd)),cd}var n1;function qv(){return n1||(n1=1,ld.exports=Vv()),ld.exports}var r1;function Yv(){if(r1)return xn;r1=1;var e=bs(),t=qv();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),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 x(i,s,l,d,g,y,S){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=S}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){C[i]=new x(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 x(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){C[i]=new x(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){C[i]=new x(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 x(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){C[i]=new x(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){C[i]=new x(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){C[i]=new x(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){C[i]=new x(i,5,!1,i.toLowerCase(),null,!1,!1)});var O=/[\-:]([a-z])/g;function F(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(O,F);C[s]=new x(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(O,F);C[s]=new x(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(O,F);C[s]=new x(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){C[i]=new x(i,1,!1,i.toLowerCase(),null,!1,!1)}),C.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){C[i]=new x(i,1,!1,i.toLowerCase(),null,!0,!0)});function D(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 G=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),B=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),Te=Symbol.for("react.strict_mode"),xe=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),ee=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),Ee=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),q=Symbol.iterator;function ne(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var 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 be(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
9
  `),y=d.stack.split(`
10
- `),x=g.length-1,O=y.length-1;1<=x&&0<=O&&g[x]!==y[O];)O--;for(;1<=x&&0<=O;x--,O--)if(g[x]!==y[O]){if(x!==1||O!==1)do if(x--,O--,0>O||g[x]!==y[O]){var L=`
11
- `+g[x].replace(" at new "," at ");return i.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",i.displayName)),L}while(1<=x&&0<=O);break}}}finally{k=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?Q(i):""}function Be(i){switch(i.tag){case 5:return Q(i.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return i=xe(i.type,!1),i;case 11:return i=xe(i.type.render,!1),i;case 1:return i=xe(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 te:return"Fragment";case B:return"Portal";case he:return"Profiler";case be:return"StrictMode";case ce:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case le:return(i.displayName||"Context")+".Consumer";case H:return(i._context.displayName||"Context")+".Provider";case de:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case Te:return s=i.displayName||null,s!==null?s:Ie(i.type)||"Memo";case we:s=i._payload,i=i._init;try{return Ie(i(s))}catch(l){}}return null}function Ye(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 Ve(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Je(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function wt(i){var s=Je(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 Qn(i){i._valueTracker||(i._valueTracker=wt(i))}function ss(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),d="";return i&&(d=Je(i)?i.checked?"true":"false":i.value),i=d,i!==l?(s.setValue(i),!0):!1}function yi(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 Ti(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 bi(i,s){var l=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;l=Ve(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 _e(i,s){s=s.checked,s!=null&&D(i,"checked",s,!1)}function He(i,s){_e(i,s);var l=Ve(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")?dt(i,s.type,l):s.hasOwnProperty("defaultValue")&&dt(i,s.type,Ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function it(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 dt(i,s,l){(s!=="number"||yi(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var mt=Array.isArray;function kt(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=""+Ve(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 on(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return w({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function nt(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(mt(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ve(l)}}function Jr(i,s){var l=Ve(s.value),d=Ve(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 Fn(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 Re,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(Re=Re||document.createElement("div"),Re.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Re.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Ze(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Kt={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},Zr=["Webkit","ms","Moz","O"];Object.keys(Kt).forEach(function(i){Zr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Kt[s]=Kt[i]})});function Xn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Kt.hasOwnProperty(i)&&Kt[i]?(""+s).trim():s+"px"}function _i(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var d=l.indexOf("--")===0,g=Xn(l,s[l],d);l==="float"&&(l="cssFloat"),d?i.setProperty(l,g):i[l]=g}}var os=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 Qt(i,s){if(s){if(os[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Lr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bn=null;function qh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Yh=null,ao=null,uo=null;function Lb(i){if(i=Ja(i)){if(typeof Yh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=cc(s),Yh(i.stateNode,i.type,s))}}function Db(i){ao?uo?uo.push(i):uo=[i]:ao=i}function Mb(){if(ao){var i=ao,s=uo;if(uo=ao=null,Lb(i),s)for(i=0;i<s.length;i++)Lb(s[i])}}function Fb(i,s){return i(s)}function Bb(){}var Wh=!1;function Ub(i,s,l){if(Wh)return i(s,l);Wh=!0;try{return Fb(i,s,l)}finally{Wh=!1,(ao!==null||uo!==null)&&(Bb(),Mb())}}function Ia(i,s){var l=i.stateNode;if(l===null)return null;var d=cc(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 Gh=!1;if(c)try{var Pa={};Object.defineProperty(Pa,"passive",{get:function(){Gh=!0}}),window.addEventListener("test",Pa,Pa),window.removeEventListener("test",Pa,Pa)}catch(i){Gh=!1}function w8(i,s,l,d,g,y,x,O,L){var Y=Array.prototype.slice.call(arguments,3);try{s.apply(l,Y)}catch(ie){this.onError(ie)}}var Ra=!1,jl=null,$l=!1,Kh=null,C8={onError:function(i){Ra=!0,jl=i}};function A8(i,s,l,d,g,y,x,O,L){Ra=!1,jl=null,w8.apply(C8,arguments)}function v8(i,s,l,d,g,y,x,O,L){if(A8.apply(this,arguments),Ra){if(Ra){var Y=jl;Ra=!1,jl=null}else throw Error(n(198));$l||($l=!0,Kh=Y)}}function as(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 Hb(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 zb(i){if(as(i)!==i)throw Error(n(188))}function k8(i){var s=i.alternate;if(!s){if(s=as(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 zb(g),i;if(y===d)return zb(g),s;y=y.sibling}throw Error(n(188))}if(l.return!==d.return)l=g,d=y;else{for(var x=!1,O=g.child;O;){if(O===l){x=!0,l=g,d=y;break}if(O===d){x=!0,d=g,l=y;break}O=O.sibling}if(!x){for(O=y.child;O;){if(O===l){x=!0,l=y,d=g;break}if(O===d){x=!0,d=y,l=g;break}O=O.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 jb(i){return i=k8(i),i!==null?$b(i):null}function $b(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=$b(i);if(s!==null)return s;i=i.sibling}return null}var Vb=t.unstable_scheduleCallback,qb=t.unstable_cancelCallback,N8=t.unstable_shouldYield,O8=t.unstable_requestPaint,Rt=t.unstable_now,I8=t.unstable_getCurrentPriorityLevel,Qh=t.unstable_ImmediatePriority,Yb=t.unstable_UserBlockingPriority,Vl=t.unstable_NormalPriority,P8=t.unstable_LowPriority,Wb=t.unstable_IdlePriority,ql=null,Dr=null;function R8(i){if(Dr&&typeof Dr.onCommitFiberRoot=="function")try{Dr.onCommitFiberRoot(ql,i,void 0,(i.current.flags&128)===128)}catch(s){}}var pr=Math.clz32?Math.clz32:M8,L8=Math.log,D8=Math.LN2;function M8(i){return i>>>=0,i===0?32:31-(L8(i)/D8|0)|0}var Yl=64,Wl=4194304;function La(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 Gl(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 O=x&~g;O!==0?d=La(O):(y&=x,y!==0&&(d=La(y)))}else x=l&~g,x!==0?d=La(x):y!==0&&(d=La(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-pr(s),g=1<<l,d|=i[l],s&=~g;return d}function F8(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 B8(i,s){for(var l=i.suspendedLanes,d=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var x=31-pr(y),O=1<<x,L=g[x];L===-1?((O&l)===0||(O&d)!==0)&&(g[x]=F8(O,s)):L<=s&&(i.expiredLanes|=O),y&=~O}}function Xh(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Gb(){var i=Yl;return Yl<<=1,(Yl&4194240)===0&&(Yl=64),i}function Jh(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Da(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-pr(s),i[s]=l}function U8(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-pr(l),y=1<<g;s[g]=0,d[g]=-1,i[g]=-1,l&=~y}}function Zh(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var d=31-pr(l),g=1<<d;g&s|i[d]&s&&(i[d]|=s),l&=~g}}var at=0;function Kb(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Qb,ep,Xb,Jb,Zb,tp=!1,Kl=[],xi=null,Si=null,wi=null,Ma=new Map,Fa=new Map,Ci=[],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 e_(i,s){switch(i){case"focusin":case"focusout":xi=null;break;case"dragenter":case"dragleave":Si=null;break;case"mouseover":case"mouseout":wi=null;break;case"pointerover":case"pointerout":Ma.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fa.delete(s.pointerId)}}function Ba(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=Ja(s),s!==null&&ep(s)),i):(i.eventSystemFlags|=d,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function z8(i,s,l,d,g){switch(s){case"focusin":return xi=Ba(xi,i,s,l,d,g),!0;case"dragenter":return Si=Ba(Si,i,s,l,d,g),!0;case"mouseover":return wi=Ba(wi,i,s,l,d,g),!0;case"pointerover":var y=g.pointerId;return Ma.set(y,Ba(Ma.get(y)||null,i,s,l,d,g)),!0;case"gotpointercapture":return y=g.pointerId,Fa.set(y,Ba(Fa.get(y)||null,i,s,l,d,g)),!0}return!1}function t_(i){var s=us(i.target);if(s!==null){var l=as(s);if(l!==null){if(s=l.tag,s===13){if(s=Hb(l),s!==null){i.blockedOn=s,Zb(i.priority,function(){Xb(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 Ql(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=rp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var d=new l.constructor(l.type,l);Bn=d,l.target.dispatchEvent(d),Bn=null}else return s=Ja(l),s!==null&&ep(s),i.blockedOn=l,!1;s.shift()}return!0}function n_(i,s,l){Ql(i)&&l.delete(s)}function j8(){tp=!1,xi!==null&&Ql(xi)&&(xi=null),Si!==null&&Ql(Si)&&(Si=null),wi!==null&&Ql(wi)&&(wi=null),Ma.forEach(n_),Fa.forEach(n_)}function Ua(i,s){i.blockedOn===s&&(i.blockedOn=null,tp||(tp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,j8)))}function Ha(i){function s(g){return Ua(g,i)}if(0<Kl.length){Ua(Kl[0],i);for(var l=1;l<Kl.length;l++){var d=Kl[l];d.blockedOn===i&&(d.blockedOn=null)}}for(xi!==null&&Ua(xi,i),Si!==null&&Ua(Si,i),wi!==null&&Ua(wi,i),Ma.forEach(s),Fa.forEach(s),l=0;l<Ci.length;l++)d=Ci[l],d.blockedOn===i&&(d.blockedOn=null);for(;0<Ci.length&&(l=Ci[0],l.blockedOn===null);)t_(l),l.blockedOn===null&&Ci.shift()}var lo=G.ReactCurrentBatchConfig,Xl=!0;function $8(i,s,l,d){var g=at,y=lo.transition;lo.transition=null;try{at=1,np(i,s,l,d)}finally{at=g,lo.transition=y}}function V8(i,s,l,d){var g=at,y=lo.transition;lo.transition=null;try{at=4,np(i,s,l,d)}finally{at=g,lo.transition=y}}function np(i,s,l,d){if(Xl){var g=rp(i,s,l,d);if(g===null)bp(i,s,d,Jl,l),e_(i,d);else if(z8(g,i,s,l,d))d.stopPropagation();else if(e_(i,d),s&4&&-1<H8.indexOf(i)){for(;g!==null;){var y=Ja(g);if(y!==null&&Qb(y),y=rp(i,s,l,d),y===null&&bp(i,s,d,Jl,l),y===g)break;g=y}g!==null&&d.stopPropagation()}else bp(i,s,d,null,l)}}var Jl=null;function rp(i,s,l,d){if(Jl=null,i=qh(d),i=us(i),i!==null)if(s=as(i),s===null)i=null;else if(l=s.tag,l===13){if(i=Hb(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 Jl=i,null}function r_(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 Qh:return 1;case Yb:return 4;case Vl:case P8:return 16;case Wb:return 536870912;default:return 16}default:return 16}}var Ai=null,ip=null,Zl=null;function i_(){if(Zl)return Zl;var i,s=ip,l=s.length,d,g="value"in Ai?Ai.value:Ai.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 Zl=g.slice(i,1<d?1-d:void 0)}function ec(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 tc(){return!0}function s_(){return!1}function Un(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 O in i)i.hasOwnProperty(O)&&(l=i[O],this[O]=l?l(y):y[O]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?tc:s_,this.isPropagationStopped=s_,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=tc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=tc)},persist:function(){},isPersistent:tc}),s}var co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sp=Un(co),za=w({},co,{view:0,detail:0}),q8=Un(za),op,ap,ja,nc=w({},za,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lp,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!==ja&&(ja&&i.type==="mousemove"?(op=i.screenX-ja.screenX,ap=i.screenY-ja.screenY):ap=op=0,ja=i),op)},movementY:function(i){return"movementY"in i?i.movementY:ap}}),o_=Un(nc),Y8=w({},nc,{dataTransfer:0}),W8=Un(Y8),G8=w({},za,{relatedTarget:0}),up=Un(G8),K8=w({},co,{animationName:0,elapsedTime:0,pseudoElement:0}),Q8=Un(K8),X8=w({},co,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),J8=Un(X8),Z8=w({},co,{data:0}),a_=Un(Z8),eM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tM={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"},nM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=nM[i])?!!s[i]:!1}function lp(){return rM}var iM=w({},za,{key:function(i){if(i.key){var s=eM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=ec(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?tM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lp,charCode:function(i){return i.type==="keypress"?ec(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?ec(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),sM=Un(iM),oM=w({},nc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),u_=Un(oM),aM=w({},za,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lp}),uM=Un(aM),lM=w({},co,{propertyName:0,elapsedTime:0,pseudoElement:0}),cM=Un(lM),fM=w({},nc,{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}),dM=Un(fM),hM=[9,13,27,32],cp=c&&"CompositionEvent"in window,$a=null;c&&"documentMode"in document&&($a=document.documentMode);var pM=c&&"TextEvent"in window&&!$a,l_=c&&(!cp||$a&&8<$a&&11>=$a),c_=" ",f_=!1;function d_(i,s){switch(i){case"keyup":return hM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function h_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var fo=!1;function mM(i,s){switch(i){case"compositionend":return h_(s);case"keypress":return s.which!==32?null:(f_=!0,c_);case"textInput":return i=s.data,i===c_&&f_?null:i;default:return null}}function gM(i,s){if(fo)return i==="compositionend"||!cp&&d_(i,s)?(i=i_(),Zl=ip=Ai=null,fo=!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 l_&&s.locale!=="ko"?null:s.data;default:return null}}var EM={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 p_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!EM[i.type]:s==="textarea"}function m_(i,s,l,d){Db(d),s=ac(s,"onChange"),0<s.length&&(l=new sp("onChange","change",null,l,d),i.push({event:l,listeners:s}))}var Va=null,qa=null;function yM(i){R_(i,0)}function rc(i){var s=Eo(i);if(ss(s))return i}function TM(i,s){if(i==="change")return s}var g_=!1;if(c){var fp;if(c){var dp="oninput"in document;if(!dp){var E_=document.createElement("div");E_.setAttribute("oninput","return;"),dp=typeof E_.oninput=="function"}fp=dp}else fp=!1;g_=fp&&(!document.documentMode||9<document.documentMode)}function y_(){Va&&(Va.detachEvent("onpropertychange",T_),qa=Va=null)}function T_(i){if(i.propertyName==="value"&&rc(qa)){var s=[];m_(s,qa,i,qh(i)),Ub(yM,s)}}function bM(i,s,l){i==="focusin"?(y_(),Va=s,qa=l,Va.attachEvent("onpropertychange",T_)):i==="focusout"&&y_()}function _M(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return rc(qa)}function xM(i,s){if(i==="click")return rc(s)}function SM(i,s){if(i==="input"||i==="change")return rc(s)}function wM(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var mr=typeof Object.is=="function"?Object.is:wM;function Ya(i,s){if(mr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),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)||!mr(i[g],s[g]))return!1}return!0}function b_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function __(i,s){var l=b_(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=b_(l)}}function x_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?x_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function S_(){for(var i=window,s=yi();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=yi(i.document)}return s}function hp(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 CM(i){var s=S_(),l=i.focusedElem,d=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&x_(l.ownerDocument.documentElement,l)){if(d!==null&&hp(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,y);var x=__(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 AM=c&&"documentMode"in document&&11>=document.documentMode,ho=null,pp=null,Wa=null,mp=!1;function w_(i,s,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;mp||ho==null||ho!==yi(d)||(d=ho,"selectionStart"in d&&hp(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}),Wa&&Ya(Wa,d)||(Wa=d,d=ac(pp,"onSelect"),0<d.length&&(s=new sp("onSelect","select",null,s,l),i.push({event:s,listeners:d}),s.target=ho)))}function ic(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var po={animationend:ic("Animation","AnimationEnd"),animationiteration:ic("Animation","AnimationIteration"),animationstart:ic("Animation","AnimationStart"),transitionend:ic("Transition","TransitionEnd")},gp={},C_={};c&&(C_=document.createElement("div").style,"AnimationEvent"in window||(delete po.animationend.animation,delete po.animationiteration.animation,delete po.animationstart.animation),"TransitionEvent"in window||delete po.transitionend.transition);function sc(i){if(gp[i])return gp[i];if(!po[i])return i;var s=po[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in C_)return gp[i]=s[l];return i}var A_=sc("animationend"),v_=sc("animationiteration"),k_=sc("animationstart"),N_=sc("transitionend"),O_=new Map,I_="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 vi(i,s){O_.set(i,s),a(s,[i])}for(var Ep=0;Ep<I_.length;Ep++){var yp=I_[Ep],vM=yp.toLowerCase(),kM=yp[0].toUpperCase()+yp.slice(1);vi(vM,"on"+kM)}vi(A_,"onAnimationEnd"),vi(v_,"onAnimationIteration"),vi(k_,"onAnimationStart"),vi("dblclick","onDoubleClick"),vi("focusin","onFocus"),vi("focusout","onBlur"),vi(N_,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ga="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(Ga));function P_(i,s,l){var d=i.type||"unknown-event";i.currentTarget=l,v8(d,s,void 0,i),i.currentTarget=null}function R_(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 O=d[x],L=O.instance,Y=O.currentTarget;if(O=O.listener,L!==y&&g.isPropagationStopped())break e;P_(g,O,Y),y=L}else for(x=0;x<d.length;x++){if(O=d[x],L=O.instance,Y=O.currentTarget,O=O.listener,L!==y&&g.isPropagationStopped())break e;P_(g,O,Y),y=L}}}if($l)throw i=Kh,$l=!1,Kh=null,i}function gt(i,s){var l=s[Ap];l===void 0&&(l=s[Ap]=new Set);var d=i+"__bubble";l.has(d)||(L_(s,i,2,!1),l.add(d))}function Tp(i,s,l){var d=0;s&&(d|=4),L_(l,i,d,s)}var oc="_reactListening"+Math.random().toString(36).slice(2);function Ka(i){if(!i[oc]){i[oc]=!0,r.forEach(function(l){l!=="selectionchange"&&(NM.has(l)||Tp(l,!1,i),Tp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[oc]||(s[oc]=!0,Tp("selectionchange",!1,s))}}function L_(i,s,l,d){switch(r_(s)){case 1:var g=$8;break;case 4:g=V8;break;default:g=np}l=g.bind(null,s,l,i),g=void 0,!Gh||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 bp(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 O=d.stateNode.containerInfo;if(O===g||O.nodeType===8&&O.parentNode===g)break;if(x===4)for(x=d.return;x!==null;){var L=x.tag;if((L===3||L===4)&&(L=x.stateNode.containerInfo,L===g||L.nodeType===8&&L.parentNode===g))return;x=x.return}for(;O!==null;){if(x=us(O),x===null)return;if(L=x.tag,L===5||L===6){d=y=x;continue e}O=O.parentNode}}d=d.return}Ub(function(){var Y=y,ie=qh(l),ue=[];e:{var ne=O_.get(i);if(ne!==void 0){var Se=sp,Ae=i;switch(i){case"keypress":if(ec(l)===0)break e;case"keydown":case"keyup":Se=sM;break;case"focusin":Ae="focus",Se=up;break;case"focusout":Ae="blur",Se=up;break;case"beforeblur":case"afterblur":Se=up;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=o_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Se=W8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Se=uM;break;case A_:case v_:case k_:Se=Q8;break;case N_:Se=cM;break;case"scroll":Se=q8;break;case"wheel":Se=dM;break;case"copy":case"cut":case"paste":Se=J8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Se=u_}var ke=(s&4)!==0,Lt=!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=Ia(M,z),ge!=null&&ke.push(Qa(M,ge,V)))),Lt)break;M=M.return}0<ke.length&&(ne=new Se(ne,Ae,null,l,ie),ue.push({event:ne,listeners:ke}))}}if((s&7)===0){e:{if(ne=i==="mouseover"||i==="pointerover",Se=i==="mouseout"||i==="pointerout",ne&&l!==Bn&&(Ae=l.relatedTarget||l.fromElement)&&(us(Ae)||Ae[ei]))break e;if((Se||ne)&&(ne=ie.window===ie?ie:(ne=ie.ownerDocument)?ne.defaultView||ne.parentWindow:window,Se?(Ae=l.relatedTarget||l.toElement,Se=Y,Ae=Ae?us(Ae):null,Ae!==null&&(Lt=as(Ae),Ae!==Lt||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(Se=null,Ae=Y),Se!==Ae)){if(ke=o_,ge="onMouseLeave",z="onMouseEnter",M="mouse",(i==="pointerout"||i==="pointerover")&&(ke=u_,ge="onPointerLeave",z="onPointerEnter",M="pointer"),Lt=Se==null?ne:Eo(Se),V=Ae==null?ne:Eo(Ae),ne=new ke(ge,M+"leave",Se,l,ie),ne.target=Lt,ne.relatedTarget=V,ge=null,us(ie)===Y&&(ke=new ke(z,M+"enter",Ae,l,ie),ke.target=V,ke.relatedTarget=Lt,ge=ke),Lt=ge,Se&&Ae)t:{for(ke=Se,z=Ae,M=0,V=ke;V;V=mo(V))M++;for(V=0,ge=z;ge;ge=mo(ge))V++;for(;0<M-V;)ke=mo(ke),M--;for(;0<V-M;)z=mo(z),V--;for(;M--;){if(ke===z||z!==null&&ke===z.alternate)break t;ke=mo(ke),z=mo(z)}ke=null}else ke=null;Se!==null&&D_(ue,ne,Se,ke,!1),Ae!==null&&Lt!==null&&D_(ue,Lt,Ae,ke,!0)}}e:{if(ne=Y?Eo(Y):window,Se=ne.nodeName&&ne.nodeName.toLowerCase(),Se==="select"||Se==="input"&&ne.type==="file")var Ne=TM;else if(p_(ne))if(g_)Ne=SM;else{Ne=_M;var De=bM}else(Se=ne.nodeName)&&Se.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(Ne=xM);if(Ne&&(Ne=Ne(i,Y))){m_(ue,Ne,l,ie);break e}De&&De(i,ne,Y),i==="focusout"&&(De=ne._wrapperState)&&De.controlled&&ne.type==="number"&&dt(ne,"number",ne.value)}switch(De=Y?Eo(Y):window,i){case"focusin":(p_(De)||De.contentEditable==="true")&&(ho=De,pp=Y,Wa=null);break;case"focusout":Wa=pp=ho=null;break;case"mousedown":mp=!0;break;case"contextmenu":case"mouseup":case"dragend":mp=!1,w_(ue,l,ie);break;case"selectionchange":if(AM)break;case"keydown":case"keyup":w_(ue,l,ie)}var Me;if(cp)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 fo?d_(i,l)&&(ze="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&(l_&&l.locale!=="ko"&&(fo||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&fo&&(Me=i_()):(Ai=ie,ip="value"in Ai?Ai.value:Ai.textContent,fo=!0)),De=ac(Y,ze),0<De.length&&(ze=new a_(ze,i,null,l,ie),ue.push({event:ze,listeners:De}),Me?ze.data=Me:(Me=h_(l),Me!==null&&(ze.data=Me)))),(Me=pM?mM(i,l):gM(i,l))&&(Y=ac(Y,"onBeforeInput"),0<Y.length&&(ie=new a_("onBeforeInput","beforeinput",null,l,ie),ue.push({event:ie,listeners:Y}),ie.data=Me))}R_(ue,s)})}function Qa(i,s,l){return{instance:i,listener:s,currentTarget:l}}function ac(i,s){for(var l=s+"Capture",d=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=Ia(i,l),y!=null&&d.unshift(Qa(i,y,g)),y=Ia(i,s),y!=null&&d.push(Qa(i,y,g))),i=i.return}return d}function mo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function D_(i,s,l,d,g){for(var y=s._reactName,x=[];l!==null&&l!==d;){var O=l,L=O.alternate,Y=O.stateNode;if(L!==null&&L===d)break;O.tag===5&&Y!==null&&(O=Y,g?(L=Ia(l,y),L!=null&&x.unshift(Qa(l,L,O))):g||(L=Ia(l,y),L!=null&&x.push(Qa(l,L,O)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var OM=/\r\n?/g,IM=/\u0000|\uFFFD/g;function M_(i){return(typeof i=="string"?i:""+i).replace(OM,`
12
- `).replace(IM,"")}function uc(i,s,l){if(s=M_(s),M_(i)!==s&&l)throw Error(n(425))}function lc(){}var _p=null,xp=null;function Sp(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 wp=typeof setTimeout=="function"?setTimeout:void 0,PM=typeof clearTimeout=="function"?clearTimeout:void 0,F_=typeof Promise=="function"?Promise:void 0,RM=typeof queueMicrotask=="function"?queueMicrotask:typeof F_!="undefined"?function(i){return F_.resolve(null).then(i).catch(LM)}:wp;function LM(i){setTimeout(function(){throw i})}function Cp(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),Ha(s);return}d--}else l!=="$"&&l!=="$?"&&l!=="$!"||d++;l=g}while(l);Ha(s)}function ki(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 B_(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 go=Math.random().toString(36).slice(2),Mr="__reactFiber$"+go,Xa="__reactProps$"+go,ei="__reactContainer$"+go,Ap="__reactEvents$"+go,DM="__reactListeners$"+go,MM="__reactHandles$"+go;function us(i){var s=i[Mr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[ei]||l[Mr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=B_(i);i!==null;){if(l=i[Mr])return l;i=B_(i)}return s}i=l,l=i.parentNode}return null}function Ja(i){return i=i[Mr]||i[ei],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Eo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function cc(i){return i[Xa]||null}var vp=[],yo=-1;function Ni(i){return{current:i}}function Et(i){0>yo||(i.current=vp[yo],vp[yo]=null,yo--)}function ht(i,s){yo++,vp[yo]=i.current,i.current=s}var Oi={},an=Ni(Oi),An=Ni(!1),ls=Oi;function To(i,s){var l=i.type.contextTypes;if(!l)return Oi;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 vn(i){return i=i.childContextTypes,i!=null}function fc(){Et(An),Et(an)}function U_(i,s,l){if(an.current!==Oi)throw Error(n(168));ht(an,s),ht(An,l)}function H_(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,Ye(i)||"Unknown",g));return w({},l,d)}function dc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Oi,ls=an.current,ht(an,i),ht(An,An.current),!0}function z_(i,s,l){var d=i.stateNode;if(!d)throw Error(n(169));l?(i=H_(i,s,ls),d.__reactInternalMemoizedMergedChildContext=i,Et(An),Et(an),ht(an,i)):Et(An),ht(An,l)}var ti=null,hc=!1,kp=!1;function j_(i){ti===null?ti=[i]:ti.push(i)}function FM(i){hc=!0,j_(i)}function Ii(){if(!kp&&ti!==null){kp=!0;var i=0,s=at;try{var l=ti;for(at=1;i<l.length;i++){var d=l[i];do d=d(!0);while(d!==null)}ti=null,hc=!1}catch(g){throw ti!==null&&(ti=ti.slice(i+1)),Vb(Qh,Ii),g}finally{at=s,kp=!1}}return null}var bo=[],_o=0,pc=null,mc=0,Jn=[],Zn=0,cs=null,ni=1,ri="";function fs(i,s){bo[_o++]=mc,bo[_o++]=pc,pc=i,mc=s}function $_(i,s,l){Jn[Zn++]=ni,Jn[Zn++]=ri,Jn[Zn++]=cs,cs=i;var d=ni;i=ri;var g=32-pr(d)-1;d&=~(1<<g),l+=1;var y=32-pr(s)+g;if(30<y){var x=g-g%5;y=(d&(1<<x)-1).toString(32),d>>=x,g-=x,ni=1<<32-pr(s)+g|l<<g|d,ri=y+i}else ni=1<<y|l<<g|d,ri=i}function Np(i){i.return!==null&&(fs(i,1),$_(i,1,0))}function Op(i){for(;i===pc;)pc=bo[--_o],bo[_o]=null,mc=bo[--_o],bo[_o]=null;for(;i===cs;)cs=Jn[--Zn],Jn[Zn]=null,ri=Jn[--Zn],Jn[Zn]=null,ni=Jn[--Zn],Jn[Zn]=null}var Hn=null,zn=null,_t=!1,gr=null;function V_(i,s){var l=rr(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function q_(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,Hn=i,zn=ki(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Hn=i,zn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=cs!==null?{id:ni,overflow:ri}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=rr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Hn=i,zn=null,!0):!1;default:return!1}}function Ip(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Pp(i){if(_t){var s=zn;if(s){var l=s;if(!q_(i,s)){if(Ip(i))throw Error(n(418));s=ki(l.nextSibling);var d=Hn;s&&q_(i,s)?V_(d,l):(i.flags=i.flags&-4097|2,_t=!1,Hn=i)}}else{if(Ip(i))throw Error(n(418));i.flags=i.flags&-4097|2,_t=!1,Hn=i}}}function Y_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Hn=i}function gc(i){if(i!==Hn)return!1;if(!_t)return Y_(i),_t=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Sp(i.type,i.memoizedProps)),s&&(s=zn)){if(Ip(i))throw W_(),Error(n(418));for(;s;)V_(i,s),s=ki(s.nextSibling)}if(Y_(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){zn=ki(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}zn=null}}else zn=Hn?ki(i.stateNode.nextSibling):null;return!0}function W_(){for(var i=zn;i;)i=ki(i.nextSibling)}function xo(){zn=Hn=null,_t=!1}function Rp(i){gr===null?gr=[i]:gr.push(i)}var BM=G.ReactCurrentBatchConfig;function Za(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 O=g.refs;x===null?delete O[y]:O[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 Ec(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function G_(i){var s=i._init;return s(i._payload)}function K_(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=Ui(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 O(z,M,V,ge){return M===null||M.tag!==6?(M=wm(V,z.mode,ge),M.return=z,M):(M=g(M,V),M.return=z,M)}function L(z,M,V,ge){var Ne=V.type;return Ne===te?ie(z,M,V.props.children,ge,V.key):M!==null&&(M.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===we&&G_(Ne)===M.type)?(ge=g(M,V.props),ge.ref=Za(z,M,V),ge.return=z,ge):(ge=zc(V.type,V.key,V.props,null,z.mode,ge),ge.ref=Za(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=Cm(V,z.mode,ge),M.return=z,M):(M=g(M,V.children||[]),M.return=z,M)}function ie(z,M,V,ge,Ne){return M===null||M.tag!==7?(M=Ts(V,z.mode,ge,Ne),M.return=z,M):(M=g(M,V),M.return=z,M)}function ue(z,M,V){if(typeof M=="string"&&M!==""||typeof M=="number")return M=wm(""+M,z.mode,V),M.return=z,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case W:return V=zc(M.type,M.key,M.props,null,z.mode,V),V.ref=Za(z,null,M),V.return=z,V;case B:return M=Cm(M,z.mode,V),M.return=z,M;case we:var ge=M._init;return ue(z,ge(M._payload),V)}if(mt(M)||ee(M))return M=Ts(M,z.mode,V,null),M.return=z,M;Ec(z,M)}return null}function ne(z,M,V,ge){var Ne=M!==null?M.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Ne!==null?null:O(z,M,""+V,ge);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case W:return V.key===Ne?L(z,M,V,ge):null;case B:return V.key===Ne?Y(z,M,V,ge):null;case we:return Ne=V._init,ne(z,M,Ne(V._payload),ge)}if(mt(V)||ee(V))return Ne!==null?null:ie(z,M,V,ge,null);Ec(z,V)}return null}function Se(z,M,V,ge,Ne){if(typeof ge=="string"&&ge!==""||typeof ge=="number")return z=z.get(V)||null,O(M,z,""+ge,Ne);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case W:return z=z.get(ge.key===null?V:ge.key)||null,L(M,z,ge,Ne);case B:return z=z.get(ge.key===null?V:ge.key)||null,Y(M,z,ge,Ne);case we:var De=ge._init;return Se(z,M,V,De(ge._payload),Ne)}if(mt(ge)||ee(ge))return z=z.get(V)||null,ie(M,z,ge,Ne,null);Ec(M,ge)}return null}function Ae(z,M,V,ge){for(var Ne=null,De=null,Me=M,ze=M=0,Gt=null;Me!==null&&ze<V.length;ze++){Me.index>ze?(Gt=Me,Me=null):Gt=Me.sibling;var tt=ne(z,Me,V[ze],ge);if(tt===null){Me===null&&(Me=Gt);break}i&&Me&&tt.alternate===null&&s(z,Me),M=y(tt,M,ze),De===null?Ne=tt:De.sibling=tt,De=tt,Me=Gt}if(ze===V.length)return l(z,Me),_t&&fs(z,ze),Ne;if(Me===null){for(;ze<V.length;ze++)Me=ue(z,V[ze],ge),Me!==null&&(M=y(Me,M,ze),De===null?Ne=Me:De.sibling=Me,De=Me);return _t&&fs(z,ze),Ne}for(Me=d(z,Me);ze<V.length;ze++)Gt=Se(Me,z,ze,V[ze],ge),Gt!==null&&(i&&Gt.alternate!==null&&Me.delete(Gt.key===null?ze:Gt.key),M=y(Gt,M,ze),De===null?Ne=Gt:De.sibling=Gt,De=Gt);return i&&Me.forEach(function(Hi){return s(z,Hi)}),_t&&fs(z,ze),Ne}function ke(z,M,V,ge){var Ne=ee(V);if(typeof Ne!="function")throw Error(n(150));if(V=Ne.call(V),V==null)throw Error(n(151));for(var De=Ne=null,Me=M,ze=M=0,Gt=null,tt=V.next();Me!==null&&!tt.done;ze++,tt=V.next()){Me.index>ze?(Gt=Me,Me=null):Gt=Me.sibling;var Hi=ne(z,Me,tt.value,ge);if(Hi===null){Me===null&&(Me=Gt);break}i&&Me&&Hi.alternate===null&&s(z,Me),M=y(Hi,M,ze),De===null?Ne=Hi:De.sibling=Hi,De=Hi,Me=Gt}if(tt.done)return l(z,Me),_t&&fs(z,ze),Ne;if(Me===null){for(;!tt.done;ze++,tt=V.next())tt=ue(z,tt.value,ge),tt!==null&&(M=y(tt,M,ze),De===null?Ne=tt:De.sibling=tt,De=tt);return _t&&fs(z,ze),Ne}for(Me=d(z,Me);!tt.done;ze++,tt=V.next())tt=Se(Me,z,ze,tt.value,ge),tt!==null&&(i&&tt.alternate!==null&&Me.delete(tt.key===null?ze:tt.key),M=y(tt,M,ze),De===null?Ne=tt:De.sibling=tt,De=tt);return i&&Me.forEach(function(EF){return s(z,EF)}),_t&&fs(z,ze),Ne}function Lt(z,M,V,ge){if(typeof V=="object"&&V!==null&&V.type===te&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case W:e:{for(var Ne=V.key,De=M;De!==null;){if(De.key===Ne){if(Ne=V.type,Ne===te){if(De.tag===7){l(z,De.sibling),M=g(De,V.props.children),M.return=z,z=M;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===we&&G_(Ne)===De.type){l(z,De.sibling),M=g(De,V.props),M.ref=Za(z,De,V),M.return=z,z=M;break e}l(z,De);break}else s(z,De);De=De.sibling}V.type===te?(M=Ts(V.props.children,z.mode,ge,V.key),M.return=z,z=M):(ge=zc(V.type,V.key,V.props,null,z.mode,ge),ge.ref=Za(z,M,V),ge.return=z,z=ge)}return x(z);case B:e:{for(De=V.key;M!==null;){if(M.key===De)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=Cm(V,z.mode,ge),M.return=z,z=M}return x(z);case we:return De=V._init,Lt(z,M,De(V._payload),ge)}if(mt(V))return Ae(z,M,V,ge);if(ee(V))return ke(z,M,V,ge);Ec(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=wm(V,z.mode,ge),M.return=z,z=M),x(z)):l(z,M)}return Lt}var So=K_(!0),Q_=K_(!1),yc=Ni(null),Tc=null,wo=null,Lp=null;function Dp(){Lp=wo=Tc=null}function Mp(i){var s=yc.current;Et(yc),i._currentValue=s}function Fp(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 Co(i,s){Tc=i,Lp=wo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(kn=!0),i.firstContext=null)}function er(i){var s=i._currentValue;if(Lp!==i)if(i={context:i,memoizedValue:s,next:null},wo===null){if(Tc===null)throw Error(n(308));wo=i,Tc.dependencies={lanes:0,firstContext:i}}else wo=wo.next=i;return s}var ds=null;function Bp(i){ds===null?ds=[i]:ds.push(i)}function X_(i,s,l,d){var g=s.interleaved;return g===null?(l.next=l,Bp(s)):(l.next=g.next,g.next=l),s.interleaved=l,ii(i,d)}function ii(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 Pi=!1;function Up(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function J_(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function si(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Ri(i,s,l){var d=i.updateQueue;if(d===null)return null;if(d=d.shared,(et&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,ii(i,l)}return g=d.interleaved,g===null?(s.next=s,Bp(d)):(s.next=g.next,g.next=s),d.interleaved=s,ii(i,l)}function bc(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,Zh(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 _c(i,s,l,d){var g=i.updateQueue;Pi=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,O=g.shared.pending;if(O!==null){g.shared.pending=null;var L=O,Y=L.next;L.next=null,x===null?y=Y:x.next=Y,x=L;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,O=ie.lastBaseUpdate,O!==x&&(O===null?ie.firstBaseUpdate=Y:O.next=Y,ie.lastBaseUpdate=L))}if(y!==null){var ue=g.baseState;x=0,ie=Y=L=null,O=y;do{var ne=O.lane,Se=O.eventTime;if((d&ne)===ne){ie!==null&&(ie=ie.next={eventTime:Se,lane:0,tag:O.tag,payload:O.payload,callback:O.callback,next:null});e:{var Ae=i,ke=O;switch(ne=s,Se=l,ke.tag){case 1:if(Ae=ke.payload,typeof Ae=="function"){ue=Ae.call(Se,ue,ne);break e}ue=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ke.payload,ne=typeof Ae=="function"?Ae.call(Se,ue,ne):Ae,ne==null)break e;ue=w({},ue,ne);break e;case 2:Pi=!0}}O.callback!==null&&O.lane!==0&&(i.flags|=64,ne=g.effects,ne===null?g.effects=[O]:ne.push(O))}else Se={eventTime:Se,lane:ne,tag:O.tag,payload:O.payload,callback:O.callback,next:null},ie===null?(Y=ie=Se,L=ue):ie=ie.next=Se,x|=ne;if(O=O.next,O===null){if(O=g.shared.pending,O===null)break;ne=O,O=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);if(ie===null&&(L=ue),g.baseState=L,g.firstBaseUpdate=Y,g.lastBaseUpdate=ie,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);ms|=x,i.lanes=x,i.memoizedState=ue}}function ex(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 eu={},Fr=Ni(eu),tu=Ni(eu),nu=Ni(eu);function hs(i){if(i===eu)throw Error(n(174));return i}function Hp(i,s){switch(ht(nu,s),ht(tu,i),ht(Fr,eu),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)}Et(Fr),ht(Fr,s)}function Ao(){Et(Fr),Et(tu),Et(nu)}function tx(i){hs(nu.current);var s=hs(Fr.current),l=Ee(s,i.type);s!==l&&(ht(tu,i),ht(Fr,l))}function zp(i){tu.current===i&&(Et(Fr),Et(tu))}var Ct=Ni(0);function xc(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 jp=[];function $p(){for(var i=0;i<jp.length;i++)jp[i]._workInProgressVersionPrimary=null;jp.length=0}var Sc=G.ReactCurrentDispatcher,Vp=G.ReactCurrentBatchConfig,ps=0,At=null,Ut=null,Yt=null,wc=!1,ru=!1,iu=0,UM=0;function un(){throw Error(n(321))}function qp(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!mr(i[l],s[l]))return!1;return!0}function Yp(i,s,l,d,g,y){if(ps=y,At=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Sc.current=i===null||i.memoizedState===null?$M:VM,i=l(d,g),ru){y=0;do{if(ru=!1,iu=0,25<=y)throw Error(n(301));y+=1,Yt=Ut=null,s.updateQueue=null,Sc.current=qM,i=l(d,g)}while(ru)}if(Sc.current=vc,s=Ut!==null&&Ut.next!==null,ps=0,Yt=Ut=At=null,wc=!1,s)throw Error(n(300));return i}function Wp(){var i=iu!==0;return iu=0,i}function Br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yt===null?At.memoizedState=Yt=i:Yt=Yt.next=i,Yt}function tr(){if(Ut===null){var i=At.alternate;i=i!==null?i.memoizedState:null}else i=Ut.next;var s=Yt===null?At.memoizedState:Yt.next;if(s!==null)Yt=s,Ut=i;else{if(i===null)throw Error(n(310));Ut=i,i={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},Yt===null?At.memoizedState=Yt=i:Yt=Yt.next=i}return Yt}function su(i,s){return typeof s=="function"?s(i):s}function Gp(i){var s=tr(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var d=Ut,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 O=x=null,L=null,Y=y;do{var ie=Y.lane;if((ps&ie)===ie)L!==null&&(L=L.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 ue={lane:ie,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};L===null?(O=L=ue,x=d):L=L.next=ue,At.lanes|=ie,ms|=ie}Y=Y.next}while(Y!==null&&Y!==y);L===null?x=d:L.next=O,mr(d,s.memoizedState)||(kn=!0),s.memoizedState=d,s.baseState=x,s.baseQueue=L,l.lastRenderedState=d}if(i=l.interleaved,i!==null){g=i;do y=g.lane,At.lanes|=y,ms|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Kp(i){var s=tr(),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);mr(y,s.memoizedState)||(kn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,d]}function nx(){}function rx(i,s){var l=At,d=tr(),g=s(),y=!mr(d.memoizedState,g);if(y&&(d.memoizedState=g,kn=!0),d=d.queue,Qp(ox.bind(null,l,d,i),[i]),d.getSnapshot!==s||y||Yt!==null&&Yt.memoizedState.tag&1){if(l.flags|=2048,ou(9,sx.bind(null,l,d,g,s),void 0,null),Wt===null)throw Error(n(349));(ps&30)!==0||ix(l,s,g)}return g}function ix(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=At.updateQueue,s===null?(s={lastEffect:null,stores:null},At.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function sx(i,s,l,d){s.value=l,s.getSnapshot=d,ax(s)&&ux(i)}function ox(i,s,l){return l(function(){ax(s)&&ux(i)})}function ax(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!mr(i,l)}catch(d){return!0}}function ux(i){var s=ii(i,1);s!==null&&br(s,i,1,-1)}function lx(i){var s=Br();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:su,lastRenderedState:i},s.queue=i,i=i.dispatch=jM.bind(null,At,i),[s.memoizedState,i]}function ou(i,s,l,d){return i={tag:i,create:s,destroy:l,deps:d,next:null},s=At.updateQueue,s===null?(s={lastEffect:null,stores:null},At.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 cx(){return tr().memoizedState}function Cc(i,s,l,d){var g=Br();At.flags|=i,g.memoizedState=ou(1|s,l,void 0,d===void 0?null:d)}function Ac(i,s,l,d){var g=tr();d=d===void 0?null:d;var y=void 0;if(Ut!==null){var x=Ut.memoizedState;if(y=x.destroy,d!==null&&qp(d,x.deps)){g.memoizedState=ou(s,l,y,d);return}}At.flags|=i,g.memoizedState=ou(1|s,l,y,d)}function fx(i,s){return Cc(8390656,8,i,s)}function Qp(i,s){return Ac(2048,8,i,s)}function dx(i,s){return Ac(4,2,i,s)}function hx(i,s){return Ac(4,4,i,s)}function px(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function mx(i,s,l){return l=l!=null?l.concat([i]):null,Ac(4,4,px.bind(null,s,i),l)}function Xp(){}function gx(i,s){var l=tr();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&qp(s,d[1])?d[0]:(l.memoizedState=[i,s],i)}function Ex(i,s){var l=tr();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&qp(s,d[1])?d[0]:(i=i(),l.memoizedState=[i,s],i)}function yx(i,s,l){return(ps&21)===0?(i.baseState&&(i.baseState=!1,kn=!0),i.memoizedState=l):(mr(l,s)||(l=Gb(),At.lanes|=l,ms|=l,i.baseState=!0),s)}function HM(i,s){var l=at;at=l!==0&&4>l?l:4,i(!0);var d=Vp.transition;Vp.transition={};try{i(!1),s()}finally{at=l,Vp.transition=d}}function Tx(){return tr().memoizedState}function zM(i,s,l){var d=Fi(i);if(l={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null},bx(i))_x(s,l);else if(l=X_(i,s,l,d),l!==null){var g=mn();br(l,i,d,g),xx(l,s,d)}}function jM(i,s,l){var d=Fi(i),g={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null};if(bx(i))_x(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,O=y(x,l);if(g.hasEagerState=!0,g.eagerState=O,mr(O,x)){var L=s.interleaved;L===null?(g.next=g,Bp(s)):(g.next=L.next,L.next=g),s.interleaved=g;return}}catch(Y){}finally{}l=X_(i,s,g,d),l!==null&&(g=mn(),br(l,i,d,g),xx(l,s,d))}}function bx(i){var s=i.alternate;return i===At||s!==null&&s===At}function _x(i,s){ru=wc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function xx(i,s,l){if((l&4194240)!==0){var d=s.lanes;d&=i.pendingLanes,l|=d,s.lanes=l,Zh(i,l)}}var vc={readContext:er,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useInsertionEffect:un,useLayoutEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useMutableSource:un,useSyncExternalStore:un,useId:un,unstable_isNewReconciler:!1},$M={readContext:er,useCallback:function(i,s){return Br().memoizedState=[i,s===void 0?null:s],i},useContext:er,useEffect:fx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Cc(4194308,4,px.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Cc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Cc(4,2,i,s)},useMemo:function(i,s){var l=Br();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var d=Br();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=zM.bind(null,At,i),[d.memoizedState,i]},useRef:function(i){var s=Br();return i={current:i},s.memoizedState=i},useState:lx,useDebugValue:Xp,useDeferredValue:function(i){return Br().memoizedState=i},useTransition:function(){var i=lx(!1),s=i[0];return i=HM.bind(null,i[1]),Br().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var d=At,g=Br();if(_t){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Wt===null)throw Error(n(349));(ps&30)!==0||ix(d,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,fx(ox.bind(null,d,y,i),[i]),d.flags|=2048,ou(9,sx.bind(null,d,y,l,s),void 0,null),l},useId:function(){var i=Br(),s=Wt.identifierPrefix;if(_t){var l=ri,d=ni;l=(d&~(1<<32-pr(d)-1)).toString(32)+l,s=":"+s+"R"+l,l=iu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=UM++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},VM={readContext:er,useCallback:gx,useContext:er,useEffect:Qp,useImperativeHandle:mx,useInsertionEffect:dx,useLayoutEffect:hx,useMemo:Ex,useReducer:Gp,useRef:cx,useState:function(){return Gp(su)},useDebugValue:Xp,useDeferredValue:function(i){var s=tr();return yx(s,Ut.memoizedState,i)},useTransition:function(){var i=Gp(su)[0],s=tr().memoizedState;return[i,s]},useMutableSource:nx,useSyncExternalStore:rx,useId:Tx,unstable_isNewReconciler:!1},qM={readContext:er,useCallback:gx,useContext:er,useEffect:Qp,useImperativeHandle:mx,useInsertionEffect:dx,useLayoutEffect:hx,useMemo:Ex,useReducer:Kp,useRef:cx,useState:function(){return Kp(su)},useDebugValue:Xp,useDeferredValue:function(i){var s=tr();return Ut===null?s.memoizedState=i:yx(s,Ut.memoizedState,i)},useTransition:function(){var i=Kp(su)[0],s=tr().memoizedState;return[i,s]},useMutableSource:nx,useSyncExternalStore:rx,useId:Tx,unstable_isNewReconciler:!1};function Er(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 Jp(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 kc={isMounted:function(i){return(i=i._reactInternals)?as(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var d=mn(),g=Fi(i),y=si(d,g);y.payload=s,l!=null&&(y.callback=l),s=Ri(i,y,g),s!==null&&(br(s,i,g,d),bc(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var d=mn(),g=Fi(i),y=si(d,g);y.tag=1,y.payload=s,l!=null&&(y.callback=l),s=Ri(i,y,g),s!==null&&(br(s,i,g,d),bc(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=mn(),d=Fi(i),g=si(l,d);g.tag=2,s!=null&&(g.callback=s),s=Ri(i,g,d),s!==null&&(br(s,i,d,l),bc(s,i,d))}};function Sx(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?!Ya(l,d)||!Ya(g,y):!0}function wx(i,s,l){var d=!1,g=Oi,y=s.contextType;return typeof y=="object"&&y!==null?y=er(y):(g=vn(s)?ls:an.current,d=s.contextTypes,y=(d=d!=null)?To(i,g):Oi),s=new s(l,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=kc,i.stateNode=s,s._reactInternals=i,d&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function Cx(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&&kc.enqueueReplaceState(s,s.state,null)}function Zp(i,s,l,d){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},Up(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=er(y):(y=vn(s)?ls:an.current,g.context=To(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Jp(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&&kc.enqueueReplaceState(g,g.state,null),_c(i,l,g,d),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function vo(i,s){try{var l="",d=s;do l+=Be(d),d=d.return;while(d);var g=l}catch(y){g=`
10
+ `),S=g.length-1,I=y.length-1;1<=S&&0<=I&&g[S]!==y[I];)I--;for(;1<=S&&0<=I;S--,I--)if(g[S]!==y[I]){if(S!==1||I!==1)do if(S--,I--,0>I||g[S]!==y[I]){var L=`
11
+ `+g[S].replace(" at new "," at ");return i.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",i.displayName)),L}while(1<=S&&0<=I);break}}}finally{k=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?K(i):""}function Re(i){switch(i.tag){case 5:return K(i.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return i=be(i.type,!1),i;case 11:return i=be(i.type.render,!1),i;case 1:return i=be(i.type,!0),i;default:return""}}function Oe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case te:return"Fragment";case B:return"Portal";case xe:return"Profiler";case Te:return"StrictMode";case fe:return"Suspense";case ae:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ee:return(i.displayName||"Context")+".Consumer";case H:return(i._context.displayName||"Context")+".Provider";case de:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case Ee:return s=i.displayName||null,s!==null?s:Oe(i.type)||"Memo";case Ce:s=i._payload,i=i._init;try{return Oe(i(s))}catch(l){}}return null}function Ye(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Oe(s);case 8:return s===Te?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ve(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Je(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function At(i){var s=Je(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(S){d=""+S,y.call(this,S)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return d},setValue:function(S){d=""+S},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Kn(i){i._valueTracker||(i._valueTracker=At(i))}function is(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),d="";return i&&(d=Je(i)?i.checked?"true":"false":i.value),i=d,i!==l?(s.setValue(i),!0):!1}function Xr(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 yi(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 ss(i,s){var l=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;l=Ve(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 Ti(i,s){s=s.checked,s!=null&&D(i,"checked",s,!1)}function Jr(i,s){Ti(i,s);var l=Ve(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")?je(i,s.type,l):s.hasOwnProperty("defaultValue")&&je(i,s.type,Ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Se(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 je(i,s,l){(s!=="number"||Xr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var nt=Array.isArray;function ot(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=""+Ve(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 dt(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return w({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function It(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(nt(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ve(l)}}function Pt(i,s){var l=Ve(s.value),d=Ve(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 Rt(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function J(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ge(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?J(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var De,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(De=De||document.createElement("div"),De.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=De.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Ze(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Xt={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},Zr=["Webkit","ms","Moz","O"];Object.keys(Xt).forEach(function(i){Zr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Xt[s]=Xt[i]})});function Qn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Xt.hasOwnProperty(i)&&Xt[i]?(""+s).trim():s+"px"}function bi(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var d=l.indexOf("--")===0,g=Qn(l,s[l],d);l==="float"&&(l="cssFloat"),d?i.setProperty(l,g):i[l]=g}}var os=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 Jt(i,s){if(s){if(os[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 Rr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Fn=null;function Gh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Kh=null,ao=null,uo=null;function Lb(i){if(i=Za(i)){if(typeof Kh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=fc(s),Kh(i.stateNode,i.type,s))}}function Db(i){ao?uo?uo.push(i):uo=[i]:ao=i}function Mb(){if(ao){var i=ao,s=uo;if(uo=ao=null,Lb(i),s)for(i=0;i<s.length;i++)Lb(s[i])}}function Fb(i,s){return i(s)}function Bb(){}var Qh=!1;function Ub(i,s,l){if(Qh)return i(s,l);Qh=!0;try{return Fb(i,s,l)}finally{Qh=!1,(ao!==null||uo!==null)&&(Bb(),Mb())}}function Pa(i,s){var l=i.stateNode;if(l===null)return null;var d=fc(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 Xh=!1;if(c)try{var Ra={};Object.defineProperty(Ra,"passive",{get:function(){Xh=!0}}),window.addEventListener("test",Ra,Ra),window.removeEventListener("test",Ra,Ra)}catch(i){Xh=!1}function A8(i,s,l,d,g,y,S,I,L){var Y=Array.prototype.slice.call(arguments,3);try{s.apply(l,Y)}catch(oe){this.onError(oe)}}var La=!1,$l=null,Vl=!1,Jh=null,v8={onError:function(i){La=!0,$l=i}};function k8(i,s,l,d,g,y,S,I,L){La=!1,$l=null,A8.apply(v8,arguments)}function N8(i,s,l,d,g,y,S,I,L){if(k8.apply(this,arguments),La){if(La){var Y=$l;La=!1,$l=null}else throw Error(n(198));Vl||(Vl=!0,Jh=Y)}}function as(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 Hb(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 zb(i){if(as(i)!==i)throw Error(n(188))}function O8(i){var s=i.alternate;if(!s){if(s=as(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 zb(g),i;if(y===d)return zb(g),s;y=y.sibling}throw Error(n(188))}if(l.return!==d.return)l=g,d=y;else{for(var S=!1,I=g.child;I;){if(I===l){S=!0,l=g,d=y;break}if(I===d){S=!0,d=g,l=y;break}I=I.sibling}if(!S){for(I=y.child;I;){if(I===l){S=!0,l=y,d=g;break}if(I===d){S=!0,d=y,l=g;break}I=I.sibling}if(!S)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 jb(i){return i=O8(i),i!==null?$b(i):null}function $b(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=$b(i);if(s!==null)return s;i=i.sibling}return null}var Vb=t.unstable_scheduleCallback,qb=t.unstable_cancelCallback,I8=t.unstable_shouldYield,P8=t.unstable_requestPaint,Lt=t.unstable_now,R8=t.unstable_getCurrentPriorityLevel,Zh=t.unstable_ImmediatePriority,Yb=t.unstable_UserBlockingPriority,ql=t.unstable_NormalPriority,L8=t.unstable_LowPriority,Wb=t.unstable_IdlePriority,Yl=null,Lr=null;function D8(i){if(Lr&&typeof Lr.onCommitFiberRoot=="function")try{Lr.onCommitFiberRoot(Yl,i,void 0,(i.current.flags&128)===128)}catch(s){}}var hr=Math.clz32?Math.clz32:B8,M8=Math.log,F8=Math.LN2;function B8(i){return i>>>=0,i===0?32:31-(M8(i)/F8|0)|0}var Wl=64,Gl=4194304;function Da(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 Kl(i,s){var l=i.pendingLanes;if(l===0)return 0;var d=0,g=i.suspendedLanes,y=i.pingedLanes,S=l&268435455;if(S!==0){var I=S&~g;I!==0?d=Da(I):(y&=S,y!==0&&(d=Da(y)))}else S=l&~g,S!==0?d=Da(S):y!==0&&(d=Da(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-hr(s),g=1<<l,d|=i[l],s&=~g;return d}function U8(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 H8(i,s){for(var l=i.suspendedLanes,d=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var S=31-hr(y),I=1<<S,L=g[S];L===-1?((I&l)===0||(I&d)!==0)&&(g[S]=U8(I,s)):L<=s&&(i.expiredLanes|=I),y&=~I}}function ep(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Gb(){var i=Wl;return Wl<<=1,(Wl&4194240)===0&&(Wl=64),i}function tp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Ma(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-hr(s),i[s]=l}function z8(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-hr(l),y=1<<g;s[g]=0,d[g]=-1,i[g]=-1,l&=~y}}function np(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var d=31-hr(l),g=1<<d;g&s|i[d]&s&&(i[d]|=s),l&=~g}}var at=0;function Kb(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Qb,rp,Xb,Jb,Zb,ip=!1,Ql=[],_i=null,xi=null,Si=null,Fa=new Map,Ba=new Map,wi=[],j8="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 e_(i,s){switch(i){case"focusin":case"focusout":_i=null;break;case"dragenter":case"dragleave":xi=null;break;case"mouseover":case"mouseout":Si=null;break;case"pointerover":case"pointerout":Fa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ba.delete(s.pointerId)}}function Ua(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=Za(s),s!==null&&rp(s)),i):(i.eventSystemFlags|=d,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function $8(i,s,l,d,g){switch(s){case"focusin":return _i=Ua(_i,i,s,l,d,g),!0;case"dragenter":return xi=Ua(xi,i,s,l,d,g),!0;case"mouseover":return Si=Ua(Si,i,s,l,d,g),!0;case"pointerover":var y=g.pointerId;return Fa.set(y,Ua(Fa.get(y)||null,i,s,l,d,g)),!0;case"gotpointercapture":return y=g.pointerId,Ba.set(y,Ua(Ba.get(y)||null,i,s,l,d,g)),!0}return!1}function t_(i){var s=us(i.target);if(s!==null){var l=as(s);if(l!==null){if(s=l.tag,s===13){if(s=Hb(l),s!==null){i.blockedOn=s,Zb(i.priority,function(){Xb(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 Xl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=op(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var d=new l.constructor(l.type,l);Fn=d,l.target.dispatchEvent(d),Fn=null}else return s=Za(l),s!==null&&rp(s),i.blockedOn=l,!1;s.shift()}return!0}function n_(i,s,l){Xl(i)&&l.delete(s)}function V8(){ip=!1,_i!==null&&Xl(_i)&&(_i=null),xi!==null&&Xl(xi)&&(xi=null),Si!==null&&Xl(Si)&&(Si=null),Fa.forEach(n_),Ba.forEach(n_)}function Ha(i,s){i.blockedOn===s&&(i.blockedOn=null,ip||(ip=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,V8)))}function za(i){function s(g){return Ha(g,i)}if(0<Ql.length){Ha(Ql[0],i);for(var l=1;l<Ql.length;l++){var d=Ql[l];d.blockedOn===i&&(d.blockedOn=null)}}for(_i!==null&&Ha(_i,i),xi!==null&&Ha(xi,i),Si!==null&&Ha(Si,i),Fa.forEach(s),Ba.forEach(s),l=0;l<wi.length;l++)d=wi[l],d.blockedOn===i&&(d.blockedOn=null);for(;0<wi.length&&(l=wi[0],l.blockedOn===null);)t_(l),l.blockedOn===null&&wi.shift()}var lo=G.ReactCurrentBatchConfig,Jl=!0;function q8(i,s,l,d){var g=at,y=lo.transition;lo.transition=null;try{at=1,sp(i,s,l,d)}finally{at=g,lo.transition=y}}function Y8(i,s,l,d){var g=at,y=lo.transition;lo.transition=null;try{at=4,sp(i,s,l,d)}finally{at=g,lo.transition=y}}function sp(i,s,l,d){if(Jl){var g=op(i,s,l,d);if(g===null)Sp(i,s,d,Zl,l),e_(i,d);else if($8(g,i,s,l,d))d.stopPropagation();else if(e_(i,d),s&4&&-1<j8.indexOf(i)){for(;g!==null;){var y=Za(g);if(y!==null&&Qb(y),y=op(i,s,l,d),y===null&&Sp(i,s,d,Zl,l),y===g)break;g=y}g!==null&&d.stopPropagation()}else Sp(i,s,d,null,l)}}var Zl=null;function op(i,s,l,d){if(Zl=null,i=Gh(d),i=us(i),i!==null)if(s=as(i),s===null)i=null;else if(l=s.tag,l===13){if(i=Hb(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 Zl=i,null}function r_(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(R8()){case Zh:return 1;case Yb:return 4;case ql:case L8:return 16;case Wb:return 536870912;default:return 16}default:return 16}}var Ci=null,ap=null,ec=null;function i_(){if(ec)return ec;var i,s=ap,l=s.length,d,g="value"in Ci?Ci.value:Ci.textContent,y=g.length;for(i=0;i<l&&s[i]===g[i];i++);var S=l-i;for(d=1;d<=S&&s[l-d]===g[y-d];d++);return ec=g.slice(i,1<d?1-d:void 0)}function tc(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 nc(){return!0}function s_(){return!1}function Bn(i){function s(l,d,g,y,S){this._reactName=l,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=S,this.currentTarget=null;for(var I in i)i.hasOwnProperty(I)&&(l=i[I],this[I]=l?l(y):y[I]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?nc:s_,this.isPropagationStopped=s_,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=nc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=nc)},persist:function(){},isPersistent:nc}),s}var co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},up=Bn(co),ja=w({},co,{view:0,detail:0}),W8=Bn(ja),lp,cp,$a,rc=w({},ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dp,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!==$a&&($a&&i.type==="mousemove"?(lp=i.screenX-$a.screenX,cp=i.screenY-$a.screenY):cp=lp=0,$a=i),lp)},movementY:function(i){return"movementY"in i?i.movementY:cp}}),o_=Bn(rc),G8=w({},rc,{dataTransfer:0}),K8=Bn(G8),Q8=w({},ja,{relatedTarget:0}),fp=Bn(Q8),X8=w({},co,{animationName:0,elapsedTime:0,pseudoElement:0}),J8=Bn(X8),Z8=w({},co,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),eM=Bn(Z8),tM=w({},co,{data:0}),a_=Bn(tM),nM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rM={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"},iM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=iM[i])?!!s[i]:!1}function dp(){return sM}var oM=w({},ja,{key:function(i){if(i.key){var s=nM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=tc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?rM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dp,charCode:function(i){return i.type==="keypress"?tc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?tc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),aM=Bn(oM),uM=w({},rc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),u_=Bn(uM),lM=w({},ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dp}),cM=Bn(lM),fM=w({},co,{propertyName:0,elapsedTime:0,pseudoElement:0}),dM=Bn(fM),hM=w({},rc,{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}),pM=Bn(hM),mM=[9,13,27,32],hp=c&&"CompositionEvent"in window,Va=null;c&&"documentMode"in document&&(Va=document.documentMode);var gM=c&&"TextEvent"in window&&!Va,l_=c&&(!hp||Va&&8<Va&&11>=Va),c_=" ",f_=!1;function d_(i,s){switch(i){case"keyup":return mM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function h_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var fo=!1;function EM(i,s){switch(i){case"compositionend":return h_(s);case"keypress":return s.which!==32?null:(f_=!0,c_);case"textInput":return i=s.data,i===c_&&f_?null:i;default:return null}}function yM(i,s){if(fo)return i==="compositionend"||!hp&&d_(i,s)?(i=i_(),ec=ap=Ci=null,fo=!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 l_&&s.locale!=="ko"?null:s.data;default:return null}}var TM={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 p_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!TM[i.type]:s==="textarea"}function m_(i,s,l,d){Db(d),s=uc(s,"onChange"),0<s.length&&(l=new up("onChange","change",null,l,d),i.push({event:l,listeners:s}))}var qa=null,Ya=null;function bM(i){R_(i,0)}function ic(i){var s=Eo(i);if(is(s))return i}function _M(i,s){if(i==="change")return s}var g_=!1;if(c){var pp;if(c){var mp="oninput"in document;if(!mp){var E_=document.createElement("div");E_.setAttribute("oninput","return;"),mp=typeof E_.oninput=="function"}pp=mp}else pp=!1;g_=pp&&(!document.documentMode||9<document.documentMode)}function y_(){qa&&(qa.detachEvent("onpropertychange",T_),Ya=qa=null)}function T_(i){if(i.propertyName==="value"&&ic(Ya)){var s=[];m_(s,Ya,i,Gh(i)),Ub(bM,s)}}function xM(i,s,l){i==="focusin"?(y_(),qa=s,Ya=l,qa.attachEvent("onpropertychange",T_)):i==="focusout"&&y_()}function SM(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return ic(Ya)}function wM(i,s){if(i==="click")return ic(s)}function CM(i,s){if(i==="input"||i==="change")return ic(s)}function AM(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var pr=typeof Object.is=="function"?Object.is:AM;function Wa(i,s){if(pr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),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)||!pr(i[g],s[g]))return!1}return!0}function b_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function __(i,s){var l=b_(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=b_(l)}}function x_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?x_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function S_(){for(var i=window,s=Xr();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=Xr(i.document)}return s}function gp(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 vM(i){var s=S_(),l=i.focusedElem,d=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&x_(l.ownerDocument.documentElement,l)){if(d!==null&&gp(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,y);var S=__(l,d);g&&S&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),y>d?(i.addRange(s),i.extend(S.node,S.offset)):(s.setEnd(S.node,S.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var kM=c&&"documentMode"in document&&11>=document.documentMode,ho=null,Ep=null,Ga=null,yp=!1;function w_(i,s,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;yp||ho==null||ho!==Xr(d)||(d=ho,"selectionStart"in d&&gp(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}),Ga&&Wa(Ga,d)||(Ga=d,d=uc(Ep,"onSelect"),0<d.length&&(s=new up("onSelect","select",null,s,l),i.push({event:s,listeners:d}),s.target=ho)))}function sc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var po={animationend:sc("Animation","AnimationEnd"),animationiteration:sc("Animation","AnimationIteration"),animationstart:sc("Animation","AnimationStart"),transitionend:sc("Transition","TransitionEnd")},Tp={},C_={};c&&(C_=document.createElement("div").style,"AnimationEvent"in window||(delete po.animationend.animation,delete po.animationiteration.animation,delete po.animationstart.animation),"TransitionEvent"in window||delete po.transitionend.transition);function oc(i){if(Tp[i])return Tp[i];if(!po[i])return i;var s=po[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in C_)return Tp[i]=s[l];return i}var A_=oc("animationend"),v_=oc("animationiteration"),k_=oc("animationstart"),N_=oc("transitionend"),O_=new Map,I_="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 Ai(i,s){O_.set(i,s),a(s,[i])}for(var bp=0;bp<I_.length;bp++){var _p=I_[bp],NM=_p.toLowerCase(),OM=_p[0].toUpperCase()+_p.slice(1);Ai(NM,"on"+OM)}Ai(A_,"onAnimationEnd"),Ai(v_,"onAnimationIteration"),Ai(k_,"onAnimationStart"),Ai("dblclick","onDoubleClick"),Ai("focusin","onFocus"),Ai("focusout","onBlur"),Ai(N_,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ka="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(" "),IM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ka));function P_(i,s,l){var d=i.type||"unknown-event";i.currentTarget=l,N8(d,s,void 0,i),i.currentTarget=null}function R_(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 S=d.length-1;0<=S;S--){var I=d[S],L=I.instance,Y=I.currentTarget;if(I=I.listener,L!==y&&g.isPropagationStopped())break e;P_(g,I,Y),y=L}else for(S=0;S<d.length;S++){if(I=d[S],L=I.instance,Y=I.currentTarget,I=I.listener,L!==y&&g.isPropagationStopped())break e;P_(g,I,Y),y=L}}}if(Vl)throw i=Jh,Vl=!1,Jh=null,i}function mt(i,s){var l=s[Np];l===void 0&&(l=s[Np]=new Set);var d=i+"__bubble";l.has(d)||(L_(s,i,2,!1),l.add(d))}function xp(i,s,l){var d=0;s&&(d|=4),L_(l,i,d,s)}var ac="_reactListening"+Math.random().toString(36).slice(2);function Qa(i){if(!i[ac]){i[ac]=!0,r.forEach(function(l){l!=="selectionchange"&&(IM.has(l)||xp(l,!1,i),xp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[ac]||(s[ac]=!0,xp("selectionchange",!1,s))}}function L_(i,s,l,d){switch(r_(s)){case 1:var g=q8;break;case 4:g=Y8;break;default:g=sp}l=g.bind(null,s,l,i),g=void 0,!Xh||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 Sp(i,s,l,d,g){var y=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var S=d.tag;if(S===3||S===4){var I=d.stateNode.containerInfo;if(I===g||I.nodeType===8&&I.parentNode===g)break;if(S===4)for(S=d.return;S!==null;){var L=S.tag;if((L===3||L===4)&&(L=S.stateNode.containerInfo,L===g||L.nodeType===8&&L.parentNode===g))return;S=S.return}for(;I!==null;){if(S=us(I),S===null)return;if(L=S.tag,L===5||L===6){d=y=S;continue e}I=I.parentNode}}d=d.return}Ub(function(){var Y=y,oe=Gh(l),ce=[];e:{var ie=O_.get(i);if(ie!==void 0){var _e=up,Ae=i;switch(i){case"keypress":if(tc(l)===0)break e;case"keydown":case"keyup":_e=aM;break;case"focusin":Ae="focus",_e=fp;break;case"focusout":Ae="blur",_e=fp;break;case"beforeblur":case"afterblur":_e=fp;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":_e=o_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_e=K8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_e=cM;break;case A_:case v_:case k_:_e=J8;break;case N_:_e=dM;break;case"scroll":_e=W8;break;case"wheel":_e=pM;break;case"copy":case"cut":case"paste":_e=eM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_e=u_}var ke=(s&4)!==0,Dt=!ke&&i==="scroll",z=ke?ie!==null?ie+"Capture":null:ie;ke=[];for(var M=Y,$;M!==null;){$=M;var me=$.stateNode;if($.tag===5&&me!==null&&($=me,z!==null&&(me=Pa(M,z),me!=null&&ke.push(Xa(M,me,$)))),Dt)break;M=M.return}0<ke.length&&(ie=new _e(ie,Ae,null,l,oe),ce.push({event:ie,listeners:ke}))}}if((s&7)===0){e:{if(ie=i==="mouseover"||i==="pointerover",_e=i==="mouseout"||i==="pointerout",ie&&l!==Fn&&(Ae=l.relatedTarget||l.fromElement)&&(us(Ae)||Ae[ei]))break e;if((_e||ie)&&(ie=oe.window===oe?oe:(ie=oe.ownerDocument)?ie.defaultView||ie.parentWindow:window,_e?(Ae=l.relatedTarget||l.toElement,_e=Y,Ae=Ae?us(Ae):null,Ae!==null&&(Dt=as(Ae),Ae!==Dt||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(_e=null,Ae=Y),_e!==Ae)){if(ke=o_,me="onMouseLeave",z="onMouseEnter",M="mouse",(i==="pointerout"||i==="pointerover")&&(ke=u_,me="onPointerLeave",z="onPointerEnter",M="pointer"),Dt=_e==null?ie:Eo(_e),$=Ae==null?ie:Eo(Ae),ie=new ke(me,M+"leave",_e,l,oe),ie.target=Dt,ie.relatedTarget=$,me=null,us(oe)===Y&&(ke=new ke(z,M+"enter",Ae,l,oe),ke.target=$,ke.relatedTarget=Dt,me=ke),Dt=me,_e&&Ae)t:{for(ke=_e,z=Ae,M=0,$=ke;$;$=mo($))M++;for($=0,me=z;me;me=mo(me))$++;for(;0<M-$;)ke=mo(ke),M--;for(;0<$-M;)z=mo(z),$--;for(;M--;){if(ke===z||z!==null&&ke===z.alternate)break t;ke=mo(ke),z=mo(z)}ke=null}else ke=null;_e!==null&&D_(ce,ie,_e,ke,!1),Ae!==null&&Dt!==null&&D_(ce,Dt,Ae,ke,!0)}}e:{if(ie=Y?Eo(Y):window,_e=ie.nodeName&&ie.nodeName.toLowerCase(),_e==="select"||_e==="input"&&ie.type==="file")var Ne=_M;else if(p_(ie))if(g_)Ne=CM;else{Ne=SM;var Me=xM}else(_e=ie.nodeName)&&_e.toLowerCase()==="input"&&(ie.type==="checkbox"||ie.type==="radio")&&(Ne=wM);if(Ne&&(Ne=Ne(i,Y))){m_(ce,Ne,l,oe);break e}Me&&Me(i,ie,Y),i==="focusout"&&(Me=ie._wrapperState)&&Me.controlled&&ie.type==="number"&&je(ie,"number",ie.value)}switch(Me=Y?Eo(Y):window,i){case"focusin":(p_(Me)||Me.contentEditable==="true")&&(ho=Me,Ep=Y,Ga=null);break;case"focusout":Ga=Ep=ho=null;break;case"mousedown":yp=!0;break;case"contextmenu":case"mouseup":case"dragend":yp=!1,w_(ce,l,oe);break;case"selectionchange":if(kM)break;case"keydown":case"keyup":w_(ce,l,oe)}var Fe;if(hp)e:{switch(i){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else fo?d_(i,l)&&(He="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(He="onCompositionStart");He&&(l_&&l.locale!=="ko"&&(fo||He!=="onCompositionStart"?He==="onCompositionEnd"&&fo&&(Fe=i_()):(Ci=oe,ap="value"in Ci?Ci.value:Ci.textContent,fo=!0)),Me=uc(Y,He),0<Me.length&&(He=new a_(He,i,null,l,oe),ce.push({event:He,listeners:Me}),Fe?He.data=Fe:(Fe=h_(l),Fe!==null&&(He.data=Fe)))),(Fe=gM?EM(i,l):yM(i,l))&&(Y=uc(Y,"onBeforeInput"),0<Y.length&&(oe=new a_("onBeforeInput","beforeinput",null,l,oe),ce.push({event:oe,listeners:Y}),oe.data=Fe))}R_(ce,s)})}function Xa(i,s,l){return{instance:i,listener:s,currentTarget:l}}function uc(i,s){for(var l=s+"Capture",d=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=Pa(i,l),y!=null&&d.unshift(Xa(i,y,g)),y=Pa(i,s),y!=null&&d.push(Xa(i,y,g))),i=i.return}return d}function mo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function D_(i,s,l,d,g){for(var y=s._reactName,S=[];l!==null&&l!==d;){var I=l,L=I.alternate,Y=I.stateNode;if(L!==null&&L===d)break;I.tag===5&&Y!==null&&(I=Y,g?(L=Pa(l,y),L!=null&&S.unshift(Xa(l,L,I))):g||(L=Pa(l,y),L!=null&&S.push(Xa(l,L,I)))),l=l.return}S.length!==0&&i.push({event:s,listeners:S})}var PM=/\r\n?/g,RM=/\u0000|\uFFFD/g;function M_(i){return(typeof i=="string"?i:""+i).replace(PM,`
12
+ `).replace(RM,"")}function lc(i,s,l){if(s=M_(s),M_(i)!==s&&l)throw Error(n(425))}function cc(){}var wp=null,Cp=null;function Ap(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 vp=typeof setTimeout=="function"?setTimeout:void 0,LM=typeof clearTimeout=="function"?clearTimeout:void 0,F_=typeof Promise=="function"?Promise:void 0,DM=typeof queueMicrotask=="function"?queueMicrotask:typeof F_!="undefined"?function(i){return F_.resolve(null).then(i).catch(MM)}:vp;function MM(i){setTimeout(function(){throw i})}function kp(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),za(s);return}d--}else l!=="$"&&l!=="$?"&&l!=="$!"||d++;l=g}while(l);za(s)}function vi(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 B_(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 go=Math.random().toString(36).slice(2),Dr="__reactFiber$"+go,Ja="__reactProps$"+go,ei="__reactContainer$"+go,Np="__reactEvents$"+go,FM="__reactListeners$"+go,BM="__reactHandles$"+go;function us(i){var s=i[Dr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[ei]||l[Dr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=B_(i);i!==null;){if(l=i[Dr])return l;i=B_(i)}return s}i=l,l=i.parentNode}return null}function Za(i){return i=i[Dr]||i[ei],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Eo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function fc(i){return i[Ja]||null}var Op=[],yo=-1;function ki(i){return{current:i}}function gt(i){0>yo||(i.current=Op[yo],Op[yo]=null,yo--)}function ht(i,s){yo++,Op[yo]=i.current,i.current=s}var Ni={},un=ki(Ni),An=ki(!1),ls=Ni;function To(i,s){var l=i.type.contextTypes;if(!l)return Ni;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 vn(i){return i=i.childContextTypes,i!=null}function dc(){gt(An),gt(un)}function U_(i,s,l){if(un.current!==Ni)throw Error(n(168));ht(un,s),ht(An,l)}function H_(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,Ye(i)||"Unknown",g));return w({},l,d)}function hc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ni,ls=un.current,ht(un,i),ht(An,An.current),!0}function z_(i,s,l){var d=i.stateNode;if(!d)throw Error(n(169));l?(i=H_(i,s,ls),d.__reactInternalMemoizedMergedChildContext=i,gt(An),gt(un),ht(un,i)):gt(An),ht(An,l)}var ti=null,pc=!1,Ip=!1;function j_(i){ti===null?ti=[i]:ti.push(i)}function UM(i){pc=!0,j_(i)}function Oi(){if(!Ip&&ti!==null){Ip=!0;var i=0,s=at;try{var l=ti;for(at=1;i<l.length;i++){var d=l[i];do d=d(!0);while(d!==null)}ti=null,pc=!1}catch(g){throw ti!==null&&(ti=ti.slice(i+1)),Vb(Zh,Oi),g}finally{at=s,Ip=!1}}return null}var bo=[],_o=0,mc=null,gc=0,Xn=[],Jn=0,cs=null,ni=1,ri="";function fs(i,s){bo[_o++]=gc,bo[_o++]=mc,mc=i,gc=s}function $_(i,s,l){Xn[Jn++]=ni,Xn[Jn++]=ri,Xn[Jn++]=cs,cs=i;var d=ni;i=ri;var g=32-hr(d)-1;d&=~(1<<g),l+=1;var y=32-hr(s)+g;if(30<y){var S=g-g%5;y=(d&(1<<S)-1).toString(32),d>>=S,g-=S,ni=1<<32-hr(s)+g|l<<g|d,ri=y+i}else ni=1<<y|l<<g|d,ri=i}function Pp(i){i.return!==null&&(fs(i,1),$_(i,1,0))}function Rp(i){for(;i===mc;)mc=bo[--_o],bo[_o]=null,gc=bo[--_o],bo[_o]=null;for(;i===cs;)cs=Xn[--Jn],Xn[Jn]=null,ri=Xn[--Jn],Xn[Jn]=null,ni=Xn[--Jn],Xn[Jn]=null}var Un=null,Hn=null,bt=!1,mr=null;function V_(i,s){var l=nr(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function q_(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Un=i,Hn=vi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Un=i,Hn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=cs!==null?{id:ni,overflow:ri}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=nr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Un=i,Hn=null,!0):!1;default:return!1}}function Lp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Dp(i){if(bt){var s=Hn;if(s){var l=s;if(!q_(i,s)){if(Lp(i))throw Error(n(418));s=vi(l.nextSibling);var d=Un;s&&q_(i,s)?V_(d,l):(i.flags=i.flags&-4097|2,bt=!1,Un=i)}}else{if(Lp(i))throw Error(n(418));i.flags=i.flags&-4097|2,bt=!1,Un=i}}}function Y_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Un=i}function Ec(i){if(i!==Un)return!1;if(!bt)return Y_(i),bt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Ap(i.type,i.memoizedProps)),s&&(s=Hn)){if(Lp(i))throw W_(),Error(n(418));for(;s;)V_(i,s),s=vi(s.nextSibling)}if(Y_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){Hn=vi(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Hn=null}}else Hn=Un?vi(i.stateNode.nextSibling):null;return!0}function W_(){for(var i=Hn;i;)i=vi(i.nextSibling)}function xo(){Hn=Un=null,bt=!1}function Mp(i){mr===null?mr=[i]:mr.push(i)}var HM=G.ReactCurrentBatchConfig;function eu(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(S){var I=g.refs;S===null?delete I[y]:I[y]=S},s._stringRef=y,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function yc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function G_(i){var s=i._init;return s(i._payload)}function K_(i){function s(z,M){if(i){var $=z.deletions;$===null?(z.deletions=[M],z.flags|=16):$.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=Bi(z,M),z.index=0,z.sibling=null,z}function y(z,M,$){return z.index=$,i?($=z.alternate,$!==null?($=$.index,$<M?(z.flags|=2,M):$):(z.flags|=2,M)):(z.flags|=1048576,M)}function S(z){return i&&z.alternate===null&&(z.flags|=2),z}function I(z,M,$,me){return M===null||M.tag!==6?(M=vm($,z.mode,me),M.return=z,M):(M=g(M,$),M.return=z,M)}function L(z,M,$,me){var Ne=$.type;return Ne===te?oe(z,M,$.props.children,me,$.key):M!==null&&(M.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&G_(Ne)===M.type)?(me=g(M,$.props),me.ref=eu(z,M,$),me.return=z,me):(me=jc($.type,$.key,$.props,null,z.mode,me),me.ref=eu(z,M,$),me.return=z,me)}function Y(z,M,$,me){return M===null||M.tag!==4||M.stateNode.containerInfo!==$.containerInfo||M.stateNode.implementation!==$.implementation?(M=km($,z.mode,me),M.return=z,M):(M=g(M,$.children||[]),M.return=z,M)}function oe(z,M,$,me,Ne){return M===null||M.tag!==7?(M=Ts($,z.mode,me,Ne),M.return=z,M):(M=g(M,$),M.return=z,M)}function ce(z,M,$){if(typeof M=="string"&&M!==""||typeof M=="number")return M=vm(""+M,z.mode,$),M.return=z,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case W:return $=jc(M.type,M.key,M.props,null,z.mode,$),$.ref=eu(z,null,M),$.return=z,$;case B:return M=km(M,z.mode,$),M.return=z,M;case Ce:var me=M._init;return ce(z,me(M._payload),$)}if(nt(M)||ne(M))return M=Ts(M,z.mode,$,null),M.return=z,M;yc(z,M)}return null}function ie(z,M,$,me){var Ne=M!==null?M.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return Ne!==null?null:I(z,M,""+$,me);if(typeof $=="object"&&$!==null){switch($.$$typeof){case W:return $.key===Ne?L(z,M,$,me):null;case B:return $.key===Ne?Y(z,M,$,me):null;case Ce:return Ne=$._init,ie(z,M,Ne($._payload),me)}if(nt($)||ne($))return Ne!==null?null:oe(z,M,$,me,null);yc(z,$)}return null}function _e(z,M,$,me,Ne){if(typeof me=="string"&&me!==""||typeof me=="number")return z=z.get($)||null,I(M,z,""+me,Ne);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case W:return z=z.get(me.key===null?$:me.key)||null,L(M,z,me,Ne);case B:return z=z.get(me.key===null?$:me.key)||null,Y(M,z,me,Ne);case Ce:var Me=me._init;return _e(z,M,$,Me(me._payload),Ne)}if(nt(me)||ne(me))return z=z.get($)||null,oe(M,z,me,Ne,null);yc(M,me)}return null}function Ae(z,M,$,me){for(var Ne=null,Me=null,Fe=M,He=M=0,Qt=null;Fe!==null&&He<$.length;He++){Fe.index>He?(Qt=Fe,Fe=null):Qt=Fe.sibling;var tt=ie(z,Fe,$[He],me);if(tt===null){Fe===null&&(Fe=Qt);break}i&&Fe&&tt.alternate===null&&s(z,Fe),M=y(tt,M,He),Me===null?Ne=tt:Me.sibling=tt,Me=tt,Fe=Qt}if(He===$.length)return l(z,Fe),bt&&fs(z,He),Ne;if(Fe===null){for(;He<$.length;He++)Fe=ce(z,$[He],me),Fe!==null&&(M=y(Fe,M,He),Me===null?Ne=Fe:Me.sibling=Fe,Me=Fe);return bt&&fs(z,He),Ne}for(Fe=d(z,Fe);He<$.length;He++)Qt=_e(Fe,z,He,$[He],me),Qt!==null&&(i&&Qt.alternate!==null&&Fe.delete(Qt.key===null?He:Qt.key),M=y(Qt,M,He),Me===null?Ne=Qt:Me.sibling=Qt,Me=Qt);return i&&Fe.forEach(function(Ui){return s(z,Ui)}),bt&&fs(z,He),Ne}function ke(z,M,$,me){var Ne=ne($);if(typeof Ne!="function")throw Error(n(150));if($=Ne.call($),$==null)throw Error(n(151));for(var Me=Ne=null,Fe=M,He=M=0,Qt=null,tt=$.next();Fe!==null&&!tt.done;He++,tt=$.next()){Fe.index>He?(Qt=Fe,Fe=null):Qt=Fe.sibling;var Ui=ie(z,Fe,tt.value,me);if(Ui===null){Fe===null&&(Fe=Qt);break}i&&Fe&&Ui.alternate===null&&s(z,Fe),M=y(Ui,M,He),Me===null?Ne=Ui:Me.sibling=Ui,Me=Ui,Fe=Qt}if(tt.done)return l(z,Fe),bt&&fs(z,He),Ne;if(Fe===null){for(;!tt.done;He++,tt=$.next())tt=ce(z,tt.value,me),tt!==null&&(M=y(tt,M,He),Me===null?Ne=tt:Me.sibling=tt,Me=tt);return bt&&fs(z,He),Ne}for(Fe=d(z,Fe);!tt.done;He++,tt=$.next())tt=_e(Fe,z,He,tt.value,me),tt!==null&&(i&&tt.alternate!==null&&Fe.delete(tt.key===null?He:tt.key),M=y(tt,M,He),Me===null?Ne=tt:Me.sibling=tt,Me=tt);return i&&Fe.forEach(function(TF){return s(z,TF)}),bt&&fs(z,He),Ne}function Dt(z,M,$,me){if(typeof $=="object"&&$!==null&&$.type===te&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case W:e:{for(var Ne=$.key,Me=M;Me!==null;){if(Me.key===Ne){if(Ne=$.type,Ne===te){if(Me.tag===7){l(z,Me.sibling),M=g(Me,$.props.children),M.return=z,z=M;break e}}else if(Me.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&G_(Ne)===Me.type){l(z,Me.sibling),M=g(Me,$.props),M.ref=eu(z,Me,$),M.return=z,z=M;break e}l(z,Me);break}else s(z,Me);Me=Me.sibling}$.type===te?(M=Ts($.props.children,z.mode,me,$.key),M.return=z,z=M):(me=jc($.type,$.key,$.props,null,z.mode,me),me.ref=eu(z,M,$),me.return=z,z=me)}return S(z);case B:e:{for(Me=$.key;M!==null;){if(M.key===Me)if(M.tag===4&&M.stateNode.containerInfo===$.containerInfo&&M.stateNode.implementation===$.implementation){l(z,M.sibling),M=g(M,$.children||[]),M.return=z,z=M;break e}else{l(z,M);break}else s(z,M);M=M.sibling}M=km($,z.mode,me),M.return=z,z=M}return S(z);case Ce:return Me=$._init,Dt(z,M,Me($._payload),me)}if(nt($))return Ae(z,M,$,me);if(ne($))return ke(z,M,$,me);yc(z,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,M!==null&&M.tag===6?(l(z,M.sibling),M=g(M,$),M.return=z,z=M):(l(z,M),M=vm($,z.mode,me),M.return=z,z=M),S(z)):l(z,M)}return Dt}var So=K_(!0),Q_=K_(!1),Tc=ki(null),bc=null,wo=null,Fp=null;function Bp(){Fp=wo=bc=null}function Up(i){var s=Tc.current;gt(Tc),i._currentValue=s}function Hp(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 Co(i,s){bc=i,Fp=wo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(kn=!0),i.firstContext=null)}function Zn(i){var s=i._currentValue;if(Fp!==i)if(i={context:i,memoizedValue:s,next:null},wo===null){if(bc===null)throw Error(n(308));wo=i,bc.dependencies={lanes:0,firstContext:i}}else wo=wo.next=i;return s}var ds=null;function zp(i){ds===null?ds=[i]:ds.push(i)}function X_(i,s,l,d){var g=s.interleaved;return g===null?(l.next=l,zp(s)):(l.next=g.next,g.next=l),s.interleaved=l,ii(i,d)}function ii(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 Ii=!1;function jp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function J_(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function si(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Pi(i,s,l){var d=i.updateQueue;if(d===null)return null;if(d=d.shared,(et&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,ii(i,l)}return g=d.interleaved,g===null?(s.next=s,zp(d)):(s.next=g.next,g.next=s),d.interleaved=s,ii(i,l)}function _c(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,np(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 S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?g=y=S:y=y.next=S,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 xc(i,s,l,d){var g=i.updateQueue;Ii=!1;var y=g.firstBaseUpdate,S=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var L=I,Y=L.next;L.next=null,S===null?y=Y:S.next=Y,S=L;var oe=i.alternate;oe!==null&&(oe=oe.updateQueue,I=oe.lastBaseUpdate,I!==S&&(I===null?oe.firstBaseUpdate=Y:I.next=Y,oe.lastBaseUpdate=L))}if(y!==null){var ce=g.baseState;S=0,oe=Y=L=null,I=y;do{var ie=I.lane,_e=I.eventTime;if((d&ie)===ie){oe!==null&&(oe=oe.next={eventTime:_e,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var Ae=i,ke=I;switch(ie=s,_e=l,ke.tag){case 1:if(Ae=ke.payload,typeof Ae=="function"){ce=Ae.call(_e,ce,ie);break e}ce=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ke.payload,ie=typeof Ae=="function"?Ae.call(_e,ce,ie):Ae,ie==null)break e;ce=w({},ce,ie);break e;case 2:Ii=!0}}I.callback!==null&&I.lane!==0&&(i.flags|=64,ie=g.effects,ie===null?g.effects=[I]:ie.push(I))}else _e={eventTime:_e,lane:ie,tag:I.tag,payload:I.payload,callback:I.callback,next:null},oe===null?(Y=oe=_e,L=ce):oe=oe.next=_e,S|=ie;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;ie=I,I=ie.next,ie.next=null,g.lastBaseUpdate=ie,g.shared.pending=null}}while(!0);if(oe===null&&(L=ce),g.baseState=L,g.firstBaseUpdate=Y,g.lastBaseUpdate=oe,s=g.shared.interleaved,s!==null){g=s;do S|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);ms|=S,i.lanes=S,i.memoizedState=ce}}function ex(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 tu={},Mr=ki(tu),nu=ki(tu),ru=ki(tu);function hs(i){if(i===tu)throw Error(n(174));return i}function $p(i,s){switch(ht(ru,s),ht(nu,i),ht(Mr,tu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ge(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=ge(s,i)}gt(Mr),ht(Mr,s)}function Ao(){gt(Mr),gt(nu),gt(ru)}function tx(i){hs(ru.current);var s=hs(Mr.current),l=ge(s,i.type);s!==l&&(ht(nu,i),ht(Mr,l))}function Vp(i){nu.current===i&&(gt(Mr),gt(nu))}var St=ki(0);function Sc(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 qp=[];function Yp(){for(var i=0;i<qp.length;i++)qp[i]._workInProgressVersionPrimary=null;qp.length=0}var wc=G.ReactCurrentDispatcher,Wp=G.ReactCurrentBatchConfig,ps=0,wt=null,zt=null,Gt=null,Cc=!1,iu=!1,su=0,zM=0;function ln(){throw Error(n(321))}function Gp(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!pr(i[l],s[l]))return!1;return!0}function Kp(i,s,l,d,g,y){if(ps=y,wt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,wc.current=i===null||i.memoizedState===null?qM:YM,i=l(d,g),iu){y=0;do{if(iu=!1,su=0,25<=y)throw Error(n(301));y+=1,Gt=zt=null,s.updateQueue=null,wc.current=WM,i=l(d,g)}while(iu)}if(wc.current=kc,s=zt!==null&&zt.next!==null,ps=0,Gt=zt=wt=null,Cc=!1,s)throw Error(n(300));return i}function Qp(){var i=su!==0;return su=0,i}function Fr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gt===null?wt.memoizedState=Gt=i:Gt=Gt.next=i,Gt}function er(){if(zt===null){var i=wt.alternate;i=i!==null?i.memoizedState:null}else i=zt.next;var s=Gt===null?wt.memoizedState:Gt.next;if(s!==null)Gt=s,zt=i;else{if(i===null)throw Error(n(310));zt=i,i={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Gt===null?wt.memoizedState=Gt=i:Gt=Gt.next=i}return Gt}function ou(i,s){return typeof s=="function"?s(i):s}function Xp(i){var s=er(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var d=zt,g=d.baseQueue,y=l.pending;if(y!==null){if(g!==null){var S=g.next;g.next=y.next,y.next=S}d.baseQueue=g=y,l.pending=null}if(g!==null){y=g.next,d=d.baseState;var I=S=null,L=null,Y=y;do{var oe=Y.lane;if((ps&oe)===oe)L!==null&&(L=L.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:oe,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};L===null?(I=L=ce,S=d):L=L.next=ce,wt.lanes|=oe,ms|=oe}Y=Y.next}while(Y!==null&&Y!==y);L===null?S=d:L.next=I,pr(d,s.memoizedState)||(kn=!0),s.memoizedState=d,s.baseState=S,s.baseQueue=L,l.lastRenderedState=d}if(i=l.interleaved,i!==null){g=i;do y=g.lane,wt.lanes|=y,ms|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Jp(i){var s=er(),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 S=g=g.next;do y=i(y,S.action),S=S.next;while(S!==g);pr(y,s.memoizedState)||(kn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,d]}function nx(){}function rx(i,s){var l=wt,d=er(),g=s(),y=!pr(d.memoizedState,g);if(y&&(d.memoizedState=g,kn=!0),d=d.queue,Zp(ox.bind(null,l,d,i),[i]),d.getSnapshot!==s||y||Gt!==null&&Gt.memoizedState.tag&1){if(l.flags|=2048,au(9,sx.bind(null,l,d,g,s),void 0,null),Kt===null)throw Error(n(349));(ps&30)!==0||ix(l,s,g)}return g}function ix(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=wt.updateQueue,s===null?(s={lastEffect:null,stores:null},wt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function sx(i,s,l,d){s.value=l,s.getSnapshot=d,ax(s)&&ux(i)}function ox(i,s,l){return l(function(){ax(s)&&ux(i)})}function ax(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!pr(i,l)}catch(d){return!0}}function ux(i){var s=ii(i,1);s!==null&&Tr(s,i,1,-1)}function lx(i){var s=Fr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ou,lastRenderedState:i},s.queue=i,i=i.dispatch=VM.bind(null,wt,i),[s.memoizedState,i]}function au(i,s,l,d){return i={tag:i,create:s,destroy:l,deps:d,next:null},s=wt.updateQueue,s===null?(s={lastEffect:null,stores:null},wt.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 cx(){return er().memoizedState}function Ac(i,s,l,d){var g=Fr();wt.flags|=i,g.memoizedState=au(1|s,l,void 0,d===void 0?null:d)}function vc(i,s,l,d){var g=er();d=d===void 0?null:d;var y=void 0;if(zt!==null){var S=zt.memoizedState;if(y=S.destroy,d!==null&&Gp(d,S.deps)){g.memoizedState=au(s,l,y,d);return}}wt.flags|=i,g.memoizedState=au(1|s,l,y,d)}function fx(i,s){return Ac(8390656,8,i,s)}function Zp(i,s){return vc(2048,8,i,s)}function dx(i,s){return vc(4,2,i,s)}function hx(i,s){return vc(4,4,i,s)}function px(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function mx(i,s,l){return l=l!=null?l.concat([i]):null,vc(4,4,px.bind(null,s,i),l)}function em(){}function gx(i,s){var l=er();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&Gp(s,d[1])?d[0]:(l.memoizedState=[i,s],i)}function Ex(i,s){var l=er();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&Gp(s,d[1])?d[0]:(i=i(),l.memoizedState=[i,s],i)}function yx(i,s,l){return(ps&21)===0?(i.baseState&&(i.baseState=!1,kn=!0),i.memoizedState=l):(pr(l,s)||(l=Gb(),wt.lanes|=l,ms|=l,i.baseState=!0),s)}function jM(i,s){var l=at;at=l!==0&&4>l?l:4,i(!0);var d=Wp.transition;Wp.transition={};try{i(!1),s()}finally{at=l,Wp.transition=d}}function Tx(){return er().memoizedState}function $M(i,s,l){var d=Mi(i);if(l={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null},bx(i))_x(s,l);else if(l=X_(i,s,l,d),l!==null){var g=En();Tr(l,i,d,g),xx(l,s,d)}}function VM(i,s,l){var d=Mi(i),g={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null};if(bx(i))_x(s,g);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var S=s.lastRenderedState,I=y(S,l);if(g.hasEagerState=!0,g.eagerState=I,pr(I,S)){var L=s.interleaved;L===null?(g.next=g,zp(s)):(g.next=L.next,L.next=g),s.interleaved=g;return}}catch(Y){}finally{}l=X_(i,s,g,d),l!==null&&(g=En(),Tr(l,i,d,g),xx(l,s,d))}}function bx(i){var s=i.alternate;return i===wt||s!==null&&s===wt}function _x(i,s){iu=Cc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function xx(i,s,l){if((l&4194240)!==0){var d=s.lanes;d&=i.pendingLanes,l|=d,s.lanes=l,np(i,l)}}var kc={readContext:Zn,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useInsertionEffect:ln,useLayoutEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useMutableSource:ln,useSyncExternalStore:ln,useId:ln,unstable_isNewReconciler:!1},qM={readContext:Zn,useCallback:function(i,s){return Fr().memoizedState=[i,s===void 0?null:s],i},useContext:Zn,useEffect:fx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Ac(4194308,4,px.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Ac(4194308,4,i,s)},useInsertionEffect:function(i,s){return Ac(4,2,i,s)},useMemo:function(i,s){var l=Fr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var d=Fr();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=$M.bind(null,wt,i),[d.memoizedState,i]},useRef:function(i){var s=Fr();return i={current:i},s.memoizedState=i},useState:lx,useDebugValue:em,useDeferredValue:function(i){return Fr().memoizedState=i},useTransition:function(){var i=lx(!1),s=i[0];return i=jM.bind(null,i[1]),Fr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var d=wt,g=Fr();if(bt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Kt===null)throw Error(n(349));(ps&30)!==0||ix(d,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,fx(ox.bind(null,d,y,i),[i]),d.flags|=2048,au(9,sx.bind(null,d,y,l,s),void 0,null),l},useId:function(){var i=Fr(),s=Kt.identifierPrefix;if(bt){var l=ri,d=ni;l=(d&~(1<<32-hr(d)-1)).toString(32)+l,s=":"+s+"R"+l,l=su++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=zM++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},YM={readContext:Zn,useCallback:gx,useContext:Zn,useEffect:Zp,useImperativeHandle:mx,useInsertionEffect:dx,useLayoutEffect:hx,useMemo:Ex,useReducer:Xp,useRef:cx,useState:function(){return Xp(ou)},useDebugValue:em,useDeferredValue:function(i){var s=er();return yx(s,zt.memoizedState,i)},useTransition:function(){var i=Xp(ou)[0],s=er().memoizedState;return[i,s]},useMutableSource:nx,useSyncExternalStore:rx,useId:Tx,unstable_isNewReconciler:!1},WM={readContext:Zn,useCallback:gx,useContext:Zn,useEffect:Zp,useImperativeHandle:mx,useInsertionEffect:dx,useLayoutEffect:hx,useMemo:Ex,useReducer:Jp,useRef:cx,useState:function(){return Jp(ou)},useDebugValue:em,useDeferredValue:function(i){var s=er();return zt===null?s.memoizedState=i:yx(s,zt.memoizedState,i)},useTransition:function(){var i=Jp(ou)[0],s=er().memoizedState;return[i,s]},useMutableSource:nx,useSyncExternalStore:rx,useId:Tx,unstable_isNewReconciler:!1};function gr(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 tm(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 Nc={isMounted:function(i){return(i=i._reactInternals)?as(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var d=En(),g=Mi(i),y=si(d,g);y.payload=s,l!=null&&(y.callback=l),s=Pi(i,y,g),s!==null&&(Tr(s,i,g,d),_c(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var d=En(),g=Mi(i),y=si(d,g);y.tag=1,y.payload=s,l!=null&&(y.callback=l),s=Pi(i,y,g),s!==null&&(Tr(s,i,g,d),_c(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=En(),d=Mi(i),g=si(l,d);g.tag=2,s!=null&&(g.callback=s),s=Pi(i,g,d),s!==null&&(Tr(s,i,d,l),_c(s,i,d))}};function Sx(i,s,l,d,g,y,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(d,y,S):s.prototype&&s.prototype.isPureReactComponent?!Wa(l,d)||!Wa(g,y):!0}function wx(i,s,l){var d=!1,g=Ni,y=s.contextType;return typeof y=="object"&&y!==null?y=Zn(y):(g=vn(s)?ls:un.current,d=s.contextTypes,y=(d=d!=null)?To(i,g):Ni),s=new s(l,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Nc,i.stateNode=s,s._reactInternals=i,d&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function Cx(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&&Nc.enqueueReplaceState(s,s.state,null)}function nm(i,s,l,d){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},jp(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Zn(y):(y=vn(s)?ls:un.current,g.context=To(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(tm(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&&Nc.enqueueReplaceState(g,g.state,null),xc(i,l,g,d),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function vo(i,s){try{var l="",d=s;do l+=Re(d),d=d.return;while(d);var g=l}catch(y){g=`
13
13
  Error generating stack: `+y.message+`
14
- `+y.stack}return{value:i,source:s,stack:g,digest:null}}function em(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function tm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var YM=typeof WeakMap=="function"?WeakMap:Map;function Ax(i,s,l){l=si(-1,l),l.tag=3,l.payload={element:null};var d=s.value;return l.callback=function(){Dc||(Dc=!0,gm=d),tm(i,s)},l}function vx(i,s,l){l=si(-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(){tm(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){tm(i,s),typeof d!="function"&&(Di===null?Di=new Set([this]):Di.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function kx(i,s,l){var d=i.pingCache;if(d===null){d=i.pingCache=new YM;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=oF.bind(null,i,s,l),s.then(i,i))}function Nx(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 Ox(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=si(-1,1),s.tag=2,Ri(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var WM=G.ReactCurrentOwner,kn=!1;function pn(i,s,l,d){s.child=i===null?Q_(s,null,l,d):So(s,i.child,l,d)}function Ix(i,s,l,d,g){l=l.render;var y=s.ref;return Co(s,g),d=Yp(i,s,l,d,y,g),l=Wp(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,oi(i,s,g)):(_t&&l&&Np(s),s.flags|=1,pn(i,s,d,g),s.child)}function Px(i,s,l,d,g){if(i===null){var y=l.type;return typeof y=="function"&&!Sm(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,Rx(i,s,y,d,g)):(i=zc(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:Ya,l(x,d)&&i.ref===s.ref)return oi(i,s,g)}return s.flags|=1,i=Ui(y,d),i.ref=s.ref,i.return=s,s.child=i}function Rx(i,s,l,d,g){if(i!==null){var y=i.memoizedProps;if(Ya(y,d)&&i.ref===s.ref)if(kn=!1,s.pendingProps=d=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(kn=!0);else return s.lanes=i.lanes,oi(i,s,g)}return nm(i,s,l,d,g)}function Lx(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},ht(No,jn),jn|=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,ht(No,jn),jn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:l,ht(No,jn),jn|=d}else y!==null?(d=y.baseLanes|l,s.memoizedState=null):d=l,ht(No,jn),jn|=d;return pn(i,s,g,l),s.child}function Dx(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function nm(i,s,l,d,g){var y=vn(l)?ls:an.current;return y=To(s,y),Co(s,g),l=Yp(i,s,l,d,y,g),d=Wp(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,oi(i,s,g)):(_t&&d&&Np(s),s.flags|=1,pn(i,s,l,g),s.child)}function Mx(i,s,l,d,g){if(vn(l)){var y=!0;dc(s)}else y=!1;if(Co(s,g),s.stateNode===null)Oc(i,s),wx(s,l,d),Zp(s,l,d,g),d=!0;else if(i===null){var x=s.stateNode,O=s.memoizedProps;x.props=O;var L=x.context,Y=l.contextType;typeof Y=="object"&&Y!==null?Y=er(Y):(Y=vn(l)?ls:an.current,Y=To(s,Y));var ie=l.getDerivedStateFromProps,ue=typeof ie=="function"||typeof x.getSnapshotBeforeUpdate=="function";ue||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O!==d||L!==Y)&&Cx(s,x,d,Y),Pi=!1;var ne=s.memoizedState;x.state=ne,_c(s,d,x,g),L=s.memoizedState,O!==d||ne!==L||An.current||Pi?(typeof ie=="function"&&(Jp(s,l,ie,d),L=s.memoizedState),(O=Pi||Sx(s,l,O,d,ne,L,Y))?(ue||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=L),x.props=d,x.state=L,x.context=Y,d=O):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{x=s.stateNode,J_(i,s),O=s.memoizedProps,Y=s.type===s.elementType?O:Er(s.type,O),x.props=Y,ue=s.pendingProps,ne=x.context,L=l.contextType,typeof L=="object"&&L!==null?L=er(L):(L=vn(l)?ls:an.current,L=To(s,L));var Se=l.getDerivedStateFromProps;(ie=typeof Se=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O!==ue||ne!==L)&&Cx(s,x,d,L),Pi=!1,ne=s.memoizedState,x.state=ne,_c(s,d,x,g);var Ae=s.memoizedState;O!==ue||ne!==Ae||An.current||Pi?(typeof Se=="function"&&(Jp(s,l,Se,d),Ae=s.memoizedState),(Y=Pi||Sx(s,l,Y,d,ne,Ae,L)||!1)?(ie||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,Ae,L),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,Ae,L)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=Ae),x.props=d,x.state=Ae,x.context=L,d=Y):(typeof x.componentDidUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||O===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),d=!1)}return rm(i,s,l,d,y,g)}function rm(i,s,l,d,g,y){Dx(i,s);var x=(s.flags&128)!==0;if(!d&&!x)return g&&z_(s,l,!1),oi(i,s,y);d=s.stateNode,WM.current=s;var O=x&&typeof l.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,i!==null&&x?(s.child=So(s,i.child,null,y),s.child=So(s,null,O,y)):pn(i,s,O,y),s.memoizedState=d.state,g&&z_(s,l,!0),s.child}function Fx(i){var s=i.stateNode;s.pendingContext?U_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&U_(i,s.context,!1),Hp(i,s.containerInfo)}function Bx(i,s,l,d,g){return xo(),Rp(g),s.flags|=256,pn(i,s,l,d),s.child}var im={dehydrated:null,treeContext:null,retryLane:0};function sm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Ux(i,s,l){var d=s.pendingProps,g=Ct.current,y=!1,x=(s.flags&128)!==0,O;if((O=x)||(O=i!==null&&i.memoizedState===null?!1:(g&2)!==0),O?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),ht(Ct,g&1),i===null)return Pp(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=jc(x,d,0,null),i=Ts(i,d,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=sm(l),s.memoizedState=im,i):om(s,x));if(g=i.memoizedState,g!==null&&(O=g.dehydrated,O!==null))return GM(i,s,x,d,O,g,l);if(y){y=d.fallback,x=s.mode,g=i.child,O=g.sibling;var L={mode:"hidden",children:d.children};return(x&1)===0&&s.child!==g?(d=s.child,d.childLanes=0,d.pendingProps=L,s.deletions=null):(d=Ui(g,L),d.subtreeFlags=g.subtreeFlags&14680064),O!==null?y=Ui(O,y):(y=Ts(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?sm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=i.childLanes&~l,s.memoizedState=im,d}return y=i.child,i=y.sibling,d=Ui(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 om(i,s){return s=jc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Nc(i,s,l,d){return d!==null&&Rp(d),So(s,i.child,null,l),i=om(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function GM(i,s,l,d,g,y,x){if(l)return s.flags&256?(s.flags&=-257,d=em(Error(n(422))),Nc(i,s,x,d)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=d.fallback,g=s.mode,d=jc({mode:"visible",children:d.children},g,0,null),y=Ts(y,g,x,null),y.flags|=2,d.return=s,y.return=s,d.sibling=y,s.child=d,(s.mode&1)!==0&&So(s,i.child,null,x),s.child.memoizedState=sm(x),s.memoizedState=im,y);if((s.mode&1)===0)return Nc(i,s,x,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var O=d.dgst;return d=O,y=Error(n(419)),d=em(y,d,void 0),Nc(i,s,x,d)}if(O=(x&i.childLanes)!==0,kn||O){if(d=Wt,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,ii(i,g),br(d,i,g,-1))}return xm(),d=em(Error(n(421))),Nc(i,s,x,d)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=aF.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,zn=ki(g.nextSibling),Hn=s,_t=!0,gr=null,i!==null&&(Jn[Zn++]=ni,Jn[Zn++]=ri,Jn[Zn++]=cs,ni=i.id,ri=i.overflow,cs=s),s=om(s,d.children),s.flags|=4096,s)}function Hx(i,s,l){i.lanes|=s;var d=i.alternate;d!==null&&(d.lanes|=s),Fp(i.return,s,l)}function am(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 zx(i,s,l){var d=s.pendingProps,g=d.revealOrder,y=d.tail;if(pn(i,s,d.children,l),d=Ct.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&&Hx(i,l,s);else if(i.tag===19)Hx(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(ht(Ct,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&&xc(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),am(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&&xc(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}am(s,!0,l,null,y);break;case"together":am(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Oc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function oi(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),ms|=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=Ui(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Ui(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function KM(i,s,l){switch(s.tag){case 3:Fx(s),xo();break;case 5:tx(s);break;case 1:vn(s.type)&&dc(s);break;case 4:Hp(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;ht(yc,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(ht(Ct,Ct.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?Ux(i,s,l):(ht(Ct,Ct.current&1),i=oi(i,s,l),i!==null?i.sibling:null);ht(Ct,Ct.current&1);break;case 19:if(d=(l&s.childLanes)!==0,(i.flags&128)!==0){if(d)return zx(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ht(Ct,Ct.current),d)break;return null;case 22:case 23:return s.lanes=0,Lx(i,s,l)}return oi(i,s,l)}var jx,um,$x,Vx;jx=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}},um=function(){},$x=function(i,s,l,d){var g=i.memoizedProps;if(g!==d){i=s.stateNode,hs(Fr.current);var y=null;switch(l){case"input":g=Ti(i,g),d=Ti(i,d),y=[];break;case"select":g=w({},g,{value:void 0}),d=w({},d,{value:void 0}),y=[];break;case"textarea":g=on(i,g),d=on(i,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(i.onclick=lc)}Qt(l,d);var x;l=null;for(Y in g)if(!d.hasOwnProperty(Y)&&g.hasOwnProperty(Y)&&g[Y]!=null)if(Y==="style"){var O=g[Y];for(x in O)O.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 L=d[Y];if(O=g!=null?g[Y]:void 0,d.hasOwnProperty(Y)&&L!==O&&(L!=null||O!=null))if(Y==="style")if(O){for(x in O)!O.hasOwnProperty(x)||L&&L.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in L)L.hasOwnProperty(x)&&O[x]!==L[x]&&(l||(l={}),l[x]=L[x])}else l||(y||(y=[]),y.push(Y,l)),l=L;else Y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,O=O?O.__html:void 0,L!=null&&O!==L&&(y=y||[]).push(Y,L)):Y==="children"?typeof L!="string"&&typeof L!="number"||(y=y||[]).push(Y,""+L):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(o.hasOwnProperty(Y)?(L!=null&&Y==="onScroll"&&gt("scroll",i),y||O===L||(y=[])):(y=y||[]).push(Y,L))}l&&(y=y||[]).push("style",l);var Y=y;(s.updateQueue=Y)&&(s.flags|=4)}},Vx=function(i,s,l,d){l!==d&&(s.flags|=4)};function au(i,s){if(!_t)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 ln(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 QM(i,s,l){var d=s.pendingProps;switch(Op(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ln(s),null;case 1:return vn(s.type)&&fc(),ln(s),null;case 3:return d=s.stateNode,Ao(),Et(An),Et(an),$p(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(gc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,gr!==null&&(Tm(gr),gr=null))),um(i,s),ln(s),null;case 5:zp(s);var g=hs(nu.current);if(l=s.type,i!==null&&s.stateNode!=null)$x(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 ln(s),null}if(i=hs(Fr.current),gc(s)){d=s.stateNode,l=s.type;var y=s.memoizedProps;switch(d[Mr]=s,d[Xa]=y,i=(s.mode&1)!==0,l){case"dialog":gt("cancel",d),gt("close",d);break;case"iframe":case"object":case"embed":gt("load",d);break;case"video":case"audio":for(g=0;g<Ga.length;g++)gt(Ga[g],d);break;case"source":gt("error",d);break;case"img":case"image":case"link":gt("error",d),gt("load",d);break;case"details":gt("toggle",d);break;case"input":bi(d,y),gt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},gt("invalid",d);break;case"textarea":nt(d,y),gt("invalid",d)}Qt(l,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var O=y[x];x==="children"?typeof O=="string"?d.textContent!==O&&(y.suppressHydrationWarning!==!0&&uc(d.textContent,O,i),g=["children",O]):typeof O=="number"&&d.textContent!==""+O&&(y.suppressHydrationWarning!==!0&&uc(d.textContent,O,i),g=["children",""+O]):o.hasOwnProperty(x)&&O!=null&&x==="onScroll"&&gt("scroll",d)}switch(l){case"input":Qn(d),it(d,y,!0);break;case"textarea":Qn(d),Fn(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=lc)}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[Mr]=s,i[Xa]=d,jx(i,s,!1,!1),s.stateNode=i;e:{switch(x=Lr(l,d),l){case"dialog":gt("cancel",i),gt("close",i),g=d;break;case"iframe":case"object":case"embed":gt("load",i),g=d;break;case"video":case"audio":for(g=0;g<Ga.length;g++)gt(Ga[g],i);g=d;break;case"source":gt("error",i),g=d;break;case"img":case"image":case"link":gt("error",i),gt("load",i),g=d;break;case"details":gt("toggle",i),g=d;break;case"input":bi(i,d),g=Ti(i,d),gt("invalid",i);break;case"option":g=d;break;case"select":i._wrapperState={wasMultiple:!!d.multiple},g=w({},d,{value:void 0}),gt("invalid",i);break;case"textarea":nt(i,d),g=on(i,d),gt("invalid",i);break;default:g=d}Qt(l,g),O=g;for(y in O)if(O.hasOwnProperty(y)){var L=O[y];y==="style"?_i(i,L):y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&We(i,L)):y==="children"?typeof L=="string"?(l!=="textarea"||L!=="")&&Ze(i,L):typeof L=="number"&&Ze(i,""+L):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?L!=null&&y==="onScroll"&&gt("scroll",i):L!=null&&D(i,y,L,x))}switch(l){case"input":Qn(i),it(i,d,!1);break;case"textarea":Qn(i),Fn(i);break;case"option":d.value!=null&&i.setAttribute("value",""+Ve(d.value));break;case"select":i.multiple=!!d.multiple,y=d.value,y!=null?kt(i,!!d.multiple,y,!1):d.defaultValue!=null&&kt(i,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=lc)}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 ln(s),null;case 6:if(i&&s.stateNode!=null)Vx(i,s,i.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(l=hs(nu.current),hs(Fr.current),gc(s)){if(d=s.stateNode,l=s.memoizedProps,d[Mr]=s,(y=d.nodeValue!==l)&&(i=Hn,i!==null))switch(i.tag){case 3:uc(d.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&uc(d.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else d=(l.nodeType===9?l:l.ownerDocument).createTextNode(d),d[Mr]=s,s.stateNode=d}return ln(s),null;case 13:if(Et(Ct),d=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_t&&zn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)W_(),xo(),s.flags|=98560,y=!1;else if(y=gc(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[Mr]=s}else xo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ln(s),y=!1}else gr!==null&&(Tm(gr),gr=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||(Ct.current&1)!==0?Ht===0&&(Ht=3):xm())),s.updateQueue!==null&&(s.flags|=4),ln(s),null);case 4:return Ao(),um(i,s),i===null&&Ka(s.stateNode.containerInfo),ln(s),null;case 10:return Mp(s.type._context),ln(s),null;case 17:return vn(s.type)&&fc(),ln(s),null;case 19:if(Et(Ct),y=s.memoizedState,y===null)return ln(s),null;if(d=(s.flags&128)!==0,x=y.rendering,x===null)if(d)au(y,!1);else{if(Ht!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=xc(i),x!==null){for(s.flags|=128,au(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 ht(Ct,Ct.current&1|2),s.child}i=i.sibling}y.tail!==null&&Rt()>Oo&&(s.flags|=128,d=!0,au(y,!1),s.lanes=4194304)}else{if(!d)if(i=xc(x),i!==null){if(s.flags|=128,d=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),au(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!_t)return ln(s),null}else 2*Rt()-y.renderingStartTime>Oo&&l!==1073741824&&(s.flags|=128,d=!0,au(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=Rt(),s.sibling=null,l=Ct.current,ht(Ct,d?l&1|2:l&1),s):(ln(s),null);case 22:case 23:return _m(),d=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(jn&1073741824)!==0&&(ln(s),s.subtreeFlags&6&&(s.flags|=8192)):ln(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function XM(i,s){switch(Op(s),s.tag){case 1:return vn(s.type)&&fc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ao(),Et(An),Et(an),$p(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return zp(s),null;case 13:if(Et(Ct),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));xo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return Et(Ct),null;case 4:return Ao(),null;case 10:return Mp(s.type._context),null;case 22:case 23:return _m(),null;case 24:return null;default:return null}}var Ic=!1,cn=!1,JM=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function ko(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(d){Nt(i,s,d)}else l.current=null}function lm(i,s,l){try{l()}catch(d){Nt(i,s,d)}}var qx=!1;function ZM(i,s){if(_p=Xl,i=S_(),hp(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,O=-1,L=-1,Y=0,ie=0,ue=i,ne=null;t:for(;;){for(var Se;ue!==l||g!==0&&ue.nodeType!==3||(O=x+g),ue!==y||d!==0&&ue.nodeType!==3||(L=x+d),ue.nodeType===3&&(x+=ue.nodeValue.length),(Se=ue.firstChild)!==null;)ne=ue,ue=Se;for(;;){if(ue===i)break t;if(ne===l&&++Y===g&&(O=x),ne===y&&++ie===d&&(L=x),(Se=ue.nextSibling)!==null)break;ue=ne,ne=ue.parentNode}ue=Se}l=O===-1||L===-1?null:{start:O,end:L}}else l=null}l=l||{start:0,end:0}}else l=null;for(xp={focusedElem:i,selectionRange:l},Xl=!1,Ce=s;Ce!==null;)if(s=Ce,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ce=i;else for(;Ce!==null;){s=Ce;try{var Ae=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var ke=Ae.memoizedProps,Lt=Ae.memoizedState,z=s.stateNode,M=z.getSnapshotBeforeUpdate(s.elementType===s.type?ke:Er(s.type,ke),Lt);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){Nt(s,s.return,ge)}if(i=s.sibling,i!==null){i.return=s.return,Ce=i;break}Ce=s.return}return Ae=qx,qx=!1,Ae}function uu(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&&lm(s,l,y)}g=g.next}while(g!==d)}}function Pc(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 cm(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 Yx(i){var s=i.alternate;s!==null&&(i.alternate=null,Yx(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Mr],delete s[Xa],delete s[Ap],delete s[DM],delete s[MM])),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 Wx(i){return i.tag===5||i.tag===3||i.tag===4}function Gx(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Wx(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 fm(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=lc));else if(d!==4&&(i=i.child,i!==null))for(fm(i,s,l),i=i.sibling;i!==null;)fm(i,s,l),i=i.sibling}function dm(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(dm(i,s,l),i=i.sibling;i!==null;)dm(i,s,l),i=i.sibling}var Xt=null,yr=!1;function Li(i,s,l){for(l=l.child;l!==null;)Kx(i,s,l),l=l.sibling}function Kx(i,s,l){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(ql,l)}catch(O){}switch(l.tag){case 5:cn||ko(l,s);case 6:var d=Xt,g=yr;Xt=null,Li(i,s,l),Xt=d,yr=g,Xt!==null&&(yr?(i=Xt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Xt.removeChild(l.stateNode));break;case 18:Xt!==null&&(yr?(i=Xt,l=l.stateNode,i.nodeType===8?Cp(i.parentNode,l):i.nodeType===1&&Cp(i,l),Ha(i)):Cp(Xt,l.stateNode));break;case 4:d=Xt,g=yr,Xt=l.stateNode.containerInfo,yr=!0,Li(i,s,l),Xt=d,yr=g;break;case 0:case 11:case 14:case 15:if(!cn&&(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)&&lm(l,s,x),g=g.next}while(g!==d)}Li(i,s,l);break;case 1:if(!cn&&(ko(l,s),d=l.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=l.memoizedProps,d.state=l.memoizedState,d.componentWillUnmount()}catch(O){Nt(l,s,O)}Li(i,s,l);break;case 21:Li(i,s,l);break;case 22:l.mode&1?(cn=(d=cn)||l.memoizedState!==null,Li(i,s,l),cn=d):Li(i,s,l);break;default:Li(i,s,l)}}function Qx(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new JM),s.forEach(function(d){var g=uF.bind(null,i,d);l.has(d)||(l.add(d),d.then(g,g))})}}function Tr(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,O=x;e:for(;O!==null;){switch(O.tag){case 5:Xt=O.stateNode,yr=!1;break e;case 3:Xt=O.stateNode.containerInfo,yr=!0;break e;case 4:Xt=O.stateNode.containerInfo,yr=!0;break e}O=O.return}if(Xt===null)throw Error(n(160));Kx(y,x,g),Xt=null,yr=!1;var L=g.alternate;L!==null&&(L.return=null),g.return=null}catch(Y){Nt(g,s,Y)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Xx(s,i),s=s.sibling}function Xx(i,s){var l=i.alternate,d=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Tr(s,i),Ur(i),d&4){try{uu(3,i,i.return),Pc(3,i)}catch(ke){Nt(i,i.return,ke)}try{uu(5,i,i.return)}catch(ke){Nt(i,i.return,ke)}}break;case 1:Tr(s,i),Ur(i),d&512&&l!==null&&ko(l,l.return);break;case 5:if(Tr(s,i),Ur(i),d&512&&l!==null&&ko(l,l.return),i.flags&32){var g=i.stateNode;try{Ze(g,"")}catch(ke){Nt(i,i.return,ke)}}if(d&4&&(g=i.stateNode,g!=null)){var y=i.memoizedProps,x=l!==null?l.memoizedProps:y,O=i.type,L=i.updateQueue;if(i.updateQueue=null,L!==null)try{O==="input"&&y.type==="radio"&&y.name!=null&&_e(g,y),Lr(O,x);var Y=Lr(O,y);for(x=0;x<L.length;x+=2){var ie=L[x],ue=L[x+1];ie==="style"?_i(g,ue):ie==="dangerouslySetInnerHTML"?We(g,ue):ie==="children"?Ze(g,ue):D(g,ie,ue,Y)}switch(O){case"input":He(g,y);break;case"textarea":Jr(g,y);break;case"select":var ne=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var Se=y.value;Se!=null?kt(g,!!y.multiple,Se,!1):ne!==!!y.multiple&&(y.defaultValue!=null?kt(g,!!y.multiple,y.defaultValue,!0):kt(g,!!y.multiple,y.multiple?[]:"",!1))}g[Xa]=y}catch(ke){Nt(i,i.return,ke)}}break;case 6:if(Tr(s,i),Ur(i),d&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ke){Nt(i,i.return,ke)}}break;case 3:if(Tr(s,i),Ur(i),d&4&&l!==null&&l.memoizedState.isDehydrated)try{Ha(s.containerInfo)}catch(ke){Nt(i,i.return,ke)}break;case 4:Tr(s,i),Ur(i);break;case 13:Tr(s,i),Ur(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(mm=Rt())),d&4&&Qx(i);break;case 22:if(ie=l!==null&&l.memoizedState!==null,i.mode&1?(cn=(Y=cn)||ie,Tr(s,i),cn=Y):Tr(s,i),Ur(i),d&8192){if(Y=i.memoizedState!==null,(i.stateNode.isHidden=Y)&&!ie&&(i.mode&1)!==0)for(Ce=i,ie=i.child;ie!==null;){for(ue=Ce=ie;Ce!==null;){switch(ne=Ce,Se=ne.child,ne.tag){case 0:case 11:case 14:case 15:uu(4,ne,ne.return);break;case 1:ko(ne,ne.return);var Ae=ne.stateNode;if(typeof Ae.componentWillUnmount=="function"){d=ne,l=ne.return;try{s=d,Ae.props=s.memoizedProps,Ae.state=s.memoizedState,Ae.componentWillUnmount()}catch(ke){Nt(d,l,ke)}}break;case 5:ko(ne,ne.return);break;case 22:if(ne.memoizedState!==null){e2(ue);continue}}Se!==null?(Se.return=ne,Ce=Se):e2(ue)}ie=ie.sibling}e:for(ie=null,ue=i;;){if(ue.tag===5){if(ie===null){ie=ue;try{g=ue.stateNode,Y?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(O=ue.stateNode,L=ue.memoizedProps.style,x=L!=null&&L.hasOwnProperty("display")?L.display:null,O.style.display=Xn("display",x))}catch(ke){Nt(i,i.return,ke)}}}else if(ue.tag===6){if(ie===null)try{ue.stateNode.nodeValue=Y?"":ue.memoizedProps}catch(ke){Nt(i,i.return,ke)}}else if((ue.tag!==22&&ue.tag!==23||ue.memoizedState===null||ue===i)&&ue.child!==null){ue.child.return=ue,ue=ue.child;continue}if(ue===i)break e;for(;ue.sibling===null;){if(ue.return===null||ue.return===i)break e;ie===ue&&(ie=null),ue=ue.return}ie===ue&&(ie=null),ue.sibling.return=ue.return,ue=ue.sibling}}break;case 19:Tr(s,i),Ur(i),d&4&&Qx(i);break;case 21:break;default:Tr(s,i),Ur(i)}}function Ur(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(Wx(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&&(Ze(g,""),d.flags&=-33);var y=Gx(i);dm(i,y,g);break;case 3:case 4:var x=d.stateNode.containerInfo,O=Gx(i);fm(i,O,x);break;default:throw Error(n(161))}}catch(L){Nt(i,i.return,L)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function eF(i,s,l){Ce=i,Jx(i)}function Jx(i,s,l){for(var d=(i.mode&1)!==0;Ce!==null;){var g=Ce,y=g.child;if(g.tag===22&&d){var x=g.memoizedState!==null||Ic;if(!x){var O=g.alternate,L=O!==null&&O.memoizedState!==null||cn;O=Ic;var Y=cn;if(Ic=x,(cn=L)&&!Y)for(Ce=g;Ce!==null;)x=Ce,L=x.child,x.tag===22&&x.memoizedState!==null?t2(g):L!==null?(L.return=x,Ce=L):t2(g);for(;y!==null;)Ce=y,Jx(y),y=y.sibling;Ce=g,Ic=O,cn=Y}Zx(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,Ce=y):Zx(i)}}function Zx(i){for(;Ce!==null;){var s=Ce;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:cn||Pc(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!cn)if(l===null)d.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:Er(s.type,l.memoizedProps);d.componentDidUpdate(g,l.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&ex(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}ex(s,x,l)}break;case 5:var O=s.stateNode;if(l===null&&s.flags&4){l=O;var L=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&l.focus();break;case"img":L.src&&(l.src=L.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 ie=Y.memoizedState;if(ie!==null){var ue=ie.dehydrated;ue!==null&&Ha(ue)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}cn||s.flags&512&&cm(s)}catch(ne){Nt(s,s.return,ne)}}if(s===i){Ce=null;break}if(l=s.sibling,l!==null){l.return=s.return,Ce=l;break}Ce=s.return}}function e2(i){for(;Ce!==null;){var s=Ce;if(s===i){Ce=null;break}var l=s.sibling;if(l!==null){l.return=s.return,Ce=l;break}Ce=s.return}}function t2(i){for(;Ce!==null;){var s=Ce;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{Pc(4,s)}catch(L){Nt(s,l,L)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var g=s.return;try{d.componentDidMount()}catch(L){Nt(s,g,L)}}var y=s.return;try{cm(s)}catch(L){Nt(s,y,L)}break;case 5:var x=s.return;try{cm(s)}catch(L){Nt(s,x,L)}}}catch(L){Nt(s,s.return,L)}if(s===i){Ce=null;break}var O=s.sibling;if(O!==null){O.return=s.return,Ce=O;break}Ce=s.return}}var tF=Math.ceil,Rc=G.ReactCurrentDispatcher,hm=G.ReactCurrentOwner,nr=G.ReactCurrentBatchConfig,et=0,Wt=null,Bt=null,Jt=0,jn=0,No=Ni(0),Ht=0,lu=null,ms=0,Lc=0,pm=0,cu=null,Nn=null,mm=0,Oo=1/0,ai=null,Dc=!1,gm=null,Di=null,Mc=!1,Mi=null,Fc=0,fu=0,Em=null,Bc=-1,Uc=0;function mn(){return(et&6)!==0?Rt():Bc!==-1?Bc:Bc=Rt()}function Fi(i){return(i.mode&1)===0?1:(et&2)!==0&&Jt!==0?Jt&-Jt:BM.transition!==null?(Uc===0&&(Uc=Gb()),Uc):(i=at,i!==0||(i=window.event,i=i===void 0?16:r_(i.type)),i)}function br(i,s,l,d){if(50<fu)throw fu=0,Em=null,Error(n(185));Da(i,l,d),((et&2)===0||i!==Wt)&&(i===Wt&&((et&2)===0&&(Lc|=l),Ht===4&&Bi(i,Jt)),On(i,d),l===1&&et===0&&(s.mode&1)===0&&(Oo=Rt()+500,hc&&Ii()))}function On(i,s){var l=i.callbackNode;B8(i,s);var d=Gl(i,i===Wt?Jt:0);if(d===0)l!==null&&qb(l),i.callbackNode=null,i.callbackPriority=0;else if(s=d&-d,i.callbackPriority!==s){if(l!=null&&qb(l),s===1)i.tag===0?FM(r2.bind(null,i)):j_(r2.bind(null,i)),RM(function(){(et&6)===0&&Ii()}),l=null;else{switch(Kb(d)){case 1:l=Qh;break;case 4:l=Yb;break;case 16:l=Vl;break;case 536870912:l=Wb;break;default:l=Vl}l=f2(l,n2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function n2(i,s){if(Bc=-1,Uc=0,(et&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Io()&&i.callbackNode!==l)return null;var d=Gl(i,i===Wt?Jt:0);if(d===0)return null;if((d&30)!==0||(d&i.expiredLanes)!==0||s)s=Hc(i,d);else{s=d;var g=et;et|=2;var y=s2();(Wt!==i||Jt!==s)&&(ai=null,Oo=Rt()+500,Es(i,s));do try{iF();break}catch(O){i2(i,O)}while(!0);Dp(),Rc.current=y,et=g,Bt!==null?s=0:(Wt=null,Jt=0,s=Ht)}if(s!==0){if(s===2&&(g=Xh(i),g!==0&&(d=g,s=ym(i,g))),s===1)throw l=lu,Es(i,0),Bi(i,d),On(i,Rt()),l;if(s===6)Bi(i,d);else{if(g=i.current.alternate,(d&30)===0&&!nF(g)&&(s=Hc(i,d),s===2&&(y=Xh(i),y!==0&&(d=y,s=ym(i,y))),s===1))throw l=lu,Es(i,0),Bi(i,d),On(i,Rt()),l;switch(i.finishedWork=g,i.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:ys(i,Nn,ai);break;case 3:if(Bi(i,d),(d&130023424)===d&&(s=mm+500-Rt(),10<s)){if(Gl(i,0)!==0)break;if(g=i.suspendedLanes,(g&d)!==d){mn(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=wp(ys.bind(null,i,Nn,ai),s);break}ys(i,Nn,ai);break;case 4:if(Bi(i,d),(d&4194240)===d)break;for(s=i.eventTimes,g=-1;0<d;){var x=31-pr(d);y=1<<x,x=s[x],x>g&&(g=x),d&=~y}if(d=g,d=Rt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*tF(d/1960))-d,10<d){i.timeoutHandle=wp(ys.bind(null,i,Nn,ai),d);break}ys(i,Nn,ai);break;case 5:ys(i,Nn,ai);break;default:throw Error(n(329))}}}return On(i,Rt()),i.callbackNode===l?n2.bind(null,i):null}function ym(i,s){var l=cu;return i.current.memoizedState.isDehydrated&&(Es(i,s).flags|=256),i=Hc(i,s),i!==2&&(s=Nn,Nn=l,s!==null&&Tm(s)),i}function Tm(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function nF(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(!mr(y(),g))return!1}catch(x){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Bi(i,s){for(s&=~pm,s&=~Lc,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-pr(s),d=1<<l;i[l]=-1,s&=~d}}function r2(i){if((et&6)!==0)throw Error(n(327));Io();var s=Gl(i,0);if((s&1)===0)return On(i,Rt()),null;var l=Hc(i,s);if(i.tag!==0&&l===2){var d=Xh(i);d!==0&&(s=d,l=ym(i,d))}if(l===1)throw l=lu,Es(i,0),Bi(i,s),On(i,Rt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,ys(i,Nn,ai),On(i,Rt()),null}function bm(i,s){var l=et;et|=1;try{return i(s)}finally{et=l,et===0&&(Oo=Rt()+500,hc&&Ii())}}function gs(i){Mi!==null&&Mi.tag===0&&(et&6)===0&&Io();var s=et;et|=1;var l=nr.transition,d=at;try{if(nr.transition=null,at=1,i)return i()}finally{at=d,nr.transition=l,et=s,(et&6)===0&&Ii()}}function _m(){jn=No.current,Et(No)}function Es(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,PM(l)),Bt!==null)for(l=Bt.return;l!==null;){var d=l;switch(Op(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&fc();break;case 3:Ao(),Et(An),Et(an),$p();break;case 5:zp(d);break;case 4:Ao();break;case 13:Et(Ct);break;case 19:Et(Ct);break;case 10:Mp(d.type._context);break;case 22:case 23:_m()}l=l.return}if(Wt=i,Bt=i=Ui(i.current,null),Jt=jn=s,Ht=0,lu=null,pm=Lc=ms=0,Nn=cu=null,ds!==null){for(s=0;s<ds.length;s++)if(l=ds[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}ds=null}return i}function i2(i,s){do{var l=Bt;try{if(Dp(),Sc.current=vc,wc){for(var d=At.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}wc=!1}if(ps=0,Yt=Ut=At=null,ru=!1,iu=0,hm.current=null,l===null||l.return===null){Ht=1,lu=s,Bt=null;break}e:{var y=i,x=l.return,O=l,L=s;if(s=Jt,O.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var Y=L,ie=O,ue=ie.tag;if((ie.mode&1)===0&&(ue===0||ue===11||ue===15)){var ne=ie.alternate;ne?(ie.updateQueue=ne.updateQueue,ie.memoizedState=ne.memoizedState,ie.lanes=ne.lanes):(ie.updateQueue=null,ie.memoizedState=null)}var Se=Nx(x);if(Se!==null){Se.flags&=-257,Ox(Se,x,O,y,s),Se.mode&1&&kx(y,Y,s),s=Se,L=Y;var Ae=s.updateQueue;if(Ae===null){var ke=new Set;ke.add(L),s.updateQueue=ke}else Ae.add(L);break e}else{if((s&1)===0){kx(y,Y,s),xm();break e}L=Error(n(426))}}else if(_t&&O.mode&1){var Lt=Nx(x);if(Lt!==null){(Lt.flags&65536)===0&&(Lt.flags|=256),Ox(Lt,x,O,y,s),Rp(vo(L,O));break e}}y=L=vo(L,O),Ht!==4&&(Ht=2),cu===null?cu=[y]:cu.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var z=Ax(y,L,s);Z_(y,z);break e;case 1:O=L;var M=y.type,V=y.stateNode;if((y.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Di===null||!Di.has(V)))){y.flags|=65536,s&=-s,y.lanes|=s;var ge=vx(y,O,s);Z_(y,ge);break e}}y=y.return}while(y!==null)}a2(l)}catch(Ne){s=Ne,Bt===l&&l!==null&&(Bt=l=l.return);continue}break}while(!0)}function s2(){var i=Rc.current;return Rc.current=vc,i===null?vc:i}function xm(){(Ht===0||Ht===3||Ht===2)&&(Ht=4),Wt===null||(ms&268435455)===0&&(Lc&268435455)===0||Bi(Wt,Jt)}function Hc(i,s){var l=et;et|=2;var d=s2();(Wt!==i||Jt!==s)&&(ai=null,Es(i,s));do try{rF();break}catch(g){i2(i,g)}while(!0);if(Dp(),et=l,Rc.current=d,Bt!==null)throw Error(n(261));return Wt=null,Jt=0,Ht}function rF(){for(;Bt!==null;)o2(Bt)}function iF(){for(;Bt!==null&&!N8();)o2(Bt)}function o2(i){var s=c2(i.alternate,i,jn);i.memoizedProps=i.pendingProps,s===null?a2(i):Bt=s,hm.current=null}function a2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=QM(l,s,jn),l!==null){Bt=l;return}}else{if(l=XM(l,s),l!==null){l.flags&=32767,Bt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Ht=6,Bt=null;return}}if(s=s.sibling,s!==null){Bt=s;return}Bt=s=i}while(s!==null);Ht===0&&(Ht=5)}function ys(i,s,l){var d=at,g=nr.transition;try{nr.transition=null,at=1,sF(i,s,l,d)}finally{nr.transition=g,at=d}return null}function sF(i,s,l,d){do Io();while(Mi!==null);if((et&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(U8(i,y),i===Wt&&(Bt=Wt=null,Jt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Mc||(Mc=!0,f2(Vl,function(){return Io(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=nr.transition,nr.transition=null;var x=at;at=1;var O=et;et|=4,hm.current=null,ZM(i,l),Xx(l,i),CM(xp),Xl=!!_p,xp=_p=null,i.current=l,eF(l),O8(),et=O,at=x,nr.transition=y}else i.current=l;if(Mc&&(Mc=!1,Mi=i,Fc=g),y=i.pendingLanes,y===0&&(Di=null),R8(l.stateNode),On(i,Rt()),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(Dc)throw Dc=!1,i=gm,gm=null,i;return(Fc&1)!==0&&i.tag!==0&&Io(),y=i.pendingLanes,(y&1)!==0?i===Em?fu++:(fu=0,Em=i):fu=0,Ii(),null}function Io(){if(Mi!==null){var i=Kb(Fc),s=nr.transition,l=at;try{if(nr.transition=null,at=16>i?16:i,Mi===null)var d=!1;else{if(i=Mi,Mi=null,Fc=0,(et&6)!==0)throw Error(n(331));var g=et;for(et|=4,Ce=i.current;Ce!==null;){var y=Ce,x=y.child;if((Ce.flags&16)!==0){var O=y.deletions;if(O!==null){for(var L=0;L<O.length;L++){var Y=O[L];for(Ce=Y;Ce!==null;){var ie=Ce;switch(ie.tag){case 0:case 11:case 15:uu(8,ie,y)}var ue=ie.child;if(ue!==null)ue.return=ie,Ce=ue;else for(;Ce!==null;){ie=Ce;var ne=ie.sibling,Se=ie.return;if(Yx(ie),ie===Y){Ce=null;break}if(ne!==null){ne.return=Se,Ce=ne;break}Ce=Se}}}var Ae=y.alternate;if(Ae!==null){var ke=Ae.child;if(ke!==null){Ae.child=null;do{var Lt=ke.sibling;ke.sibling=null,ke=Lt}while(ke!==null)}}Ce=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,Ce=x;else e:for(;Ce!==null;){if(y=Ce,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:uu(9,y,y.return)}var z=y.sibling;if(z!==null){z.return=y.return,Ce=z;break e}Ce=y.return}}var M=i.current;for(Ce=M;Ce!==null;){x=Ce;var V=x.child;if((x.subtreeFlags&2064)!==0&&V!==null)V.return=x,Ce=V;else e:for(x=M;Ce!==null;){if(O=Ce,(O.flags&2048)!==0)try{switch(O.tag){case 0:case 11:case 15:Pc(9,O)}}catch(Ne){Nt(O,O.return,Ne)}if(O===x){Ce=null;break e}var ge=O.sibling;if(ge!==null){ge.return=O.return,Ce=ge;break e}Ce=O.return}}if(et=g,Ii(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(ql,i)}catch(Ne){}d=!0}return d}finally{at=l,nr.transition=s}}return!1}function u2(i,s,l){s=vo(l,s),s=Ax(i,s,1),i=Ri(i,s,1),s=mn(),i!==null&&(Da(i,1,s),On(i,s))}function Nt(i,s,l){if(i.tag===3)u2(i,i,l);else for(;s!==null;){if(s.tag===3){u2(s,i,l);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Di===null||!Di.has(d))){i=vo(l,i),i=vx(s,i,1),s=Ri(s,i,1),i=mn(),s!==null&&(Da(s,1,i),On(s,i));break}}s=s.return}}function oF(i,s,l){var d=i.pingCache;d!==null&&d.delete(s),s=mn(),i.pingedLanes|=i.suspendedLanes&l,Wt===i&&(Jt&l)===l&&(Ht===4||Ht===3&&(Jt&130023424)===Jt&&500>Rt()-mm?Es(i,0):pm|=l),On(i,s)}function l2(i,s){s===0&&((i.mode&1)===0?s=1:(s=Wl,Wl<<=1,(Wl&130023424)===0&&(Wl=4194304)));var l=mn();i=ii(i,s),i!==null&&(Da(i,s,l),On(i,l))}function aF(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),l2(i,l)}function uF(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),l2(i,l)}var c2;c2=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||An.current)kn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return kn=!1,KM(i,s,l);kn=(i.flags&131072)!==0}else kn=!1,_t&&(s.flags&1048576)!==0&&$_(s,mc,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;Oc(i,s),i=s.pendingProps;var g=To(s,an.current);Co(s,l),g=Yp(null,s,d,i,g,l);var y=Wp();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,vn(d)?(y=!0,dc(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Up(s),g.updater=kc,s.stateNode=g,g._reactInternals=s,Zp(s,d,i,l),s=rm(null,s,d,!0,y,l)):(s.tag=0,_t&&y&&Np(s),pn(null,s,g,l),s=s.child),s;case 16:d=s.elementType;e:{switch(Oc(i,s),i=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=cF(d),i=Er(d,i),g){case 0:s=nm(null,s,d,i,l);break e;case 1:s=Mx(null,s,d,i,l);break e;case 11:s=Ix(null,s,d,i,l);break e;case 14:s=Px(null,s,d,Er(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:Er(d,g),nm(i,s,d,g,l);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:Er(d,g),Mx(i,s,d,g,l);case 3:e:{if(Fx(s),i===null)throw Error(n(387));d=s.pendingProps,y=s.memoizedState,g=y.element,J_(i,s),_c(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=vo(Error(n(423)),s),s=Bx(i,s,d,l,g);break e}else if(d!==g){g=vo(Error(n(424)),s),s=Bx(i,s,d,l,g);break e}else for(zn=ki(s.stateNode.containerInfo.firstChild),Hn=s,_t=!0,gr=null,l=Q_(s,null,d,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(xo(),d===g){s=oi(i,s,l);break e}pn(i,s,d,l)}s=s.child}return s;case 5:return tx(s),i===null&&Pp(s),d=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,x=g.children,Sp(d,g)?x=null:y!==null&&Sp(d,y)&&(s.flags|=32),Dx(i,s),pn(i,s,x,l),s.child;case 6:return i===null&&Pp(s),null;case 13:return Ux(i,s,l);case 4:return Hp(s,s.stateNode.containerInfo),d=s.pendingProps,i===null?s.child=So(s,null,d,l):pn(i,s,d,l),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:Er(d,g),Ix(i,s,d,g,l);case 7:return pn(i,s,s.pendingProps,l),s.child;case 8:return pn(i,s,s.pendingProps.children,l),s.child;case 12:return pn(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,ht(yc,d._currentValue),d._currentValue=x,y!==null)if(mr(y.value,x)){if(y.children===g.children&&!An.current){s=oi(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var O=y.dependencies;if(O!==null){x=y.child;for(var L=O.firstContext;L!==null;){if(L.context===d){if(y.tag===1){L=si(-1,l&-l),L.tag=2;var Y=y.updateQueue;if(Y!==null){Y=Y.shared;var ie=Y.pending;ie===null?L.next=L:(L.next=ie.next,ie.next=L),Y.pending=L}}y.lanes|=l,L=y.alternate,L!==null&&(L.lanes|=l),Fp(y.return,l,s),O.lanes|=l;break}L=L.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,O=x.alternate,O!==null&&(O.lanes|=l),Fp(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}pn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,Co(s,l),g=er(g),d=d(g),s.flags|=1,pn(i,s,d,l),s.child;case 14:return d=s.type,g=Er(d,s.pendingProps),g=Er(d.type,g),Px(i,s,d,g,l);case 15:return Rx(i,s,s.type,s.pendingProps,l);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:Er(d,g),Oc(i,s),s.tag=1,vn(d)?(i=!0,dc(s)):i=!1,Co(s,l),wx(s,d,g),Zp(s,d,g,l),rm(null,s,d,!0,i,l);case 19:return zx(i,s,l);case 22:return Lx(i,s,l)}throw Error(n(156,s.tag))};function f2(i,s){return Vb(i,s)}function lF(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 rr(i,s,l,d){return new lF(i,s,l,d)}function Sm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function cF(i){if(typeof i=="function")return Sm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===de)return 11;if(i===Te)return 14}return 2}function Ui(i,s){var l=i.alternate;return l===null?(l=rr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function zc(i,s,l,d,g,y){var x=2;if(d=i,typeof i=="function")Sm(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case te:return Ts(l.children,g,y,s);case be:x=8,g|=8;break;case he:return i=rr(12,l,s,g|2),i.elementType=he,i.lanes=y,i;case ce:return i=rr(13,l,s,g),i.elementType=ce,i.lanes=y,i;case fe:return i=rr(19,l,s,g),i.elementType=fe,i.lanes=y,i;case oe:return jc(l,g,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case H:x=10;break e;case le:x=9;break e;case de:x=11;break e;case Te:x=14;break e;case we:x=16,d=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=rr(x,l,s,g),s.elementType=i,s.type=d,s.lanes=y,s}function Ts(i,s,l,d){return i=rr(7,i,d,s),i.lanes=l,i}function jc(i,s,l,d){return i=rr(22,i,d,s),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function wm(i,s,l){return i=rr(6,i,null,s),i.lanes=l,i}function Cm(i,s,l){return s=rr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function fF(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=Jh(0),this.expirationTimes=Jh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jh(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Am(i,s,l,d,g,y,x,O,L){return i=new fF(i,s,l,O,L),s===1?(s=1,y===!0&&(s|=8)):s=0,y=rr(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:d,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Up(y),i}function dF(i,s,l){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:d==null?null:""+d,children:i,containerInfo:s,implementation:l}}function d2(i){if(!i)return Oi;i=i._reactInternals;e:{if(as(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(vn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(vn(l))return H_(i,l,s)}return s}function h2(i,s,l,d,g,y,x,O,L){return i=Am(l,d,!0,i,g,y,x,O,L),i.context=d2(null),l=i.current,d=mn(),g=Fi(l),y=si(d,g),y.callback=s!=null?s:null,Ri(l,y,g),i.current.lanes=g,Da(i,g,d),On(i,d),i}function $c(i,s,l,d){var g=s.current,y=mn(),x=Fi(g);return l=d2(l),s.context===null?s.context=l:s.pendingContext=l,s=si(y,x),s.payload={element:i},d=d===void 0?null:d,d!==null&&(s.callback=d),i=Ri(g,s,x),i!==null&&(br(i,g,x,y),bc(i,g,x)),x}function Vc(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 p2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function vm(i,s){p2(i,s),(i=i.alternate)&&p2(i,s)}function hF(){return null}var m2=typeof reportError=="function"?reportError:function(i){console.error(i)};function km(i){this._internalRoot=i}qc.prototype.render=km.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));$c(i,s,null,null)},qc.prototype.unmount=km.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;gs(function(){$c(null,i,null,null)}),s[ei]=null}};function qc(i){this._internalRoot=i}qc.prototype.unstable_scheduleHydration=function(i){if(i){var s=Jb();i={blockedOn:null,target:i,priority:s};for(var l=0;l<Ci.length&&s!==0&&s<Ci[l].priority;l++);Ci.splice(l,0,i),l===0&&t_(i)}};function Nm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Yc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function g2(){}function pF(i,s,l,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var Y=Vc(x);y.call(Y)}}var x=h2(s,d,i,0,null,!1,!1,"",g2);return i._reactRootContainer=x,i[ei]=x.current,Ka(i.nodeType===8?i.parentNode:i),gs(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof d=="function"){var O=d;d=function(){var Y=Vc(L);O.call(Y)}}var L=Am(i,0,!1,null,null,!1,!1,"",g2);return i._reactRootContainer=L,i[ei]=L.current,Ka(i.nodeType===8?i.parentNode:i),gs(function(){$c(s,L,l,d)}),L}function Wc(i,s,l,d,g){var y=l._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var O=g;g=function(){var L=Vc(x);O.call(L)}}$c(s,x,i,g)}else x=pF(l,s,i,g,d);return Vc(x)}Qb=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=La(s.pendingLanes);l!==0&&(Zh(s,l|1),On(s,Rt()),(et&6)===0&&(Oo=Rt()+500,Ii()))}break;case 13:gs(function(){var d=ii(i,1);if(d!==null){var g=mn();br(d,i,1,g)}}),vm(i,1)}},ep=function(i){if(i.tag===13){var s=ii(i,134217728);if(s!==null){var l=mn();br(s,i,134217728,l)}vm(i,134217728)}},Xb=function(i){if(i.tag===13){var s=Fi(i),l=ii(i,s);if(l!==null){var d=mn();br(l,i,s,d)}vm(i,s)}},Jb=function(){return at},Zb=function(i,s){var l=at;try{return at=i,s()}finally{at=l}},Yh=function(i,s,l){switch(s){case"input":if(He(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=cc(d);if(!g)throw Error(n(90));ss(d),He(d,g)}}}break;case"textarea":Jr(i,l);break;case"select":s=l.value,s!=null&&kt(i,!!l.multiple,s,!1)}},Fb=bm,Bb=gs;var mF={usingClientEntryPoint:!1,Events:[Ja,Eo,cc,Db,Mb,bm]},du={findFiberByHostInstance:us,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gF={bundleType:du.bundleType,version:du.version,rendererPackageName:du.rendererPackageName,rendererConfig:du.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:G.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=jb(i),i===null?null:i.stateNode},findFiberByHostInstance:du.findFiberByHostInstance||hF,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 Gc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gc.isDisabled&&Gc.supportsFiber)try{ql=Gc.inject(gF),Dr=Gc}catch(i){}}return xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mF,xn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Nm(s))throw Error(n(200));return dF(i,s,null,l)},xn.createRoot=function(i,s){if(!Nm(i))throw Error(n(299));var l=!1,d="",g=m2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Am(i,1,!1,null,null,l,!1,d,g),i[ei]=s.current,Ka(i.nodeType===8?i.parentNode:i),new km(s)},xn.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=jb(s),i=i===null?null:i.stateNode,i},xn.flushSync=function(i){return gs(i)},xn.hydrate=function(i,s,l){if(!Yc(s))throw Error(n(200));return Wc(null,i,s,!0,l)},xn.hydrateRoot=function(i,s,l){if(!Nm(i))throw Error(n(405));var d=l!=null&&l.hydratedSources||null,g=!1,y="",x=m2;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=h2(s,null,i,1,l!=null?l:null,g,!1,y,x),i[ei]=s.current,Ka(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 qc(s)},xn.render=function(i,s,l){if(!Yc(s))throw Error(n(200));return Wc(null,i,s,!1,l)},xn.unmountComponentAtNode=function(i){if(!Yc(i))throw Error(n(40));return i._reactRootContainer?(gs(function(){Wc(null,null,i,!1,function(){i._reactRootContainer=null,i[ei]=null})}),!0):!1},xn.unstable_batchedUpdates=bm,xn.unstable_renderSubtreeIntoContainer=function(i,s,l,d){if(!Yc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Wc(i,s,l,!1,d)},xn.version="18.3.1-next-f1338f8080-20240426",xn}var r1;function i1(){if(r1)return sd.exports;r1=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(),sd.exports=qv(),sd.exports}var Ju=i1();function Yv(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ud=()=>e=>Array.from(new Set(e)),s1=typeof globalThis.document!="undefined"?q.useLayoutEffect:q.useEffect;function Zu(e){var E,b;const t=(E=e().value)!=null?E:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=q.useState(t),[o,a]=q.useState(r),u=e().value!==void 0,c=q.useRef(o);c.current=u?e().value:o;const f=q.useRef(c.current);s1(()=>{f.current=c.current},[o,e().value]);const h=T=>{var C,I;const _=f.current,S=Is(T)?T(_):T;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),u||a(S),n(S,_)||(I=(C=e()).onChange)==null||I.call(C,S,_)};function m(){return u?e().value:o}return{initial:r,ref:c,get:m,set(T){(e().sync?Ju.flushSync:$A)(()=>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)}}}Zu.cleanup=e=>{q.useEffect(()=>e,[])},Zu.ref=e=>{const t=q.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function Wv(e){const t=q.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var Gv=(e,t)=>{const n=q.useRef(!1),r=q.useRef(!1);q.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),q.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ld(e,t={}){var le,de,ce,fe,Te,we;const n=q.useMemo(()=>{const{id:oe,ids:$,getRootNode:ee}=t;return jv({id:oe,ids:$,getRootNode:ee})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},o=(de=(le=e.props)==null?void 0:le.call(e,{props:Gf(t),scope:n}))!=null?de:t,a=Kv(o),u=(ce=e.context)==null?void 0:ce.call(e,{prop:a,bindable:Zu,scope:n,flush:a1,getContext(){return f},getComputed(){return W},getRefs(){return S},getEvent(){return T()}}),c=o1(u),f={get(oe){var $;return($=c.current)==null?void 0:$[oe].ref.current},set(oe,$){var ee;(ee=c.current)==null||ee[oe].set($)},initial(oe){var $;return($=c.current)==null?void 0:$[oe].initial},hash(oe){var ee,w;const $=(ee=c.current)==null?void 0:ee[oe].get();return(w=c.current)==null?void 0:w[oe].hash($)}},h=q.useRef(new Map),m=q.useRef(null),E=q.useRef(null),b=q.useRef({type:""}),T=()=>ye(U({},b.current),{current(){return b.current},previous(){return E.current}}),_=()=>ye(U({},B),{matches(...oe){return oe.includes(B.ref.current)},hasTag(oe){var $,ee;return!!((ee=($=e.states[B.ref.current])==null?void 0:$.tags)!=null&&ee.includes(oe))}}),S=Wv((Te=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:f}))!=null?Te:{}),C=()=>({state:_(),context:f,event:T(),prop:a,send:H,action:I,guard:F,track:Gv,refs:S,computed:W,flush:a1,scope:n,choose:G}),I=oe=>{const $=Is(oe)?oe(C()):oe;if(!$)return;const ee=$.map(w=>{var Q,k;const R=(k=(Q=e.implementations)==null?void 0:Q.actions)==null?void 0:k[w];return R||Kf(`[zag-js] No implementation found for action "${JSON.stringify(w)}"`),R});for(const w of ee)w==null||w(C())},F=oe=>{var $,ee;return Is(oe)?oe(C()):(ee=($=e.implementations)==null?void 0:$.guards)==null?void 0:ee[oe](C())},D=oe=>{const $=Is(oe)?oe(C()):oe;if(!$)return;const ee=$.map(R=>{var k,xe;const Q=(xe=(k=e.implementations)==null?void 0:k.effects)==null?void 0:xe[R];return Q||Kf(`[zag-js] No implementation found for effect "${JSON.stringify(R)}"`),Q}),w=[];for(const R of ee){const Q=R==null?void 0:R(C());Q&&w.push(Q)}return()=>w.forEach(R=>R==null?void 0:R())},G=oe=>RA(oe).find($=>{let ee=!$.guard;return qu($.guard)?ee=!!F($.guard):Is($.guard)&&(ee=$.guard(C())),ee}),W=oe=>{qA(e.computed,()=>"[zag-js] No computed object found on machine");const $=e.computed[oe];return $({context:f,event:T(),prop:a,refs:S,scope:n,computed:W})},B=Zu(()=>({defaultValue:e.initialState({prop:a}),onChange(oe,$){var w,R,Q,k;if($){const xe=h.current.get($);xe==null||xe(),h.current.delete($)}$&&I((w=e.states[$])==null?void 0:w.exit),I((R=m.current)==null?void 0:R.actions);const ee=D((Q=e.states[oe])==null?void 0:Q.effects);if(ee&&h.current.set(oe,ee),$===id){I(e.entry);const xe=D(e.effects);xe&&h.current.set(id,xe)}I((k=e.states[oe])==null?void 0:k.entry)}})),te=q.useRef(void 0),be=q.useRef(Ls.NotStarted);s1(()=>{queueMicrotask(()=>{var R;const ee=be.current===Ls.Started;be.current=Ls.Started,r(ee?"rehydrating...":"initializing...");const w=(R=te.current)!=null?R:B.initial;B.invoke(w,ee?B.get():id)});const oe=h.current,$=B.ref.current;return()=>{r("unmounting..."),te.current=$,be.current=Ls.Stopped,oe.forEach(ee=>ee==null?void 0:ee()),h.current=new Map,m.current=null,queueMicrotask(()=>{I(e.exit)})}},[]);const he=()=>"ref"in B?B.ref.current:B.get(),H=oe=>{queueMicrotask(()=>{var k,xe,Be,Ie,Ye;if(be.current!==Ls.Started)return;E.current=b.current,b.current=oe;let $=he();const ee=(Be=(k=e.states[$].on)==null?void 0:k[oe.type])!=null?Be:(xe=e.on)==null?void 0:xe[oe.type],w=G(ee);if(!w)return;m.current=w;const R=(Ie=w.target)!=null?Ie:$;r("transition",oe.type,w.target||$,`(${w.actions})`);const Q=R!==$;Q?Ju.flushSync(()=>B.set(R)):w.reenter&&!Q?B.invoke($,$):I((Ye=w.actions)!=null?Ye:[])})};return(we=e.watch)==null||we.call(e,C()),{state:_(),send:H,context:f,prop:a,scope:n,refs:S,computed:W,event:T(),getStatus:()=>be.current}}function o1(e){const t=q.useRef(e);return t.current=e,t}function Kv(e){const t=o1(e);return function(r){return t.current[r]}}function a1(e){queueMicrotask(()=>{Ju.flushSync(()=>e())})}var u1=Yv(e=>e);function el(...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 Qv(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 cd=e=>{const t=q.memo(q.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=Zt(h,["asChild","children"]);if(!o)return q.createElement(e,ye(U({},u),{ref:r}),a);if(!q.isValidElement(a))return null;const c=q.Children.only(a),f=Qv(c);return q.cloneElement(c,ye(U({},lr(u,c.props)),{ref:r?el(r,f):f}))}));return t.displayName=e.displayName||e.name,t},ci=(()=>{const e=new Map;return new Proxy(cd,{apply(t,n,r){return cd(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,cd(r)),e.get(r)}})})();function Xv(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ds(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=q.createContext(u);c.displayName=t;function f(){var m;const h=q.useContext(c);if(!h&&n){const E=new Error(a!=null?a:Xv(r,o));throw E.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,E,f),E}return h}return[c.Provider,f,c]}const[Jv,fd]=Ds({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[l1,Jo]=Ds({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),c1=q.forwardRef((e,t)=>{const n=fd(),r=Jo(),o=lr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:N.jsx(ci.div,ye(U({},o),{ref:el(r.ref,t)}))});c1.displayName="PopoverContent";const f1=q.forwardRef((e,t)=>{const n=fd(),r=Jo(),o=lr(n.getPositionerProps(),e);return r.unmounted?null:N.jsx(ci.div,ye(U({},o),{ref:t}))});f1.displayName="PopoverPositioner";const d1=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},U({},e)]),h1=e=>d1()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function Zv(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var ek={props({props:e}){return ye(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",Ku(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});_n(()=>{var c,f;const u=tl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===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})=>{_n(()=>{e.set("prevAnimationName",tl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=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",tl(t.get("styles")))},u=f=>{const h=tl(t.get("styles"));qr(f)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Xu(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Ov(()=>c())}}}}};function tl(e){return(e==null?void 0:e.animationName)||"none"}ud()(["onExitComplete","present","immediate"]);function tk(e,t={}){const{sync:n=!1}=t,r=nk(e);return q.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function nk(e){const t=q.useRef(e);return t.current=e,t}const dd=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,a=Zt(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=q.useRef(!1),c=ye(U({},a),{present:r,onExitComplete:tk(e.onExitComplete)}),f=ld(ek,c),h=Zv(f);h.present&&(u.current=!0);const m=!h.present&&!u.current&&t||n&&!h.present&&u.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 Ms=(e,t=[])=>({parts:(...n)=>{if(rk(t))return Ms(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Ms(e,[...t,...n]),omit:(...n)=>Ms(e,t.filter(r=>!n.includes(r))),rename:n=>Ms(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Fs(e)}"][data-part="${Fs(r)}"]`,`& [data-scope="${Fs(e)}"][data-part="${Fs(r)}"]`].join(", "),attrs:{"data-scope":Fs(e),"data-part":Fs(r)}}}),{})}),Fs=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),rk=e=>e.length===0;const ik=["top","right","bottom","left"],fi=Math.min,Pn=Math.max,nl=Math.round,rl=Math.floor,Cr=e=>({x:e,y:e}),sk={left:"right",right:"left",bottom:"top",top:"bottom"},ok={start:"end",end:"start"};function hd(e,t,n){return Pn(e,fi(t,n))}function Wr(e,t){return typeof e=="function"?e(t):e}function Gr(e){return e.split("-")[0]}function Bs(e){return e.split("-")[1]}function pd(e){return e==="x"?"y":"x"}function md(e){return e==="y"?"height":"width"}const ak=new Set(["top","bottom"]);function Ar(e){return ak.has(Gr(e))?"y":"x"}function gd(e){return pd(Ar(e))}function uk(e,t,n){n===void 0&&(n=!1);const r=Bs(e),o=gd(e),a=md(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=il(u)),[u,il(u)]}function lk(e){const t=il(e);return[Ed(e),t,Ed(t)]}function Ed(e){return e.replace(/start|end/g,t=>ok[t])}const p1=["left","right"],m1=["right","left"],ck=["top","bottom"],fk=["bottom","top"];function dk(e,t,n){switch(e){case"top":case"bottom":return n?t?m1:p1:t?p1:m1;case"left":case"right":return t?ck:fk;default:return[]}}function hk(e,t,n,r){const o=Bs(e);let a=dk(Gr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Ed)))),a}function il(e){return e.replace(/left|right|bottom|top/g,t=>sk[t])}function pk(e){return U({top:0,right:0,bottom:0,left:0},e)}function g1(e){return typeof e!="number"?pk(e):{top:e,right:e,bottom:e,left:e}}function sl(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 E1(e,t,n){let{reference:r,floating:o}=e;const a=Ar(t),u=gd(t),c=md(u),f=Gr(t),h=a==="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(Bs(t)){case"start":T[u]-=b*(n&&h?-1:1);break;case"end":T[u]+=b*(n&&h?-1:1);break}return T}const mk=(e,t,n)=>st(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),f=yield u.isRTL==null?void 0:u.isRTL(t);let h=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:E}=E1(h,r,f),b=r,T={},_=0;for(let S=0;S<c.length;S++){const{name:C,fn:I}=c[S],{x:F,y:D,data:G,reset:W}=yield I({x:m,y:E,initialPlacement:r,placement:b,strategy:o,middlewareData:T,rects:h,platform:u,elements:{reference:e,floating:t}});m=F!=null?F:m,E=D!=null?D:E,T=ye(U({},T),{[C]:U(U({},T[C]),G)}),W&&_<=50&&(_++,typeof W=="object"&&(W.placement&&(b=W.placement),W.rects&&(h=W.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):W.rects),{x:m,y:E}=E1(h,b,f)),S=-1)}return{x:m,y:E,placement:b,strategy:o,middlewareData:T}});function Zo(e,t){return st(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:E="floating",altBoundary:b=!1,padding:T=0}=Wr(t,e),_=g1(T),C=c[b?E==="floating"?"reference":"floating":E],I=sl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(C))==null||n?C:C.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:f})),F=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,D=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),G=(yield a.isElement==null?void 0:a.isElement(D))?(yield a.getScale==null?void 0:a.getScale(D))||{x:1,y:1}:{x:1,y:1},W=sl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:F,offsetParent:D,strategy:f}):F);return{top:(I.top-W.top+_.top)/G.y,bottom:(W.bottom-I.bottom+_.bottom)/G.y,left:(I.left-W.left+_.left)/G.x,right:(W.right-I.right+_.right)/G.x}})}const gk=e=>({name:"arrow",options:e,fn(n){return st(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:f,middlewareData:h}=n,{element:m,padding:E=0}=Wr(e,n)||{};if(m==null)return{};const b=g1(E),T={x:r,y:o},_=gd(a),S=md(_),C=yield c.getDimensions(m),I=_==="y",F=I?"top":"left",D=I?"bottom":"right",G=I?"clientHeight":"clientWidth",W=u.reference[S]+u.reference[_]-T[_]-u.floating[S],B=T[_]-u.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(m);let be=te?te[G]:0;(!be||!(yield c.isElement==null?void 0:c.isElement(te)))&&(be=f.floating[G]||u.floating[S]);const he=W/2-B/2,H=be/2-C[S]/2-1,le=fi(b[F],H),de=fi(b[D],H),ce=le,fe=be-C[S]-de,Te=be/2-C[S]/2+he,we=hd(ce,Te,fe),oe=!h.arrow&&Bs(a)!=null&&Te!==we&&u.reference[S]/2-(Te<ce?le:de)-C[S]/2<0,$=oe?Te<ce?Te-ce:Te-fe:0;return{[_]:T[_]+$,data:U({[_]:we,centerOffset:Te-we-$},oe&&{alignmentOffset:$}),reset:oe}})}}),Ek=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return st(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:f,platform:h,elements:m}=n,Te=Wr(e,n),{mainAxis:E=!0,crossAxis:b=!0,fallbackPlacements:T,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0}=Te,I=Zt(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const F=Gr(a),D=Ar(f),G=Gr(f)===f,W=yield h.isRTL==null?void 0:h.isRTL(m.floating),B=T||(G||!C?[il(f)]:lk(f)),te=S!=="none";!T&&te&&B.push(...hk(f,C,S,W));const be=[f,...B],he=yield Zo(n,I),H=[];let le=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&H.push(he[F]),b){const we=uk(a,c,W);H.push(he[we[0]],he[we[1]])}if(le=[...le,{placement:a,overflows:H}],!H.every(we=>we<=0)){var de,ce;const we=(((de=u.flip)==null?void 0:de.index)||0)+1,oe=be[we];if(oe&&(!(b==="alignment"?D!==Ar(oe):!1)||le.every(w=>Ar(w.placement)===D?w.overflows[0]>0:!0)))return{data:{index:we,overflows:le},reset:{placement:oe}};let $=(ce=le.filter(ee=>ee.overflows[0]<=0).sort((ee,w)=>ee.overflows[1]-w.overflows[1])[0])==null?void 0:ce.placement;if(!$)switch(_){case"bestFit":{var fe;const ee=(fe=le.filter(w=>{if(te){const R=Ar(w.placement);return R===D||R==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(R=>R>0).reduce((R,Q)=>R+Q,0)]).sort((w,R)=>w[1]-R[1])[0])==null?void 0:fe[0];ee&&($=ee);break}case"initialPlacement":$=f;break}if(a!==$)return{reset:{placement:$}}}return{}})}}};function y1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function T1(e){return ik.some(t=>e[t]>=0)}const yk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return st(this,null,function*(){const{rects:r}=n,u=Wr(e,n),{strategy:o="referenceHidden"}=u,a=Zt(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Zo(n,ye(U({},a),{elementContext:"reference"})),f=y1(c,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:T1(f)}}}case"escaped":{const c=yield Zo(n,ye(U({},a),{altBoundary:!0})),f=y1(c,r.floating);return{data:{escapedOffsets:f,escaped:T1(f)}}}default:return{}}})}}},b1=new Set(["left","top"]);function Tk(e,t){return st(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Gr(n),c=Bs(n),f=Ar(n)==="y",h=b1.has(u)?-1:1,m=a&&f?-1:1,E=Wr(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 bk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return st(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:f}=n,h=yield Tk(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(o=f.arrow)!=null&&o.alignmentOffset?{}:{x:a+h.x,y:u+h.y,data:ye(U({},h),{placement:c})}})}}},_k=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return st(this,null,function*(){const{x:r,y:o,placement:a}=n,I=Wr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:f={fn:F=>{let{x:D,y:G}=F;return{x:D,y:G}}}}=I,h=Zt(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},E=yield Zo(n,h),b=Ar(Gr(a)),T=pd(b);let _=m[T],S=m[b];if(u){const F=T==="y"?"top":"left",D=T==="y"?"bottom":"right",G=_+E[F],W=_-E[D];_=hd(G,_,W)}if(c){const F=b==="y"?"top":"left",D=b==="y"?"bottom":"right",G=S+E[F],W=S-E[D];S=hd(G,S,W)}const C=f.fn(ye(U({},n),{[T]:_,[b]:S}));return ye(U({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[T]:u,[b]:c}}})})}}},xk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:f=!0,crossAxis:h=!0}=Wr(e,t),m={x:n,y:r},E=Ar(o),b=pd(E);let T=m[b],_=m[E];const S=Wr(c,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:U({mainAxis:0,crossAxis:0},S);if(f){const D=b==="y"?"height":"width",G=a.reference[b]-a.floating[D]+C.mainAxis,W=a.reference[b]+a.reference[D]-C.mainAxis;T<G?T=G:T>W&&(T=W)}if(h){var I,F;const D=b==="y"?"width":"height",G=b1.has(Gr(o)),W=a.reference[E]-a.floating[D]+(G&&((I=u.offset)==null?void 0:I[E])||0)+(G?0:C.crossAxis),B=a.reference[E]+a.reference[D]+(G?0:((F=u.offset)==null?void 0:F[E])||0)-(G?C.crossAxis:0);_<W?_=W:_>B&&(_=B)}return{[b]:T,[E]:_}}}},Sk=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return st(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:f}=n,le=Wr(e,n),{apply:h=()=>{}}=le,m=Zt(le,["apply"]),E=yield Zo(n,m),b=Gr(a),T=Bs(a),_=Ar(a)==="y",{width:S,height:C}=u.floating;let I,F;b==="top"||b==="bottom"?(I=b,F=T===((yield c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(F=b,I=T==="end"?"top":"bottom");const D=C-E.top-E.bottom,G=S-E.left-E.right,W=fi(C-E[I],D),B=fi(S-E[F],G),te=!n.middlewareData.shift;let be=W,he=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(he=G),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(be=D),te&&!T){const de=Pn(E.left,0),ce=Pn(E.right,0),fe=Pn(E.top,0),Te=Pn(E.bottom,0);_?he=S-2*(de!==0||ce!==0?de+ce:Pn(E.left,E.right)):be=C-2*(fe!==0||Te!==0?fe+Te:Pn(E.top,E.bottom))}yield h(ye(U({},n),{availableWidth:he,availableHeight:be}));const H=yield c.getDimensions(f.floating);return S!==H.width||C!==H.height?{reset:{rects:!0}}:{}})}}};function ol(){return typeof window!="undefined"}function Us(e){return _1(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vr(e){var t;return(t=(_1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _1(e){return ol()?e instanceof Node||e instanceof Rn(e).Node:!1}function cr(e){return ol()?e instanceof Element||e instanceof Rn(e).Element:!1}function kr(e){return ol()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function x1(e){return!ol()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}const wk=new Set(["inline","contents"]);function ea(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!wk.has(o)}const Ck=new Set(["table","td","th"]);function Ak(e){return Ck.has(Us(e))}const vk=[":popover-open",":modal"];function al(e){return vk.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const kk=["transform","translate","scale","rotate","perspective"],Nk=["transform","translate","scale","rotate","perspective","filter"],Ok=["paint","layout","strict","content"];function yd(e){const t=Td(),n=cr(e)?fr(e):e;return kk.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)||Nk.some(r=>(n.willChange||"").includes(r))||Ok.some(r=>(n.contain||"").includes(r))}function Ik(e){let t=di(e);for(;kr(t)&&!Hs(t);){if(yd(t))return t;if(al(t))return null;t=di(t)}return null}function Td(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Pk=new Set(["html","body","#document"]);function Hs(e){return Pk.has(Us(e))}function fr(e){return Rn(e).getComputedStyle(e)}function ul(e){return cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function di(e){if(Us(e)==="html")return e;const t=e.assignedSlot||e.parentNode||x1(e)&&e.host||vr(e);return x1(t)?t.host:t}function S1(e){const t=di(e);return Hs(t)?e.ownerDocument?e.ownerDocument.body:e.body:kr(t)&&ea(t)?t:S1(t)}function ta(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=S1(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Rn(o);if(a){const c=bd(u);return t.concat(u,u.visualViewport||[],ea(o)?o:[],c&&n?ta(c):[])}return t.concat(o,ta(o,[],n))}function bd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function w1(e){const t=fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=kr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=nl(n)!==a||nl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function _d(e){return cr(e)?e:e.contextElement}function zs(e){const t=_d(e);if(!kr(t))return Cr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=w1(t);let u=(a?nl(n.width):n.width)/r,c=(a?nl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const Rk=Cr(0);function C1(e){const t=Rn(e);return!Td()||!t.visualViewport?Rk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Lk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function Qi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=_d(e);let u=Cr(1);t&&(r?cr(r)&&(u=zs(r)):u=zs(e));const c=Lk(a,n,r)?C1(a):Cr(0);let f=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,m=o.width/u.x,E=o.height/u.y;if(a){const b=Rn(a),T=r&&cr(r)?Rn(r):r;let _=b,S=bd(_);for(;S&&r&&T!==_;){const C=zs(S),I=S.getBoundingClientRect(),F=fr(S),D=I.left+(S.clientLeft+parseFloat(F.paddingLeft))*C.x,G=I.top+(S.clientTop+parseFloat(F.paddingTop))*C.y;f*=C.x,h*=C.y,m*=C.x,E*=C.y,f+=D,h+=G,_=Rn(S),S=bd(_)}}return sl({width:m,height:E,x:f,y:h})}function ll(e,t){const n=ul(e).scrollLeft;return t?t.left+n:Qi(vr(e)).left+n}function A1(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ll(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Dk(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=vr(r),c=t?al(t.floating):!1;if(r===u||c&&a)return n;let f={scrollLeft:0,scrollTop:0},h=Cr(1);const m=Cr(0),E=kr(r);if((E||!E&&!a)&&((Us(r)!=="body"||ea(u))&&(f=ul(r)),kr(r))){const T=Qi(r);h=zs(r),m.x=T.x+r.clientLeft,m.y=T.y+r.clientTop}const b=u&&!E&&!a?A1(u,f):Cr(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 Mk(e){return Array.from(e.getClientRects())}function Fk(e){const t=vr(e),n=ul(e),r=e.ownerDocument.body,o=Pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+ll(e);const c=-n.scrollTop;return fr(r).direction==="rtl"&&(u+=Pn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const v1=25;function Bk(e,t){const n=Rn(e),r=vr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,f=0;if(o){a=o.width,u=o.height;const m=Td();(!m||m&&t==="fixed")&&(c=o.offsetLeft,f=o.offsetTop)}const h=ll(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);_<=v1&&(a-=_)}else h<=v1&&(a+=h);return{width:a,height:u,x:c,y:f}}const Uk=new Set(["absolute","fixed"]);function Hk(e,t){const n=Qi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=kr(e)?zs(e):Cr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,f=o*a.x,h=r*a.y;return{width:u,height:c,x:f,y:h}}function k1(e,t,n){let r;if(t==="viewport")r=Bk(e,n);else if(t==="document")r=Fk(vr(e));else if(cr(t))r=Hk(t,n);else{const o=C1(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sl(r)}function N1(e,t){const n=di(e);return n===t||!cr(n)||Hs(n)?!1:fr(n).position==="fixed"||N1(n,t)}function zk(e,t){const n=t.get(e);if(n)return n;let r=ta(e,[],!1).filter(c=>cr(c)&&Us(c)!=="body"),o=null;const a=fr(e).position==="fixed";let u=a?di(e):e;for(;cr(u)&&!Hs(u);){const c=fr(u),f=yd(u);!f&&c.position==="fixed"&&(o=null),(a?!f&&!o:!f&&c.position==="static"&&!!o&&Uk.has(o.position)||ea(u)&&!f&&N1(e,u))?r=r.filter(m=>m!==u):o=c,u=di(u)}return t.set(e,r),r}function jk(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?al(t)?[]:zk(t,this._c):[].concat(n),r],c=u[0],f=u.reduce((h,m)=>{const E=k1(t,m,o);return h.top=Pn(E.top,h.top),h.right=fi(E.right,h.right),h.bottom=fi(E.bottom,h.bottom),h.left=Pn(E.left,h.left),h},k1(t,c,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function $k(e){const{width:t,height:n}=w1(e);return{width:t,height:n}}function Vk(e,t,n){const r=kr(t),o=vr(t),a=n==="fixed",u=Qi(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const f=Cr(0);function h(){f.x=ll(o)}if(r||!r&&!a)if((Us(t)!=="body"||ea(o))&&(c=ul(t)),r){const T=Qi(t,!0,a,t);f.x=T.x+t.clientLeft,f.y=T.y+t.clientTop}else o&&h();a&&!r&&o&&h();const m=o&&!r&&!a?A1(o,c):Cr(0),E=u.left+c.scrollLeft-f.x-m.x,b=u.top+c.scrollTop-f.y-m.y;return{x:E,y:b,width:u.width,height:u.height}}function xd(e){return fr(e).position==="static"}function O1(e,t){if(!kr(e)||fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return vr(e)===n&&(n=n.ownerDocument.body),n}function I1(e,t){const n=Rn(e);if(al(e))return n;if(!kr(e)){let o=di(e);for(;o&&!Hs(o);){if(cr(o)&&!xd(o))return o;o=di(o)}return n}let r=O1(e,t);for(;r&&Ak(r)&&xd(r);)r=O1(r,t);return r&&Hs(r)&&xd(r)&&!yd(r)?n:r||Ik(e)||n}const qk=function(e){return st(this,null,function*(){const t=this.getOffsetParent||I1,n=this.getDimensions,r=yield n(e.floating);return{reference:Vk(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function Yk(e){return fr(e).direction==="rtl"}const Wk={convertOffsetParentRelativeRectToViewportRelativeRect:Dk,getDocumentElement:vr,getClippingRect:jk,getOffsetParent:I1,getElementRects:qk,getClientRects:Mk,getDimensions:$k,getScale:zs,isElement:cr,isRTL:Yk};function P1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gk(e,t){let n=null,r;const o=vr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),a();const h=e.getBoundingClientRect(),{left:m,top:E,width:b,height:T}=h;if(c||t(),!b||!T)return;const _=rl(E),S=rl(o.clientWidth-(m+b)),C=rl(o.clientHeight-(E+T)),I=rl(m),D={rootMargin:-_+"px "+-S+"px "+-C+"px "+-I+"px",threshold:Pn(0,fi(1,f))||1};let G=!0;function W(B){const te=B[0].intersectionRatio;if(te!==f){if(!G)return u();te?u(!1,te):r=setTimeout(()=>{u(!1,1e-7)},1e3)}te===1&&!P1(h,e.getBoundingClientRect())&&u(),G=!1}try{n=new IntersectionObserver(W,ye(U({},D),{root:o.ownerDocument}))}catch(B){n=new IntersectionObserver(W,D)}n.observe(e)}return u(!0),a}function Kk(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,h=_d(e),m=o||a?[...h?ta(h):[],...ta(t)]:[];m.forEach(I=>{o&&I.addEventListener("scroll",n,{passive:!0}),a&&I.addEventListener("resize",n)});const E=h&&c?Gk(h,n):null;let b=-1,T=null;u&&(T=new ResizeObserver(I=>{let[F]=I;F&&F.target===h&&T&&(T.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var D;(D=T)==null||D.observe(t)})),n()}),h&&!f&&T.observe(h),T.observe(t));let _,S=f?Qi(e):null;f&&C();function C(){const I=Qi(e);S&&!P1(S,I)&&n(),S=I,_=requestAnimationFrame(C)}return n(),()=>{var I;m.forEach(F=>{o&&F.removeEventListener("scroll",n),a&&F.removeEventListener("resize",n)}),E==null||E(),(I=T)==null||I.disconnect(),T=null,f&&cancelAnimationFrame(_)}}const Qk=bk,Xk=_k,Jk=Ek,Zk=Sk,eN=yk,tN=gk,nN=xk,rN=(e,t,n)=>{const r=new Map,o=U({platform:Wk},n),a=ye(U({},o.platform),{_c:r});return mk(e,t,ye(U({},o),{platform:a}))};function R1(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 ye(U({},o),{toJSON:()=>o})}function iN(e){if(!e)return R1();const{x:t,y:n,width:r,height:o}=e;return R1(t,n,r,o)}function sN(e,t){return{contextElement:$t(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?iN(r):n.getBoundingClientRect()}}}var na=e=>({variable:e,reference:`var(${e})`}),Kr={arrowSize:na("--arrow-size"),arrowSizeHalf:na("--arrow-size-half"),arrowBg:na("--arrow-background"),transformOrigin:na("--transform-origin"),arrowOffset:na("--arrow-offset")},oN=e=>e==="top"||e==="bottom"?"y":"x";function aN(e,t){return{name:"transformOrigin",fn(n){var he,H,le,de,ce;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,f=a.split("-")[0],h=oN(f),m=((he=o.arrow)==null?void 0:he.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(((le=o.shift)==null?void 0:le.y)||0),I=u.reference.height/2,F=T/2,D=(ce=(de=e.offset)==null?void 0:de.mainAxis)!=null?ce:e.gutter,G=typeof D=="number"?D+F:D!=null?D:F,W=C>G,B={top:`${_}px calc(100% + ${G}px)`,bottom:`${_}px ${-G}px`,left:`calc(100% + ${G}px) ${S}px`,right:`${-G}px ${S}px`}[f],te=`${_}px ${u.reference.y+I-c}px`,be=!!e.overlap&&h==="y"&&W;return r.floating.style.setProperty(Kr.transformOrigin.variable,be?te:B),{data:{transformOrigin:be?te:B}}}}}var uN={name:"rects",fn({rects:e}){return{data:e}}},lN=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${Kr.arrowOffset.reference})`}),{}}}};function cN(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var fN={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function L1(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Sd(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function dN(e,t,n){const r=e||t.createElement("div");return tN({element:r,padding:n.arrowPadding})}function hN(e,t){var n;if(!DA((n=t.offset)!=null?n:t.gutter))return Qk(({placement:r})=>{var m,E,b,T;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(m=t.offset)==null?void 0:m.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=cN(r),f=c?void 0:t.shift,h=(T=(b=t.offset)==null?void 0:b.crossAxis)!=null?T:f;return Gf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function pN(e){if(!e.flip)return;const t=Sd(e.boundary);return Jk(ye(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function mN(e){if(!e.slide&&!e.overlap)return;const t=Sd(e.boundary);return Xk(ye(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:nN()}))}function gN(e){return Zk({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function EN(e){var t;if(e.hideWhenDetached)return eN({strategy:"referenceHidden",boundary:(t=Sd(e.boundary))!=null?t:"clippingAncestors"})}function yN(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function TN(e,t,n={}){const r=sN(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},fN,n),a=t.querySelector("[data-part=arrow]"),u=[hN(a,o),pN(o),mN(o),dN(a,t.ownerDocument,o),lN(a),aN({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),gN(o),EN(o),uN],{placement:c,strategy:f,onComplete:h,onPositioned:m}=o,E=()=>st(null,null,function*(){var G;if(!r||!t)return;const S=yield rN(r,t,{placement:c,middleware:u,strategy:f});h==null||h(S),m==null||m({placed:!0});const C=Ps(t),I=L1(C,S.x),F=L1(C,S.y);t.style.setProperty("--x",`${I}px`),t.style.setProperty("--y",`${F}px`),o.hideWhenDetached&&(((G=S.middlewareData.hide)==null?void 0:G.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const D=t.firstElementChild;if(D){const W=Ku(D);t.style.setProperty("--z-index",W.zIndex)}}),b=()=>st(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),m==null||m({placed:!0})):yield E()}),T=yN(o.listeners),_=o.listeners?Kk(r,t,b,T):VA;return b(),()=>{_==null||_(),m==null||m({placed:!1})}}function D1(e,t,n={}){const c=n,{defer:r}=c,o=Zt(c,["defer"]),a=r?_n:f=>f(),u=[];return u.push(a(()=>{const f=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(TN(f,h,o))})),()=>{u.forEach(f=>f==null?void 0:f())}}var bN={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function _N(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Kr.arrowSize.reference,height:Kr.arrowSize.reference,[Kr.arrowSizeHalf.variable]:`calc(${Kr.arrowSize.reference} / 2)`,[Kr.arrowOffset.variable]:`calc(${Kr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?bN[t.split("-")[0]]:void 0,background:Kr.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 js=new WeakMap,cl=new WeakMap,fl={},wd=0,M1=e=>e&&(e.host||M1(e.parentNode)),xN=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=M1(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),SN=new Set(["script","output","status","next-route-announcer"]),wN=e=>SN.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),CN=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=xN(n,Array.isArray(e)?e:[e]);fl[r]||(fl[r]=new WeakMap);const c=fl[r],f=[],h=new Set,m=new Set(u),E=T=>{!T||h.has(T)||(h.add(T),E(T.parentNode))};u.forEach(T=>{E(T),a&&$t(T)&&qg(T,_=>{E(_)})});const b=T=>{!T||m.has(T)||Array.prototype.forEach.call(T.children,_=>{if(h.has(_))b(_);else try{if(wN(_))return;const C=_.getAttribute(o)==="true",I=(js.get(_)||0)+1,F=(c.get(_)||0)+1;js.set(_,I),c.set(_,F),f.push(_),I===1&&C&&cl.set(_,!0),F===1&&_.setAttribute(r,""),C||_.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return b(n),h.clear(),wd++,()=>{f.forEach(T=>{const _=js.get(T)-1,S=c.get(T)-1;js.set(T,_),c.set(T,S),_||(cl.has(T)||T.removeAttribute(o),cl.delete(T)),S||T.removeAttribute(r)}),wd--,wd||(js=new WeakMap,js=new WeakMap,cl=new WeakMap,fl={})}},AN=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,vN=(e,t=AN(e),n="data-aria-hidden",r=!0)=>{if(t)return CN(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},kN=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function F1(e,t={}){const{defer:n=!0}=t,r=n?kN:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(vN(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function NN(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function ON(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var B1="pointerdown.outside",U1="focus.outside";function IN(e){for(const t of e)if($t(t)&&Yr(t))return!0;return!1}var H1=e=>"clientY"in e;function PN(e,t){if(!H1(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 RN(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function z1(e,t){if(!t||!H1(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return RN(u,c)?r||a:!1}function LN(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const f=wr(e),h=Ps(e),m=NN(h),E=ON(h);function b(D,G){if(!$t(G)||!G.isConnected||Gu(e,G)||PN(e,D)||c&&Vg(e,G))return!1;const W=f.querySelector(`[aria-controls="${e.id}"]`);if(W){const te=rd(W);if(z1(D,te))return!1}const B=rd(e);return z1(D,B)?!1:!(n!=null&&n(G))}const T=new Set,_=Gi(e==null?void 0:e.getRootNode());function S(D){function G(W){var he,H;const B=u&&!Yg()?_n:le=>le(),te=W!=null?W:D,be=(H=(he=te==null?void 0:te.composedPath)==null?void 0:he.call(te))!=null?H:[te==null?void 0:te.target];B(()=>{const le=_?be[0]:qr(D);if(!(!e||!b(D,le))){if(o||a){const de=Wf(o,a);e.addEventListener(B1,de,{once:!0})}j1(e,B1,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:xv(te),focusable:IN(be),target:le}})}})}D.pointerType==="touch"?(T.forEach(W=>W()),T.add(ur(f,"click",G,{once:!0})),T.add(E.addEventListener("click",G,{once:!0})),T.add(m.addEventListener("click",G,{once:!0}))):G()}const C=new Set,I=setTimeout(()=>{C.add(ur(f,"pointerdown",S,!0)),C.add(E.addEventListener("pointerdown",S,!0)),C.add(m.addEventListener("pointerdown",S,!0))},0);function F(D){(u?_n:W=>W())(()=>{var te,be;const W=(be=(te=D==null?void 0:D.composedPath)==null?void 0:te.call(D))!=null?be:[D==null?void 0:D.target],B=_?W[0]:qr(D);if(!(!e||!b(D,B))){if(r||a){const he=Wf(r,a);e.addEventListener(U1,he,{once:!0})}j1(e,U1,{bubbles:!1,cancelable:!0,detail:{originalEvent:D,contextmenu:!1,focusable:Yr(B),target:B}})}})}return Yg()||(C.add(ur(f,"focusin",F,!0)),C.add(E.addEventListener("focusin",F,!0)),C.add(m.addEventListener("focusin",F,!0))),()=>{clearTimeout(I),T.forEach(D=>D()),C.forEach(D=>D())}}function DN(e,t){const{defer:n}=t,r=n?_n:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(LN(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function j1(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function MN(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return ur(wr(e),"keydown",n,{capture:!0})}var $1="layer:request-dismiss",Yn={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=>Gu(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Gu(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=>Yn.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];BN(e,$1,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),FN(e,$1,{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 BN(e,t,n){e.addEventListener(t,n,{once:!0})}var V1;function q1(){Yn.layers.forEach(({node:e})=>{e.style.pointerEvents=Yn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function UN(e){e.style.pointerEvents=""}function HN(e,t){const n=wr(e),r=[];return Yn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(V1=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=Bv(()=>{const c=o();return $t(c)?c:null},{timeout:1e3});a.then(c=>r.push(Xu(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Yn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=V1,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function zN(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Kf("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:f="dialog"}=t,h={dismiss:r,node:e,type:f,pointerBlocking:a,requestDismiss:o};Yn.add(h),q1();function m(S){var I,F;const C=qr(S.detail.originalEvent);Yn.isBelowPointerBlockingLayer(e)||Yn.isInBranch(C)||((I=t.onPointerDownOutside)==null||I.call(t,S),(F=t.onInteractOutside)==null||F.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function E(S){var I,F;const C=qr(S.detail.originalEvent);Yn.isInBranch(C)||((I=t.onFocusOutside)==null||I.call(t,S),(F=t.onInteractOutside)==null||F.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var C;Yn.isTopMost(e)&&((C=t.onEscapeKeyDown)==null||C.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function T(S){var D;if(!e)return!1;const C=typeof u=="function"?u():u,I=Array.isArray(C)?C:[C],F=(D=t.persistentElements)==null?void 0:D.map(G=>G()).filter($t);return F&&I.push(...F),I.some(G=>Gu(G,S))||Yn.isInNestedLayer(e,S)}const _=[a?HN(e,t.persistentElements):void 0,MN(e,b),DN(e,{exclude:T,onFocusOutside:E,onPointerDownOutside:m,defer:t.defer})];return()=>{Yn.remove(e),q1(),UN(e),_.forEach(S=>S==null?void 0:S())}}function Y1(e,t){const{defer:n}=t,r=n?_n:a=>a(),o=[];return o.push(r(()=>{const a=Is(e)?e():e;o.push(zN(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var jN=Object.defineProperty,$N=(e,t,n)=>t in e?jN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tt=(e,t,n)=>$N(e,typeof t!="symbol"?t+"":t,n),W1={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()}},VN=[],qN=class{constructor(e,t){Tt(this,"trapStack"),Tt(this,"config"),Tt(this,"doc"),Tt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Tt(this,"portalContainers",new Set),Tt(this,"listenerCleanups",[]),Tt(this,"handleFocus",r=>{const o=qr(r),a=this.findContainerIndex(o,r)>=0;if(a||Wu(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Xo(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&&(u=h[m+1],c=!1):m-1>=0&&(u=h[m-1],c=!1))}}else this.state.containerGroups.some(f=>f.tabbableNodes.some(h=>Xo(h)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Tt(this,"handlePointerDown",r=>{const o=qr(r);if(!(this.findContainerIndex(o,r)>=0)){if(ia(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ia(this.config.allowOutsideClick,r)||r.preventDefault()}}),Tt(this,"handleClick",r=>{const o=qr(r);this.findContainerIndex(o,r)>=0||ia(this.config.clickOutsideDeactivates,r)||ia(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Tt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;ra(r)&&r.preventDefault(),this.tryFocus(a)}}),Tt(this,"handleEscapeKey",r=>{YN(r)&&ia(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Tt(this,"_mutationObserver"),Tt(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 dv(h)?!0:h.id&&!this.state.containers.some(m=>m.contains(h))?hv(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Tt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),Tt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Yr(r)){const o=Rs(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Tt(this,"tryFocus",r=>{if(r!==!1&&r!==Rs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,WN(r)&&r.select()}}),Tt(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(),W1.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),f=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const h=()=>{G1(()=>{if(f){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(m)}u==null||u()})};if(f&&c){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(m).then(h,h),this}return h(),this}),Tt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),Tt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),Tt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Tt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Tt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),Tt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(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}),Tt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||qr(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const f=this.findContainerIndex(u,o),h=f>=0?this.state.containerGroups[f]:void 0;if(f<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let m=this.state.tabbableGroups.findIndex(({firstTabbableNode:E})=>u===E);if(m<0&&((h==null?void 0:h.container)===u||Yr(u)&&!Ki(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(m=f),m>=0){const E=m===0?this.state.tabbableGroups.length-1:m-1,b=this.state.tabbableGroups[E];c=Xo(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else ra(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(m<0&&((h==null?void 0:h.container)===u||Yr(u)&&!Ki(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(m=f),m>=0){const E=m===this.state.tabbableGroups.length-1?0:m+1,b=this.state.tabbableGroups[E];c=Xo(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else ra(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||VN;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ra(r)&&!r.shiftKey},isKeyBackward(r){return ra(r)&&r.shiftKey}},t);this.doc=n.document||wr(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=>{lv(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Vg(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Qo(e,{getShadowRoot:this.config.getShadowRoot}),n=Xg(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let h=0;h<t.length;h++)if(Xo(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(Ki(n[T]))return n[T]}else for(let T=b-1;T>=0;T--)if(Ki(n[T]))return n[T]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,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 W1.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?G1(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(ur(this.doc,"focusin",this.handleFocus,!0),ur(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),ur(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),ur(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),ur(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),ur(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=Rs(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)}},ra=e=>e.key==="Tab",ia=(e,...t)=>typeof e=="function"?e(...t):e,YN=e=>!e.isComposing&&e.key==="Escape",G1=e=>setTimeout(e,0),WN=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function K1(e,t={}){let n;const r=_n(()=>{const o=typeof e=="function"?e():e;if(o){n=new qN(o,ye(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:wr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Cd="data-scroll-lock";function GN(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Q1(e){const t=Ku(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function X1(e){var T;const t=e!=null?e:document,n=(T=t.defaultView)!=null?T:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Cd))return;const u=Q1(r)||Q1(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Cd,"");const f=()=>Mv(r,"--scrollbar-width",`${c}px`),h=GN(r),m=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[h]=`${c}px`),Xu(o,_)},E=()=>{var W,B;const{scrollX:_,scrollY:S,visualViewport:C}=n,I=(W=C==null?void 0:C.offsetLeft)!=null?W:0,F=(B=C==null?void 0:C.offsetTop)!=null?B:0,D={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(F))}px`,left:`${-(_-Math.floor(I))}px`,right:"0"};!u&&c>0&&(D[h]=`${c}px`);const G=Xu(o,D);return()=>{G==null||G(),n.scrollTo({left:_,top:S,behavior:"instant"})}},b=[f(),Wg()?E():m()];return()=>{b.forEach(_=>_==null?void 0:_()),o.removeAttribute(Cd)}}var KN=Ms("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Nr=KN.build(),J1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Z1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Ad=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},eE=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},QN=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},vd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},kd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},XN=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},tE=e=>e.getById(J1(e)),$s=e=>e.getById(Z1(e)),Vs=e=>e.getById(Ad(e)),nE=e=>e.getById(eE(e)),JN=e=>e.getById(vd(e)),ZN=e=>e.getById(kd(e));function e3(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,f=n.matches("open"),h=r.get("currentPlacement"),m=a("currentPortalled"),E=r.get("renderedElements"),b=_N(ye(U({},u("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(ye(U({id:QN(c)},Nr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(ye(U({},Nr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(ye(U({},Nr.anchor.attrs),{dir:u("dir"),id:J1(c)}))},getTriggerProps(){return t.button(ye(U({},Nr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:Z1(c),"aria-haspopup":"dialog","aria-expanded":f,"data-state":f?"open":"closed","aria-controls":Ad(c),onPointerDown(T){_v(T)&&Tv()&&T.currentTarget.focus()},onClick(T){T.defaultPrevented||o({type:"TOGGLE"})},onBlur(T){o({type:"TRIGGER_BLUR",target:T.relatedTarget})}}))},getIndicatorProps(){return t.element(ye(U({},Nr.indicator.attrs),{dir:u("dir"),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(ye(U({id:eE(c)},Nr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(ye(U({},Nr.content.attrs),{dir:u("dir"),id:Ad(c),tabIndex:-1,role:"dialog","aria-modal":KA(u("modal")),hidden:!f,"data-state":f?"open":"closed","data-expanded":GA(f),"aria-labelledby":E.title?vd(c):void 0,"aria-describedby":E.description?kd(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(ye(U({},Nr.title.attrs),{id:vd(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ye(U({},Nr.description.attrs),{id:kd(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ye(U({},Nr.closeTrigger.attrs),{dir:u("dir"),id:XN(c),type:"button","aria-label":"close",onClick(T){T.defaultPrevented||(T.stopPropagation(),o({type:"CLOSE"}))}}))}}}var t3={props({props:e}){return ye(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 a;e.set("currentPlacement",t("positioning").placement);const r=(a=tE(n))!=null?a:$s(n);return D1(r,()=>nE(n),ye(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Vs(n);let o=!0;return Y1(r,{type:"popover",pointerBlocking:t("modal"),exclude:$s(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:Dv(()=>Vs(t),{triggerElement:$s(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?F1(()=>[Vs(t),$s(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return X1(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?K1(()=>Vs(t),{initialFocus:()=>Jg({root:Vs(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=tE(n))!=null?u:$s(n);D1(o,()=>nE(n),ye(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){_n(()=>{Object.assign(e.get("renderedElements"),{title:!!JN(t),description:!!ZN(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||_n(()=>{const n=Jg({root:Vs(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||_n(()=>{const a=$s(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};ud()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[XF,Nd]=Ds({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[JF,rE]=Ds({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),n3=e=>{const t=q.useId(),{getRootNode:n}=Nd(),{dir:r}=rE(),o=U({id:t,dir:r,getRootNode:n},e),a=ld(t3,o);return e3(a,u1)},r3=e=>{const[t,u]=h1(e),c=u,{children:n}=c,r=Zt(c,["children"]),o=n3(r),a=dd(lr({present:o.open},t));return N.jsx(Jv,{value:o,children:N.jsx(l1,{value:a,children:n})})},iE=q.forwardRef((e,t)=>{const n=fd(),r=Jo(),o=lr(ye(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return N.jsx(ci.button,ye(U({},o),{ref:t}))});iE.displayName="PopoverTrigger";function i3(e){return dn({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 s3(e){return dn({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 o3(e){return dn({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 sE(e){return dn({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 a3=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=Vr(),r=()=>{n(),e()};return N.jsxs("button",{className:se(`${Z}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[N.jsx(sE,{}),"Clear chat"]})},u3=({className:e,componentType:t,children:n})=>{const[r,o]=q.useState(!1),{globalClassName:a}=bn(),u=()=>{o(!1)},c=f=>{o(f.open)};return N.jsxs(r3,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[N.jsx(iE,{"aria-label":`Overflow menu for ${t}`,className:se(`${Z}-overflow-menu-button-trigger`,a,e,t),children:N.jsx(o3,{})}),N.jsx(f1,{children:N.jsxs(c1,{className:se(`${Z}-overflow-menu-list`,a,t),children:[n,N.jsx(a3,{componentType:t,onClearChat:u})]})})]})};function l3(e){return dn({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 oE(e){return dn({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 aE=({className:e,onClick:t,disabled:n=!1})=>N.jsx("button",{"aria-label":"Close",className:se(e,`${Z}-close-button`),disabled:n,onClick:t,children:N.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:N.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"})})}),uE=r=>{var o=r,{onClearChat:e,componentType:t}=o,n=Zt(o,["onClearChat","componentType"]);const{globalClassName:a}=bn(),{resetConversation:u}=Vr(),c=()=>{u(),e==null||e()};return N.jsx(Os,U({icon:N.jsx(sE,{size:"0.875rem"}),ariaLabel:"Clear Chat",className:se(a,`${Z}-clear-chat-icon-button`,t),onClick:c},n))},lE=({componentType:e,isIcon:t})=>{const{globalClassName:n}=bn(),r=()=>{Vf("modal")};return t?N.jsx(Os,{className:se(n,`${Z}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:N.jsx(oE,{})}):N.jsxs("button",{className:se(n,`${Z}-overflow-menu-button`,`${Z}-toggle-modal-button`,e),onClick:r,children:[N.jsx(oE,{}),"Show modal"]})},c3=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r}=bn();if(!n)return null;const o=n.getName(t),a=n.getBrand(t),u=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 N.jsxs("div",{className:se(r,`${Z}-product-tile`,{embedded:!e,standalone:e}),children:[N.jsx("img",{className:se(r,`${Z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${h}`,alt:`${o}`,loading:"lazy"}),N.jsxs("div",{className:se(r,`${Z}-product-tile-details`,{embedded:!e,standalone:e}),children:[N.jsxs("div",{className:se(r,`${Z}-product-tile-content`),children:[a&&N.jsx("p",{className:`${Z}-product-tile-brand`,children:a}),m?N.jsxs("a",{"aria-label":`Go to product page for ${o}`,className:se(r,`${Z}-product-tile-pdp`),href:`${m}`,target:"_blank",rel:"noopener noreferrer",children:[o," ",N.jsx("span",{className:se(r,`${Z}-product-tile-pdp-arrow`),children:"→"})]}):N.jsx("p",{className:se(r,`${Z}-product-tile-name`),title:o,children:o})]}),N.jsx("div",{className:se(r,`${Z}-product-tile-footer`),children:N.jsx("p",{className:se(r,`${Z}-product-tile-price`),children:u})})]})]})},f3=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=bn(),o=t;return n?N.jsxs("div",{className:se(r,`${Z}-display-products widget-message`),children:[N.jsx("p",{children:o.message}),o.products&&o.products.length>0&&N.jsx("div",{className:se(r,`${Z}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(a=>{const u=n.getPid(a);return N.jsx(c3,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},d3=({globalClassName:e,message:t,isWidgetStandalone:n})=>N.jsx("div",{className:se(e,`${Z}-error-message`,{standalone:n,embedded:!n}),children:N.jsxs("p",{className:se(e,`${Z}-error-message-text`,{standalone:n,embedded:!n}),children:[N.jsx(vA,{})," ",t.message||"An error occurred while processing your request."]})});function h3(e){return dn({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 p3=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:a})=>N.jsx("div",{className:se(e,`${Z}-suggestion-container standalone`),children:o.map(u=>N.jsxs(qf,{disabled:r,className:se(e,`${Z}-suggestion-button standalone`),onClick:()=>a(u,n||t),children:[N.jsx(h3,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",u.displayText]},u.displayText))}),m3=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=Vr();return N.jsxs("div",{className:se(e,`${Z}-follow-up`),children:[N.jsx("p",{className:se(e,`${Z}-text`),children:t.message}),n&&N.jsx(p3,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&N.jsx("div",{className:se(e,`${Z}-suggestion-container embedded`),children:t.suggestions.map(a=>N.jsx("button",{disabled:o,className:se(e,`${Z}-suggestion-button embedded`),onClick:()=>r(a,t.eventSourceId||t.id),children:a.displayText},a.displayText))})]})};function ZF(){}function eB(){}function cE(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function fE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const g3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,y3={};function dE(e,t){return(y3.jsx?E3:g3).test(e)}const T3=/[ \t\n\f\r]/g;function b3(e){return typeof e=="object"?e.type==="text"?hE(e.value):!1:hE(e)}function hE(e){return e.replace(T3,"")===""}let sa=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};sa.prototype.normal={},sa.prototype.property={},sa.prototype.space=void 0;function pE(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new sa(n,r,t)}function oa(e){return e.toLowerCase()}let Sn=class{constructor(t,n){this.attribute=n,this.property=t}};Sn.prototype.attribute="",Sn.prototype.booleanish=!1,Sn.prototype.boolean=!1,Sn.prototype.commaOrSpaceSeparated=!1,Sn.prototype.commaSeparated=!1,Sn.prototype.defined=!1,Sn.prototype.mustUseProperty=!1,Sn.prototype.number=!1,Sn.prototype.overloadedBoolean=!1,Sn.prototype.property="",Sn.prototype.spaceSeparated=!1,Sn.prototype.space=void 0;let _3=0;const $e=Xi(),Mt=Xi(),Od=Xi(),pe=Xi(),ct=Xi(),qs=Xi(),Ln=Xi();function Xi(){return Qc(2,++_3)}const Id=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Mt,commaOrSpaceSeparated:Ln,commaSeparated:qs,number:pe,overloadedBoolean:Od,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),Pd=Object.keys(Id);let Rd=class extends Sn{constructor(t,n,r,o){let a=-1;if(super(t,n),mE(this,"space",o),typeof r=="number")for(;++a<Pd.length;){const u=Pd[a];mE(this,Pd[a],(r&Id[u])===Id[u])}}};Rd.prototype.defined=!0;function mE(e,t,n){n&&(e[t]=n)}function Ys(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Rd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[oa(r)]=r,n[oa(a.attribute)]=r}return new sa(t,n,e.space)}const gE=Ys({properties:{ariaActiveDescendant:null,ariaAtomic:Mt,ariaAutoComplete:null,ariaBusy:Mt,ariaChecked:Mt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:Mt,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:Mt,ariaFlowTo:ct,ariaGrabbed:Mt,ariaHasPopup:null,ariaHidden:Mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:pe,ariaLive:null,ariaModal:Mt,ariaMultiLine:Mt,ariaMultiSelectable:Mt,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Mt,ariaReadOnly:Mt,ariaRelevant:null,ariaRequired:Mt,ariaRoleDescription:ct,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Mt,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 EE(e,t){return t in e?e[t]:t}function yE(e,t){return EE(e,t.toLowerCase())}const x3=Ys({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qs,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:ct,autoFocus:$e,autoPlay:$e,blocking:ct,capture:null,charSet:null,checked:$e,cite:null,className:ct,cols:pe,colSpan:null,content:null,contentEditable:Mt,controls:$e,controlsList:ct,coords:pe|qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:Od,draggable:Mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:ct,height:pe,hidden:Od,high:pe,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:ct,itemRef:ct,itemScope:$e,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,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:pe,pattern:null,ping:ct,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:ct,required:$e,reversed:$e,rows:pe,rowSpan:pe,sandbox:ct,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Mt,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:$e,useMap:null,value:Mt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,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:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Mt,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:$e,disableRemotePlayback:$e,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:yE}),S3=Ys({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:Ln,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:ct,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:$e,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:qs,g2:qs,glyphName:qs,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:Ln,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:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant: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:Ln,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:Ln,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:Ln,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:EE}),TE=Ys({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()}}),bE=Ys({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:yE}),_E=Ys({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),w3={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"},C3=/[A-Z]/g,xE=/-[a-z]/g,A3=/^data[-\w.:]+$/i;function Ld(e,t){const n=oa(t);let r=t,o=Sn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&A3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(xE,k3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!xE.test(a)){let u=a.replace(C3,v3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Rd}return new o(r,t)}function v3(e){return"-"+e.toLowerCase()}function k3(e){return e.charAt(1).toUpperCase()}const dl=pE([gE,x3,TE,bE,_E],"html"),Ws=pE([gE,S3,TE,bE,_E],"svg");function SE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function wE(e){return e.join(" ").trim()}var Gs={},Dd,CE;function N3(){if(CE)return Dd;CE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
15
- `,h="/",m="*",E="",b="comment",T="declaration";Dd=function(S,C){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];C=C||{};var I=1,F=1;function D(ce){var fe=ce.match(t);fe&&(I+=fe.length);var Te=ce.lastIndexOf(f);F=~Te?ce.length-Te:F+ce.length}function G(){var ce={line:I,column:F};return function(fe){return fe.position=new W(ce),be(),fe}}function W(ce){this.start=ce,this.end={line:I,column:F},this.source=C.source}W.prototype.content=S;function B(ce){var fe=new Error(C.source+":"+I+":"+F+": "+ce);if(fe.reason=ce,fe.filename=C.source,fe.line=I,fe.column=F,fe.source=S,!C.silent)throw fe}function te(ce){var fe=ce.exec(S);if(fe){var Te=fe[0];return D(Te),S=S.slice(Te.length),fe}}function be(){te(n)}function he(ce){var fe;for(ce=ce||[];fe=H();)fe!==!1&&ce.push(fe);return ce}function H(){var ce=G();if(!(h!=S.charAt(0)||m!=S.charAt(1))){for(var fe=2;E!=S.charAt(fe)&&(m!=S.charAt(fe)||h!=S.charAt(fe+1));)++fe;if(fe+=2,E===S.charAt(fe-1))return B("End of comment missing");var Te=S.slice(2,fe-2);return F+=2,D(Te),S=S.slice(fe),F+=2,ce({type:b,comment:Te})}}function le(){var ce=G(),fe=te(r);if(fe){if(H(),!te(o))return B("property missing ':'");var Te=te(a),we=ce({type:T,property:_(fe[0].replace(e,E)),value:Te?_(Te[0].replace(e,E)):E});return te(u),we}}function de(){var ce=[];he(ce);for(var fe;fe=le();)fe!==!1&&(ce.push(fe),he(ce));return ce}return be(),de()};function _(S){return S?S.replace(c,E):E}return Dd}var AE;function O3(){if(AE)return Gs;AE=1;var e=Gs&&Gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.default=n;var t=e(N3());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(f){if(f.type==="declaration"){var h=f.property,m=f.value;c?o(h,m,f):m&&(a=a||{},a[h]=m)}}),a}return Gs}var aa={},vE;function I3(){if(vE)return aa;vE=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},u=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},f=function(h,m){return m===void 0&&(m={}),a(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,u))};return aa.camelCase=f,aa}var ua,kE;function P3(){if(kE)return ua;kE=1;var e=ua&&ua.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(O3()),n=I3();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,f){c&&f&&(u[(0,n.camelCase)(c,a)]=f)}),u}return r.default=r,ua=r,ua}var R3=P3();const L3=Ge(R3),hl=NE("end"),Or=NE("start");function NE(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 D3(e){const t=Or(e),n=hl(e);if(t&&n)return{start:t,end:n}}function la(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?OE(e.position):"start"in e||"end"in e?OE(e):"line"in e||"column"in e?Md(e):""}function Md(e){return IE(e&&e.line)+":"+IE(e&&e.column)}function OE(e){return Md(e&&e.start)+"-"+Md(e&&e.end)}function IE(e){return e&&typeof e=="number"?e:1}class nn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=U({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?a.ruleId=r:(a.source=r.slice(0,f),a.ruleId=r.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=la(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}nn.prototype.file="",nn.prototype.name="",nn.prototype.reason="",nn.prototype.message="",nn.prototype.stack="",nn.prototype.column=void 0,nn.prototype.line=void 0,nn.prototype.ancestors=void 0,nn.prototype.cause=void 0,nn.prototype.fatal=void 0,nn.prototype.place=void 0,nn.prototype.ruleId=void 0,nn.prototype.source=void 0;const Fd={}.hasOwnProperty,M3=new Map,F3=/[A-Z]/g,B3=new Set(["table","tbody","thead","tfoot","tr"]),U3=new Set(["td","th"]),PE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function H3(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=G3(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=W3(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"?Ws:dl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=RE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function RE(e,t,n){if(t.type==="element")return z3(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return j3(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return V3(e,t,n);if(t.type==="mdxjsEsm")return $3(e,t);if(t.type==="root")return q3(e,t,n);if(t.type==="text")return Y3(e,t)}function z3(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ws,e.schema=o),e.ancestors.push(t);const a=DE(e,t.tagName,!1),u=K3(e,t);let c=Ud(e,t);return B3.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!b3(f):!0})),LE(e,u,a,t),Bd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function j3(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ca(e,t.position)}function $3(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ca(e,t.position)}function V3(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Ws,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:DE(e,t.name,!0),u=Q3(e,t),c=Ud(e,t);return LE(e,u,a,t),Bd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function q3(e,t,n){const r={};return Bd(r,Ud(e,t)),e.create(t,e.Fragment,r,n)}function Y3(e,t){return t.value}function LE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function W3(e,t,n){return r;function r(o,a,u,c){const h=Array.isArray(u.children)?n:t;return c?h(a,u,c):h(a,u)}}function G3(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),f=Or(r);return t(o,a,u,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function K3(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Fd.call(t.properties,o)){const a=X3(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&U3.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Q3(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else ca(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else ca(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Ud(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:M3;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const h=o.get(f)||0;u=f+"-"+h,o.set(f,h+1)}}const c=RE(e,a,u);c!==void 0&&n.push(c)}return n}function X3(e,t,n){const r=Ld(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?fE(n):wE(n)),r.property==="style"){let o=typeof n=="object"?n:J3(e,String(n));return e.stylePropertyNameCase==="css"&&(o=Z3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?w3[r.property]||r.property:r.attribute,n]}}function J3(e,t){try{return L3(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new nn("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=PE+"#cannot-parse-style-attribute",o}}function DE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=dE(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=dE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Fd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ca(e)}function ca(e,t){const n=new nn("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=PE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Z3(e){const t={};let n;for(n in e)Fd.call(e,n)&&(t[eO(n)]=e[n]);return t}function eO(e){let t=e.replace(F3,tO);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function tO(e){return"-"+e.toLowerCase()}const Hd={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"]},nO={};function zd(e,t){const n=nO,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ME(e,r,o)}function ME(e,t,n){if(rO(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 FE(e.children,t,n)}return Array.isArray(e)?FE(e,t,n):""}function FE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=ME(e[o],t,n);return r.join("")}function rO(e){return!!(e&&typeof e=="object")}const BE=document.createElement("i");function jd(e){const t="&"+e+";";BE.innerHTML=t;const n=BE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Dn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function Wn(e,t){return e.length>0?(Dn(e,e.length,0,t),e):t}const UE={}.hasOwnProperty;function HE(e){const t={};let n=-1;for(;++n<e.length;)iO(t,e[n]);return t}function iO(e,t){let n;for(n in t){const o=(UE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){UE.call(o,u)||(o[u]=[]);const c=a[u];sO(o[u],Array.isArray(c)?c:c?[c]:[])}}}function sO(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Dn(e,0,0,r)}function zE(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 dr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const hn=hi(/[A-Za-z]/),rn=hi(/[\dA-Za-z]/),oO=hi(/[#-'*+\--9=?A-Z^-~]/);function pl(e){return e!==null&&(e<32||e===127)}const $d=hi(/\d/),aO=hi(/[\dA-Fa-f]/),uO=hi(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function lt(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const ml=hi(new RegExp("\\p{P}|\\p{S}","u")),Ji=hi(/\s/);function hi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ks(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&rn(e.charCodeAt(n+1))&&rn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(f){return Ke(f)?(e.enter(n),c(f)):t(f)}function c(f){return Ke(f)&&a++<o?(e.consume(f),c):(e.exit(n),t(f))}}const lO={tokenize:cO};function cO(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"),a(c)}function a(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const fO={tokenize:dO},jE={tokenize:hO};function dO(e){const t=this,n=[];let r=0,o,a,u;return c;function c(D){if(r<n.length){const G=n[r];return t.containerState=G[1],e.attempt(G[0].continuation,f,h)(D)}return h(D)}function f(D){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&F();const G=t.events.length;let W=G,B;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){B=t.events[W][1].end;break}I(r);let te=G;for(;te<t.events.length;)t.events[te][1].end=U({},B),te++;return Dn(t.events,W+1,0,t.events.slice(G)),t.events.length=te,h(D)}return c(D)}function h(D){if(r===n.length){if(!o)return b(D);if(o.currentConstruct&&o.currentConstruct.concrete)return _(D);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(jE,m,E)(D)}function m(D){return o&&F(),I(r),b(D)}function E(D){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(D)}function b(D){return t.containerState={},e.attempt(jE,T,_)(D)}function T(D){return r++,n.push([t.currentConstruct,t.containerState]),b(D)}function _(D){if(D===null){o&&F(),I(0),e.consume(D);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(D)}function S(D){if(D===null){C(e.exit("chunkFlow"),!0),I(0),e.consume(D);return}return Le(D)?(e.consume(D),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(D),S)}function C(D,G){const W=t.sliceStream(D);if(G&&W.push(null),D.previous=a,a&&(a.next=D),a=D,o.defineSkip(D.start),o.write(W),t.parser.lazy[D.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<u&&(!o.events[B][1].end||o.events[B][1].end.offset>u))return;const te=t.events.length;let be=te,he,H;for(;be--;)if(t.events[be][0]==="exit"&&t.events[be][1].type==="chunkFlow"){if(he){H=t.events[be][1].end;break}he=!0}for(I(r),B=te;B<t.events.length;)t.events[B][1].end=U({},H),B++;Dn(t.events,be+1,0,t.events.slice(te)),t.events.length=B}}function I(D){let G=n.length;for(;G-- >D;){const W=n[G];t.containerState=W[1],W[0].exit.call(t,e)}n.length=D}function F(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function hO(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 Qs(e){if(e===null||lt(e)||Ji(e))return 1;if(ml(e))return 2}function gl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Vd={name:"attention",resolveAll:pO,tokenize:mO};function pO(e,t){let n=-1,r,o,a,u,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);$E(E,-f),$E(b,f),u={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},a={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({},u.start),end:U({},c.end)},e[r][1].end=U({},u.start),e[n][1].start=U({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Wn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Wn(h,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=Wn(h,gl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Wn(h,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=Wn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Dn(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 mO(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Qs(r);let a;return u;function u(f){return a=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===a)return e.consume(f),c;const h=e.exit("attentionSequence"),m=Qs(f),E=!m||m===2&&o||n.includes(f),b=!o||o===2&&m||n.includes(r);return h._open=!!(a===42?E:E&&(o||!b)),h._close=!!(a===42?b:b&&(m||!E)),t(f)}}function $E(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const gO={name:"autolink",tokenize:EO};function EO(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"),a}function a(T){return hn(T)?(e.consume(T),u):T===64?n(T):h(T)}function u(T){return T===43||T===45||T===46||rn(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||rn(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||pl(T)?n(T):(e.consume(T),f)}function h(T){return T===64?(e.consume(T),m):oO(T)?(e.consume(T),h):n(T)}function m(T){return rn(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||rn(T))&&r++<63){const _=T===45?b:E;return e.consume(T),_}return n(T)}}const fa={partial:!0,tokenize:yO};function yO(e,t,n){return r;function r(a){return Ke(a)?Xe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const VE={continuation:{tokenize:bO},exit:_O,name:"blockQuote",tokenize:TO};function TO(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ke(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function bO(e,t,n){const r=this;return o;function o(u){return Ke(u)?Xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(VE,t,n)(u)}}function _O(e){e.exit("blockQuote")}const qE={name:"characterEscape",tokenize:xO};function xO(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return uO(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const YE={name:"characterReference",tokenize:SO};function SO(e,t,n){const r=this;let o=0,a,u;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),f}function f(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,u=rn,m(E))}function h(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=aO,m):(e.enter("characterReferenceValue"),a=7,u=$d,m(E))}function m(E){if(E===59&&o){const b=e.exit("characterReferenceValue");return u===rn&&!jd(r.sliceSerialize(b))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(E)&&o++<a?(e.consume(E),m):n(E)}}const WE={partial:!0,tokenize:CO},GE={concrete:!0,name:"codeFenced",tokenize:wO};function wO(e,t,n){const r=this,o={partial:!0,tokenize:W};let a=0,u=0,c;return f;function f(B){return h(B)}function h(B){const te=r.events[r.events.length-1];return a=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(B)}function m(B){return B===c?(u++,e.consume(B),m):u<3?n(B):(e.exit("codeFencedFenceSequence"),Ke(B)?Xe(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Le(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(WE,S,G)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(B))}function b(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Ke(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,T,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),b)}function T(B){return B===null||Le(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),_)}function S(B){return e.attempt(o,G,C)(B)}function C(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),I}function I(B){return a>0&&Ke(B)?Xe(e,F,"linePrefix",a+1)(B):F(B)}function F(B){return B===null||Le(B)?e.check(WE,S,G)(B):(e.enter("codeFlowValue"),D(B))}function D(B){return B===null||Le(B)?(e.exit("codeFlowValue"),F(B)):(e.consume(B),D)}function G(B){return e.exit("codeFenced"),t(B)}function W(B,te,be){let he=0;return H;function H(Te){return B.enter("lineEnding"),B.consume(Te),B.exit("lineEnding"),le}function le(Te){return B.enter("codeFencedFence"),Ke(Te)?Xe(B,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Te):de(Te)}function de(Te){return Te===c?(B.enter("codeFencedFenceSequence"),ce(Te)):be(Te)}function ce(Te){return Te===c?(he++,B.consume(Te),ce):he>=u?(B.exit("codeFencedFenceSequence"),Ke(Te)?Xe(B,fe,"whitespace")(Te):fe(Te)):be(Te)}function fe(Te){return Te===null||Le(Te)?(B.exit("codeFencedFence"),te(Te)):be(Te)}}}function CO(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const qd={name:"codeIndented",tokenize:vO},AO={partial:!0,tokenize:kO};function vO(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Xe(e,a,"linePrefix",5)(h)}function a(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?f(h):Le(h)?e.attempt(AO,u,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Le(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function kO(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Xe(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const NO={name:"codeText",previous:IO,resolve:OO,tokenize:PO};function OO(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 IO(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function PO(e,t,n){let r=0,o,a;return u;function u(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),f(E))}function f(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),f):E===96?(a=e.enter("codeTextSequence"),o=0,m(E)):Le(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||Le(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)):(a.type="codeTextData",h(E))}}class RO{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&da(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),da(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),da(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);da(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);da(this.left,n.reverse())}}}function da(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 KE(e){const t={};let n=-1,r,o,a,u,c,f,h;const m=new RO(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,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,LO(m,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=m.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(m.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=U({},m.get(o)[1].start),c=m.slice(o,n),c.unshift(r),m.splice(o,n-o+1,c))}}return Dn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function LO(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,f=[],h={};let m,E,b=-1,T=n,_=0,S=0;const C=[S];for(;T;){for(;e.get(++o)[1]!==T;);a.push(o),T._tokenizer||(m=r.sliceStream(T),T.next||m.push(null),E&&u.defineSkip(T.start),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),T._isInFirstContentOfListItem&&(u._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(u.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]),F=a.pop();f.push([F,F+I.length-1]),e.splice(F,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 DO={resolve:FO,tokenize:BO},MO={partial:!0,tokenize:UO};function FO(e){return KE(e),e}function BO(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(MO,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function UO(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function QE(e,t,n,r,o,a,u,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(a),e.consume(I),e.exit(a),b):I===null||I===32||I===41||pl(I)?n(I):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(I))}function b(I){return I===62?(e.enter(a),e.consume(I),e.exit(a),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||Le(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||lt(I))?(e.exit("chunkString"),e.exit(c),e.exit(u),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||pl(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 XE(e,t,n,r,o,a){const u=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(a),m}function m(T){return c>999||T===null||T===91||T===93&&!f||T===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(T):T===93?(e.exit(a),e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):Le(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||Le(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 JE(e,t,n,r,o,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),u=b===40?41:b,f):n(b)}function f(b){return b===u?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(a),h(b))}function h(b){return b===u?(e.exit(a),f(u)):b===null?n(b):Le(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===u||b===null||Le(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?E:m)}function E(b){return b===u||b===92?(e.consume(b),m):m(b)}}function ha(e,t){let n;return r;function r(o){return Le(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 HO={name:"definition",tokenize:jO},zO={partial:!0,tokenize:$O};function jO(e,t,n){const r=this;let o;return a;function a(T){return e.enter("definition"),u(T)}function u(T){return XE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function c(T){return o=dr(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 lt(T)?ha(e,h)(T):h(T)}function h(T){return QE(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function m(T){return e.attempt(zO,E,E)(T)}function E(T){return Ke(T)?Xe(e,b,"whitespace")(T):b(T)}function b(T){return T===null||Le(T)?(e.exit("definition"),r.parser.defined.push(o),t(T)):n(T)}}function $O(e,t,n){return r;function r(c){return lt(c)?ha(e,o)(c):n(c)}function o(c){return JE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ke(c)?Xe(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const VO={name:"hardBreakEscape",tokenize:qO};function qO(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const YO={name:"headingAtx",resolve:WO,tokenize:GO};function WO(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Dn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function GO(e,t,n){let r=0;return o;function o(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&r++<6?(e.consume(m),u):m===null||lt(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||Le(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||lt(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const KO=["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"],QO={concrete:!0,name:"htmlFlow",resolveTo:ZO,tokenize:eI},XO={partial:!0,tokenize:nI},JO={partial:!0,tokenize:tI};function ZO(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 eI(e,t,n){const r=this;let o,a,u,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),a=!0,S):k===63?(e.consume(k),o=3,r.interrupt?t:w):hn(k)?(e.consume(k),u=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,_):hn(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 xe="CDATA[";return k===xe.charCodeAt(c++)?(e.consume(k),c===xe.length?r.interrupt?t:de:_):n(k)}function S(k){return hn(k)?(e.consume(k),u=String.fromCharCode(k),C):n(k)}function C(k){if(k===null||k===47||k===62||lt(k)){const xe=k===47,Be=u.toLowerCase();return!xe&&!a&&ZE.includes(Be)?(o=1,r.interrupt?t(k):de(k)):KO.includes(u.toLowerCase())?(o=6,xe?(e.consume(k),I):r.interrupt?t(k):de(k)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):a?F(k):D(k))}return k===45||rn(k)?(e.consume(k),u+=String.fromCharCode(k),C):n(k)}function I(k){return k===62?(e.consume(k),r.interrupt?t:de):n(k)}function F(k){return Ke(k)?(e.consume(k),F):H(k)}function D(k){return k===47?(e.consume(k),H):k===58||k===95||hn(k)?(e.consume(k),G):Ke(k)?(e.consume(k),D):H(k)}function G(k){return k===45||k===46||k===58||k===95||rn(k)?(e.consume(k),G):W(k)}function W(k){return k===61?(e.consume(k),B):Ke(k)?(e.consume(k),W):D(k)}function B(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),f=k,te):Ke(k)?(e.consume(k),B):be(k)}function te(k){return k===f?(e.consume(k),f=null,he):k===null||Le(k)?n(k):(e.consume(k),te)}function be(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||lt(k)?W(k):(e.consume(k),be)}function he(k){return k===47||k===62||Ke(k)?D(k):n(k)}function H(k){return k===62?(e.consume(k),le):n(k)}function le(k){return k===null||Le(k)?de(k):Ke(k)?(e.consume(k),le):n(k)}function de(k){return k===45&&o===2?(e.consume(k),we):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),ee):Le(k)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(XO,Q,ce)(k)):k===null||Le(k)?(e.exit("htmlFlowData"),ce(k)):(e.consume(k),de)}function ce(k){return e.check(JO,fe,Q)(k)}function fe(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Te}function Te(k){return k===null||Le(k)?ce(k):(e.enter("htmlFlowData"),de(k))}function we(k){return k===45?(e.consume(k),w):de(k)}function oe(k){return k===47?(e.consume(k),u="",$):de(k)}function $(k){if(k===62){const xe=u.toLowerCase();return ZE.includes(xe)?(e.consume(k),R):de(k)}return hn(k)&&u.length<8?(e.consume(k),u+=String.fromCharCode(k),$):de(k)}function ee(k){return k===93?(e.consume(k),w):de(k)}function w(k){return k===62?(e.consume(k),R):k===45&&o===2?(e.consume(k),w):de(k)}function R(k){return k===null||Le(k)?(e.exit("htmlFlowData"),Q(k)):(e.consume(k),R)}function Q(k){return e.exit("htmlFlow"),t(k)}}function tI(e,t,n){const r=this;return o;function o(u){return Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function nI(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(fa,t,n)}}const rI={name:"htmlText",tokenize:iI};function iI(e,t,n){const r=this;let o,a,u;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),W):w===63?(e.consume(w),D):hn(w)?(e.consume(w),be):n(w)}function h(w){return w===45?(e.consume(w),m):w===91?(e.consume(w),a=0,_):hn(w)?(e.consume(w),F):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):Le(w)?(u=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?we(w):w===45?b(w):E(w)}function _(w){const R="CDATA[";return w===R.charCodeAt(a++)?(e.consume(w),a===R.length?S:_):n(w)}function S(w){return w===null?n(w):w===93?(e.consume(w),C):Le(w)?(u=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?we(w):w===93?(e.consume(w),I):S(w)}function F(w){return w===null||w===62?we(w):Le(w)?(u=F,oe(w)):(e.consume(w),F)}function D(w){return w===null?n(w):w===63?(e.consume(w),G):Le(w)?(u=D,oe(w)):(e.consume(w),D)}function G(w){return w===62?we(w):D(w)}function W(w){return hn(w)?(e.consume(w),B):n(w)}function B(w){return w===45||rn(w)?(e.consume(w),B):te(w)}function te(w){return Le(w)?(u=te,oe(w)):Ke(w)?(e.consume(w),te):we(w)}function be(w){return w===45||rn(w)?(e.consume(w),be):w===47||w===62||lt(w)?he(w):n(w)}function he(w){return w===47?(e.consume(w),we):w===58||w===95||hn(w)?(e.consume(w),H):Le(w)?(u=he,oe(w)):Ke(w)?(e.consume(w),he):we(w)}function H(w){return w===45||w===46||w===58||w===95||rn(w)?(e.consume(w),H):le(w)}function le(w){return w===61?(e.consume(w),de):Le(w)?(u=le,oe(w)):Ke(w)?(e.consume(w),le):he(w)}function de(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,ce):Le(w)?(u=de,oe(w)):Ke(w)?(e.consume(w),de):(e.consume(w),fe)}function ce(w){return w===o?(e.consume(w),o=void 0,Te):w===null?n(w):Le(w)?(u=ce,oe(w)):(e.consume(w),ce)}function fe(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||lt(w)?he(w):(e.consume(w),fe)}function Te(w){return w===47||w===62||lt(w)?he(w):n(w)}function we(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,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):ee(w)}function ee(w){return e.enter("htmlTextData"),u(w)}}const Yd={name:"labelEnd",resolveAll:uI,resolveTo:lI,tokenize:cI},sI={tokenize:fI},oI={tokenize:dI},aI={tokenize:hI};function uI(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&&Dn(e,0,e.length,n),e}function lI(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const f={type:e[a][1].type==="labelLink"?"link":"image",start:U({},e[a][1].start),end:U({},e[e.length-1][1].end)},h={type:"label",start:U({},e[a][1].start),end:U({},e[u][1].end)},m={type:"labelText",start:U({},e[a+r+2][1].end),end:U({},e[u-2][1].start)};return c=[["enter",f,t],["enter",h,t]],c=Wn(c,e.slice(a+1,a+r+3)),c=Wn(c,[["enter",m,t]]),c=Wn(c,gl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Wn(c,[["exit",m,t],e[u-2],e[u-1],["exit",h,t]]),c=Wn(c,e.slice(u+1)),c=Wn(c,[["exit",f,t]]),Dn(e,a,e.length,c),e}function cI(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(b){return a?a._inactive?E(b):(u=r.parser.defined.includes(dr(r.sliceSerialize({start:a.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(sI,m,u?m:E)(b):b===91?e.attempt(oI,m,u?h:E)(b):u?m(b):E(b)}function h(b){return e.attempt(aI,m,E)(b)}function m(b){return t(b)}function E(b){return a._balanced=!0,n(b)}}function fI(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 lt(E)?ha(e,a)(E):a(E)}function a(E){return E===41?m(E):QE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function u(E){return lt(E)?ha(e,f)(E):m(E)}function c(E){return n(E)}function f(E){return E===34||E===39||E===40?JE(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):m(E)}function h(E){return lt(E)?ha(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 dI(e,t,n){const r=this;return o;function o(c){return XE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(dr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function hI(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const pI={name:"labelStartImage",resolveAll:Yd.resolveAll,tokenize:mI};function mI(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const gI={name:"labelStartLink",resolveAll:Yd.resolveAll,tokenize:EI};function EI(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Wd={name:"lineEnding",tokenize:yI};function yI(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const El={name:"thematicBreak",tokenize:TI};function TI(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),u(h)}function u(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),f(h)):r>=3&&(h===null||Le(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 wn={continuation:{tokenize:SI},exit:CI,name:"list",tokenize:xI},bI={partial:!0,tokenize:AI},_I={partial:!0,tokenize:wI};function xI(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(T){const _=r.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||T===r.containerState.marker:$d(T)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(El,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 $d(T)&&++u<10?(e.consume(T),f):(!r.interrupt||u<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(fa,r.interrupt?n:m,e.attempt(bI,b,E))}function m(T){return r.containerState.initialBlankLine=!0,a++,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=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function SI(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(fa,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ke(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(_I,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(wn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function wI(e,t,n){const r=this;return Xe(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function CI(e){e.exit(this.containerState.type)}function AI(e,t,n){const r=this;return Xe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Ke(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ey={name:"setextUnderline",resolveTo:vI,tokenize:kI};function vI(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:U({},e[r][1].start),end:U({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=U({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function kI(e,t,n){const r=this;let o;return a;function a(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,u(h)):n(h)}function u(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||Le(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const NI={tokenize:OI};function OI(e){const t=this,n=e.attempt(fa,r,e.attempt(this.parser.constructs.flowInitial,o,Xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(DO,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const II={resolveAll:ny()},PI=ty("string"),RI=ty("text");function ty(e){return{resolveAll:ny(e==="text"?LI:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(m){return h(m)?a(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"),a(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 ny(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function LI(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,f;for(;a--;){const h=o[a];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)f=!0,c++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end: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 DI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:HO},disable:{null:[]},document:{42:wn,43:wn,45:wn,48:wn,49:wn,50:wn,51:wn,52:wn,53:wn,54:wn,55:wn,56:wn,57:wn,62:VE},flow:{35:YO,42:El,45:[ey,El],60:QO,61:ey,95:El,96:GE,126:GE},flowInitial:{[-2]:qd,[-1]:qd,32:qd},insideSpan:{null:[Vd,II]},string:{38:YE,92:qE},text:{[-5]:Wd,[-4]:Wd,[-3]:Wd,33:pI,38:YE,42:Vd,60:[gO,rI],91:gI,92:[VO,qE],93:Yd,95:Vd,96:NO}},Symbol.toStringTag,{value:"Module"}));function MI(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const f={attempt:te(W),check:te(B),consume:F,enter:D,exit:G,interrupt:te(B,{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&&a.push(t),h;function E(le){return u=Wn(u,le),C(),u[u.length-1]!==null?[]:(be(t,0),h.events=gl(a,h.events,h),h.events)}function b(le,de){return BI(T(le),de)}function T(le){return FI(u,le)}function _(){const{_bufferIndex:le,_index:de,line:ce,column:fe,offset:Te}=r;return{_bufferIndex:le,_index:de,line:ce,column:fe,offset:Te}}function S(le){o[le.line]=le.column,H()}function C(){let le;for(;r._index<u.length;){const de=u[r._index];if(typeof de=="string")for(le=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===le&&r._bufferIndex<de.length;)I(de.charCodeAt(r._bufferIndex));else I(de)}}function I(le){m=m(le)}function F(le){Le(le)?(r.line++,r.column=1,r.offset+=le===-3?2:1,H()):le!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=le}function D(le,de){const ce=de||{};return ce.type=le,ce.start=_(),h.events.push(["enter",ce,h]),c.push(ce),ce}function G(le){const de=c.pop();return de.end=_(),h.events.push(["exit",de,h]),de}function W(le,de){be(le,de.from)}function B(le,de){de.restore()}function te(le,de){return ce;function ce(fe,Te,we){let oe,$,ee,w;return Array.isArray(fe)?Q(fe):"tokenize"in fe?Q([fe]):R(fe);function R(Ie){return Ye;function Ye(Ve){const Je=Ve!==null&&Ie[Ve],wt=Ve!==null&&Ie.null,Qn=[...Array.isArray(Je)?Je:Je?[Je]:[],...Array.isArray(wt)?wt:wt?[wt]:[]];return Q(Qn)(Ve)}}function Q(Ie){return oe=Ie,$=0,Ie.length===0?we:k(Ie[$])}function k(Ie){return Ye;function Ye(Ve){return w=he(),ee=Ie,Ie.partial||(h.currentConstruct=Ie),Ie.name&&h.parser.constructs.disable.null.includes(Ie.name)?Be():Ie.tokenize.call(de?Object.assign(Object.create(h),de):h,f,xe,Be)(Ve)}}function xe(Ie){return le(ee,w),Te}function Be(Ie){return w.restore(),++$<oe.length?k(oe[$]):we}}}function be(le,de){le.resolveAll&&!a.includes(le)&&a.push(le),le.resolve&&Dn(h.events,de,h.events.length-de,le.resolve(h.events.slice(de),h)),le.resolveTo&&(h.events=le.resolveTo(h.events,h))}function he(){const le=_(),de=h.previous,ce=h.currentConstruct,fe=h.events.length,Te=Array.from(c);return{from:fe,restore:we};function we(){r=le,h.previous=de,h.currentConstruct=ce,h.events.length=fe,c=Te,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,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function BI(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
14
+ `+y.stack}return{value:i,source:s,stack:g,digest:null}}function rm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function im(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var GM=typeof WeakMap=="function"?WeakMap:Map;function Ax(i,s,l){l=si(-1,l),l.tag=3,l.payload={element:null};var d=s.value;return l.callback=function(){Mc||(Mc=!0,Tm=d),im(i,s)},l}function vx(i,s,l){l=si(-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(){im(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){im(i,s),typeof d!="function"&&(Li===null?Li=new Set([this]):Li.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})}),l}function kx(i,s,l){var d=i.pingCache;if(d===null){d=i.pingCache=new GM;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=uF.bind(null,i,s,l),s.then(i,i))}function Nx(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 Ox(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=si(-1,1),s.tag=2,Pi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var KM=G.ReactCurrentOwner,kn=!1;function gn(i,s,l,d){s.child=i===null?Q_(s,null,l,d):So(s,i.child,l,d)}function Ix(i,s,l,d,g){l=l.render;var y=s.ref;return Co(s,g),d=Kp(i,s,l,d,y,g),l=Qp(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,oi(i,s,g)):(bt&&l&&Pp(s),s.flags|=1,gn(i,s,d,g),s.child)}function Px(i,s,l,d,g){if(i===null){var y=l.type;return typeof y=="function"&&!Am(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,Rx(i,s,y,d,g)):(i=jc(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 S=y.memoizedProps;if(l=l.compare,l=l!==null?l:Wa,l(S,d)&&i.ref===s.ref)return oi(i,s,g)}return s.flags|=1,i=Bi(y,d),i.ref=s.ref,i.return=s,s.child=i}function Rx(i,s,l,d,g){if(i!==null){var y=i.memoizedProps;if(Wa(y,d)&&i.ref===s.ref)if(kn=!1,s.pendingProps=d=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(kn=!0);else return s.lanes=i.lanes,oi(i,s,g)}return sm(i,s,l,d,g)}function Lx(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},ht(No,zn),zn|=l;else{if((l&1073741824)===0)return i=y!==null?y.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ht(No,zn),zn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:l,ht(No,zn),zn|=d}else y!==null?(d=y.baseLanes|l,s.memoizedState=null):d=l,ht(No,zn),zn|=d;return gn(i,s,g,l),s.child}function Dx(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function sm(i,s,l,d,g){var y=vn(l)?ls:un.current;return y=To(s,y),Co(s,g),l=Kp(i,s,l,d,y,g),d=Qp(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,oi(i,s,g)):(bt&&d&&Pp(s),s.flags|=1,gn(i,s,l,g),s.child)}function Mx(i,s,l,d,g){if(vn(l)){var y=!0;hc(s)}else y=!1;if(Co(s,g),s.stateNode===null)Ic(i,s),wx(s,l,d),nm(s,l,d,g),d=!0;else if(i===null){var S=s.stateNode,I=s.memoizedProps;S.props=I;var L=S.context,Y=l.contextType;typeof Y=="object"&&Y!==null?Y=Zn(Y):(Y=vn(l)?ls:un.current,Y=To(s,Y));var oe=l.getDerivedStateFromProps,ce=typeof oe=="function"||typeof S.getSnapshotBeforeUpdate=="function";ce||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(I!==d||L!==Y)&&Cx(s,S,d,Y),Ii=!1;var ie=s.memoizedState;S.state=ie,xc(s,d,S,g),L=s.memoizedState,I!==d||ie!==L||An.current||Ii?(typeof oe=="function"&&(tm(s,l,oe,d),L=s.memoizedState),(I=Ii||Sx(s,l,I,d,ie,L,Y))?(ce||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(s.flags|=4194308)):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=L),S.props=d,S.state=L,S.context=Y,d=I):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{S=s.stateNode,J_(i,s),I=s.memoizedProps,Y=s.type===s.elementType?I:gr(s.type,I),S.props=Y,ce=s.pendingProps,ie=S.context,L=l.contextType,typeof L=="object"&&L!==null?L=Zn(L):(L=vn(l)?ls:un.current,L=To(s,L));var _e=l.getDerivedStateFromProps;(oe=typeof _e=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(I!==ce||ie!==L)&&Cx(s,S,d,L),Ii=!1,ie=s.memoizedState,S.state=ie,xc(s,d,S,g);var Ae=s.memoizedState;I!==ce||ie!==Ae||An.current||Ii?(typeof _e=="function"&&(tm(s,l,_e,d),Ae=s.memoizedState),(Y=Ii||Sx(s,l,Y,d,ie,Ae,L)||!1)?(oe||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(d,Ae,L),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(d,Ae,L)),typeof S.componentDidUpdate=="function"&&(s.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof S.componentDidUpdate!="function"||I===i.memoizedProps&&ie===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&ie===i.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=Ae),S.props=d,S.state=Ae,S.context=L,d=Y):(typeof S.componentDidUpdate!="function"||I===i.memoizedProps&&ie===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&ie===i.memoizedState||(s.flags|=1024),d=!1)}return om(i,s,l,d,y,g)}function om(i,s,l,d,g,y){Dx(i,s);var S=(s.flags&128)!==0;if(!d&&!S)return g&&z_(s,l,!1),oi(i,s,y);d=s.stateNode,KM.current=s;var I=S&&typeof l.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,i!==null&&S?(s.child=So(s,i.child,null,y),s.child=So(s,null,I,y)):gn(i,s,I,y),s.memoizedState=d.state,g&&z_(s,l,!0),s.child}function Fx(i){var s=i.stateNode;s.pendingContext?U_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&U_(i,s.context,!1),$p(i,s.containerInfo)}function Bx(i,s,l,d,g){return xo(),Mp(g),s.flags|=256,gn(i,s,l,d),s.child}var am={dehydrated:null,treeContext:null,retryLane:0};function um(i){return{baseLanes:i,cachePool:null,transitions:null}}function Ux(i,s,l){var d=s.pendingProps,g=St.current,y=!1,S=(s.flags&128)!==0,I;if((I=S)||(I=i!==null&&i.memoizedState===null?!1:(g&2)!==0),I?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),ht(St,g&1),i===null)return Dp(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(S=d.children,i=d.fallback,y?(d=s.mode,y=s.child,S={mode:"hidden",children:S},(d&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=S):y=$c(S,d,0,null),i=Ts(i,d,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=um(l),s.memoizedState=am,i):lm(s,S));if(g=i.memoizedState,g!==null&&(I=g.dehydrated,I!==null))return QM(i,s,S,d,I,g,l);if(y){y=d.fallback,S=s.mode,g=i.child,I=g.sibling;var L={mode:"hidden",children:d.children};return(S&1)===0&&s.child!==g?(d=s.child,d.childLanes=0,d.pendingProps=L,s.deletions=null):(d=Bi(g,L),d.subtreeFlags=g.subtreeFlags&14680064),I!==null?y=Bi(I,y):(y=Ts(y,S,l,null),y.flags|=2),y.return=s,d.return=s,d.sibling=y,s.child=d,d=y,y=s.child,S=i.child.memoizedState,S=S===null?um(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},y.memoizedState=S,y.childLanes=i.childLanes&~l,s.memoizedState=am,d}return y=i.child,i=y.sibling,d=Bi(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 lm(i,s){return s=$c({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Oc(i,s,l,d){return d!==null&&Mp(d),So(s,i.child,null,l),i=lm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function QM(i,s,l,d,g,y,S){if(l)return s.flags&256?(s.flags&=-257,d=rm(Error(n(422))),Oc(i,s,S,d)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=d.fallback,g=s.mode,d=$c({mode:"visible",children:d.children},g,0,null),y=Ts(y,g,S,null),y.flags|=2,d.return=s,y.return=s,d.sibling=y,s.child=d,(s.mode&1)!==0&&So(s,i.child,null,S),s.child.memoizedState=um(S),s.memoizedState=am,y);if((s.mode&1)===0)return Oc(i,s,S,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var I=d.dgst;return d=I,y=Error(n(419)),d=rm(y,d,void 0),Oc(i,s,S,d)}if(I=(S&i.childLanes)!==0,kn||I){if(d=Kt,d!==null){switch(S&-S){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|S))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,ii(i,g),Tr(d,i,g,-1))}return Cm(),d=rm(Error(n(421))),Oc(i,s,S,d)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=lF.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,Hn=vi(g.nextSibling),Un=s,bt=!0,mr=null,i!==null&&(Xn[Jn++]=ni,Xn[Jn++]=ri,Xn[Jn++]=cs,ni=i.id,ri=i.overflow,cs=s),s=lm(s,d.children),s.flags|=4096,s)}function Hx(i,s,l){i.lanes|=s;var d=i.alternate;d!==null&&(d.lanes|=s),Hp(i.return,s,l)}function cm(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 zx(i,s,l){var d=s.pendingProps,g=d.revealOrder,y=d.tail;if(gn(i,s,d.children,l),d=St.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&&Hx(i,l,s);else if(i.tag===19)Hx(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(ht(St,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&&Sc(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),cm(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&&Sc(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}cm(s,!0,l,null,y);break;case"together":cm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Ic(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function oi(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),ms|=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=Bi(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Bi(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function XM(i,s,l){switch(s.tag){case 3:Fx(s),xo();break;case 5:tx(s);break;case 1:vn(s.type)&&hc(s);break;case 4:$p(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;ht(Tc,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(ht(St,St.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?Ux(i,s,l):(ht(St,St.current&1),i=oi(i,s,l),i!==null?i.sibling:null);ht(St,St.current&1);break;case 19:if(d=(l&s.childLanes)!==0,(i.flags&128)!==0){if(d)return zx(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ht(St,St.current),d)break;return null;case 22:case 23:return s.lanes=0,Lx(i,s,l)}return oi(i,s,l)}var jx,fm,$x,Vx;jx=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}},fm=function(){},$x=function(i,s,l,d){var g=i.memoizedProps;if(g!==d){i=s.stateNode,hs(Mr.current);var y=null;switch(l){case"input":g=yi(i,g),d=yi(i,d),y=[];break;case"select":g=w({},g,{value:void 0}),d=w({},d,{value:void 0}),y=[];break;case"textarea":g=dt(i,g),d=dt(i,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(i.onclick=cc)}Jt(l,d);var S;l=null;for(Y in g)if(!d.hasOwnProperty(Y)&&g.hasOwnProperty(Y)&&g[Y]!=null)if(Y==="style"){var I=g[Y];for(S in I)I.hasOwnProperty(S)&&(l||(l={}),l[S]="")}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 L=d[Y];if(I=g!=null?g[Y]:void 0,d.hasOwnProperty(Y)&&L!==I&&(L!=null||I!=null))if(Y==="style")if(I){for(S in I)!I.hasOwnProperty(S)||L&&L.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in L)L.hasOwnProperty(S)&&I[S]!==L[S]&&(l||(l={}),l[S]=L[S])}else l||(y||(y=[]),y.push(Y,l)),l=L;else Y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,I=I?I.__html:void 0,L!=null&&I!==L&&(y=y||[]).push(Y,L)):Y==="children"?typeof L!="string"&&typeof L!="number"||(y=y||[]).push(Y,""+L):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(o.hasOwnProperty(Y)?(L!=null&&Y==="onScroll"&&mt("scroll",i),y||I===L||(y=[])):(y=y||[]).push(Y,L))}l&&(y=y||[]).push("style",l);var Y=y;(s.updateQueue=Y)&&(s.flags|=4)}},Vx=function(i,s,l,d){l!==d&&(s.flags|=4)};function uu(i,s){if(!bt)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 cn(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 JM(i,s,l){var d=s.pendingProps;switch(Rp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cn(s),null;case 1:return vn(s.type)&&dc(),cn(s),null;case 3:return d=s.stateNode,Ao(),gt(An),gt(un),Yp(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(Ec(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,mr!==null&&(xm(mr),mr=null))),fm(i,s),cn(s),null;case 5:Vp(s);var g=hs(ru.current);if(l=s.type,i!==null&&s.stateNode!=null)$x(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 cn(s),null}if(i=hs(Mr.current),Ec(s)){d=s.stateNode,l=s.type;var y=s.memoizedProps;switch(d[Dr]=s,d[Ja]=y,i=(s.mode&1)!==0,l){case"dialog":mt("cancel",d),mt("close",d);break;case"iframe":case"object":case"embed":mt("load",d);break;case"video":case"audio":for(g=0;g<Ka.length;g++)mt(Ka[g],d);break;case"source":mt("error",d);break;case"img":case"image":case"link":mt("error",d),mt("load",d);break;case"details":mt("toggle",d);break;case"input":ss(d,y),mt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},mt("invalid",d);break;case"textarea":It(d,y),mt("invalid",d)}Jt(l,y),g=null;for(var S in y)if(y.hasOwnProperty(S)){var I=y[S];S==="children"?typeof I=="string"?d.textContent!==I&&(y.suppressHydrationWarning!==!0&&lc(d.textContent,I,i),g=["children",I]):typeof I=="number"&&d.textContent!==""+I&&(y.suppressHydrationWarning!==!0&&lc(d.textContent,I,i),g=["children",""+I]):o.hasOwnProperty(S)&&I!=null&&S==="onScroll"&&mt("scroll",d)}switch(l){case"input":Kn(d),Se(d,y,!0);break;case"textarea":Kn(d),Rt(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=cc)}d=g,s.updateQueue=d,d!==null&&(s.flags|=4)}else{S=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=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof d.is=="string"?i=S.createElement(l,{is:d.is}):(i=S.createElement(l),l==="select"&&(S=i,d.multiple?S.multiple=!0:d.size&&(S.size=d.size))):i=S.createElementNS(i,l),i[Dr]=s,i[Ja]=d,jx(i,s,!1,!1),s.stateNode=i;e:{switch(S=Rr(l,d),l){case"dialog":mt("cancel",i),mt("close",i),g=d;break;case"iframe":case"object":case"embed":mt("load",i),g=d;break;case"video":case"audio":for(g=0;g<Ka.length;g++)mt(Ka[g],i);g=d;break;case"source":mt("error",i),g=d;break;case"img":case"image":case"link":mt("error",i),mt("load",i),g=d;break;case"details":mt("toggle",i),g=d;break;case"input":ss(i,d),g=yi(i,d),mt("invalid",i);break;case"option":g=d;break;case"select":i._wrapperState={wasMultiple:!!d.multiple},g=w({},d,{value:void 0}),mt("invalid",i);break;case"textarea":It(i,d),g=dt(i,d),mt("invalid",i);break;default:g=d}Jt(l,g),I=g;for(y in I)if(I.hasOwnProperty(y)){var L=I[y];y==="style"?bi(i,L):y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&We(i,L)):y==="children"?typeof L=="string"?(l!=="textarea"||L!=="")&&Ze(i,L):typeof L=="number"&&Ze(i,""+L):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?L!=null&&y==="onScroll"&&mt("scroll",i):L!=null&&D(i,y,L,S))}switch(l){case"input":Kn(i),Se(i,d,!1);break;case"textarea":Kn(i),Rt(i);break;case"option":d.value!=null&&i.setAttribute("value",""+Ve(d.value));break;case"select":i.multiple=!!d.multiple,y=d.value,y!=null?ot(i,!!d.multiple,y,!1):d.defaultValue!=null&&ot(i,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=cc)}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 cn(s),null;case 6:if(i&&s.stateNode!=null)Vx(i,s,i.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(l=hs(ru.current),hs(Mr.current),Ec(s)){if(d=s.stateNode,l=s.memoizedProps,d[Dr]=s,(y=d.nodeValue!==l)&&(i=Un,i!==null))switch(i.tag){case 3:lc(d.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&lc(d.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else d=(l.nodeType===9?l:l.ownerDocument).createTextNode(d),d[Dr]=s,s.stateNode=d}return cn(s),null;case 13:if(gt(St),d=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(bt&&Hn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)W_(),xo(),s.flags|=98560,y=!1;else if(y=Ec(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[Dr]=s}else xo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;cn(s),y=!1}else mr!==null&&(xm(mr),mr=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||(St.current&1)!==0?jt===0&&(jt=3):Cm())),s.updateQueue!==null&&(s.flags|=4),cn(s),null);case 4:return Ao(),fm(i,s),i===null&&Qa(s.stateNode.containerInfo),cn(s),null;case 10:return Up(s.type._context),cn(s),null;case 17:return vn(s.type)&&dc(),cn(s),null;case 19:if(gt(St),y=s.memoizedState,y===null)return cn(s),null;if(d=(s.flags&128)!==0,S=y.rendering,S===null)if(d)uu(y,!1);else{if(jt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(S=Sc(i),S!==null){for(s.flags|=128,uu(y,!1),d=S.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,S=y.alternate,S===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=S.childLanes,y.lanes=S.lanes,y.child=S.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=S.memoizedProps,y.memoizedState=S.memoizedState,y.updateQueue=S.updateQueue,y.type=S.type,i=S.dependencies,y.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return ht(St,St.current&1|2),s.child}i=i.sibling}y.tail!==null&&Lt()>Oo&&(s.flags|=128,d=!0,uu(y,!1),s.lanes=4194304)}else{if(!d)if(i=Sc(S),i!==null){if(s.flags|=128,d=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),uu(y,!0),y.tail===null&&y.tailMode==="hidden"&&!S.alternate&&!bt)return cn(s),null}else 2*Lt()-y.renderingStartTime>Oo&&l!==1073741824&&(s.flags|=128,d=!0,uu(y,!1),s.lanes=4194304);y.isBackwards?(S.sibling=s.child,s.child=S):(l=y.last,l!==null?l.sibling=S:s.child=S,y.last=S)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Lt(),s.sibling=null,l=St.current,ht(St,d?l&1|2:l&1),s):(cn(s),null);case 22:case 23:return wm(),d=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(zn&1073741824)!==0&&(cn(s),s.subtreeFlags&6&&(s.flags|=8192)):cn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function ZM(i,s){switch(Rp(s),s.tag){case 1:return vn(s.type)&&dc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ao(),gt(An),gt(un),Yp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Vp(s),null;case 13:if(gt(St),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));xo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return gt(St),null;case 4:return Ao(),null;case 10:return Up(s.type._context),null;case 22:case 23:return wm(),null;case 24:return null;default:return null}}var Pc=!1,fn=!1,eF=typeof WeakSet=="function"?WeakSet:Set,we=null;function ko(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(d){vt(i,s,d)}else l.current=null}function dm(i,s,l){try{l()}catch(d){vt(i,s,d)}}var qx=!1;function tF(i,s){if(wp=Jl,i=S_(),gp(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(me){l=null;break e}var S=0,I=-1,L=-1,Y=0,oe=0,ce=i,ie=null;t:for(;;){for(var _e;ce!==l||g!==0&&ce.nodeType!==3||(I=S+g),ce!==y||d!==0&&ce.nodeType!==3||(L=S+d),ce.nodeType===3&&(S+=ce.nodeValue.length),(_e=ce.firstChild)!==null;)ie=ce,ce=_e;for(;;){if(ce===i)break t;if(ie===l&&++Y===g&&(I=S),ie===y&&++oe===d&&(L=S),(_e=ce.nextSibling)!==null)break;ce=ie,ie=ce.parentNode}ce=_e}l=I===-1||L===-1?null:{start:I,end:L}}else l=null}l=l||{start:0,end:0}}else l=null;for(Cp={focusedElem:i,selectionRange:l},Jl=!1,we=s;we!==null;)if(s=we,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,we=i;else for(;we!==null;){s=we;try{var Ae=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var ke=Ae.memoizedProps,Dt=Ae.memoizedState,z=s.stateNode,M=z.getSnapshotBeforeUpdate(s.elementType===s.type?ke:gr(s.type,ke),Dt);z.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var $=s.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(me){vt(s,s.return,me)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return Ae=qx,qx=!1,Ae}function lu(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&&dm(s,l,y)}g=g.next}while(g!==d)}}function Rc(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 hm(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 Yx(i){var s=i.alternate;s!==null&&(i.alternate=null,Yx(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Dr],delete s[Ja],delete s[Np],delete s[FM],delete s[BM])),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 Wx(i){return i.tag===5||i.tag===3||i.tag===4}function Gx(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Wx(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 pm(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=cc));else if(d!==4&&(i=i.child,i!==null))for(pm(i,s,l),i=i.sibling;i!==null;)pm(i,s,l),i=i.sibling}function mm(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(mm(i,s,l),i=i.sibling;i!==null;)mm(i,s,l),i=i.sibling}var Zt=null,Er=!1;function Ri(i,s,l){for(l=l.child;l!==null;)Kx(i,s,l),l=l.sibling}function Kx(i,s,l){if(Lr&&typeof Lr.onCommitFiberUnmount=="function")try{Lr.onCommitFiberUnmount(Yl,l)}catch(I){}switch(l.tag){case 5:fn||ko(l,s);case 6:var d=Zt,g=Er;Zt=null,Ri(i,s,l),Zt=d,Er=g,Zt!==null&&(Er?(i=Zt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Zt.removeChild(l.stateNode));break;case 18:Zt!==null&&(Er?(i=Zt,l=l.stateNode,i.nodeType===8?kp(i.parentNode,l):i.nodeType===1&&kp(i,l),za(i)):kp(Zt,l.stateNode));break;case 4:d=Zt,g=Er,Zt=l.stateNode.containerInfo,Er=!0,Ri(i,s,l),Zt=d,Er=g;break;case 0:case 11:case 14:case 15:if(!fn&&(d=l.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var y=g,S=y.destroy;y=y.tag,S!==void 0&&((y&2)!==0||(y&4)!==0)&&dm(l,s,S),g=g.next}while(g!==d)}Ri(i,s,l);break;case 1:if(!fn&&(ko(l,s),d=l.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=l.memoizedProps,d.state=l.memoizedState,d.componentWillUnmount()}catch(I){vt(l,s,I)}Ri(i,s,l);break;case 21:Ri(i,s,l);break;case 22:l.mode&1?(fn=(d=fn)||l.memoizedState!==null,Ri(i,s,l),fn=d):Ri(i,s,l);break;default:Ri(i,s,l)}}function Qx(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new eF),s.forEach(function(d){var g=cF.bind(null,i,d);l.has(d)||(l.add(d),d.then(g,g))})}}function yr(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,S=s,I=S;e:for(;I!==null;){switch(I.tag){case 5:Zt=I.stateNode,Er=!1;break e;case 3:Zt=I.stateNode.containerInfo,Er=!0;break e;case 4:Zt=I.stateNode.containerInfo,Er=!0;break e}I=I.return}if(Zt===null)throw Error(n(160));Kx(y,S,g),Zt=null,Er=!1;var L=g.alternate;L!==null&&(L.return=null),g.return=null}catch(Y){vt(g,s,Y)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Xx(s,i),s=s.sibling}function Xx(i,s){var l=i.alternate,d=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(yr(s,i),Br(i),d&4){try{lu(3,i,i.return),Rc(3,i)}catch(ke){vt(i,i.return,ke)}try{lu(5,i,i.return)}catch(ke){vt(i,i.return,ke)}}break;case 1:yr(s,i),Br(i),d&512&&l!==null&&ko(l,l.return);break;case 5:if(yr(s,i),Br(i),d&512&&l!==null&&ko(l,l.return),i.flags&32){var g=i.stateNode;try{Ze(g,"")}catch(ke){vt(i,i.return,ke)}}if(d&4&&(g=i.stateNode,g!=null)){var y=i.memoizedProps,S=l!==null?l.memoizedProps:y,I=i.type,L=i.updateQueue;if(i.updateQueue=null,L!==null)try{I==="input"&&y.type==="radio"&&y.name!=null&&Ti(g,y),Rr(I,S);var Y=Rr(I,y);for(S=0;S<L.length;S+=2){var oe=L[S],ce=L[S+1];oe==="style"?bi(g,ce):oe==="dangerouslySetInnerHTML"?We(g,ce):oe==="children"?Ze(g,ce):D(g,oe,ce,Y)}switch(I){case"input":Jr(g,y);break;case"textarea":Pt(g,y);break;case"select":var ie=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var _e=y.value;_e!=null?ot(g,!!y.multiple,_e,!1):ie!==!!y.multiple&&(y.defaultValue!=null?ot(g,!!y.multiple,y.defaultValue,!0):ot(g,!!y.multiple,y.multiple?[]:"",!1))}g[Ja]=y}catch(ke){vt(i,i.return,ke)}}break;case 6:if(yr(s,i),Br(i),d&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ke){vt(i,i.return,ke)}}break;case 3:if(yr(s,i),Br(i),d&4&&l!==null&&l.memoizedState.isDehydrated)try{za(s.containerInfo)}catch(ke){vt(i,i.return,ke)}break;case 4:yr(s,i),Br(i);break;case 13:yr(s,i),Br(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(ym=Lt())),d&4&&Qx(i);break;case 22:if(oe=l!==null&&l.memoizedState!==null,i.mode&1?(fn=(Y=fn)||oe,yr(s,i),fn=Y):yr(s,i),Br(i),d&8192){if(Y=i.memoizedState!==null,(i.stateNode.isHidden=Y)&&!oe&&(i.mode&1)!==0)for(we=i,oe=i.child;oe!==null;){for(ce=we=oe;we!==null;){switch(ie=we,_e=ie.child,ie.tag){case 0:case 11:case 14:case 15:lu(4,ie,ie.return);break;case 1:ko(ie,ie.return);var Ae=ie.stateNode;if(typeof Ae.componentWillUnmount=="function"){d=ie,l=ie.return;try{s=d,Ae.props=s.memoizedProps,Ae.state=s.memoizedState,Ae.componentWillUnmount()}catch(ke){vt(d,l,ke)}}break;case 5:ko(ie,ie.return);break;case 22:if(ie.memoizedState!==null){e2(ce);continue}}_e!==null?(_e.return=ie,we=_e):e2(ce)}oe=oe.sibling}e:for(oe=null,ce=i;;){if(ce.tag===5){if(oe===null){oe=ce;try{g=ce.stateNode,Y?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(I=ce.stateNode,L=ce.memoizedProps.style,S=L!=null&&L.hasOwnProperty("display")?L.display:null,I.style.display=Qn("display",S))}catch(ke){vt(i,i.return,ke)}}}else if(ce.tag===6){if(oe===null)try{ce.stateNode.nodeValue=Y?"":ce.memoizedProps}catch(ke){vt(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;oe===ce&&(oe=null),ce=ce.return}oe===ce&&(oe=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:yr(s,i),Br(i),d&4&&Qx(i);break;case 21:break;default:yr(s,i),Br(i)}}function Br(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(Wx(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&&(Ze(g,""),d.flags&=-33);var y=Gx(i);mm(i,y,g);break;case 3:case 4:var S=d.stateNode.containerInfo,I=Gx(i);pm(i,I,S);break;default:throw Error(n(161))}}catch(L){vt(i,i.return,L)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function nF(i,s,l){we=i,Jx(i)}function Jx(i,s,l){for(var d=(i.mode&1)!==0;we!==null;){var g=we,y=g.child;if(g.tag===22&&d){var S=g.memoizedState!==null||Pc;if(!S){var I=g.alternate,L=I!==null&&I.memoizedState!==null||fn;I=Pc;var Y=fn;if(Pc=S,(fn=L)&&!Y)for(we=g;we!==null;)S=we,L=S.child,S.tag===22&&S.memoizedState!==null?t2(g):L!==null?(L.return=S,we=L):t2(g);for(;y!==null;)we=y,Jx(y),y=y.sibling;we=g,Pc=I,fn=Y}Zx(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,we=y):Zx(i)}}function Zx(i){for(;we!==null;){var s=we;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:fn||Rc(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!fn)if(l===null)d.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:gr(s.type,l.memoizedProps);d.componentDidUpdate(g,l.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&ex(s,y,d);break;case 3:var S=s.updateQueue;if(S!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}ex(s,S,l)}break;case 5:var I=s.stateNode;if(l===null&&s.flags&4){l=I;var L=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&l.focus();break;case"img":L.src&&(l.src=L.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 oe=Y.memoizedState;if(oe!==null){var ce=oe.dehydrated;ce!==null&&za(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}fn||s.flags&512&&hm(s)}catch(ie){vt(s,s.return,ie)}}if(s===i){we=null;break}if(l=s.sibling,l!==null){l.return=s.return,we=l;break}we=s.return}}function e2(i){for(;we!==null;){var s=we;if(s===i){we=null;break}var l=s.sibling;if(l!==null){l.return=s.return,we=l;break}we=s.return}}function t2(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{Rc(4,s)}catch(L){vt(s,l,L)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var g=s.return;try{d.componentDidMount()}catch(L){vt(s,g,L)}}var y=s.return;try{hm(s)}catch(L){vt(s,y,L)}break;case 5:var S=s.return;try{hm(s)}catch(L){vt(s,S,L)}}}catch(L){vt(s,s.return,L)}if(s===i){we=null;break}var I=s.sibling;if(I!==null){I.return=s.return,we=I;break}we=s.return}}var rF=Math.ceil,Lc=G.ReactCurrentDispatcher,gm=G.ReactCurrentOwner,tr=G.ReactCurrentBatchConfig,et=0,Kt=null,Ht=null,en=0,zn=0,No=ki(0),jt=0,cu=null,ms=0,Dc=0,Em=0,fu=null,Nn=null,ym=0,Oo=1/0,ai=null,Mc=!1,Tm=null,Li=null,Fc=!1,Di=null,Bc=0,du=0,bm=null,Uc=-1,Hc=0;function En(){return(et&6)!==0?Lt():Uc!==-1?Uc:Uc=Lt()}function Mi(i){return(i.mode&1)===0?1:(et&2)!==0&&en!==0?en&-en:HM.transition!==null?(Hc===0&&(Hc=Gb()),Hc):(i=at,i!==0||(i=window.event,i=i===void 0?16:r_(i.type)),i)}function Tr(i,s,l,d){if(50<du)throw du=0,bm=null,Error(n(185));Ma(i,l,d),((et&2)===0||i!==Kt)&&(i===Kt&&((et&2)===0&&(Dc|=l),jt===4&&Fi(i,en)),On(i,d),l===1&&et===0&&(s.mode&1)===0&&(Oo=Lt()+500,pc&&Oi()))}function On(i,s){var l=i.callbackNode;H8(i,s);var d=Kl(i,i===Kt?en:0);if(d===0)l!==null&&qb(l),i.callbackNode=null,i.callbackPriority=0;else if(s=d&-d,i.callbackPriority!==s){if(l!=null&&qb(l),s===1)i.tag===0?UM(r2.bind(null,i)):j_(r2.bind(null,i)),DM(function(){(et&6)===0&&Oi()}),l=null;else{switch(Kb(d)){case 1:l=Zh;break;case 4:l=Yb;break;case 16:l=ql;break;case 536870912:l=Wb;break;default:l=ql}l=f2(l,n2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function n2(i,s){if(Uc=-1,Hc=0,(et&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Io()&&i.callbackNode!==l)return null;var d=Kl(i,i===Kt?en:0);if(d===0)return null;if((d&30)!==0||(d&i.expiredLanes)!==0||s)s=zc(i,d);else{s=d;var g=et;et|=2;var y=s2();(Kt!==i||en!==s)&&(ai=null,Oo=Lt()+500,Es(i,s));do try{oF();break}catch(I){i2(i,I)}while(!0);Bp(),Lc.current=y,et=g,Ht!==null?s=0:(Kt=null,en=0,s=jt)}if(s!==0){if(s===2&&(g=ep(i),g!==0&&(d=g,s=_m(i,g))),s===1)throw l=cu,Es(i,0),Fi(i,d),On(i,Lt()),l;if(s===6)Fi(i,d);else{if(g=i.current.alternate,(d&30)===0&&!iF(g)&&(s=zc(i,d),s===2&&(y=ep(i),y!==0&&(d=y,s=_m(i,y))),s===1))throw l=cu,Es(i,0),Fi(i,d),On(i,Lt()),l;switch(i.finishedWork=g,i.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:ys(i,Nn,ai);break;case 3:if(Fi(i,d),(d&130023424)===d&&(s=ym+500-Lt(),10<s)){if(Kl(i,0)!==0)break;if(g=i.suspendedLanes,(g&d)!==d){En(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=vp(ys.bind(null,i,Nn,ai),s);break}ys(i,Nn,ai);break;case 4:if(Fi(i,d),(d&4194240)===d)break;for(s=i.eventTimes,g=-1;0<d;){var S=31-hr(d);y=1<<S,S=s[S],S>g&&(g=S),d&=~y}if(d=g,d=Lt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*rF(d/1960))-d,10<d){i.timeoutHandle=vp(ys.bind(null,i,Nn,ai),d);break}ys(i,Nn,ai);break;case 5:ys(i,Nn,ai);break;default:throw Error(n(329))}}}return On(i,Lt()),i.callbackNode===l?n2.bind(null,i):null}function _m(i,s){var l=fu;return i.current.memoizedState.isDehydrated&&(Es(i,s).flags|=256),i=zc(i,s),i!==2&&(s=Nn,Nn=l,s!==null&&xm(s)),i}function xm(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function iF(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(!pr(y(),g))return!1}catch(S){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Fi(i,s){for(s&=~Em,s&=~Dc,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-hr(s),d=1<<l;i[l]=-1,s&=~d}}function r2(i){if((et&6)!==0)throw Error(n(327));Io();var s=Kl(i,0);if((s&1)===0)return On(i,Lt()),null;var l=zc(i,s);if(i.tag!==0&&l===2){var d=ep(i);d!==0&&(s=d,l=_m(i,d))}if(l===1)throw l=cu,Es(i,0),Fi(i,s),On(i,Lt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,ys(i,Nn,ai),On(i,Lt()),null}function Sm(i,s){var l=et;et|=1;try{return i(s)}finally{et=l,et===0&&(Oo=Lt()+500,pc&&Oi())}}function gs(i){Di!==null&&Di.tag===0&&(et&6)===0&&Io();var s=et;et|=1;var l=tr.transition,d=at;try{if(tr.transition=null,at=1,i)return i()}finally{at=d,tr.transition=l,et=s,(et&6)===0&&Oi()}}function wm(){zn=No.current,gt(No)}function Es(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,LM(l)),Ht!==null)for(l=Ht.return;l!==null;){var d=l;switch(Rp(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&dc();break;case 3:Ao(),gt(An),gt(un),Yp();break;case 5:Vp(d);break;case 4:Ao();break;case 13:gt(St);break;case 19:gt(St);break;case 10:Up(d.type._context);break;case 22:case 23:wm()}l=l.return}if(Kt=i,Ht=i=Bi(i.current,null),en=zn=s,jt=0,cu=null,Em=Dc=ms=0,Nn=fu=null,ds!==null){for(s=0;s<ds.length;s++)if(l=ds[s],d=l.interleaved,d!==null){l.interleaved=null;var g=d.next,y=l.pending;if(y!==null){var S=y.next;y.next=g,d.next=S}l.pending=d}ds=null}return i}function i2(i,s){do{var l=Ht;try{if(Bp(),wc.current=kc,Cc){for(var d=wt.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}Cc=!1}if(ps=0,Gt=zt=wt=null,iu=!1,su=0,gm.current=null,l===null||l.return===null){jt=1,cu=s,Ht=null;break}e:{var y=i,S=l.return,I=l,L=s;if(s=en,I.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var Y=L,oe=I,ce=oe.tag;if((oe.mode&1)===0&&(ce===0||ce===11||ce===15)){var ie=oe.alternate;ie?(oe.updateQueue=ie.updateQueue,oe.memoizedState=ie.memoizedState,oe.lanes=ie.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var _e=Nx(S);if(_e!==null){_e.flags&=-257,Ox(_e,S,I,y,s),_e.mode&1&&kx(y,Y,s),s=_e,L=Y;var Ae=s.updateQueue;if(Ae===null){var ke=new Set;ke.add(L),s.updateQueue=ke}else Ae.add(L);break e}else{if((s&1)===0){kx(y,Y,s),Cm();break e}L=Error(n(426))}}else if(bt&&I.mode&1){var Dt=Nx(S);if(Dt!==null){(Dt.flags&65536)===0&&(Dt.flags|=256),Ox(Dt,S,I,y,s),Mp(vo(L,I));break e}}y=L=vo(L,I),jt!==4&&(jt=2),fu===null?fu=[y]:fu.push(y),y=S;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var z=Ax(y,L,s);Z_(y,z);break e;case 1:I=L;var M=y.type,$=y.stateNode;if((y.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(Li===null||!Li.has($)))){y.flags|=65536,s&=-s,y.lanes|=s;var me=vx(y,I,s);Z_(y,me);break e}}y=y.return}while(y!==null)}a2(l)}catch(Ne){s=Ne,Ht===l&&l!==null&&(Ht=l=l.return);continue}break}while(!0)}function s2(){var i=Lc.current;return Lc.current=kc,i===null?kc:i}function Cm(){(jt===0||jt===3||jt===2)&&(jt=4),Kt===null||(ms&268435455)===0&&(Dc&268435455)===0||Fi(Kt,en)}function zc(i,s){var l=et;et|=2;var d=s2();(Kt!==i||en!==s)&&(ai=null,Es(i,s));do try{sF();break}catch(g){i2(i,g)}while(!0);if(Bp(),et=l,Lc.current=d,Ht!==null)throw Error(n(261));return Kt=null,en=0,jt}function sF(){for(;Ht!==null;)o2(Ht)}function oF(){for(;Ht!==null&&!I8();)o2(Ht)}function o2(i){var s=c2(i.alternate,i,zn);i.memoizedProps=i.pendingProps,s===null?a2(i):Ht=s,gm.current=null}function a2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=JM(l,s,zn),l!==null){Ht=l;return}}else{if(l=ZM(l,s),l!==null){l.flags&=32767,Ht=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{jt=6,Ht=null;return}}if(s=s.sibling,s!==null){Ht=s;return}Ht=s=i}while(s!==null);jt===0&&(jt=5)}function ys(i,s,l){var d=at,g=tr.transition;try{tr.transition=null,at=1,aF(i,s,l,d)}finally{tr.transition=g,at=d}return null}function aF(i,s,l,d){do Io();while(Di!==null);if((et&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(z8(i,y),i===Kt&&(Ht=Kt=null,en=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Fc||(Fc=!0,f2(ql,function(){return Io(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=tr.transition,tr.transition=null;var S=at;at=1;var I=et;et|=4,gm.current=null,tF(i,l),Xx(l,i),vM(Cp),Jl=!!wp,Cp=wp=null,i.current=l,nF(l),P8(),et=I,at=S,tr.transition=y}else i.current=l;if(Fc&&(Fc=!1,Di=i,Bc=g),y=i.pendingLanes,y===0&&(Li=null),D8(l.stateNode),On(i,Lt()),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(Mc)throw Mc=!1,i=Tm,Tm=null,i;return(Bc&1)!==0&&i.tag!==0&&Io(),y=i.pendingLanes,(y&1)!==0?i===bm?du++:(du=0,bm=i):du=0,Oi(),null}function Io(){if(Di!==null){var i=Kb(Bc),s=tr.transition,l=at;try{if(tr.transition=null,at=16>i?16:i,Di===null)var d=!1;else{if(i=Di,Di=null,Bc=0,(et&6)!==0)throw Error(n(331));var g=et;for(et|=4,we=i.current;we!==null;){var y=we,S=y.child;if((we.flags&16)!==0){var I=y.deletions;if(I!==null){for(var L=0;L<I.length;L++){var Y=I[L];for(we=Y;we!==null;){var oe=we;switch(oe.tag){case 0:case 11:case 15:lu(8,oe,y)}var ce=oe.child;if(ce!==null)ce.return=oe,we=ce;else for(;we!==null;){oe=we;var ie=oe.sibling,_e=oe.return;if(Yx(oe),oe===Y){we=null;break}if(ie!==null){ie.return=_e,we=ie;break}we=_e}}}var Ae=y.alternate;if(Ae!==null){var ke=Ae.child;if(ke!==null){Ae.child=null;do{var Dt=ke.sibling;ke.sibling=null,ke=Dt}while(ke!==null)}}we=y}}if((y.subtreeFlags&2064)!==0&&S!==null)S.return=y,we=S;else e:for(;we!==null;){if(y=we,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:lu(9,y,y.return)}var z=y.sibling;if(z!==null){z.return=y.return,we=z;break e}we=y.return}}var M=i.current;for(we=M;we!==null;){S=we;var $=S.child;if((S.subtreeFlags&2064)!==0&&$!==null)$.return=S,we=$;else e:for(S=M;we!==null;){if(I=we,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:Rc(9,I)}}catch(Ne){vt(I,I.return,Ne)}if(I===S){we=null;break e}var me=I.sibling;if(me!==null){me.return=I.return,we=me;break e}we=I.return}}if(et=g,Oi(),Lr&&typeof Lr.onPostCommitFiberRoot=="function")try{Lr.onPostCommitFiberRoot(Yl,i)}catch(Ne){}d=!0}return d}finally{at=l,tr.transition=s}}return!1}function u2(i,s,l){s=vo(l,s),s=Ax(i,s,1),i=Pi(i,s,1),s=En(),i!==null&&(Ma(i,1,s),On(i,s))}function vt(i,s,l){if(i.tag===3)u2(i,i,l);else for(;s!==null;){if(s.tag===3){u2(s,i,l);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Li===null||!Li.has(d))){i=vo(l,i),i=vx(s,i,1),s=Pi(s,i,1),i=En(),s!==null&&(Ma(s,1,i),On(s,i));break}}s=s.return}}function uF(i,s,l){var d=i.pingCache;d!==null&&d.delete(s),s=En(),i.pingedLanes|=i.suspendedLanes&l,Kt===i&&(en&l)===l&&(jt===4||jt===3&&(en&130023424)===en&&500>Lt()-ym?Es(i,0):Em|=l),On(i,s)}function l2(i,s){s===0&&((i.mode&1)===0?s=1:(s=Gl,Gl<<=1,(Gl&130023424)===0&&(Gl=4194304)));var l=En();i=ii(i,s),i!==null&&(Ma(i,s,l),On(i,l))}function lF(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),l2(i,l)}function cF(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),l2(i,l)}var c2;c2=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||An.current)kn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return kn=!1,XM(i,s,l);kn=(i.flags&131072)!==0}else kn=!1,bt&&(s.flags&1048576)!==0&&$_(s,gc,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;Ic(i,s),i=s.pendingProps;var g=To(s,un.current);Co(s,l),g=Kp(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,vn(d)?(y=!0,hc(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,jp(s),g.updater=Nc,s.stateNode=g,g._reactInternals=s,nm(s,d,i,l),s=om(null,s,d,!0,y,l)):(s.tag=0,bt&&y&&Pp(s),gn(null,s,g,l),s=s.child),s;case 16:d=s.elementType;e:{switch(Ic(i,s),i=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=dF(d),i=gr(d,i),g){case 0:s=sm(null,s,d,i,l);break e;case 1:s=Mx(null,s,d,i,l);break e;case 11:s=Ix(null,s,d,i,l);break e;case 14:s=Px(null,s,d,gr(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:gr(d,g),sm(i,s,d,g,l);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:gr(d,g),Mx(i,s,d,g,l);case 3:e:{if(Fx(s),i===null)throw Error(n(387));d=s.pendingProps,y=s.memoizedState,g=y.element,J_(i,s),xc(s,d,null,l);var S=s.memoizedState;if(d=S.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=vo(Error(n(423)),s),s=Bx(i,s,d,l,g);break e}else if(d!==g){g=vo(Error(n(424)),s),s=Bx(i,s,d,l,g);break e}else for(Hn=vi(s.stateNode.containerInfo.firstChild),Un=s,bt=!0,mr=null,l=Q_(s,null,d,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(xo(),d===g){s=oi(i,s,l);break e}gn(i,s,d,l)}s=s.child}return s;case 5:return tx(s),i===null&&Dp(s),d=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,S=g.children,Ap(d,g)?S=null:y!==null&&Ap(d,y)&&(s.flags|=32),Dx(i,s),gn(i,s,S,l),s.child;case 6:return i===null&&Dp(s),null;case 13:return Ux(i,s,l);case 4:return $p(s,s.stateNode.containerInfo),d=s.pendingProps,i===null?s.child=So(s,null,d,l):gn(i,s,d,l),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:gr(d,g),Ix(i,s,d,g,l);case 7:return gn(i,s,s.pendingProps,l),s.child;case 8:return gn(i,s,s.pendingProps.children,l),s.child;case 12:return gn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(d=s.type._context,g=s.pendingProps,y=s.memoizedProps,S=g.value,ht(Tc,d._currentValue),d._currentValue=S,y!==null)if(pr(y.value,S)){if(y.children===g.children&&!An.current){s=oi(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var I=y.dependencies;if(I!==null){S=y.child;for(var L=I.firstContext;L!==null;){if(L.context===d){if(y.tag===1){L=si(-1,l&-l),L.tag=2;var Y=y.updateQueue;if(Y!==null){Y=Y.shared;var oe=Y.pending;oe===null?L.next=L:(L.next=oe.next,oe.next=L),Y.pending=L}}y.lanes|=l,L=y.alternate,L!==null&&(L.lanes|=l),Hp(y.return,l,s),I.lanes|=l;break}L=L.next}}else if(y.tag===10)S=y.type===s.type?null:y.child;else if(y.tag===18){if(S=y.return,S===null)throw Error(n(341));S.lanes|=l,I=S.alternate,I!==null&&(I.lanes|=l),Hp(S,l,s),S=y.sibling}else S=y.child;if(S!==null)S.return=y;else for(S=y;S!==null;){if(S===s){S=null;break}if(y=S.sibling,y!==null){y.return=S.return,S=y;break}S=S.return}y=S}gn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,Co(s,l),g=Zn(g),d=d(g),s.flags|=1,gn(i,s,d,l),s.child;case 14:return d=s.type,g=gr(d,s.pendingProps),g=gr(d.type,g),Px(i,s,d,g,l);case 15:return Rx(i,s,s.type,s.pendingProps,l);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:gr(d,g),Ic(i,s),s.tag=1,vn(d)?(i=!0,hc(s)):i=!1,Co(s,l),wx(s,d,g),nm(s,d,g,l),om(null,s,d,!0,i,l);case 19:return zx(i,s,l);case 22:return Lx(i,s,l)}throw Error(n(156,s.tag))};function f2(i,s){return Vb(i,s)}function fF(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 nr(i,s,l,d){return new fF(i,s,l,d)}function Am(i){return i=i.prototype,!(!i||!i.isReactComponent)}function dF(i){if(typeof i=="function")return Am(i)?1:0;if(i!=null){if(i=i.$$typeof,i===de)return 11;if(i===Ee)return 14}return 2}function Bi(i,s){var l=i.alternate;return l===null?(l=nr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function jc(i,s,l,d,g,y){var S=2;if(d=i,typeof i=="function")Am(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case te:return Ts(l.children,g,y,s);case Te:S=8,g|=8;break;case xe:return i=nr(12,l,s,g|2),i.elementType=xe,i.lanes=y,i;case fe:return i=nr(13,l,s,g),i.elementType=fe,i.lanes=y,i;case ae:return i=nr(19,l,s,g),i.elementType=ae,i.lanes=y,i;case ue:return $c(l,g,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case H:S=10;break e;case ee:S=9;break e;case de:S=11;break e;case Ee:S=14;break e;case Ce:S=16,d=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=nr(S,l,s,g),s.elementType=i,s.type=d,s.lanes=y,s}function Ts(i,s,l,d){return i=nr(7,i,d,s),i.lanes=l,i}function $c(i,s,l,d){return i=nr(22,i,d,s),i.elementType=ue,i.lanes=l,i.stateNode={isHidden:!1},i}function vm(i,s,l){return i=nr(6,i,null,s),i.lanes=l,i}function km(i,s,l){return s=nr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function hF(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=tp(0),this.expirationTimes=tp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tp(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Nm(i,s,l,d,g,y,S,I,L){return i=new hF(i,s,l,I,L),s===1?(s=1,y===!0&&(s|=8)):s=0,y=nr(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:d,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},jp(y),i}function pF(i,s,l){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:d==null?null:""+d,children:i,containerInfo:s,implementation:l}}function d2(i){if(!i)return Ni;i=i._reactInternals;e:{if(as(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(vn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(vn(l))return H_(i,l,s)}return s}function h2(i,s,l,d,g,y,S,I,L){return i=Nm(l,d,!0,i,g,y,S,I,L),i.context=d2(null),l=i.current,d=En(),g=Mi(l),y=si(d,g),y.callback=s!=null?s:null,Pi(l,y,g),i.current.lanes=g,Ma(i,g,d),On(i,d),i}function Vc(i,s,l,d){var g=s.current,y=En(),S=Mi(g);return l=d2(l),s.context===null?s.context=l:s.pendingContext=l,s=si(y,S),s.payload={element:i},d=d===void 0?null:d,d!==null&&(s.callback=d),i=Pi(g,s,S),i!==null&&(Tr(i,g,S,y),_c(i,g,S)),S}function qc(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 p2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function Om(i,s){p2(i,s),(i=i.alternate)&&p2(i,s)}function mF(){return null}var m2=typeof reportError=="function"?reportError:function(i){console.error(i)};function Im(i){this._internalRoot=i}Yc.prototype.render=Im.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Vc(i,s,null,null)},Yc.prototype.unmount=Im.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;gs(function(){Vc(null,i,null,null)}),s[ei]=null}};function Yc(i){this._internalRoot=i}Yc.prototype.unstable_scheduleHydration=function(i){if(i){var s=Jb();i={blockedOn:null,target:i,priority:s};for(var l=0;l<wi.length&&s!==0&&s<wi[l].priority;l++);wi.splice(l,0,i),l===0&&t_(i)}};function Pm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Wc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function g2(){}function gF(i,s,l,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var Y=qc(S);y.call(Y)}}var S=h2(s,d,i,0,null,!1,!1,"",g2);return i._reactRootContainer=S,i[ei]=S.current,Qa(i.nodeType===8?i.parentNode:i),gs(),S}for(;g=i.lastChild;)i.removeChild(g);if(typeof d=="function"){var I=d;d=function(){var Y=qc(L);I.call(Y)}}var L=Nm(i,0,!1,null,null,!1,!1,"",g2);return i._reactRootContainer=L,i[ei]=L.current,Qa(i.nodeType===8?i.parentNode:i),gs(function(){Vc(s,L,l,d)}),L}function Gc(i,s,l,d,g){var y=l._reactRootContainer;if(y){var S=y;if(typeof g=="function"){var I=g;g=function(){var L=qc(S);I.call(L)}}Vc(s,S,i,g)}else S=gF(l,s,i,g,d);return qc(S)}Qb=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=Da(s.pendingLanes);l!==0&&(np(s,l|1),On(s,Lt()),(et&6)===0&&(Oo=Lt()+500,Oi()))}break;case 13:gs(function(){var d=ii(i,1);if(d!==null){var g=En();Tr(d,i,1,g)}}),Om(i,1)}},rp=function(i){if(i.tag===13){var s=ii(i,134217728);if(s!==null){var l=En();Tr(s,i,134217728,l)}Om(i,134217728)}},Xb=function(i){if(i.tag===13){var s=Mi(i),l=ii(i,s);if(l!==null){var d=En();Tr(l,i,s,d)}Om(i,s)}},Jb=function(){return at},Zb=function(i,s){var l=at;try{return at=i,s()}finally{at=l}},Kh=function(i,s,l){switch(s){case"input":if(Jr(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=fc(d);if(!g)throw Error(n(90));is(d),Jr(d,g)}}}break;case"textarea":Pt(i,l);break;case"select":s=l.value,s!=null&&ot(i,!!l.multiple,s,!1)}},Fb=Sm,Bb=gs;var EF={usingClientEntryPoint:!1,Events:[Za,Eo,fc,Db,Mb,Sm]},hu={findFiberByHostInstance:us,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},yF={bundleType:hu.bundleType,version:hu.version,rendererPackageName:hu.rendererPackageName,rendererConfig:hu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:G.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=jb(i),i===null?null:i.stateNode},findFiberByHostInstance:hu.findFiberByHostInstance||mF,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 Kc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kc.isDisabled&&Kc.supportsFiber)try{Yl=Kc.inject(yF),Lr=Kc}catch(i){}}return xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=EF,xn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pm(s))throw Error(n(200));return pF(i,s,null,l)},xn.createRoot=function(i,s){if(!Pm(i))throw Error(n(299));var l=!1,d="",g=m2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Nm(i,1,!1,null,null,l,!1,d,g),i[ei]=s.current,Qa(i.nodeType===8?i.parentNode:i),new Im(s)},xn.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=jb(s),i=i===null?null:i.stateNode,i},xn.flushSync=function(i){return gs(i)},xn.hydrate=function(i,s,l){if(!Wc(s))throw Error(n(200));return Gc(null,i,s,!0,l)},xn.hydrateRoot=function(i,s,l){if(!Pm(i))throw Error(n(405));var d=l!=null&&l.hydratedSources||null,g=!1,y="",S=m2;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),s=h2(s,null,i,1,l!=null?l:null,g,!1,y,S),i[ei]=s.current,Qa(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 Yc(s)},xn.render=function(i,s,l){if(!Wc(s))throw Error(n(200));return Gc(null,i,s,!1,l)},xn.unmountComponentAtNode=function(i){if(!Wc(i))throw Error(n(40));return i._reactRootContainer?(gs(function(){Gc(null,null,i,!1,function(){i._reactRootContainer=null,i[ei]=null})}),!0):!1},xn.unstable_batchedUpdates=Sm,xn.unstable_renderSubtreeIntoContainer=function(i,s,l,d){if(!Wc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Gc(i,s,l,!1,d)},xn.version="18.3.1-next-f1338f8080-20240426",xn}var i1;function s1(){if(i1)return ud.exports;i1=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(),ud.exports=Yv(),ud.exports}var Zu=s1();function Wv(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var fd=()=>e=>Array.from(new Set(e)),o1=typeof globalThis.document!="undefined"?V.useLayoutEffect:V.useEffect;function el(e){var E,b;const t=(E=e().value)!=null?E:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=V.useState(t),[o,a]=V.useState(r),u=e().value!==void 0,c=V.useRef(o);c.current=u?e().value:o;const f=V.useRef(c.current);o1(()=>{f.current=c.current},[o,e().value]);const h=T=>{var C,O;const _=f.current,x=Is(T)?T(_):T;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:x,prev:_}),u||a(x),n(x,_)||(O=(C=e()).onChange)==null||O.call(C,x,_)};function m(){return u?e().value:o}return{initial:r,ref:c,get:m,set(T){(e().sync?Zu.flushSync:VA)(()=>h(T))},invoke(T,_){var x,C;(C=(x=e()).onChange)==null||C.call(x,T,_)},hash(T){var _,x,C;return(C=(x=(_=e()).hash)==null?void 0:x.call(_,T))!=null?C:String(T)}}}el.cleanup=e=>{V.useEffect(()=>e,[])},el.ref=e=>{const t=V.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function Gv(e){const t=V.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var Kv=(e,t)=>{const n=V.useRef(!1),r=V.useRef(!1);V.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),V.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function dd(e,t={}){var ee,de,fe,ae,Ee,Ce;const n=V.useMemo(()=>{const{id:ue,ids:q,getRootNode:ne}=t;return $v({id:ue,ids:q,getRootNode:ne})},[t]),r=(...ue)=>{e.debug&&console.log(...ue)},o=(de=(ee=e.props)==null?void 0:ee.call(e,{props:Xf(t),scope:n}))!=null?de:t,a=Qv(o),u=(fe=e.context)==null?void 0:fe.call(e,{prop:a,bindable:el,scope:n,flush:u1,getContext(){return f},getComputed(){return W},getRefs(){return x},getEvent(){return T()}}),c=a1(u),f={get(ue){var q;return(q=c.current)==null?void 0:q[ue].ref.current},set(ue,q){var ne;(ne=c.current)==null||ne[ue].set(q)},initial(ue){var q;return(q=c.current)==null?void 0:q[ue].initial},hash(ue){var ne,w;const q=(ne=c.current)==null?void 0:ne[ue].get();return(w=c.current)==null?void 0:w[ue].hash(q)}},h=V.useRef(new Map),m=V.useRef(null),E=V.useRef(null),b=V.useRef({type:""}),T=()=>ye(U({},b.current),{current(){return b.current},previous(){return E.current}}),_=()=>ye(U({},B),{matches(...ue){return ue.includes(B.ref.current)},hasTag(ue){var q,ne;return!!((ne=(q=e.states[B.ref.current])==null?void 0:q.tags)!=null&&ne.includes(ue))}}),x=Gv((Ee=(ae=e.refs)==null?void 0:ae.call(e,{prop:a,context:f}))!=null?Ee:{}),C=()=>({state:_(),context:f,event:T(),prop:a,send:H,action:O,guard:F,track:Kv,refs:x,computed:W,flush:u1,scope:n,choose:G}),O=ue=>{const q=Is(ue)?ue(C()):ue;if(!q)return;const ne=q.map(w=>{var K,k;const R=(k=(K=e.implementations)==null?void 0:K.actions)==null?void 0:k[w];return R||Jf(`[zag-js] No implementation found for action "${JSON.stringify(w)}"`),R});for(const w of ne)w==null||w(C())},F=ue=>{var q,ne;return Is(ue)?ue(C()):(ne=(q=e.implementations)==null?void 0:q.guards)==null?void 0:ne[ue](C())},D=ue=>{const q=Is(ue)?ue(C()):ue;if(!q)return;const ne=q.map(R=>{var k,be;const K=(be=(k=e.implementations)==null?void 0:k.effects)==null?void 0:be[R];return K||Jf(`[zag-js] No implementation found for effect "${JSON.stringify(R)}"`),K}),w=[];for(const R of ne){const K=R==null?void 0:R(C());K&&w.push(K)}return()=>w.forEach(R=>R==null?void 0:R())},G=ue=>LA(ue).find(q=>{let ne=!q.guard;return Yu(q.guard)?ne=!!F(q.guard):Is(q.guard)&&(ne=q.guard(C())),ne}),W=ue=>{YA(e.computed,()=>"[zag-js] No computed object found on machine");const q=e.computed[ue];return q({context:f,event:T(),prop:a,refs:x,scope:n,computed:W})},B=el(()=>({defaultValue:e.initialState({prop:a}),onChange(ue,q){var w,R,K,k;if(q){const be=h.current.get(q);be==null||be(),h.current.delete(q)}q&&O((w=e.states[q])==null?void 0:w.exit),O((R=m.current)==null?void 0:R.actions);const ne=D((K=e.states[ue])==null?void 0:K.effects);if(ne&&h.current.set(ue,ne),q===ad){O(e.entry);const be=D(e.effects);be&&h.current.set(ad,be)}O((k=e.states[ue])==null?void 0:k.entry)}})),te=V.useRef(void 0),Te=V.useRef(Ls.NotStarted);o1(()=>{queueMicrotask(()=>{var R;const ne=Te.current===Ls.Started;Te.current=Ls.Started,r(ne?"rehydrating...":"initializing...");const w=(R=te.current)!=null?R:B.initial;B.invoke(w,ne?B.get():ad)});const ue=h.current,q=B.ref.current;return()=>{r("unmounting..."),te.current=q,Te.current=Ls.Stopped,ue.forEach(ne=>ne==null?void 0:ne()),h.current=new Map,m.current=null,queueMicrotask(()=>{O(e.exit)})}},[]);const xe=()=>"ref"in B?B.ref.current:B.get(),H=ue=>{queueMicrotask(()=>{var k,be,Re,Oe,Ye;if(Te.current!==Ls.Started)return;E.current=b.current,b.current=ue;let q=xe();const ne=(Re=(k=e.states[q].on)==null?void 0:k[ue.type])!=null?Re:(be=e.on)==null?void 0:be[ue.type],w=G(ne);if(!w)return;m.current=w;const R=(Oe=w.target)!=null?Oe:q;r("transition",ue.type,w.target||q,`(${w.actions})`);const K=R!==q;K?Zu.flushSync(()=>B.set(R)):w.reenter&&!K?B.invoke(q,q):O((Ye=w.actions)!=null?Ye:[])})};return(Ce=e.watch)==null||Ce.call(e,C()),{state:_(),send:H,context:f,prop:a,scope:n,refs:x,computed:W,event:T(),getStatus:()=>Te.current}}function a1(e){const t=V.useRef(e);return t.current=e,t}function Qv(e){const t=a1(e);return function(r){return t.current[r]}}function u1(e){queueMicrotask(()=>{Zu.flushSync(()=>e())})}var l1=Wv(e=>e);function tl(...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 Xv(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 hd=e=>{const t=V.memo(V.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=tn(h,["asChild","children"]);if(!o)return V.createElement(e,ye(U({},u),{ref:r}),a);if(!V.isValidElement(a))return null;const c=V.Children.only(a),f=Xv(c);return V.cloneElement(c,ye(U({},ur(u,c.props)),{ref:r?tl(r,f):f}))}));return t.displayName=e.displayName||e.name,t},ci=(()=>{const e=new Map;return new Proxy(hd,{apply(t,n,r){return hd(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,hd(r)),e.get(r)}})})();function Jv(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ds(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=V.createContext(u);c.displayName=t;function f(){var m;const h=V.useContext(c);if(!h&&n){const E=new Error(a!=null?a:Jv(r,o));throw E.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,E,f),E}return h}return[c.Provider,f,c]}const[Zv,pd]=Ds({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[c1,Jo]=Ds({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),f1=V.forwardRef((e,t)=>{const n=pd(),r=Jo(),o=ur(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:N.jsx(ci.div,ye(U({},o),{ref:tl(r.ref,t)}))});f1.displayName="PopoverContent";const d1=V.forwardRef((e,t)=>{const n=pd(),r=Jo(),o=ur(n.getPositionerProps(),e);return r.unmounted?null:N.jsx(ci.div,ye(U({},o),{ref:t}))});d1.displayName="PopoverPositioner";const h1=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},U({},e)]),p1=e=>h1()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function ek(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var tk={props({props:e}){return ye(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",Qu(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});_n(()=>{var c,f;const u=nl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===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})=>{_n(()=>{e.set("prevAnimationName",nl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=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",nl(t.get("styles")))},u=f=>{const h=nl(t.get("styles"));Vr(f)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Ju(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Iv(()=>c())}}}}};function nl(e){return(e==null?void 0:e.animationName)||"none"}fd()(["onExitComplete","present","immediate"]);function nk(e,t={}){const{sync:n=!1}=t,r=rk(e);return V.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function rk(e){const t=V.useRef(e);return t.current=e,t}const md=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,a=tn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=V.useRef(!1),c=ye(U({},a),{present:r,onExitComplete:nk(e.onExitComplete)}),f=dd(tk,c),h=ek(f);h.present&&(u.current=!0);const m=!h.present&&!u.current&&t||n&&!h.present&&u.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 Ms=(e,t=[])=>({parts:(...n)=>{if(ik(t))return Ms(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Ms(e,[...t,...n]),omit:(...n)=>Ms(e,t.filter(r=>!n.includes(r))),rename:n=>Ms(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Fs(e)}"][data-part="${Fs(r)}"]`,`& [data-scope="${Fs(e)}"][data-part="${Fs(r)}"]`].join(", "),attrs:{"data-scope":Fs(e),"data-part":Fs(r)}}}),{})}),Fs=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),ik=e=>e.length===0;const sk=["top","right","bottom","left"],fi=Math.min,Pn=Math.max,rl=Math.round,il=Math.floor,wr=e=>({x:e,y:e}),ok={left:"right",right:"left",bottom:"top",top:"bottom"},ak={start:"end",end:"start"};function gd(e,t,n){return Pn(e,fi(t,n))}function Yr(e,t){return typeof e=="function"?e(t):e}function Wr(e){return e.split("-")[0]}function Bs(e){return e.split("-")[1]}function Ed(e){return e==="x"?"y":"x"}function yd(e){return e==="y"?"height":"width"}const uk=new Set(["top","bottom"]);function Cr(e){return uk.has(Wr(e))?"y":"x"}function Td(e){return Ed(Cr(e))}function lk(e,t,n){n===void 0&&(n=!1);const r=Bs(e),o=Td(e),a=yd(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=sl(u)),[u,sl(u)]}function ck(e){const t=sl(e);return[bd(e),t,bd(t)]}function bd(e){return e.replace(/start|end/g,t=>ak[t])}const m1=["left","right"],g1=["right","left"],fk=["top","bottom"],dk=["bottom","top"];function hk(e,t,n){switch(e){case"top":case"bottom":return n?t?g1:m1:t?m1:g1;case"left":case"right":return t?fk:dk;default:return[]}}function pk(e,t,n,r){const o=Bs(e);let a=hk(Wr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(bd)))),a}function sl(e){return e.replace(/left|right|bottom|top/g,t=>ok[t])}function mk(e){return U({top:0,right:0,bottom:0,left:0},e)}function E1(e){return typeof e!="number"?mk(e):{top:e,right:e,bottom:e,left:e}}function ol(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 y1(e,t,n){let{reference:r,floating:o}=e;const a=Cr(t),u=Td(t),c=yd(u),f=Wr(t),h=a==="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(Bs(t)){case"start":T[u]-=b*(n&&h?-1:1);break;case"end":T[u]+=b*(n&&h?-1:1);break}return T}const gk=(e,t,n)=>it(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),f=yield u.isRTL==null?void 0:u.isRTL(t);let h=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:E}=y1(h,r,f),b=r,T={},_=0;for(let x=0;x<c.length;x++){const{name:C,fn:O}=c[x],{x:F,y:D,data:G,reset:W}=yield O({x:m,y:E,initialPlacement:r,placement:b,strategy:o,middlewareData:T,rects:h,platform:u,elements:{reference:e,floating:t}});m=F!=null?F:m,E=D!=null?D:E,T=ye(U({},T),{[C]:U(U({},T[C]),G)}),W&&_<=50&&(_++,typeof W=="object"&&(W.placement&&(b=W.placement),W.rects&&(h=W.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):W.rects),{x:m,y:E}=y1(h,b,f)),x=-1)}return{x:m,y:E,placement:b,strategy:o,middlewareData:T}});function Zo(e,t){return it(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:E="floating",altBoundary:b=!1,padding:T=0}=Yr(t,e),_=E1(T),C=c[b?E==="floating"?"reference":"floating":E],O=ol(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(C))==null||n?C:C.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:f})),F=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,D=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),G=(yield a.isElement==null?void 0:a.isElement(D))?(yield a.getScale==null?void 0:a.getScale(D))||{x:1,y:1}:{x:1,y:1},W=ol(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:F,offsetParent:D,strategy:f}):F);return{top:(O.top-W.top+_.top)/G.y,bottom:(W.bottom-O.bottom+_.bottom)/G.y,left:(O.left-W.left+_.left)/G.x,right:(W.right-O.right+_.right)/G.x}})}const Ek=e=>({name:"arrow",options:e,fn(n){return it(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:f,middlewareData:h}=n,{element:m,padding:E=0}=Yr(e,n)||{};if(m==null)return{};const b=E1(E),T={x:r,y:o},_=Td(a),x=yd(_),C=yield c.getDimensions(m),O=_==="y",F=O?"top":"left",D=O?"bottom":"right",G=O?"clientHeight":"clientWidth",W=u.reference[x]+u.reference[_]-T[_]-u.floating[x],B=T[_]-u.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(m);let Te=te?te[G]:0;(!Te||!(yield c.isElement==null?void 0:c.isElement(te)))&&(Te=f.floating[G]||u.floating[x]);const xe=W/2-B/2,H=Te/2-C[x]/2-1,ee=fi(b[F],H),de=fi(b[D],H),fe=ee,ae=Te-C[x]-de,Ee=Te/2-C[x]/2+xe,Ce=gd(fe,Ee,ae),ue=!h.arrow&&Bs(a)!=null&&Ee!==Ce&&u.reference[x]/2-(Ee<fe?ee:de)-C[x]/2<0,q=ue?Ee<fe?Ee-fe:Ee-ae:0;return{[_]:T[_]+q,data:U({[_]:Ce,centerOffset:Ee-Ce-q},ue&&{alignmentOffset:q}),reset:ue}})}}),yk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return it(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:f,platform:h,elements:m}=n,Ee=Yr(e,n),{mainAxis:E=!0,crossAxis:b=!0,fallbackPlacements:T,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:C=!0}=Ee,O=tn(Ee,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const F=Wr(a),D=Cr(f),G=Wr(f)===f,W=yield h.isRTL==null?void 0:h.isRTL(m.floating),B=T||(G||!C?[sl(f)]:ck(f)),te=x!=="none";!T&&te&&B.push(...pk(f,C,x,W));const Te=[f,...B],xe=yield Zo(n,O),H=[];let ee=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&H.push(xe[F]),b){const Ce=lk(a,c,W);H.push(xe[Ce[0]],xe[Ce[1]])}if(ee=[...ee,{placement:a,overflows:H}],!H.every(Ce=>Ce<=0)){var de,fe;const Ce=(((de=u.flip)==null?void 0:de.index)||0)+1,ue=Te[Ce];if(ue&&(!(b==="alignment"?D!==Cr(ue):!1)||ee.every(w=>Cr(w.placement)===D?w.overflows[0]>0:!0)))return{data:{index:Ce,overflows:ee},reset:{placement:ue}};let q=(fe=ee.filter(ne=>ne.overflows[0]<=0).sort((ne,w)=>ne.overflows[1]-w.overflows[1])[0])==null?void 0:fe.placement;if(!q)switch(_){case"bestFit":{var ae;const ne=(ae=ee.filter(w=>{if(te){const R=Cr(w.placement);return R===D||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:ae[0];ne&&(q=ne);break}case"initialPlacement":q=f;break}if(a!==q)return{reset:{placement:q}}}return{}})}}};function T1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function b1(e){return sk.some(t=>e[t]>=0)}const Tk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return it(this,null,function*(){const{rects:r}=n,u=Yr(e,n),{strategy:o="referenceHidden"}=u,a=tn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Zo(n,ye(U({},a),{elementContext:"reference"})),f=T1(c,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:b1(f)}}}case"escaped":{const c=yield Zo(n,ye(U({},a),{altBoundary:!0})),f=T1(c,r.floating);return{data:{escapedOffsets:f,escaped:b1(f)}}}default:return{}}})}}},_1=new Set(["left","top"]);function bk(e,t){return it(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Wr(n),c=Bs(n),f=Cr(n)==="y",h=_1.has(u)?-1:1,m=a&&f?-1:1,E=Yr(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 _k=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return it(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:f}=n,h=yield bk(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(o=f.arrow)!=null&&o.alignmentOffset?{}:{x:a+h.x,y:u+h.y,data:ye(U({},h),{placement:c})}})}}},xk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return it(this,null,function*(){const{x:r,y:o,placement:a}=n,O=Yr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:f={fn:F=>{let{x:D,y:G}=F;return{x:D,y:G}}}}=O,h=tn(O,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},E=yield Zo(n,h),b=Cr(Wr(a)),T=Ed(b);let _=m[T],x=m[b];if(u){const F=T==="y"?"top":"left",D=T==="y"?"bottom":"right",G=_+E[F],W=_-E[D];_=gd(G,_,W)}if(c){const F=b==="y"?"top":"left",D=b==="y"?"bottom":"right",G=x+E[F],W=x-E[D];x=gd(G,x,W)}const C=f.fn(ye(U({},n),{[T]:_,[b]:x}));return ye(U({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[T]:u,[b]:c}}})})}}},Sk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:f=!0,crossAxis:h=!0}=Yr(e,t),m={x:n,y:r},E=Cr(o),b=Ed(E);let T=m[b],_=m[E];const x=Yr(c,t),C=typeof x=="number"?{mainAxis:x,crossAxis:0}:U({mainAxis:0,crossAxis:0},x);if(f){const D=b==="y"?"height":"width",G=a.reference[b]-a.floating[D]+C.mainAxis,W=a.reference[b]+a.reference[D]-C.mainAxis;T<G?T=G:T>W&&(T=W)}if(h){var O,F;const D=b==="y"?"width":"height",G=_1.has(Wr(o)),W=a.reference[E]-a.floating[D]+(G&&((O=u.offset)==null?void 0:O[E])||0)+(G?0:C.crossAxis),B=a.reference[E]+a.reference[D]+(G?0:((F=u.offset)==null?void 0:F[E])||0)-(G?C.crossAxis:0);_<W?_=W:_>B&&(_=B)}return{[b]:T,[E]:_}}}},wk=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return it(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:f}=n,ee=Yr(e,n),{apply:h=()=>{}}=ee,m=tn(ee,["apply"]),E=yield Zo(n,m),b=Wr(a),T=Bs(a),_=Cr(a)==="y",{width:x,height:C}=u.floating;let O,F;b==="top"||b==="bottom"?(O=b,F=T===((yield c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(F=b,O=T==="end"?"top":"bottom");const D=C-E.top-E.bottom,G=x-E.left-E.right,W=fi(C-E[O],D),B=fi(x-E[F],G),te=!n.middlewareData.shift;let Te=W,xe=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(xe=G),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(Te=D),te&&!T){const de=Pn(E.left,0),fe=Pn(E.right,0),ae=Pn(E.top,0),Ee=Pn(E.bottom,0);_?xe=x-2*(de!==0||fe!==0?de+fe:Pn(E.left,E.right)):Te=C-2*(ae!==0||Ee!==0?ae+Ee:Pn(E.top,E.bottom))}yield h(ye(U({},n),{availableWidth:xe,availableHeight:Te}));const H=yield c.getDimensions(f.floating);return x!==H.width||C!==H.height?{reset:{rects:!0}}:{}})}}};function al(){return typeof window!="undefined"}function Us(e){return x1(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ar(e){var t;return(t=(x1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function x1(e){return al()?e instanceof Node||e instanceof Rn(e).Node:!1}function lr(e){return al()?e instanceof Element||e instanceof Rn(e).Element:!1}function vr(e){return al()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function S1(e){return!al()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}const Ck=new Set(["inline","contents"]);function ea(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ck.has(o)}const Ak=new Set(["table","td","th"]);function vk(e){return Ak.has(Us(e))}const kk=[":popover-open",":modal"];function ul(e){return kk.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const Nk=["transform","translate","scale","rotate","perspective"],Ok=["transform","translate","scale","rotate","perspective","filter"],Ik=["paint","layout","strict","content"];function _d(e){const t=xd(),n=lr(e)?cr(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)||Ok.some(r=>(n.willChange||"").includes(r))||Ik.some(r=>(n.contain||"").includes(r))}function Pk(e){let t=di(e);for(;vr(t)&&!Hs(t);){if(_d(t))return t;if(ul(t))return null;t=di(t)}return null}function xd(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Rk=new Set(["html","body","#document"]);function Hs(e){return Rk.has(Us(e))}function cr(e){return Rn(e).getComputedStyle(e)}function ll(e){return lr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function di(e){if(Us(e)==="html")return e;const t=e.assignedSlot||e.parentNode||S1(e)&&e.host||Ar(e);return S1(t)?t.host:t}function w1(e){const t=di(e);return Hs(t)?e.ownerDocument?e.ownerDocument.body:e.body:vr(t)&&ea(t)?t:w1(t)}function ta(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=w1(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Rn(o);if(a){const c=Sd(u);return t.concat(u,u.visualViewport||[],ea(o)?o:[],c&&n?ta(c):[])}return t.concat(o,ta(o,[],n))}function Sd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function C1(e){const t=cr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=vr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=rl(n)!==a||rl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function wd(e){return lr(e)?e:e.contextElement}function zs(e){const t=wd(e);if(!vr(t))return wr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=C1(t);let u=(a?rl(n.width):n.width)/r,c=(a?rl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const Lk=wr(0);function A1(e){const t=Rn(e);return!xd()||!t.visualViewport?Lk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Dk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function Ki(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=wd(e);let u=wr(1);t&&(r?lr(r)&&(u=zs(r)):u=zs(e));const c=Dk(a,n,r)?A1(a):wr(0);let f=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,m=o.width/u.x,E=o.height/u.y;if(a){const b=Rn(a),T=r&&lr(r)?Rn(r):r;let _=b,x=Sd(_);for(;x&&r&&T!==_;){const C=zs(x),O=x.getBoundingClientRect(),F=cr(x),D=O.left+(x.clientLeft+parseFloat(F.paddingLeft))*C.x,G=O.top+(x.clientTop+parseFloat(F.paddingTop))*C.y;f*=C.x,h*=C.y,m*=C.x,E*=C.y,f+=D,h+=G,_=Rn(x),x=Sd(_)}}return ol({width:m,height:E,x:f,y:h})}function cl(e,t){const n=ll(e).scrollLeft;return t?t.left+n:Ki(Ar(e)).left+n}function v1(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Mk(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Ar(r),c=t?ul(t.floating):!1;if(r===u||c&&a)return n;let f={scrollLeft:0,scrollTop:0},h=wr(1);const m=wr(0),E=vr(r);if((E||!E&&!a)&&((Us(r)!=="body"||ea(u))&&(f=ll(r)),vr(r))){const T=Ki(r);h=zs(r),m.x=T.x+r.clientLeft,m.y=T.y+r.clientTop}const b=u&&!E&&!a?v1(u,f):wr(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 Fk(e){return Array.from(e.getClientRects())}function Bk(e){const t=Ar(e),n=ll(e),r=e.ownerDocument.body,o=Pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cl(e);const c=-n.scrollTop;return cr(r).direction==="rtl"&&(u+=Pn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const k1=25;function Uk(e,t){const n=Rn(e),r=Ar(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,f=0;if(o){a=o.width,u=o.height;const m=xd();(!m||m&&t==="fixed")&&(c=o.offsetLeft,f=o.offsetTop)}const h=cl(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);_<=k1&&(a-=_)}else h<=k1&&(a+=h);return{width:a,height:u,x:c,y:f}}const Hk=new Set(["absolute","fixed"]);function zk(e,t){const n=Ki(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=vr(e)?zs(e):wr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,f=o*a.x,h=r*a.y;return{width:u,height:c,x:f,y:h}}function N1(e,t,n){let r;if(t==="viewport")r=Uk(e,n);else if(t==="document")r=Bk(Ar(e));else if(lr(t))r=zk(t,n);else{const o=A1(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ol(r)}function O1(e,t){const n=di(e);return n===t||!lr(n)||Hs(n)?!1:cr(n).position==="fixed"||O1(n,t)}function jk(e,t){const n=t.get(e);if(n)return n;let r=ta(e,[],!1).filter(c=>lr(c)&&Us(c)!=="body"),o=null;const a=cr(e).position==="fixed";let u=a?di(e):e;for(;lr(u)&&!Hs(u);){const c=cr(u),f=_d(u);!f&&c.position==="fixed"&&(o=null),(a?!f&&!o:!f&&c.position==="static"&&!!o&&Hk.has(o.position)||ea(u)&&!f&&O1(e,u))?r=r.filter(m=>m!==u):o=c,u=di(u)}return t.set(e,r),r}function $k(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ul(t)?[]:jk(t,this._c):[].concat(n),r],c=u[0],f=u.reduce((h,m)=>{const E=N1(t,m,o);return h.top=Pn(E.top,h.top),h.right=fi(E.right,h.right),h.bottom=fi(E.bottom,h.bottom),h.left=Pn(E.left,h.left),h},N1(t,c,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Vk(e){const{width:t,height:n}=C1(e);return{width:t,height:n}}function qk(e,t,n){const r=vr(t),o=Ar(t),a=n==="fixed",u=Ki(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const f=wr(0);function h(){f.x=cl(o)}if(r||!r&&!a)if((Us(t)!=="body"||ea(o))&&(c=ll(t)),r){const T=Ki(t,!0,a,t);f.x=T.x+t.clientLeft,f.y=T.y+t.clientTop}else o&&h();a&&!r&&o&&h();const m=o&&!r&&!a?v1(o,c):wr(0),E=u.left+c.scrollLeft-f.x-m.x,b=u.top+c.scrollTop-f.y-m.y;return{x:E,y:b,width:u.width,height:u.height}}function Cd(e){return cr(e).position==="static"}function I1(e,t){if(!vr(e)||cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ar(e)===n&&(n=n.ownerDocument.body),n}function P1(e,t){const n=Rn(e);if(ul(e))return n;if(!vr(e)){let o=di(e);for(;o&&!Hs(o);){if(lr(o)&&!Cd(o))return o;o=di(o)}return n}let r=I1(e,t);for(;r&&vk(r)&&Cd(r);)r=I1(r,t);return r&&Hs(r)&&Cd(r)&&!_d(r)?n:r||Pk(e)||n}const Yk=function(e){return it(this,null,function*(){const t=this.getOffsetParent||P1,n=this.getDimensions,r=yield n(e.floating);return{reference:qk(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function Wk(e){return cr(e).direction==="rtl"}const Gk={convertOffsetParentRelativeRectToViewportRelativeRect:Mk,getDocumentElement:Ar,getClippingRect:$k,getOffsetParent:P1,getElementRects:Yk,getClientRects:Fk,getDimensions:Vk,getScale:zs,isElement:lr,isRTL:Wk};function R1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kk(e,t){let n=null,r;const o=Ar(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),a();const h=e.getBoundingClientRect(),{left:m,top:E,width:b,height:T}=h;if(c||t(),!b||!T)return;const _=il(E),x=il(o.clientWidth-(m+b)),C=il(o.clientHeight-(E+T)),O=il(m),D={rootMargin:-_+"px "+-x+"px "+-C+"px "+-O+"px",threshold:Pn(0,fi(1,f))||1};let G=!0;function W(B){const te=B[0].intersectionRatio;if(te!==f){if(!G)return u();te?u(!1,te):r=setTimeout(()=>{u(!1,1e-7)},1e3)}te===1&&!R1(h,e.getBoundingClientRect())&&u(),G=!1}try{n=new IntersectionObserver(W,ye(U({},D),{root:o.ownerDocument}))}catch(B){n=new IntersectionObserver(W,D)}n.observe(e)}return u(!0),a}function Qk(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,h=wd(e),m=o||a?[...h?ta(h):[],...ta(t)]:[];m.forEach(O=>{o&&O.addEventListener("scroll",n,{passive:!0}),a&&O.addEventListener("resize",n)});const E=h&&c?Kk(h,n):null;let b=-1,T=null;u&&(T=new ResizeObserver(O=>{let[F]=O;F&&F.target===h&&T&&(T.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var D;(D=T)==null||D.observe(t)})),n()}),h&&!f&&T.observe(h),T.observe(t));let _,x=f?Ki(e):null;f&&C();function C(){const O=Ki(e);x&&!R1(x,O)&&n(),x=O,_=requestAnimationFrame(C)}return n(),()=>{var O;m.forEach(F=>{o&&F.removeEventListener("scroll",n),a&&F.removeEventListener("resize",n)}),E==null||E(),(O=T)==null||O.disconnect(),T=null,f&&cancelAnimationFrame(_)}}const Xk=_k,Jk=xk,Zk=yk,eN=wk,tN=Tk,nN=Ek,rN=Sk,iN=(e,t,n)=>{const r=new Map,o=U({platform:Gk},n),a=ye(U({},o.platform),{_c:r});return gk(e,t,ye(U({},o),{platform:a}))};function L1(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 ye(U({},o),{toJSON:()=>o})}function sN(e){if(!e)return L1();const{x:t,y:n,width:r,height:o}=e;return L1(t,n,r,o)}function oN(e,t){return{contextElement:qt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?sN(r):n.getBoundingClientRect()}}}var na=e=>({variable:e,reference:`var(${e})`}),Gr={arrowSize:na("--arrow-size"),arrowSizeHalf:na("--arrow-size-half"),arrowBg:na("--arrow-background"),transformOrigin:na("--transform-origin"),arrowOffset:na("--arrow-offset")},aN=e=>e==="top"||e==="bottom"?"y":"x";function uN(e,t){return{name:"transformOrigin",fn(n){var xe,H,ee,de,fe;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,f=a.split("-")[0],h=aN(f),m=((xe=o.arrow)==null?void 0:xe.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,x=E+T/2,C=Math.abs(((ee=o.shift)==null?void 0:ee.y)||0),O=u.reference.height/2,F=T/2,D=(fe=(de=e.offset)==null?void 0:de.mainAxis)!=null?fe:e.gutter,G=typeof D=="number"?D+F:D!=null?D:F,W=C>G,B={top:`${_}px calc(100% + ${G}px)`,bottom:`${_}px ${-G}px`,left:`calc(100% + ${G}px) ${x}px`,right:`${-G}px ${x}px`}[f],te=`${_}px ${u.reference.y+O-c}px`,Te=!!e.overlap&&h==="y"&&W;return r.floating.style.setProperty(Gr.transformOrigin.variable,Te?te:B),{data:{transformOrigin:Te?te:B}}}}}var lN={name:"rects",fn({rects:e}){return{data:e}}},cN=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${Gr.arrowOffset.reference})`}),{}}}};function fN(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var dN={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function D1(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Ad(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function hN(e,t,n){const r=e||t.createElement("div");return nN({element:r,padding:n.arrowPadding})}function pN(e,t){var n;if(!MA((n=t.offset)!=null?n:t.gutter))return Xk(({placement:r})=>{var m,E,b,T;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(m=t.offset)==null?void 0:m.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=fN(r),f=c?void 0:t.shift,h=(T=(b=t.offset)==null?void 0:b.crossAxis)!=null?T:f;return Xf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function mN(e){if(!e.flip)return;const t=Ad(e.boundary);return Zk(ye(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function gN(e){if(!e.slide&&!e.overlap)return;const t=Ad(e.boundary);return Jk(ye(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:rN()}))}function EN(e){return eN({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function yN(e){var t;if(e.hideWhenDetached)return tN({strategy:"referenceHidden",boundary:(t=Ad(e.boundary))!=null?t:"clippingAncestors"})}function TN(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function bN(e,t,n={}){const r=oN(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},dN,n),a=t.querySelector("[data-part=arrow]"),u=[pN(a,o),mN(o),gN(o),hN(a,t.ownerDocument,o),cN(a),uN({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),EN(o),yN(o),lN],{placement:c,strategy:f,onComplete:h,onPositioned:m}=o,E=()=>it(null,null,function*(){var G;if(!r||!t)return;const x=yield iN(r,t,{placement:c,middleware:u,strategy:f});h==null||h(x),m==null||m({placed:!0});const C=Ps(t),O=D1(C,x.x),F=D1(C,x.y);t.style.setProperty("--x",`${O}px`),t.style.setProperty("--y",`${F}px`),o.hideWhenDetached&&(((G=x.middlewareData.hide)==null?void 0:G.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const D=t.firstElementChild;if(D){const W=Qu(D);t.style.setProperty("--z-index",W.zIndex)}}),b=()=>it(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),m==null||m({placed:!0})):yield E()}),T=TN(o.listeners),_=o.listeners?Qk(r,t,b,T):qA;return b(),()=>{_==null||_(),m==null||m({placed:!1})}}function M1(e,t,n={}){const c=n,{defer:r}=c,o=tn(c,["defer"]),a=r?_n:f=>f(),u=[];return u.push(a(()=>{const f=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(bN(f,h,o))})),()=>{u.forEach(f=>f==null?void 0:f())}}var _N={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function xN(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Gr.arrowSize.reference,height:Gr.arrowSize.reference,[Gr.arrowSizeHalf.variable]:`calc(${Gr.arrowSize.reference} / 2)`,[Gr.arrowOffset.variable]:`calc(${Gr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?_N[t.split("-")[0]]:void 0,background:Gr.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 js=new WeakMap,fl=new WeakMap,dl={},vd=0,F1=e=>e&&(e.host||F1(e.parentNode)),SN=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=F1(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),wN=new Set(["script","output","status","next-route-announcer"]),CN=e=>wN.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),AN=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=SN(n,Array.isArray(e)?e:[e]);dl[r]||(dl[r]=new WeakMap);const c=dl[r],f=[],h=new Set,m=new Set(u),E=T=>{!T||h.has(T)||(h.add(T),E(T.parentNode))};u.forEach(T=>{E(T),a&&qt(T)&&Yg(T,_=>{E(_)})});const b=T=>{!T||m.has(T)||Array.prototype.forEach.call(T.children,_=>{if(h.has(_))b(_);else try{if(CN(_))return;const C=_.getAttribute(o)==="true",O=(js.get(_)||0)+1,F=(c.get(_)||0)+1;js.set(_,O),c.set(_,F),f.push(_),O===1&&C&&fl.set(_,!0),F===1&&_.setAttribute(r,""),C||_.setAttribute(o,"true")}catch(x){console.error("[zag-js > ariaHidden] cannot operate on ",_,x)}})};return b(n),h.clear(),vd++,()=>{f.forEach(T=>{const _=js.get(T)-1,x=c.get(T)-1;js.set(T,_),c.set(T,x),_||(fl.has(T)||T.removeAttribute(o),fl.delete(T)),x||T.removeAttribute(r)}),vd--,vd||(js=new WeakMap,js=new WeakMap,fl=new WeakMap,dl={})}},vN=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,kN=(e,t=vN(e),n="data-aria-hidden",r=!0)=>{if(t)return AN(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},NN=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function B1(e,t={}){const{defer:n=!0}=t,r=n?NN:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(kN(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function ON(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function IN(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var U1="pointerdown.outside",H1="focus.outside";function PN(e){for(const t of e)if(qt(t)&&qr(t))return!0;return!1}var z1=e=>"clientY"in e;function RN(e,t){if(!z1(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 LN(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function j1(e,t){if(!t||!z1(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return LN(u,c)?r||a:!1}function DN(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const f=Sr(e),h=Ps(e),m=ON(h),E=IN(h);function b(D,G){if(!qt(G)||!G.isConnected||Ku(e,G)||RN(e,D)||c&&qg(e,G))return!1;const W=f.querySelector(`[aria-controls="${e.id}"]`);if(W){const te=od(W);if(j1(D,te))return!1}const B=od(e);return j1(D,B)?!1:!(n!=null&&n(G))}const T=new Set,_=Wi(e==null?void 0:e.getRootNode());function x(D){function G(W){var xe,H;const B=u&&!Wg()?_n:ee=>ee(),te=W!=null?W:D,Te=(H=(xe=te==null?void 0:te.composedPath)==null?void 0:xe.call(te))!=null?H:[te==null?void 0:te.target];B(()=>{const ee=_?Te[0]:Vr(D);if(!(!e||!b(D,ee))){if(o||a){const de=Qf(o,a);e.addEventListener(U1,de,{once:!0})}$1(e,U1,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:Sv(te),focusable:PN(Te),target:ee}})}})}D.pointerType==="touch"?(T.forEach(W=>W()),T.add(ar(f,"click",G,{once:!0})),T.add(E.addEventListener("click",G,{once:!0})),T.add(m.addEventListener("click",G,{once:!0}))):G()}const C=new Set,O=setTimeout(()=>{C.add(ar(f,"pointerdown",x,!0)),C.add(E.addEventListener("pointerdown",x,!0)),C.add(m.addEventListener("pointerdown",x,!0))},0);function F(D){(u?_n:W=>W())(()=>{var te,Te;const W=(Te=(te=D==null?void 0:D.composedPath)==null?void 0:te.call(D))!=null?Te:[D==null?void 0:D.target],B=_?W[0]:Vr(D);if(!(!e||!b(D,B))){if(r||a){const xe=Qf(r,a);e.addEventListener(H1,xe,{once:!0})}$1(e,H1,{bubbles:!1,cancelable:!0,detail:{originalEvent:D,contextmenu:!1,focusable:qr(B),target:B}})}})}return Wg()||(C.add(ar(f,"focusin",F,!0)),C.add(E.addEventListener("focusin",F,!0)),C.add(m.addEventListener("focusin",F,!0))),()=>{clearTimeout(O),T.forEach(D=>D()),C.forEach(D=>D())}}function MN(e,t){const{defer:n}=t,r=n?_n:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(DN(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function $1(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function FN(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return ar(Sr(e),"keydown",n,{capture:!0})}var V1="layer:request-dismiss",qn={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=>Ku(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ku(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=>qn.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];UN(e,V1,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),BN(e,V1,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function BN(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 UN(e,t,n){e.addEventListener(t,n,{once:!0})}var q1;function Y1(){qn.layers.forEach(({node:e})=>{e.style.pointerEvents=qn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function HN(e){e.style.pointerEvents=""}function zN(e,t){const n=Sr(e),r=[];return qn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(q1=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=Uv(()=>{const c=o();return qt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Ju(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{qn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=q1,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function jN(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Jf("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:f="dialog"}=t,h={dismiss:r,node:e,type:f,pointerBlocking:a,requestDismiss:o};qn.add(h),Y1();function m(x){var O,F;const C=Vr(x.detail.originalEvent);qn.isBelowPointerBlockingLayer(e)||qn.isInBranch(C)||((O=t.onPointerDownOutside)==null||O.call(t,x),(F=t.onInteractOutside)==null||F.call(t,x),!x.defaultPrevented&&(c&&console.log("onPointerDownOutside:",x.detail.originalEvent),r==null||r()))}function E(x){var O,F;const C=Vr(x.detail.originalEvent);qn.isInBranch(C)||((O=t.onFocusOutside)==null||O.call(t,x),(F=t.onInteractOutside)==null||F.call(t,x),!x.defaultPrevented&&(c&&console.log("onFocusOutside:",x.detail.originalEvent),r==null||r()))}function b(x){var C;qn.isTopMost(e)&&((C=t.onEscapeKeyDown)==null||C.call(t,x),!x.defaultPrevented&&r&&(x.preventDefault(),r()))}function T(x){var D;if(!e)return!1;const C=typeof u=="function"?u():u,O=Array.isArray(C)?C:[C],F=(D=t.persistentElements)==null?void 0:D.map(G=>G()).filter(qt);return F&&O.push(...F),O.some(G=>Ku(G,x))||qn.isInNestedLayer(e,x)}const _=[a?zN(e,t.persistentElements):void 0,FN(e,b),MN(e,{exclude:T,onFocusOutside:E,onPointerDownOutside:m,defer:t.defer})];return()=>{qn.remove(e),Y1(),HN(e),_.forEach(x=>x==null?void 0:x())}}function W1(e,t){const{defer:n}=t,r=n?_n:a=>a(),o=[];return o.push(r(()=>{const a=Is(e)?e():e;o.push(jN(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var $N=Object.defineProperty,VN=(e,t,n)=>t in e?$N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yt=(e,t,n)=>VN(e,typeof t!="symbol"?t+"":t,n),G1={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()}},qN=[],YN=class{constructor(e,t){yt(this,"trapStack"),yt(this,"config"),yt(this,"doc"),yt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),yt(this,"portalContainers",new Set),yt(this,"listenerCleanups",[]),yt(this,"handleFocus",r=>{const o=Vr(r),a=this.findContainerIndex(o,r)>=0;if(a||Gu(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Xo(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&&(u=h[m+1],c=!1):m-1>=0&&(u=h[m-1],c=!1))}}else this.state.containerGroups.some(f=>f.tabbableNodes.some(h=>Xo(h)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),yt(this,"handlePointerDown",r=>{const o=Vr(r);if(!(this.findContainerIndex(o,r)>=0)){if(ia(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ia(this.config.allowOutsideClick,r)||r.preventDefault()}}),yt(this,"handleClick",r=>{const o=Vr(r);this.findContainerIndex(o,r)>=0||ia(this.config.clickOutsideDeactivates,r)||ia(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),yt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;ra(r)&&r.preventDefault(),this.tryFocus(a)}}),yt(this,"handleEscapeKey",r=>{WN(r)&&ia(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),yt(this,"_mutationObserver"),yt(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 hv(h)?!0:h.id&&!this.state.containers.some(m=>m.contains(h))?pv(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),yt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),yt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!qr(r)){const o=Rs(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),yt(this,"tryFocus",r=>{if(r!==!1&&r!==Rs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,GN(r)&&r.select()}}),yt(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(),G1.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),f=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const h=()=>{K1(()=>{if(f){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(m)}u==null||u()})};if(f&&c){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(m).then(h,h),this}return h(),this}),yt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),yt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),yt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),yt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),yt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),yt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(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}),yt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Vr(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const f=this.findContainerIndex(u,o),h=f>=0?this.state.containerGroups[f]:void 0;if(f<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let m=this.state.tabbableGroups.findIndex(({firstTabbableNode:E})=>u===E);if(m<0&&((h==null?void 0:h.container)===u||qr(u)&&!Gi(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(m=f),m>=0){const E=m===0?this.state.tabbableGroups.length-1:m-1,b=this.state.tabbableGroups[E];c=Xo(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else ra(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(m<0&&((h==null?void 0:h.container)===u||qr(u)&&!Gi(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(m=f),m>=0){const E=m===this.state.tabbableGroups.length-1?0:m+1,b=this.state.tabbableGroups[E];c=Xo(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else ra(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||qN;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ra(r)&&!r.shiftKey},isKeyBackward(r){return ra(r)&&r.shiftKey}},t);this.doc=n.document||Sr(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=>{cv(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?qg(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Qo(e,{getShadowRoot:this.config.getShadowRoot}),n=Jg(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let h=0;h<t.length;h++)if(Xo(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(Gi(n[T]))return n[T]}else for(let T=b-1;T>=0;T--)if(Gi(n[T]))return n[T]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,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 G1.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?K1(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(ar(this.doc,"focusin",this.handleFocus,!0),ar(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),ar(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),ar(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),ar(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),ar(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=Rs(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)}},ra=e=>e.key==="Tab",ia=(e,...t)=>typeof e=="function"?e(...t):e,WN=e=>!e.isComposing&&e.key==="Escape",K1=e=>setTimeout(e,0),GN=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Q1(e,t={}){let n;const r=_n(()=>{const o=typeof e=="function"?e():e;if(o){n=new YN(o,ye(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Sr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var kd="data-scroll-lock";function KN(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function X1(e){const t=Qu(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function J1(e){var T;const t=e!=null?e:document,n=(T=t.defaultView)!=null?T:window,{documentElement:r,body:o}=t;if(o.hasAttribute(kd))return;const u=X1(r)||X1(o),c=n.innerWidth-r.clientWidth;o.setAttribute(kd,"");const f=()=>Fv(r,"--scrollbar-width",`${c}px`),h=KN(r),m=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[h]=`${c}px`),Ju(o,_)},E=()=>{var W,B;const{scrollX:_,scrollY:x,visualViewport:C}=n,O=(W=C==null?void 0:C.offsetLeft)!=null?W:0,F=(B=C==null?void 0:C.offsetTop)!=null?B:0,D={position:"fixed",overflow:"hidden",top:`${-(x-Math.floor(F))}px`,left:`${-(_-Math.floor(O))}px`,right:"0"};!u&&c>0&&(D[h]=`${c}px`);const G=Ju(o,D);return()=>{G==null||G(),n.scrollTo({left:_,top:x,behavior:"instant"})}},b=[f(),Gg()?E():m()];return()=>{b.forEach(_=>_==null?void 0:_()),o.removeAttribute(kd)}}var QN=Ms("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),kr=QN.build(),Z1=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},eE=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Nd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},tE=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},XN=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Od=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Id=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},JN=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},nE=e=>e.getById(Z1(e)),$s=e=>e.getById(eE(e)),Vs=e=>e.getById(Nd(e)),rE=e=>e.getById(tE(e)),ZN=e=>e.getById(Od(e)),eO=e=>e.getById(Id(e));function tO(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,f=n.matches("open"),h=r.get("currentPlacement"),m=a("currentPortalled"),E=r.get("renderedElements"),b=xN(ye(U({},u("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(ye(U({id:XN(c)},kr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(ye(U({},kr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(ye(U({},kr.anchor.attrs),{dir:u("dir"),id:Z1(c)}))},getTriggerProps(){return t.button(ye(U({},kr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:eE(c),"aria-haspopup":"dialog","aria-expanded":f,"data-state":f?"open":"closed","aria-controls":Nd(c),onPointerDown(T){xv(T)&&bv()&&T.currentTarget.focus()},onClick(T){T.defaultPrevented||o({type:"TOGGLE"})},onBlur(T){o({type:"TRIGGER_BLUR",target:T.relatedTarget})}}))},getIndicatorProps(){return t.element(ye(U({},kr.indicator.attrs),{dir:u("dir"),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(ye(U({id:tE(c)},kr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(ye(U({},kr.content.attrs),{dir:u("dir"),id:Nd(c),tabIndex:-1,role:"dialog","aria-modal":QA(u("modal")),hidden:!f,"data-state":f?"open":"closed","data-expanded":KA(f),"aria-labelledby":E.title?Od(c):void 0,"aria-describedby":E.description?Id(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(ye(U({},kr.title.attrs),{id:Od(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ye(U({},kr.description.attrs),{id:Id(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ye(U({},kr.closeTrigger.attrs),{dir:u("dir"),id:JN(c),type:"button","aria-label":"close",onClick(T){T.defaultPrevented||(T.stopPropagation(),o({type:"CLOSE"}))}}))}}}var nO={props({props:e}){return ye(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 a;e.set("currentPlacement",t("positioning").placement);const r=(a=nE(n))!=null?a:$s(n);return M1(r,()=>rE(n),ye(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Vs(n);let o=!0;return W1(r,{type:"popover",pointerBlocking:t("modal"),exclude:$s(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:Mv(()=>Vs(t),{triggerElement:$s(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?B1(()=>[Vs(t),$s(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return J1(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Q1(()=>Vs(t),{initialFocus:()=>Zg({root:Vs(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=nE(n))!=null?u:$s(n);M1(o,()=>rE(n),ye(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){_n(()=>{Object.assign(e.get("renderedElements"),{title:!!ZN(t),description:!!eO(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||_n(()=>{const n=Zg({root:Vs(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||_n(()=>{const a=$s(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};fd()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[ZF,Pd]=Ds({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[eB,iE]=Ds({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),rO=e=>{const t=V.useId(),{getRootNode:n}=Pd(),{dir:r}=iE(),o=U({id:t,dir:r,getRootNode:n},e),a=dd(nO,o);return tO(a,l1)},iO=e=>{const[t,u]=p1(e),c=u,{children:n}=c,r=tn(c,["children"]),o=rO(r),a=md(ur({present:o.open},t));return N.jsx(Zv,{value:o,children:N.jsx(c1,{value:a,children:n})})},sE=V.forwardRef((e,t)=>{const n=pd(),r=Jo(),o=ur(ye(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return N.jsx(ci.button,ye(U({},o),{ref:t}))});sE.displayName="PopoverTrigger";function sO(e){return pn({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 oO(e){return pn({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 aO(e){return pn({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 oE(e){return pn({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 uO=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=$r(),r=()=>{n(),e()};return N.jsxs("button",{className:re(`${Z}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[N.jsx(oE,{}),"Clear chat"]})},lO=({className:e,componentType:t,children:n})=>{const[r,o]=V.useState(!1),{globalClassName:a}=hn(),u=()=>{o(!1)},c=f=>{o(f.open)};return N.jsxs(iO,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[N.jsx(sE,{"aria-label":`Overflow menu for ${t}`,className:re(`${Z}-overflow-menu-button-trigger`,a,e,t),children:N.jsx(aO,{})}),N.jsx(d1,{children:N.jsxs(f1,{className:re(`${Z}-overflow-menu-list`,a,t),children:[n,N.jsx(uO,{componentType:t,onClearChat:u})]})})]})};function cO(e){return pn({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 aE(e){return pn({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 uE=({className:e,onClick:t,disabled:n=!1})=>N.jsx("button",{"aria-label":"Close",className:re(e,`${Z}-close-button`),disabled:n,onClick:t,children:N.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:N.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"})})}),lE=r=>{var o=r,{onClearChat:e,componentType:t}=o,n=tn(o,["onClearChat","componentType"]);const{globalClassName:a}=hn(),{resetConversation:u}=$r(),c=()=>{u(),e==null||e()};return N.jsx(Os,U({icon:N.jsx(oE,{size:"0.875rem"}),ariaLabel:"Clear Chat",className:re(a,`${Z}-clear-chat-icon-button`,t),onClick:c},n))},cE=({componentType:e,isIcon:t})=>{const{globalClassName:n}=hn(),r=()=>{qf("modal")};return t?N.jsx(Os,{className:re(n,`${Z}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:N.jsx(aE,{})}):N.jsxs("button",{className:re(n,`${Z}-overflow-menu-button`,`${Z}-toggle-modal-button`,e),onClick:r,children:[N.jsx(aE,{}),"Show modal"]})},fO=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=hn();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),f=n.getRelativePdp(t),h=n.getPdp(t),m=n.getImage(t),E=f&&typeof f=="string"?new URL(f,window.location.origin).href:h;return N.jsxs("div",{className:re(r,`${Z}-product-tile`,{embedded:!e,standalone:e}),children:[N.jsx("img",{className:re(r,`${Z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${a}`,loading:"lazy"}),N.jsxs("div",{className:re(r,`${Z}-product-tile-details`,{embedded:!e,standalone:e}),children:[N.jsxs("div",{className:re(r,`${Z}-product-tile-content`),children:[u&&N.jsx("p",{className:`${Z}-product-tile-brand`,children:u}),E?N.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:re(r,`${Z}-product-tile-pdp`),href:`${E}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",N.jsx("span",{className:re(r,`${Z}-product-tile-pdp-arrow`),children:"→"})]}):N.jsx("p",{className:re(r,`${Z}-product-tile-name`),title:a,children:a})]}),N.jsx("div",{className:re(r,`${Z}-product-tile-footer`),children:N.jsx("p",{className:re(r,`${Z}-product-tile-price`),children:c})})]})]})},dO=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=hn(),o=t;return n?N.jsxs("div",{className:re(r,`${Z}-display-products widget-message`),children:[N.jsx("p",{children:o.message}),o.products&&o.products.length>0&&N.jsx("div",{className:re(r,`${Z}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(a=>{const u=n.getPid(a);return N.jsx(fO,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},hO=({globalClassName:e,message:t,isWidgetStandalone:n})=>N.jsx("div",{className:re(e,`${Z}-error-message`,{standalone:n,embedded:!n}),children:N.jsxs("p",{className:re(e,`${Z}-error-message-text`,{standalone:n,embedded:!n}),children:[N.jsx(kA,{})," ",t.message||"An error occurred while processing your request."]})});function pO(e){return pn({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 mO=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:a})=>N.jsx("div",{className:re(e,`${Z}-suggestion-container standalone`),children:o.map(u=>N.jsxs(Gf,{disabled:r,className:re(e,`${Z}-suggestion-button standalone`),onClick:()=>a(u,n||t),children:[N.jsx(pO,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",u.displayText]},u.displayText))}),gO=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=$r();return N.jsxs("div",{className:re(e,`${Z}-follow-up`),children:[N.jsx("p",{className:re(e,`${Z}-text`),children:t.message}),n&&N.jsx(mO,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&N.jsx("div",{className:re(e,`${Z}-suggestion-container embedded`),children:t.suggestions.map(a=>N.jsx("button",{disabled:o,className:re(e,`${Z}-suggestion-button embedded`),onClick:()=>r(a,t.eventSourceId||t.id),children:a.displayText},a.displayText))})]})};function tB(){}function nB(){}function fE(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function dE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const EO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,TO={};function hE(e,t){return(TO.jsx?yO:EO).test(e)}const bO=/[ \t\n\f\r]/g;function _O(e){return typeof e=="object"?e.type==="text"?pE(e.value):!1:pE(e)}function pE(e){return e.replace(bO,"")===""}let sa=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};sa.prototype.normal={},sa.prototype.property={},sa.prototype.space=void 0;function mE(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new sa(n,r,t)}function oa(e){return e.toLowerCase()}let Sn=class{constructor(t,n){this.attribute=n,this.property=t}};Sn.prototype.attribute="",Sn.prototype.booleanish=!1,Sn.prototype.boolean=!1,Sn.prototype.commaOrSpaceSeparated=!1,Sn.prototype.commaSeparated=!1,Sn.prototype.defined=!1,Sn.prototype.mustUseProperty=!1,Sn.prototype.number=!1,Sn.prototype.overloadedBoolean=!1,Sn.prototype.property="",Sn.prototype.spaceSeparated=!1,Sn.prototype.space=void 0;let xO=0;const $e=Qi(),Bt=Qi(),Rd=Qi(),he=Qi(),ct=Qi(),qs=Qi(),Ln=Qi();function Qi(){return Xc(2,++xO)}const Ld=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Bt,commaOrSpaceSeparated:Ln,commaSeparated:qs,number:he,overloadedBoolean:Rd,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),Dd=Object.keys(Ld);let Md=class extends Sn{constructor(t,n,r,o){let a=-1;if(super(t,n),gE(this,"space",o),typeof r=="number")for(;++a<Dd.length;){const u=Dd[a];gE(this,Dd[a],(r&Ld[u])===Ld[u])}}};Md.prototype.defined=!0;function gE(e,t,n){n&&(e[t]=n)}function Ys(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Md(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[oa(r)]=r,n[oa(a.attribute)]=r}return new sa(t,n,e.space)}const EE=Ys({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:ct,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:he,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:ct,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Bt,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function yE(e,t){return t in e?e[t]:t}function TE(e,t){return yE(e,t.toLowerCase())}const SO=Ys({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qs,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:ct,autoFocus:$e,autoPlay:$e,blocking:ct,capture:null,charSet:null,checked:$e,cite:null,className:ct,cols:he,colSpan:null,content:null,contentEditable:Bt,controls:$e,controlsList:ct,coords:he|qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:Rd,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:ct,height:he,hidden:Rd,high:he,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:ct,itemRef:ct,itemScope:$e,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,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:he,pattern:null,ping:ct,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:ct,required:$e,reversed:$e,rows:he,rowSpan:he,sandbox:ct,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Bt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,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:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:TE}),wO=Ys({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:Ln,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ct,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,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:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ln,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yE}),bE=Ys({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()}}),_E=Ys({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:TE}),xE=Ys({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),CO={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"},AO=/[A-Z]/g,SE=/-[a-z]/g,vO=/^data[-\w.:]+$/i;function Fd(e,t){const n=oa(t);let r=t,o=Sn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&vO.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(SE,NO);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!SE.test(a)){let u=a.replace(AO,kO);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Md}return new o(r,t)}function kO(e){return"-"+e.toLowerCase()}function NO(e){return e.charAt(1).toUpperCase()}const hl=mE([EE,SO,bE,_E,xE],"html"),Ws=mE([EE,wO,bE,_E,xE],"svg");function wE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function CE(e){return e.join(" ").trim()}var Gs={},Bd,AE;function OO(){if(AE)return Bd;AE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
15
+ `,h="/",m="*",E="",b="comment",T="declaration";Bd=function(x,C){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];C=C||{};var O=1,F=1;function D(fe){var ae=fe.match(t);ae&&(O+=ae.length);var Ee=fe.lastIndexOf(f);F=~Ee?fe.length-Ee:F+fe.length}function G(){var fe={line:O,column:F};return function(ae){return ae.position=new W(fe),Te(),ae}}function W(fe){this.start=fe,this.end={line:O,column:F},this.source=C.source}W.prototype.content=x;function B(fe){var ae=new Error(C.source+":"+O+":"+F+": "+fe);if(ae.reason=fe,ae.filename=C.source,ae.line=O,ae.column=F,ae.source=x,!C.silent)throw ae}function te(fe){var ae=fe.exec(x);if(ae){var Ee=ae[0];return D(Ee),x=x.slice(Ee.length),ae}}function Te(){te(n)}function xe(fe){var ae;for(fe=fe||[];ae=H();)ae!==!1&&fe.push(ae);return fe}function H(){var fe=G();if(!(h!=x.charAt(0)||m!=x.charAt(1))){for(var ae=2;E!=x.charAt(ae)&&(m!=x.charAt(ae)||h!=x.charAt(ae+1));)++ae;if(ae+=2,E===x.charAt(ae-1))return B("End of comment missing");var Ee=x.slice(2,ae-2);return F+=2,D(Ee),x=x.slice(ae),F+=2,fe({type:b,comment:Ee})}}function ee(){var fe=G(),ae=te(r);if(ae){if(H(),!te(o))return B("property missing ':'");var Ee=te(a),Ce=fe({type:T,property:_(ae[0].replace(e,E)),value:Ee?_(Ee[0].replace(e,E)):E});return te(u),Ce}}function de(){var fe=[];xe(fe);for(var ae;ae=ee();)ae!==!1&&(fe.push(ae),xe(fe));return fe}return Te(),de()};function _(x){return x?x.replace(c,E):E}return Bd}var vE;function IO(){if(vE)return Gs;vE=1;var e=Gs&&Gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.default=n;var t=e(OO());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(f){if(f.type==="declaration"){var h=f.property,m=f.value;c?o(h,m,f):m&&(a=a||{},a[h]=m)}}),a}return Gs}var aa={},kE;function PO(){if(kE)return aa;kE=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},u=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},f=function(h,m){return m===void 0&&(m={}),a(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,u))};return aa.camelCase=f,aa}var ua,NE;function RO(){if(NE)return ua;NE=1;var e=ua&&ua.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(IO()),n=PO();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,f){c&&f&&(u[(0,n.camelCase)(c,a)]=f)}),u}return r.default=r,ua=r,ua}var LO=RO();const DO=Ge(LO),pl=OE("end"),Nr=OE("start");function OE(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 MO(e){const t=Nr(e),n=pl(e);if(t&&n)return{start:t,end:n}}function la(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?IE(e.position):"start"in e||"end"in e?IE(e):"line"in e||"column"in e?Ud(e):""}function Ud(e){return PE(e&&e.line)+":"+PE(e&&e.column)}function IE(e){return Ud(e&&e.start)+"-"+Ud(e&&e.end)}function PE(e){return e&&typeof e=="number"?e:1}class sn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=U({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?a.ruleId=r:(a.source=r.slice(0,f),a.ruleId=r.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=la(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}sn.prototype.file="",sn.prototype.name="",sn.prototype.reason="",sn.prototype.message="",sn.prototype.stack="",sn.prototype.column=void 0,sn.prototype.line=void 0,sn.prototype.ancestors=void 0,sn.prototype.cause=void 0,sn.prototype.fatal=void 0,sn.prototype.place=void 0,sn.prototype.ruleId=void 0,sn.prototype.source=void 0;const Hd={}.hasOwnProperty,FO=new Map,BO=/[A-Z]/g,UO=new Set(["table","tbody","thead","tfoot","tr"]),HO=new Set(["td","th"]),RE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function zO(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=KO(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=GO(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"?Ws:hl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=LE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function LE(e,t,n){if(t.type==="element")return jO(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return $O(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return qO(e,t,n);if(t.type==="mdxjsEsm")return VO(e,t);if(t.type==="root")return YO(e,t,n);if(t.type==="text")return WO(e,t)}function jO(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ws,e.schema=o),e.ancestors.push(t);const a=ME(e,t.tagName,!1),u=QO(e,t);let c=jd(e,t);return UO.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!_O(f):!0})),DE(e,u,a,t),zd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function $O(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ca(e,t.position)}function VO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ca(e,t.position)}function qO(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Ws,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:ME(e,t.name,!0),u=XO(e,t),c=jd(e,t);return DE(e,u,a,t),zd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function YO(e,t,n){const r={};return zd(r,jd(e,t)),e.create(t,e.Fragment,r,n)}function WO(e,t){return t.value}function DE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function GO(e,t,n){return r;function r(o,a,u,c){const h=Array.isArray(u.children)?n:t;return c?h(a,u,c):h(a,u)}}function KO(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),f=Nr(r);return t(o,a,u,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function QO(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Hd.call(t.properties,o)){const a=JO(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&HO.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function XO(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else ca(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else ca(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function jd(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:FO;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const h=o.get(f)||0;u=f+"-"+h,o.set(f,h+1)}}const c=LE(e,a,u);c!==void 0&&n.push(c)}return n}function JO(e,t,n){const r=Fd(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?dE(n):CE(n)),r.property==="style"){let o=typeof n=="object"?n:ZO(e,String(n));return e.stylePropertyNameCase==="css"&&(o=e3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?CO[r.property]||r.property:r.attribute,n]}}function ZO(e,t){try{return DO(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new sn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=RE+"#cannot-parse-style-attribute",o}}function ME(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=hE(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=hE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Hd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ca(e)}function ca(e,t){const n=new sn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=RE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function e3(e){const t={};let n;for(n in e)Hd.call(e,n)&&(t[t3(n)]=e[n]);return t}function t3(e){let t=e.replace(BO,n3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function n3(e){return"-"+e.toLowerCase()}const $d={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"]},r3={};function Vd(e,t){const n=r3,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return FE(e,r,o)}function FE(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 BE(e.children,t,n)}return Array.isArray(e)?BE(e,t,n):""}function BE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=FE(e[o],t,n);return r.join("")}function i3(e){return!!(e&&typeof e=="object")}const UE=document.createElement("i");function qd(e){const t="&"+e+";";UE.innerHTML=t;const n=UE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Dn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function Yn(e,t){return e.length>0?(Dn(e,e.length,0,t),e):t}const HE={}.hasOwnProperty;function zE(e){const t={};let n=-1;for(;++n<e.length;)s3(t,e[n]);return t}function s3(e,t){let n;for(n in t){const o=(HE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){HE.call(o,u)||(o[u]=[]);const c=a[u];o3(o[u],Array.isArray(c)?c:c?[c]:[])}}}function o3(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Dn(e,0,0,r)}function jE(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 fr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const mn=hi(/[A-Za-z]/),on=hi(/[\dA-Za-z]/),a3=hi(/[#-'*+\--9=?A-Z^-~]/);function ml(e){return e!==null&&(e<32||e===127)}const Yd=hi(/\d/),u3=hi(/[\dA-Fa-f]/),l3=hi(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function lt(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const gl=hi(new RegExp("\\p{P}|\\p{S}","u")),Xi=hi(/\s/);function hi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ks(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&on(e.charCodeAt(n+1))&&on(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(f){return Ke(f)?(e.enter(n),c(f)):t(f)}function c(f){return Ke(f)&&a++<o?(e.consume(f),c):(e.exit(n),t(f))}}const c3={tokenize:f3};function f3(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"),a(c)}function a(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const d3={tokenize:h3},$E={tokenize:p3};function h3(e){const t=this,n=[];let r=0,o,a,u;return c;function c(D){if(r<n.length){const G=n[r];return t.containerState=G[1],e.attempt(G[0].continuation,f,h)(D)}return h(D)}function f(D){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&F();const G=t.events.length;let W=G,B;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){B=t.events[W][1].end;break}O(r);let te=G;for(;te<t.events.length;)t.events[te][1].end=U({},B),te++;return Dn(t.events,W+1,0,t.events.slice(G)),t.events.length=te,h(D)}return c(D)}function h(D){if(r===n.length){if(!o)return b(D);if(o.currentConstruct&&o.currentConstruct.concrete)return _(D);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($E,m,E)(D)}function m(D){return o&&F(),O(r),b(D)}function E(D){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(D)}function b(D){return t.containerState={},e.attempt($E,T,_)(D)}function T(D){return r++,n.push([t.currentConstruct,t.containerState]),b(D)}function _(D){if(D===null){o&&F(),O(0),e.consume(D);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),x(D)}function x(D){if(D===null){C(e.exit("chunkFlow"),!0),O(0),e.consume(D);return}return Le(D)?(e.consume(D),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(D),x)}function C(D,G){const W=t.sliceStream(D);if(G&&W.push(null),D.previous=a,a&&(a.next=D),a=D,o.defineSkip(D.start),o.write(W),t.parser.lazy[D.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<u&&(!o.events[B][1].end||o.events[B][1].end.offset>u))return;const te=t.events.length;let Te=te,xe,H;for(;Te--;)if(t.events[Te][0]==="exit"&&t.events[Te][1].type==="chunkFlow"){if(xe){H=t.events[Te][1].end;break}xe=!0}for(O(r),B=te;B<t.events.length;)t.events[B][1].end=U({},H),B++;Dn(t.events,Te+1,0,t.events.slice(te)),t.events.length=B}}function O(D){let G=n.length;for(;G-- >D;){const W=n[G];t.containerState=W[1],W[0].exit.call(t,e)}n.length=D}function F(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function p3(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 Qs(e){if(e===null||lt(e)||Xi(e))return 1;if(gl(e))return 2}function El(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Wd={name:"attention",resolveAll:m3,tokenize:g3};function m3(e,t){let n=-1,r,o,a,u,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);VE(E,-f),VE(b,f),u={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},a={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({},u.start),end:U({},c.end)},e[r][1].end=U({},u.start),e[n][1].start=U({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Yn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Yn(h,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=Yn(h,El(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Yn(h,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=Yn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Dn(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 g3(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Qs(r);let a;return u;function u(f){return a=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===a)return e.consume(f),c;const h=e.exit("attentionSequence"),m=Qs(f),E=!m||m===2&&o||n.includes(f),b=!o||o===2&&m||n.includes(r);return h._open=!!(a===42?E:E&&(o||!b)),h._close=!!(a===42?b:b&&(m||!E)),t(f)}}function VE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const E3={name:"autolink",tokenize:y3};function y3(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"),a}function a(T){return mn(T)?(e.consume(T),u):T===64?n(T):h(T)}function u(T){return T===43||T===45||T===46||on(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||on(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||ml(T)?n(T):(e.consume(T),f)}function h(T){return T===64?(e.consume(T),m):a3(T)?(e.consume(T),h):n(T)}function m(T){return on(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||on(T))&&r++<63){const _=T===45?b:E;return e.consume(T),_}return n(T)}}const fa={partial:!0,tokenize:T3};function T3(e,t,n){return r;function r(a){return Ke(a)?Xe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const qE={continuation:{tokenize:_3},exit:x3,name:"blockQuote",tokenize:b3};function b3(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ke(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function _3(e,t,n){const r=this;return o;function o(u){return Ke(u)?Xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(qE,t,n)(u)}}function x3(e){e.exit("blockQuote")}const YE={name:"characterEscape",tokenize:S3};function S3(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return l3(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const WE={name:"characterReference",tokenize:w3};function w3(e,t,n){const r=this;let o=0,a,u;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),f}function f(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,u=on,m(E))}function h(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=u3,m):(e.enter("characterReferenceValue"),a=7,u=Yd,m(E))}function m(E){if(E===59&&o){const b=e.exit("characterReferenceValue");return u===on&&!qd(r.sliceSerialize(b))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(E)&&o++<a?(e.consume(E),m):n(E)}}const GE={partial:!0,tokenize:A3},KE={concrete:!0,name:"codeFenced",tokenize:C3};function C3(e,t,n){const r=this,o={partial:!0,tokenize:W};let a=0,u=0,c;return f;function f(B){return h(B)}function h(B){const te=r.events[r.events.length-1];return a=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(B)}function m(B){return B===c?(u++,e.consume(B),m):u<3?n(B):(e.exit("codeFencedFenceSequence"),Ke(B)?Xe(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Le(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(GE,x,G)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(B))}function b(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Ke(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,T,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),b)}function T(B){return B===null||Le(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),_)}function x(B){return e.attempt(o,G,C)(B)}function C(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),O}function O(B){return a>0&&Ke(B)?Xe(e,F,"linePrefix",a+1)(B):F(B)}function F(B){return B===null||Le(B)?e.check(GE,x,G)(B):(e.enter("codeFlowValue"),D(B))}function D(B){return B===null||Le(B)?(e.exit("codeFlowValue"),F(B)):(e.consume(B),D)}function G(B){return e.exit("codeFenced"),t(B)}function W(B,te,Te){let xe=0;return H;function H(Ee){return B.enter("lineEnding"),B.consume(Ee),B.exit("lineEnding"),ee}function ee(Ee){return B.enter("codeFencedFence"),Ke(Ee)?Xe(B,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Ee):de(Ee)}function de(Ee){return Ee===c?(B.enter("codeFencedFenceSequence"),fe(Ee)):Te(Ee)}function fe(Ee){return Ee===c?(xe++,B.consume(Ee),fe):xe>=u?(B.exit("codeFencedFenceSequence"),Ke(Ee)?Xe(B,ae,"whitespace")(Ee):ae(Ee)):Te(Ee)}function ae(Ee){return Ee===null||Le(Ee)?(B.exit("codeFencedFence"),te(Ee)):Te(Ee)}}}function A3(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Gd={name:"codeIndented",tokenize:k3},v3={partial:!0,tokenize:N3};function k3(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Xe(e,a,"linePrefix",5)(h)}function a(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?f(h):Le(h)?e.attempt(v3,u,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Le(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function N3(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Xe(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const O3={name:"codeText",previous:P3,resolve:I3,tokenize:R3};function I3(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 P3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function R3(e,t,n){let r=0,o,a;return u;function u(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),f(E))}function f(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),f):E===96?(a=e.enter("codeTextSequence"),o=0,m(E)):Le(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||Le(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)):(a.type="codeTextData",h(E))}}class L3{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&da(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),da(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),da(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);da(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);da(this.left,n.reverse())}}}function da(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 QE(e){const t={};let n=-1,r,o,a,u,c,f,h;const m=new L3(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,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,D3(m,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=m.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(m.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=U({},m.get(o)[1].start),c=m.slice(o,n),c.unshift(r),m.splice(o,n-o+1,c))}}return Dn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function D3(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,f=[],h={};let m,E,b=-1,T=n,_=0,x=0;const C=[x];for(;T;){for(;e.get(++o)[1]!==T;);a.push(o),T._tokenizer||(m=r.sliceStream(T),T.next||m.push(null),E&&u.defineSkip(T.start),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),T._isInFirstContentOfListItem&&(u._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&&(x=b+1,C.push(x),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(u.events=[],T?(T._tokenizer=void 0,T.previous=void 0):C.pop(),b=C.length;b--;){const O=c.slice(C[b],C[b+1]),F=a.pop();f.push([F,F+O.length-1]),e.splice(F,2,O)}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 M3={resolve:B3,tokenize:U3},F3={partial:!0,tokenize:H3};function B3(e){return QE(e),e}function U3(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(F3,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function H3(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function XE(e,t,n,r,o,a,u,c,f){const h=f||Number.POSITIVE_INFINITY;let m=0;return E;function E(O){return O===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(O),e.exit(a),b):O===null||O===32||O===41||ml(O)?n(O):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),x(O))}function b(O){return O===62?(e.enter(a),e.consume(O),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),T(O))}function T(O){return O===62?(e.exit("chunkString"),e.exit(c),b(O)):O===null||O===60||Le(O)?n(O):(e.consume(O),O===92?_:T)}function _(O){return O===60||O===62||O===92?(e.consume(O),T):T(O)}function x(O){return!m&&(O===null||O===41||lt(O))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(O)):m<h&&O===40?(e.consume(O),m++,x):O===41?(e.consume(O),m--,x):O===null||O===32||O===40||ml(O)?n(O):(e.consume(O),O===92?C:x)}function C(O){return O===40||O===41||O===92?(e.consume(O),x):x(O)}}function JE(e,t,n,r,o,a){const u=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(a),m}function m(T){return c>999||T===null||T===91||T===93&&!f||T===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(T):T===93?(e.exit(a),e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):Le(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||Le(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 ZE(e,t,n,r,o,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),u=b===40?41:b,f):n(b)}function f(b){return b===u?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(a),h(b))}function h(b){return b===u?(e.exit(a),f(u)):b===null?n(b):Le(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===u||b===null||Le(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?E:m)}function E(b){return b===u||b===92?(e.consume(b),m):m(b)}}function ha(e,t){let n;return r;function r(o){return Le(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 z3={name:"definition",tokenize:$3},j3={partial:!0,tokenize:V3};function $3(e,t,n){const r=this;let o;return a;function a(T){return e.enter("definition"),u(T)}function u(T){return JE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function c(T){return o=fr(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 lt(T)?ha(e,h)(T):h(T)}function h(T){return XE(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function m(T){return e.attempt(j3,E,E)(T)}function E(T){return Ke(T)?Xe(e,b,"whitespace")(T):b(T)}function b(T){return T===null||Le(T)?(e.exit("definition"),r.parser.defined.push(o),t(T)):n(T)}}function V3(e,t,n){return r;function r(c){return lt(c)?ha(e,o)(c):n(c)}function o(c){return ZE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ke(c)?Xe(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const q3={name:"hardBreakEscape",tokenize:Y3};function Y3(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const W3={name:"headingAtx",resolve:G3,tokenize:K3};function G3(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Dn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function K3(e,t,n){let r=0;return o;function o(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&r++<6?(e.consume(m),u):m===null||lt(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||Le(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||lt(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const Q3=["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"],ey=["pre","script","style","textarea"],X3={concrete:!0,name:"htmlFlow",resolveTo:eI,tokenize:tI},J3={partial:!0,tokenize:rI},Z3={partial:!0,tokenize:nI};function eI(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 tI(e,t,n){const r=this;let o,a,u,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),a=!0,x):k===63?(e.consume(k),o=3,r.interrupt?t:w):mn(k)?(e.consume(k),u=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,_):mn(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 be="CDATA[";return k===be.charCodeAt(c++)?(e.consume(k),c===be.length?r.interrupt?t:de:_):n(k)}function x(k){return mn(k)?(e.consume(k),u=String.fromCharCode(k),C):n(k)}function C(k){if(k===null||k===47||k===62||lt(k)){const be=k===47,Re=u.toLowerCase();return!be&&!a&&ey.includes(Re)?(o=1,r.interrupt?t(k):de(k)):Q3.includes(u.toLowerCase())?(o=6,be?(e.consume(k),O):r.interrupt?t(k):de(k)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):a?F(k):D(k))}return k===45||on(k)?(e.consume(k),u+=String.fromCharCode(k),C):n(k)}function O(k){return k===62?(e.consume(k),r.interrupt?t:de):n(k)}function F(k){return Ke(k)?(e.consume(k),F):H(k)}function D(k){return k===47?(e.consume(k),H):k===58||k===95||mn(k)?(e.consume(k),G):Ke(k)?(e.consume(k),D):H(k)}function G(k){return k===45||k===46||k===58||k===95||on(k)?(e.consume(k),G):W(k)}function W(k){return k===61?(e.consume(k),B):Ke(k)?(e.consume(k),W):D(k)}function B(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),f=k,te):Ke(k)?(e.consume(k),B):Te(k)}function te(k){return k===f?(e.consume(k),f=null,xe):k===null||Le(k)?n(k):(e.consume(k),te)}function Te(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||lt(k)?W(k):(e.consume(k),Te)}function xe(k){return k===47||k===62||Ke(k)?D(k):n(k)}function H(k){return k===62?(e.consume(k),ee):n(k)}function ee(k){return k===null||Le(k)?de(k):Ke(k)?(e.consume(k),ee):n(k)}function de(k){return k===45&&o===2?(e.consume(k),Ce):k===60&&o===1?(e.consume(k),ue):k===62&&o===4?(e.consume(k),R):k===63&&o===3?(e.consume(k),w):k===93&&o===5?(e.consume(k),ne):Le(k)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(J3,K,fe)(k)):k===null||Le(k)?(e.exit("htmlFlowData"),fe(k)):(e.consume(k),de)}function fe(k){return e.check(Z3,ae,K)(k)}function ae(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Ee}function Ee(k){return k===null||Le(k)?fe(k):(e.enter("htmlFlowData"),de(k))}function Ce(k){return k===45?(e.consume(k),w):de(k)}function ue(k){return k===47?(e.consume(k),u="",q):de(k)}function q(k){if(k===62){const be=u.toLowerCase();return ey.includes(be)?(e.consume(k),R):de(k)}return mn(k)&&u.length<8?(e.consume(k),u+=String.fromCharCode(k),q):de(k)}function ne(k){return k===93?(e.consume(k),w):de(k)}function w(k){return k===62?(e.consume(k),R):k===45&&o===2?(e.consume(k),w):de(k)}function R(k){return k===null||Le(k)?(e.exit("htmlFlowData"),K(k)):(e.consume(k),R)}function K(k){return e.exit("htmlFlow"),t(k)}}function nI(e,t,n){const r=this;return o;function o(u){return Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function rI(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(fa,t,n)}}const iI={name:"htmlText",tokenize:sI};function sI(e,t,n){const r=this;let o,a,u;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),W):w===63?(e.consume(w),D):mn(w)?(e.consume(w),Te):n(w)}function h(w){return w===45?(e.consume(w),m):w===91?(e.consume(w),a=0,_):mn(w)?(e.consume(w),F):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):Le(w)?(u=E,ue(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(a++)?(e.consume(w),a===R.length?x:_):n(w)}function x(w){return w===null?n(w):w===93?(e.consume(w),C):Le(w)?(u=x,ue(w)):(e.consume(w),x)}function C(w){return w===93?(e.consume(w),O):x(w)}function O(w){return w===62?Ce(w):w===93?(e.consume(w),O):x(w)}function F(w){return w===null||w===62?Ce(w):Le(w)?(u=F,ue(w)):(e.consume(w),F)}function D(w){return w===null?n(w):w===63?(e.consume(w),G):Le(w)?(u=D,ue(w)):(e.consume(w),D)}function G(w){return w===62?Ce(w):D(w)}function W(w){return mn(w)?(e.consume(w),B):n(w)}function B(w){return w===45||on(w)?(e.consume(w),B):te(w)}function te(w){return Le(w)?(u=te,ue(w)):Ke(w)?(e.consume(w),te):Ce(w)}function Te(w){return w===45||on(w)?(e.consume(w),Te):w===47||w===62||lt(w)?xe(w):n(w)}function xe(w){return w===47?(e.consume(w),Ce):w===58||w===95||mn(w)?(e.consume(w),H):Le(w)?(u=xe,ue(w)):Ke(w)?(e.consume(w),xe):Ce(w)}function H(w){return w===45||w===46||w===58||w===95||on(w)?(e.consume(w),H):ee(w)}function ee(w){return w===61?(e.consume(w),de):Le(w)?(u=ee,ue(w)):Ke(w)?(e.consume(w),ee):xe(w)}function de(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,fe):Le(w)?(u=de,ue(w)):Ke(w)?(e.consume(w),de):(e.consume(w),ae)}function fe(w){return w===o?(e.consume(w),o=void 0,Ee):w===null?n(w):Le(w)?(u=fe,ue(w)):(e.consume(w),fe)}function ae(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||lt(w)?xe(w):(e.consume(w),ae)}function Ee(w){return w===47||w===62||lt(w)?xe(w):n(w)}function Ce(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function ue(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),q}function q(w){return Ke(w)?Xe(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):ne(w)}function ne(w){return e.enter("htmlTextData"),u(w)}}const Kd={name:"labelEnd",resolveAll:lI,resolveTo:cI,tokenize:fI},oI={tokenize:dI},aI={tokenize:hI},uI={tokenize:pI};function lI(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&&Dn(e,0,e.length,n),e}function cI(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const f={type:e[a][1].type==="labelLink"?"link":"image",start:U({},e[a][1].start),end:U({},e[e.length-1][1].end)},h={type:"label",start:U({},e[a][1].start),end:U({},e[u][1].end)},m={type:"labelText",start:U({},e[a+r+2][1].end),end:U({},e[u-2][1].start)};return c=[["enter",f,t],["enter",h,t]],c=Yn(c,e.slice(a+1,a+r+3)),c=Yn(c,[["enter",m,t]]),c=Yn(c,El(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Yn(c,[["exit",m,t],e[u-2],e[u-1],["exit",h,t]]),c=Yn(c,e.slice(u+1)),c=Yn(c,[["exit",f,t]]),Dn(e,a,e.length,c),e}function fI(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(b){return a?a._inactive?E(b):(u=r.parser.defined.includes(fr(r.sliceSerialize({start:a.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(oI,m,u?m:E)(b):b===91?e.attempt(aI,m,u?h:E)(b):u?m(b):E(b)}function h(b){return e.attempt(uI,m,E)(b)}function m(b){return t(b)}function E(b){return a._balanced=!0,n(b)}}function dI(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 lt(E)?ha(e,a)(E):a(E)}function a(E){return E===41?m(E):XE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function u(E){return lt(E)?ha(e,f)(E):m(E)}function c(E){return n(E)}function f(E){return E===34||E===39||E===40?ZE(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):m(E)}function h(E){return lt(E)?ha(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 hI(e,t,n){const r=this;return o;function o(c){return JE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(fr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function pI(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const mI={name:"labelStartImage",resolveAll:Kd.resolveAll,tokenize:gI};function gI(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const EI={name:"labelStartLink",resolveAll:Kd.resolveAll,tokenize:yI};function yI(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Qd={name:"lineEnding",tokenize:TI};function TI(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const yl={name:"thematicBreak",tokenize:bI};function bI(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),u(h)}function u(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),f(h)):r>=3&&(h===null||Le(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 wn={continuation:{tokenize:wI},exit:AI,name:"list",tokenize:SI},_I={partial:!0,tokenize:vI},xI={partial:!0,tokenize:CI};function SI(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(T){const _=r.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||T===r.containerState.marker:Yd(T)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(yl,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 Yd(T)&&++u<10?(e.consume(T),f):(!r.interrupt||u<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(fa,r.interrupt?n:m,e.attempt(_I,b,E))}function m(T){return r.containerState.initialBlankLine=!0,a++,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=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function wI(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(fa,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ke(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xI,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(wn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function CI(e,t,n){const r=this;return Xe(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function AI(e){e.exit(this.containerState.type)}function vI(e,t,n){const r=this;return Xe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Ke(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ty={name:"setextUnderline",resolveTo:kI,tokenize:NI};function kI(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:U({},e[r][1].start),end:U({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=U({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function NI(e,t,n){const r=this;let o;return a;function a(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,u(h)):n(h)}function u(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||Le(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const OI={tokenize:II};function II(e){const t=this,n=e.attempt(fa,r,e.attempt(this.parser.constructs.flowInitial,o,Xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(M3,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const PI={resolveAll:ry()},RI=ny("string"),LI=ny("text");function ny(e){return{resolveAll:ry(e==="text"?DI:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(m){return h(m)?a(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"),a(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 ry(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function DI(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,f;for(;a--;){const h=o[a];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)f=!0,c++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end: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 MI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:z3},disable:{null:[]},document:{42:wn,43:wn,45:wn,48:wn,49:wn,50:wn,51:wn,52:wn,53:wn,54:wn,55:wn,56:wn,57:wn,62:qE},flow:{35:W3,42:yl,45:[ty,yl],60:X3,61:ty,95:yl,96:KE,126:KE},flowInitial:{[-2]:Gd,[-1]:Gd,32:Gd},insideSpan:{null:[Wd,PI]},string:{38:WE,92:YE},text:{[-5]:Qd,[-4]:Qd,[-3]:Qd,33:mI,38:WE,42:Wd,60:[E3,iI],91:EI,92:[q3,YE],93:Kd,95:Wd,96:O3}},Symbol.toStringTag,{value:"Module"}));function FI(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const f={attempt:te(W),check:te(B),consume:F,enter:D,exit:G,interrupt:te(B,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:T,write:E};let m=t.tokenize.call(h,f);return t.resolveAll&&a.push(t),h;function E(ee){return u=Yn(u,ee),C(),u[u.length-1]!==null?[]:(Te(t,0),h.events=El(a,h.events,h),h.events)}function b(ee,de){return UI(T(ee),de)}function T(ee){return BI(u,ee)}function _(){const{_bufferIndex:ee,_index:de,line:fe,column:ae,offset:Ee}=r;return{_bufferIndex:ee,_index:de,line:fe,column:ae,offset:Ee}}function x(ee){o[ee.line]=ee.column,H()}function C(){let ee;for(;r._index<u.length;){const de=u[r._index];if(typeof de=="string")for(ee=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ee&&r._bufferIndex<de.length;)O(de.charCodeAt(r._bufferIndex));else O(de)}}function O(ee){m=m(ee)}function F(ee){Le(ee)?(r.line++,r.column=1,r.offset+=ee===-3?2:1,H()):ee!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=ee}function D(ee,de){const fe=de||{};return fe.type=ee,fe.start=_(),h.events.push(["enter",fe,h]),c.push(fe),fe}function G(ee){const de=c.pop();return de.end=_(),h.events.push(["exit",de,h]),de}function W(ee,de){Te(ee,de.from)}function B(ee,de){de.restore()}function te(ee,de){return fe;function fe(ae,Ee,Ce){let ue,q,ne,w;return Array.isArray(ae)?K(ae):"tokenize"in ae?K([ae]):R(ae);function R(Oe){return Ye;function Ye(Ve){const Je=Ve!==null&&Oe[Ve],At=Ve!==null&&Oe.null,Kn=[...Array.isArray(Je)?Je:Je?[Je]:[],...Array.isArray(At)?At:At?[At]:[]];return K(Kn)(Ve)}}function K(Oe){return ue=Oe,q=0,Oe.length===0?Ce:k(Oe[q])}function k(Oe){return Ye;function Ye(Ve){return w=xe(),ne=Oe,Oe.partial||(h.currentConstruct=Oe),Oe.name&&h.parser.constructs.disable.null.includes(Oe.name)?Re():Oe.tokenize.call(de?Object.assign(Object.create(h),de):h,f,be,Re)(Ve)}}function be(Oe){return ee(ne,w),Ee}function Re(Oe){return w.restore(),++q<ue.length?k(ue[q]):Ce}}}function Te(ee,de){ee.resolveAll&&!a.includes(ee)&&a.push(ee),ee.resolve&&Dn(h.events,de,h.events.length-de,ee.resolve(h.events.slice(de),h)),ee.resolveTo&&(h.events=ee.resolveTo(h.events,h))}function xe(){const ee=_(),de=h.previous,fe=h.currentConstruct,ae=h.events.length,Ee=Array.from(c);return{from:ae,restore:Ce};function Ce(){r=ee,h.previous=de,h.currentConstruct=fe,h.events.length=ae,c=Ee,H()}}function H(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function BI(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function UI(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
16
16
  `;break}case-3:{u=`\r
17
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function UI(e){const r={constructs:HE([DI,...(e||{}).extensions||[]]),content:o(lO),defined:[],document:o(fO),flow:o(NI),lazy:{},string:o(PI),text:o(RI)};return r;function o(a){return u;function u(c){return MI(r,a,c)}}}function HI(e){for(;!KE(e););return e}const ry=/[\0\t\n\r]/g;function zI(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const f=[];let h,m,E,b,T;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),E=0,t="",n&&(a.charCodeAt(0)===65279&&E++,n=void 0);E<a.length;){if(ry.lastIndex=E,h=ry.exec(a),b=h&&h.index!==void 0?h.index:a.length,T=a.charCodeAt(b),!h){t=a.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(a.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 jI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $I(e){return e.replace(jI,VI)}function VI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return zE(n.slice(a?2:1),a?16:10)}return jd(n)||e}const iy={}.hasOwnProperty;function qI(e,t,n){return typeof t!="string"&&(n=t,t=void 0),YI(n)(HI(UI(n).document().write(zI()(e,t,!0))))}function YI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(dt),autolinkProtocol:he,autolinkEmail:he,atxHeading:a(bi),blockQuote:a(wt),characterEscape:he,characterReference:he,codeFenced:a(Qn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Qn,u),codeText:a(ss,u),codeTextData:he,data:he,codeFlowValue:he,definition:a(yi),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Ti),hardBreakEscape:a(_e),hardBreakTrailing:a(_e),htmlFlow:a(He,u),htmlFlowData:he,htmlText:a(He,u),htmlTextData:he,image:a(it),label:u,link:a(dt),listItem:a(kt),listItemValue:b,listOrdered:a(mt,E),listUnordered:a(mt),paragraph:a(on),reference:k,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(bi),strong:a(nt),thematicBreak:a(Fn)},exit:{atxHeading:f(),atxHeadingSequence:W,autolink:f(),autolinkEmail:Je,autolinkProtocol:Ve,blockQuote:f(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Be,characterReferenceMarkerNumeric:Be,characterReferenceValue:Ie,characterReference:Ye,codeFenced:f(C),codeFencedFence:S,codeFencedFenceInfo:T,codeFencedFenceMeta:_,codeFlowValue:H,codeIndented:f(I),codeText:f(Te),codeTextData:H,data:H,definition:f(),definitionDestinationString:G,definitionLabelString:F,definitionTitleString:D,emphasis:f(),hardBreakEscape:f(de),hardBreakTrailing:f(de),htmlFlow:f(ce),htmlFlowData:H,htmlText:f(fe),htmlTextData:H,image:f(oe),label:ee,labelText:$,lineEnding:le,link:f(we),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:xe,resourceDestinationString:w,resourceTitleString:R,resource:Q,setextHeading:f(be),setextHeadingLineSequence:te,setextHeadingText:B,strong:f(),thematicBreak:f()}};sy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let Ee={type:"root",children:[]};const Re={stack:[Ee],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:m,data:n},We=[];let Ze=-1;for(;++Ze<J.length;)if(J[Ze][1].type==="listOrdered"||J[Ze][1].type==="listUnordered")if(J[Ze][0]==="enter")We.push(Ze);else{const Kt=We.pop();Ze=o(J,Kt,Ze)}for(Ze=-1;++Ze<J.length;){const Kt=t[J[Ze][0]];iy.call(Kt,J[Ze][1].type)&&Kt[J[Ze][1].type].call(Object.assign({sliceSerialize:J[Ze][2].sliceSerialize},Re),J[Ze][1])}if(Re.tokenStack.length>0){const Kt=Re.tokenStack[Re.tokenStack.length-1];(Kt[1]||oy).call(Re,void 0,Kt[0])}for(Ee.position={start:pi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:pi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<t.transforms.length;)Ee=t.transforms[Ze](Ee)||Ee;return Ee}function o(J,Ee,Re){let We=Ee-1,Ze=-1,Kt=!1,Zr,Xn,_i,os;for(;++We<=Re;){const Qt=J[We];switch(Qt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Qt[0]==="enter"?Ze++:Ze--,os=void 0;break}case"lineEndingBlank":{Qt[0]==="enter"&&(Zr&&!os&&!Ze&&!_i&&(_i=We),os=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:os=void 0}if(!Ze&&Qt[0]==="enter"&&Qt[1].type==="listItemPrefix"||Ze===-1&&Qt[0]==="exit"&&(Qt[1].type==="listUnordered"||Qt[1].type==="listOrdered")){if(Zr){let Lr=We;for(Xn=void 0;Lr--;){const Bn=J[Lr];if(Bn[1].type==="lineEnding"||Bn[1].type==="lineEndingBlank"){if(Bn[0]==="exit")continue;Xn&&(J[Xn][1].type="lineEndingBlank",Kt=!0),Bn[1].type="lineEnding",Xn=Lr}else if(!(Bn[1].type==="linePrefix"||Bn[1].type==="blockQuotePrefix"||Bn[1].type==="blockQuotePrefixWhitespace"||Bn[1].type==="blockQuoteMarker"||Bn[1].type==="listItemIndent"))break}_i&&(!Xn||_i<Xn)&&(Zr._spread=!0),Zr.end=Object.assign({},Xn?J[Xn][1].start:Qt[1].end),J.splice(Xn||We,0,["exit",Zr,Qt[2]]),We++,Re++}if(Qt[1].type==="listItemPrefix"){const Lr={type:"listItem",_spread:!1,start:Object.assign({},Qt[1].start),end:void 0};Zr=Lr,J.splice(We,0,["enter",Lr,Qt[2]]),We++,Re++,_i=void 0,os=!0}}}return J[Ee][1]._spread=Kt,Re}function a(J,Ee){return Re;function Re(We){c.call(this,J(We),We),Ee&&Ee.call(this,We)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,Ee,Re){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([Ee,Re||void 0]),J.position={start:pi(Ee.start),end:void 0}}function f(J){return Ee;function Ee(Re){J&&J.call(this,Re),h.call(this,Re)}}function h(J,Ee){const Re=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==J.type&&(Ee?Ee.call(this,J,We[0]):(We[1]||oy).call(this,J,We[0]));else throw new Error("Cannot close `"+J.type+"` ("+la({start:J.start,end:J.end})+"): it’s not open");Re.position.end=pi(J.end)}function m(){return zd(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 F(J){const Ee=this.resume(),Re=this.stack[this.stack.length-1];Re.label=Ee,Re.identifier=dr(this.sliceSerialize(J)).toLowerCase()}function D(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=J}function G(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=J}function W(J){const Ee=this.stack[this.stack.length-1];if(!Ee.depth){const Re=this.sliceSerialize(J).length;Ee.depth=Re}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function te(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 he(J){const Re=this.stack[this.stack.length-1].children;let We=Re[Re.length-1];(!We||We.type!=="text")&&(We=Jr(),We.position={start:pi(J.start),end:void 0},Re.push(We)),this.stack.push(We)}function H(J){const Ee=this.stack.pop();Ee.value+=this.sliceSerialize(J),Ee.position.end=pi(J.end)}function le(J){const Ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=Ee.children[Ee.children.length-1];Re.position.end=pi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ee.type)&&(he.call(this,J),H.call(this,J))}function de(){this.data.atHardBreak=!0}function ce(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function fe(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function Te(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function we(){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),Re=this.stack[this.stack.length-2];Re.label=$I(Ee),Re.identifier=dr(Ee).toLowerCase()}function ee(){const J=this.stack[this.stack.length-1],Ee=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const We=J.children;Re.children=We}else Re.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 Q(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function xe(J){const Ee=this.resume(),Re=this.stack[this.stack.length-1];Re.label=Ee,Re.identifier=dr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Be(J){this.data.characterReferenceType=J.type}function Ie(J){const Ee=this.sliceSerialize(J),Re=this.data.characterReferenceType;let We;Re?(We=zE(Ee,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=jd(Ee);const Ze=this.stack[this.stack.length-1];Ze.value+=We}function Ye(J){const Ee=this.stack.pop();Ee.position.end=pi(J.end)}function Ve(J){H.call(this,J);const Ee=this.stack[this.stack.length-1];Ee.url=this.sliceSerialize(J)}function Je(J){H.call(this,J);const Ee=this.stack[this.stack.length-1];Ee.url="mailto:"+this.sliceSerialize(J)}function wt(){return{type:"blockquote",children:[]}}function Qn(){return{type:"code",lang:null,meta:null,value:""}}function ss(){return{type:"inlineCode",value:""}}function yi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ti(){return{type:"emphasis",children:[]}}function bi(){return{type:"heading",depth:0,children:[]}}function _e(){return{type:"break"}}function He(){return{type:"html",value:""}}function it(){return{type:"image",title:null,url:"",alt:null}}function dt(){return{type:"link",title:null,url:"",children:[]}}function mt(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function kt(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function on(){return{type:"paragraph",children:[]}}function nt(){return{type:"strong",children:[]}}function Jr(){return{type:"text",value:""}}function Fn(){return{type:"thematicBreak"}}}function pi(e){return{line:e.line,column:e.column,offset:e.offset}}function sy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?sy(e,r):WI(e,r)}}function WI(e,t){let n;for(n in t)if(iy.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 oy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+la({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+la({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+la({start:t.start,end:t.end})+") is still open")}function GI(e){const t=this;t.parser=n;function n(r){return qI(r,ye(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function KI(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 QI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
18
- `}]}function XI(e,t){const n=t.value?t.value+`
19
- `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function JI(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZI(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eP(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Ks(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const 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(u)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function tP(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 nP(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ay(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function rP(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ay(e,t);const o={src:Ks(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function iP(e,t){const n={src:Ks(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 sP(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 oP(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ay(e,t);const o={href:Ks(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function aP(e,t){const n={href:Ks(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 uP(e,t,n){const r=e.all(t),o=n?lP(n):uy(t),a={},u=[];if(typeof t.checked=="boolean"){const m=r[0];let E;m&&m.type==="element"&&m.tagName==="p"?E=m:(E={type:"element",tagName:"p",properties:{},children:[]},r.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const m=r[c];(o||c!==0||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
17
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function HI(e){const r={constructs:zE([MI,...(e||{}).extensions||[]]),content:o(c3),defined:[],document:o(d3),flow:o(OI),lazy:{},string:o(RI),text:o(LI)};return r;function o(a){return u;function u(c){return FI(r,a,c)}}}function zI(e){for(;!QE(e););return e}const iy=/[\0\t\n\r]/g;function jI(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const f=[];let h,m,E,b,T;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),E=0,t="",n&&(a.charCodeAt(0)===65279&&E++,n=void 0);E<a.length;){if(iy.lastIndex=E,h=iy.exec(a),b=h&&h.index!==void 0?h.index:a.length,T=a.charCodeAt(b),!h){t=a.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(a.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 $I=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function VI(e){return e.replace($I,qI)}function qI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return jE(n.slice(a?2:1),a?16:10)}return qd(n)||e}const sy={}.hasOwnProperty;function YI(e,t,n){return typeof t!="string"&&(n=t,t=void 0),WI(n)(zI(HI(n).document().write(jI()(e,t,!0))))}function WI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(je),autolinkProtocol:xe,autolinkEmail:xe,atxHeading:a(ss),blockQuote:a(At),characterEscape:xe,characterReference:xe,codeFenced:a(Kn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Kn,u),codeText:a(is,u),codeTextData:xe,data:xe,codeFlowValue:xe,definition:a(Xr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(yi),hardBreakEscape:a(Ti),hardBreakTrailing:a(Ti),htmlFlow:a(Jr,u),htmlFlowData:xe,htmlText:a(Jr,u),htmlTextData:xe,image:a(Se),label:u,link:a(je),listItem:a(ot),listItemValue:b,listOrdered:a(nt,E),listUnordered:a(nt),paragraph:a(dt),reference:k,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(ss),strong:a(It),thematicBreak:a(Rt)},exit:{atxHeading:f(),atxHeadingSequence:W,autolink:f(),autolinkEmail:Je,autolinkProtocol:Ve,blockQuote:f(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:Oe,characterReference:Ye,codeFenced:f(C),codeFencedFence:x,codeFencedFenceInfo:T,codeFencedFenceMeta:_,codeFlowValue:H,codeIndented:f(O),codeText:f(Ee),codeTextData:H,data:H,definition:f(),definitionDestinationString:G,definitionLabelString:F,definitionTitleString:D,emphasis:f(),hardBreakEscape:f(de),hardBreakTrailing:f(de),htmlFlow:f(fe),htmlFlowData:H,htmlText:f(ae),htmlTextData:H,image:f(ue),label:ne,labelText:q,lineEnding:ee,link:f(Ce),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:be,resourceDestinationString:w,resourceTitleString:R,resource:K,setextHeading:f(Te),setextHeadingLineSequence:te,setextHeadingText:B,strong:f(),thematicBreak:f()}};oy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ge={type:"root",children:[]};const De={stack:[ge],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:m,data:n},We=[];let Ze=-1;for(;++Ze<J.length;)if(J[Ze][1].type==="listOrdered"||J[Ze][1].type==="listUnordered")if(J[Ze][0]==="enter")We.push(Ze);else{const Xt=We.pop();Ze=o(J,Xt,Ze)}for(Ze=-1;++Ze<J.length;){const Xt=t[J[Ze][0]];sy.call(Xt,J[Ze][1].type)&&Xt[J[Ze][1].type].call(Object.assign({sliceSerialize:J[Ze][2].sliceSerialize},De),J[Ze][1])}if(De.tokenStack.length>0){const Xt=De.tokenStack[De.tokenStack.length-1];(Xt[1]||ay).call(De,void 0,Xt[0])}for(ge.position={start:pi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:pi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<t.transforms.length;)ge=t.transforms[Ze](ge)||ge;return ge}function o(J,ge,De){let We=ge-1,Ze=-1,Xt=!1,Zr,Qn,bi,os;for(;++We<=De;){const Jt=J[We];switch(Jt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Jt[0]==="enter"?Ze++:Ze--,os=void 0;break}case"lineEndingBlank":{Jt[0]==="enter"&&(Zr&&!os&&!Ze&&!bi&&(bi=We),os=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:os=void 0}if(!Ze&&Jt[0]==="enter"&&Jt[1].type==="listItemPrefix"||Ze===-1&&Jt[0]==="exit"&&(Jt[1].type==="listUnordered"||Jt[1].type==="listOrdered")){if(Zr){let Rr=We;for(Qn=void 0;Rr--;){const Fn=J[Rr];if(Fn[1].type==="lineEnding"||Fn[1].type==="lineEndingBlank"){if(Fn[0]==="exit")continue;Qn&&(J[Qn][1].type="lineEndingBlank",Xt=!0),Fn[1].type="lineEnding",Qn=Rr}else if(!(Fn[1].type==="linePrefix"||Fn[1].type==="blockQuotePrefix"||Fn[1].type==="blockQuotePrefixWhitespace"||Fn[1].type==="blockQuoteMarker"||Fn[1].type==="listItemIndent"))break}bi&&(!Qn||bi<Qn)&&(Zr._spread=!0),Zr.end=Object.assign({},Qn?J[Qn][1].start:Jt[1].end),J.splice(Qn||We,0,["exit",Zr,Jt[2]]),We++,De++}if(Jt[1].type==="listItemPrefix"){const Rr={type:"listItem",_spread:!1,start:Object.assign({},Jt[1].start),end:void 0};Zr=Rr,J.splice(We,0,["enter",Rr,Jt[2]]),We++,De++,bi=void 0,os=!0}}}return J[ge][1]._spread=Xt,De}function a(J,ge){return De;function De(We){c.call(this,J(We),We),ge&&ge.call(this,We)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,ge,De){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ge,De||void 0]),J.position={start:pi(ge.start),end:void 0}}function f(J){return ge;function ge(De){J&&J.call(this,De),h.call(this,De)}}function h(J,ge){const De=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==J.type&&(ge?ge.call(this,J,We[0]):(We[1]||ay).call(this,J,We[0]));else throw new Error("Cannot close `"+J.type+"` ("+la({start:J.start,end:J.end})+"): it’s not open");De.position.end=pi(J.end)}function m(){return Vd(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function T(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=J}function _(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=J}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function O(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/(\r?\n|\r)$/g,"")}function F(J){const ge=this.resume(),De=this.stack[this.stack.length-1];De.label=ge,De.identifier=fr(this.sliceSerialize(J)).toLowerCase()}function D(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function G(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function W(J){const ge=this.stack[this.stack.length-1];if(!ge.depth){const De=this.sliceSerialize(J).length;ge.depth=De}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function te(J){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function Te(){this.data.setextHeadingSlurpLineEnding=void 0}function xe(J){const De=this.stack[this.stack.length-1].children;let We=De[De.length-1];(!We||We.type!=="text")&&(We=Pt(),We.position={start:pi(J.start),end:void 0},De.push(We)),this.stack.push(We)}function H(J){const ge=this.stack.pop();ge.value+=this.sliceSerialize(J),ge.position.end=pi(J.end)}function ee(J){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const De=ge.children[ge.children.length-1];De.position.end=pi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(xe.call(this,J),H.call(this,J))}function de(){this.data.atHardBreak=!0}function fe(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function ae(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function Ee(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function Ce(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function ue(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function q(J){const ge=this.sliceSerialize(J),De=this.stack[this.stack.length-2];De.label=VI(ge),De.identifier=fr(ge).toLowerCase()}function ne(){const J=this.stack[this.stack.length-1],ge=this.resume(),De=this.stack[this.stack.length-1];if(this.data.inReference=!0,De.type==="link"){const We=J.children;De.children=We}else De.alt=ge}function w(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function R(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function K(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function be(J){const ge=this.resume(),De=this.stack[this.stack.length-1];De.label=ge,De.identifier=fr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Re(J){this.data.characterReferenceType=J.type}function Oe(J){const ge=this.sliceSerialize(J),De=this.data.characterReferenceType;let We;De?(We=jE(ge,De==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=qd(ge);const Ze=this.stack[this.stack.length-1];Ze.value+=We}function Ye(J){const ge=this.stack.pop();ge.position.end=pi(J.end)}function Ve(J){H.call(this,J);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(J)}function Je(J){H.call(this,J);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(J)}function At(){return{type:"blockquote",children:[]}}function Kn(){return{type:"code",lang:null,meta:null,value:""}}function is(){return{type:"inlineCode",value:""}}function Xr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function yi(){return{type:"emphasis",children:[]}}function ss(){return{type:"heading",depth:0,children:[]}}function Ti(){return{type:"break"}}function Jr(){return{type:"html",value:""}}function Se(){return{type:"image",title:null,url:"",alt:null}}function je(){return{type:"link",title:null,url:"",children:[]}}function nt(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function ot(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function dt(){return{type:"paragraph",children:[]}}function It(){return{type:"strong",children:[]}}function Pt(){return{type:"text",value:""}}function Rt(){return{type:"thematicBreak"}}}function pi(e){return{line:e.line,column:e.column,offset:e.offset}}function oy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?oy(e,r):GI(e,r)}}function GI(e,t){let n;for(n in t)if(sy.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 ay(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+la({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+la({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+la({start:t.start,end:t.end})+") is still open")}function KI(e){const t=this;t.parser=n;function n(r){return YI(r,ye(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function QI(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 XI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
18
+ `}]}function JI(e,t){const n=t.value?t.value+`
19
+ `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function ZI(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eP(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tP(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Ks(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const 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(u)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function nP(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 rP(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function uy(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function iP(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uy(e,t);const o={src:Ks(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function sP(e,t){const n={src:Ks(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 oP(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 aP(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uy(e,t);const o={href:Ks(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function uP(e,t){const n={href:Ks(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 lP(e,t,n){const r=e.all(t),o=n?cP(n):ly(t),a={},u=[];if(typeof t.checked=="boolean"){const m=r[0];let E;m&&m.type==="element"&&m.tagName==="p"?E=m:(E={type:"element",tagName:"p",properties:{},children:[]},r.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const m=r[c];(o||c!==0||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
20
20
  `}),m.type==="element"&&m.tagName==="p"&&!o?u.push(...m.children):u.push(m)}const f=r[r.length-1];f&&(o||f.type!=="element"||f.tagName!=="p")&&u.push({type:"text",value:`
21
- `});const h={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,h),e.applyData(t,h)}function lP(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=uy(n[r])}return t}function uy(e){const t=e.spread;return t==null?e.children.length>1:t}function cP(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function fP(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dP(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function hP(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pP(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Or(t.children[1]),f=hl(t.children[t.children.length-1]);c&&f&&(u.position={start:c,end:f}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function mP(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let f=-1;const h=[];for(;++f<c;){const E=t.children[f],b={},T=u?u[f]:void 0;T&&(b.align=T);let _={type:"element",tagName:a,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 gP(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ly=9,cy=32;function EP(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(fy(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(fy(t.slice(o),o>0,!1)),a.join("")}function fy(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===ly||a===cy;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===ly||a===cy;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function yP(e,t){const n={type:"text",value:EP(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function TP(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const bP={blockquote:KI,break:QI,code:XI,delete:JI,emphasis:ZI,footnoteReference:eP,heading:tP,html:nP,imageReference:rP,image:iP,inlineCode:sP,linkReference:oP,link:aP,listItem:uP,list:cP,paragraph:fP,root:dP,strong:hP,table:pP,tableCell:gP,tableRow:mP,text:yP,thematicBreak:TP,toml:yl,yaml:yl,definition:yl,footnoteDefinition:yl};function yl(){}const dy=-1,Tl=0,pa=1,bl=2,Gd=3,Kd=4,Qd=5,Xd=6,hy=7,py=8,my=typeof self=="object"?self:globalThis,_P=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case Tl:case dy:return n(u,o);case pa:{const c=n([],o);for(const f of u)c.push(r(f));return c}case bl:{const c=n({},o);for(const[f,h]of u)c[r(f)]=r(h);return c}case Gd:return n(new Date(u),o);case Kd:{const{source:c,flags:f}=u;return n(new RegExp(c,f),o)}case Qd:{const c=n(new Map,o);for(const[f,h]of u)c.set(r(f),r(h));return c}case Xd:{const c=n(new Set,o);for(const f of u)c.add(r(f));return c}case hy:{const{name:c,message:f}=u;return n(new my[c](f),o)}case py:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new my[a](u),o)};return r},gy=e=>_P(new Map,e)(0),Xs="",{toString:xP}={},{keys:SP}=Object,ma=e=>{const t=typeof e;if(t!=="object"||!e)return[Tl,t];const n=xP.call(e).slice(8,-1);switch(n){case"Array":return[pa,Xs];case"Object":return[bl,Xs];case"Date":return[Gd,Xs];case"RegExp":return[Kd,Xs];case"Map":return[Qd,Xs];case"Set":return[Xd,Xs];case"DataView":return[pa,n]}return n.includes("Array")?[pa,n]:n.includes("Error")?[hy,n]:[bl,n]},_l=([e,t])=>e===Tl&&(t==="function"||t==="symbol"),wP=(e,t,n,r)=>{const o=(u,c)=>{const f=r.push(u)-1;return n.set(c,f),f},a=u=>{if(n.has(u))return n.get(u);let[c,f]=ma(u);switch(c){case Tl:{let m=u;switch(f){case"bigint":c=py,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);m=null;break;case"undefined":return o([dy],u)}return o([c,m],u)}case pa:{if(f){let b=u;return f==="DataView"?b=new Uint8Array(u.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(u)),o([f,[...b]],u)}const m=[],E=o([c,m],u);for(const b of u)m.push(a(b));return E}case bl:{if(f)switch(f){case"BigInt":return o([f,u.toString()],u);case"Boolean":case"Number":case"String":return o([f,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const m=[],E=o([c,m],u);for(const b of SP(u))(e||!_l(ma(u[b])))&&m.push([a(b),a(u[b])]);return E}case Gd:return o([c,u.toISOString()],u);case Kd:{const{source:m,flags:E}=u;return o([c,{source:m,flags:E}],u)}case Qd:{const m=[],E=o([c,m],u);for(const[b,T]of u)(e||!(_l(ma(b))||_l(ma(T))))&&m.push([a(b),a(T)]);return E}case Xd:{const m=[],E=o([c,m],u);for(const b of u)(e||!_l(ma(b)))&&m.push(a(b));return E}}const{message:h}=u;return o([c,{name:f,message:h}],u)};return a},Ey=(e,{json:t,lossy:n}={})=>{const r=[];return wP(!(t||n),!!t,new Map,r)(e),r},Js=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?gy(Ey(e,t)):structuredClone(e):(e,t)=>gy(Ey(e,t));function CP(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 AP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function vP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||CP,r=e.options.footnoteBackLabel||AP,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=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=Ks(E.toLowerCase());let T=0;const _=[],S=e.footnoteCounts.get(E);for(;S!==void 0&&++T<=S;){_.length>0&&_.push({type:"text",value:" "});let F=typeof n=="string"?n:n(f,T);typeof F=="string"&&(F={type:"text",value:F}),_.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(F)?F:[F]})}const C=m[m.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const F=C.children[C.children.length-1];F&&F.type==="text"?F.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:a,properties:ye(U({},Js(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
21
+ `});const h={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,h),e.applyData(t,h)}function cP(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=ly(n[r])}return t}function ly(e){const t=e.spread;return t==null?e.children.length>1:t}function fP(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function dP(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hP(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function pP(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mP(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Nr(t.children[1]),f=pl(t.children[t.children.length-1]);c&&f&&(u.position={start:c,end:f}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function gP(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let f=-1;const h=[];for(;++f<c;){const E=t.children[f],b={},T=u?u[f]:void 0;T&&(b.align=T);let _={type:"element",tagName:a,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 EP(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const cy=9,fy=32;function yP(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(dy(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(dy(t.slice(o),o>0,!1)),a.join("")}function dy(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===cy||a===fy;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===cy||a===fy;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function TP(e,t){const n={type:"text",value:yP(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function bP(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const _P={blockquote:QI,break:XI,code:JI,delete:ZI,emphasis:eP,footnoteReference:tP,heading:nP,html:rP,imageReference:iP,image:sP,inlineCode:oP,linkReference:aP,link:uP,listItem:lP,list:fP,paragraph:dP,root:hP,strong:pP,table:mP,tableCell:EP,tableRow:gP,text:TP,thematicBreak:bP,toml:Tl,yaml:Tl,definition:Tl,footnoteDefinition:Tl};function Tl(){}const hy=-1,bl=0,pa=1,_l=2,Xd=3,Jd=4,Zd=5,eh=6,py=7,my=8,gy=typeof self=="object"?self:globalThis,xP=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case bl:case hy:return n(u,o);case pa:{const c=n([],o);for(const f of u)c.push(r(f));return c}case _l:{const c=n({},o);for(const[f,h]of u)c[r(f)]=r(h);return c}case Xd:return n(new Date(u),o);case Jd:{const{source:c,flags:f}=u;return n(new RegExp(c,f),o)}case Zd:{const c=n(new Map,o);for(const[f,h]of u)c.set(r(f),r(h));return c}case eh:{const c=n(new Set,o);for(const f of u)c.add(r(f));return c}case py:{const{name:c,message:f}=u;return n(new gy[c](f),o)}case my:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new gy[a](u),o)};return r},Ey=e=>xP(new Map,e)(0),Xs="",{toString:SP}={},{keys:wP}=Object,ma=e=>{const t=typeof e;if(t!=="object"||!e)return[bl,t];const n=SP.call(e).slice(8,-1);switch(n){case"Array":return[pa,Xs];case"Object":return[_l,Xs];case"Date":return[Xd,Xs];case"RegExp":return[Jd,Xs];case"Map":return[Zd,Xs];case"Set":return[eh,Xs];case"DataView":return[pa,n]}return n.includes("Array")?[pa,n]:n.includes("Error")?[py,n]:[_l,n]},xl=([e,t])=>e===bl&&(t==="function"||t==="symbol"),CP=(e,t,n,r)=>{const o=(u,c)=>{const f=r.push(u)-1;return n.set(c,f),f},a=u=>{if(n.has(u))return n.get(u);let[c,f]=ma(u);switch(c){case bl:{let m=u;switch(f){case"bigint":c=my,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);m=null;break;case"undefined":return o([hy],u)}return o([c,m],u)}case pa:{if(f){let b=u;return f==="DataView"?b=new Uint8Array(u.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(u)),o([f,[...b]],u)}const m=[],E=o([c,m],u);for(const b of u)m.push(a(b));return E}case _l:{if(f)switch(f){case"BigInt":return o([f,u.toString()],u);case"Boolean":case"Number":case"String":return o([f,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const m=[],E=o([c,m],u);for(const b of wP(u))(e||!xl(ma(u[b])))&&m.push([a(b),a(u[b])]);return E}case Xd:return o([c,u.toISOString()],u);case Jd:{const{source:m,flags:E}=u;return o([c,{source:m,flags:E}],u)}case Zd:{const m=[],E=o([c,m],u);for(const[b,T]of u)(e||!(xl(ma(b))||xl(ma(T))))&&m.push([a(b),a(T)]);return E}case eh:{const m=[],E=o([c,m],u);for(const b of u)(e||!xl(ma(b)))&&m.push(a(b));return E}}const{message:h}=u;return o([c,{name:f,message:h}],u)};return a},yy=(e,{json:t,lossy:n}={})=>{const r=[];return CP(!(t||n),!!t,new Map,r)(e),r},Js=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ey(yy(e,t)):structuredClone(e):(e,t)=>Ey(yy(e,t));function AP(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 vP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function kP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||AP,r=e.options.footnoteBackLabel||vP,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=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=Ks(E.toLowerCase());let T=0;const _=[],x=e.footnoteCounts.get(E);for(;x!==void 0&&++T<=x;){_.length>0&&_.push({type:"text",value:" "});let F=typeof n=="string"?n:n(f,T);typeof F=="string"&&(F={type:"text",value:F}),_.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(F)?F:[F]})}const C=m[m.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const F=C.children[C.children.length-1];F&&F.type==="text"?F.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(..._)}else m.push(..._);const O={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(m,!0)};e.patch(h,O),c.push(O)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:ye(U({},Js(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
22
22
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
23
- `}]}}const xl=function(e){if(e==null)return IP;if(typeof e=="function")return Sl(e);if(typeof e=="object")return Array.isArray(e)?kP(e):NP(e);if(typeof e=="string")return OP(e);throw new Error("Expected function, string, or object as test")};function kP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xl(e[n]);return Sl(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function NP(e){const t=e;return Sl(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function OP(e){return Sl(t);function t(n){return n&&n.type===e}}function Sl(e){return t;function t(n,r,o){return!!(PP(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function IP(){return!0}function PP(e){return e!==null&&typeof e=="object"&&"type"in e}function cB(e){return e}const yy=[],RP=!0,Jd=!1,LP="skip";function Ty(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=xl(o),u=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=yy,_,S,C;if((!t||a(f,h,m[m.length-1]||void 0))&&(T=DP(n(f,m)),T[0]===Jd))return T;if("children"in f&&f.children){const I=f;if(I.children&&T[0]!==LP)for(S=(r?I.children.length:-1)+u,C=m.concat(I);S>-1&&S<I.children.length;){const F=I.children[S];if(_=c(F,S,C)(),_[0]===Jd)return _;S=typeof _[1]=="number"?_[1]:S+u}}return T}}}function DP(e){return Array.isArray(e)?e:typeof e=="number"?[RP,e]:e==null?yy:[e]}function wl(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),Ty(e,a,c,o);function c(f,h){const m=h[h.length-1],E=m?m.children.indexOf(f):void 0;return u(f,E,m)}}const Zd={}.hasOwnProperty,MP={};function FP(e,t){const n=t||MP,r=new Map,o=new Map,a=new Map,u=U(U({},bP),n.handlers),c={all:h,applyData:UP,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:f,options:n,patch:BP,wrap:zP};return wl(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(Zd.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=Zt(S,["children"]),F=Js(I);return F.children=c.all(m),F}return Js(m)}return(c.options.unknownHandler||HP)(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=by(_.value)),!Array.isArray(_)&&_.type==="element")){const S=_.children[0];S&&S.type==="text"&&(S.value=by(S.value))}Array.isArray(_)?E.push(..._):E.push(_)}}}return E}}function BP(e,t){e.position&&(t.position=D3(e))}function UP(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Js(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function HP(e,t){const n=t.data||{},r="value"in t&&!(Zd.call(n,"hProperties")||Zd.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 zP(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
23
+ `}]}}const Sl=function(e){if(e==null)return PP;if(typeof e=="function")return wl(e);if(typeof e=="object")return Array.isArray(e)?NP(e):OP(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]=Sl(e[n]);return wl(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function OP(e){const t=e;return wl(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function IP(e){return wl(t);function t(n){return n&&n.type===e}}function wl(e){return t;function t(n,r,o){return!!(RP(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function PP(){return!0}function RP(e){return e!==null&&typeof e=="object"&&"type"in e}function dB(e){return e}const Ty=[],LP=!0,th=!1,DP="skip";function by(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=Sl(o),u=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=Ty,_,x,C;if((!t||a(f,h,m[m.length-1]||void 0))&&(T=MP(n(f,m)),T[0]===th))return T;if("children"in f&&f.children){const O=f;if(O.children&&T[0]!==DP)for(x=(r?O.children.length:-1)+u,C=m.concat(O);x>-1&&x<O.children.length;){const F=O.children[x];if(_=c(F,x,C)(),_[0]===th)return _;x=typeof _[1]=="number"?_[1]:x+u}}return T}}}function MP(e){return Array.isArray(e)?e:typeof e=="number"?[LP,e]:e==null?Ty:[e]}function Cl(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),by(e,a,c,o);function c(f,h){const m=h[h.length-1],E=m?m.children.indexOf(f):void 0;return u(f,E,m)}}const nh={}.hasOwnProperty,FP={};function BP(e,t){const n=t||FP,r=new Map,o=new Map,a=new Map,u=U(U({},_P),n.handlers),c={all:h,applyData:HP,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:f,options:n,patch:UP,wrap:jP};return Cl(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(nh.call(c.handlers,b)&&T)return T(c,m,E);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in m){const x=m,{children:C}=x,O=tn(x,["children"]),F=Js(O);return F.children=c.all(m),F}return Js(m)}return(c.options.unknownHandler||zP)(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=_y(_.value)),!Array.isArray(_)&&_.type==="element")){const x=_.children[0];x&&x.type==="text"&&(x.value=_y(x.value))}Array.isArray(_)?E.push(..._):E.push(_)}}}return E}}function UP(e,t){e.position&&(t.position=MO(e))}function HP(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Js(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function zP(e,t){const n=t.data||{},r="value"in t&&!(nh.call(n,"hProperties")||nh.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 jP(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
24
24
  `});++r<e.length;)r&&n.push({type:"text",value:`
25
25
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
26
- `}),n}function by(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function _y(e,t){const n=FP(e,t),r=n.one(e,void 0),o=vP(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
27
- `},o),a}function jP(e,t){return e&&"run"in e?function(n,r){return st(this,null,function*(){const o=_y(n,U({file:r},t));yield e.run(o,r)})}:function(n,r){return _y(n,U({file:r},e||t))}}function xy(e){if(e)throw e}var eh,Sy;function $P(){if(Sy)return eh;Sy=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]"},a=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)},u=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 eh=function f(){var h,m,E,b,T,_,S=arguments[0],C=1,I=arguments.length,F=!1;for(typeof S=="boolean"&&(F=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&&(F&&b&&(a(b)||(T=o(b)))?(T?(T=!1,_=E&&o(E)?E:[]):_=E&&a(E)?E:{},u(S,{name:m,newValue:f(F,_,b)})):typeof b!="undefined"&&u(S,{name:m,newValue:b}));return S},eh}var VP=$P();const th=Ge(VP);function nh(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 qP(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(f,...h){const m=e[++a];let E=-1;if(f){u(f);return}for(;++E<o.length;)(h[E]===null||h[E]===void 0)&&(h[E]=o[E]);o=h,m?YP(m,c)(...h):u(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 YP(e,t){let n;return r;function r(...u){const c=e.length>u.length;let f;c&&u.push(o);try{f=e.apply(this,u)}catch(h){const m=h;if(c&&n)throw m;return o(m)}c||(f&&f.then&&typeof f.then=="function"?f.then(a,o):f instanceof Error?o(f):a(f))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const Ir={basename:WP,dirname:GP,extname:KP,join:QP,sep:"/"};function WP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ga(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function GP(e){if(ga(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 KP(e){ga(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function QP(...e){let t=-1,n;for(;++t<e.length;)ga(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":XP(n)}function XP(e){ga(e);const t=e.codePointAt(0)===47;let n=JP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function JP(e,t){let n="",r=0,o=-1,a=0,u=-1,c,f;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function ga(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ZP={cwd:eR};function eR(){return"/"}function rh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function tR(e){if(typeof e=="string")e=new URL(e);else if(!rh(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 nR(e)}function nR(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 ih=["history","path","basename","stem","extname","dirname"];class wy{constructor(t){let n;t?rh(t)?n={path:t}:typeof t=="string"||rR(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":ZP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ih.length;){const a=ih[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)ih.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Ir.basename(this.path):void 0}set basename(t){oh(t,"basename"),sh(t,"basename"),this.path=Ir.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ir.dirname(this.path):void 0}set dirname(t){Cy(this.basename,"dirname"),this.path=Ir.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ir.extname(this.path):void 0}set extname(t){if(sh(t,"extname"),Cy(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=Ir.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){rh(t)&&(t=tR(t)),oh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ir.basename(this.path,this.extname):void 0}set stem(t){oh(t,"stem"),sh(t,"stem"),this.path=Ir.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 nn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function sh(e,t){if(e&&e.includes(Ir.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ir.sep+"`")}function oh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Cy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function rR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const iR=function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},sR={}.hasOwnProperty;class ah extends iR{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=qP()}copy(){const t=new ah;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(th(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ch("data",this.frozen),this.namespace[t]=n,this):sR.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ch("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=Cl(t),r=this.parser||this.Parser;return uh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),uh("process",this.parser||this.Parser),lh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=Cl(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);uR(_)?b.value=_:b.result=_,h(m,b)});function h(m,E){m||!E?u(m):a?a(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),uh("processSync",this.parser||this.Parser),lh("processSync",this.compiler||this.Compiler),this.process(t,o),vy("processSync","process",n),r;function o(a,u){n=!0,xy(a),r=u}}run(t,n,r){Ay(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const f=Cl(n);o.run(t,f,h);function h(m,E,b){const T=E||t;m?c(m):u?u(T):r(void 0,T,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),vy("runSync","run",r),o;function a(u,c){xy(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=Cl(n),o=this.compiler||this.Compiler;return lh("stringify",o),Ay(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(ch("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...E]=h;f(m,E)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(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=th(!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];a(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];nh(S)&&nh(T)&&(T=th(!0,S,T)),r[b]=[h,T,..._]}}}}const oR=new ah().freeze();function uh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ch(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 Ay(e){if(!nh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function vy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cl(e){return aR(e)?e:new wy(e)}function aR(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function uR(e){return typeof e=="string"||lR(e)}function lR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cR="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ky=[],Ny={allowDangerousHtml:!0},fR=/^(https?|ircs?|mailto|xmpp)$/i,dR=[{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 hR(e){const t=pR(e),n=mR(e);return gR(t.runSync(t.parse(n),n),e)}function pR(e){const t=e.rehypePlugins||ky,n=e.remarkPlugins||ky,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),Ny):Ny;return oR().use(GI).use(n).use(jP,r).use(t)}function mR(e){const t=e.children||"",n=new wy;return typeof t=="string"&&(n.value=t),n}function gR(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||ER;for(const m of dR)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+cR+m.id,void 0);return wl(e,h),H3(e,{Fragment:N.Fragment,components:o,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function h(m,E,b){if(m.type==="raw"&&b&&typeof E=="number")return u?b.children.splice(E,1):b.children[E]={type:"text",value:m.value},E;if(m.type==="element"){let T;for(T in Hd)if(Object.hasOwn(Hd,T)&&Object.hasOwn(m.properties,T)){const _=m.properties[T],S=Hd[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):a?a.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 ER(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||fR.test(e.slice(0,t))?e:""}const Oy=/[#.]/g;function yR(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){Oy.lastIndex=o;const c=Oy.exec(n),f=n.slice(o,c?c.index:n.length);f&&(a?a==="#"?r.id=f:Array.isArray(r.className)?r.className.push(f):r.className=[f]:u=f,o+=f.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function Iy(e,t,n){const r=n?xR(n):void 0;function o(a,u,...c){let f;if(a==null){f={type:"root",children:[]};const h=u;c.unshift(h)}else{f=yR(a,t);const h=f.tagName.toLowerCase(),m=r?r.get(h):void 0;if(f.tagName=m||h,TR(u))c.unshift(u);else for(const[E,b]of Object.entries(u))bR(e,f.properties,E,b)}for(const h of c)fh(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return o}function TR(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function bR(e,t,n,r){const o=Ld(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=SE(r):o.commaSeparated?a=cE(r):o.commaOrSpaceSeparated?a=SE(cE(r).join(" ")):a=Py(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?_R(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(Py(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function fh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)fh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?fh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Py(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||oa(n)===oa(t)))return!0}return n}function _R(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function xR(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const SR=["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"],wR=Iy(dl,"div"),CR=Iy(Ws,"g",SR);function AR(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const f=Ry(t,n[u-1]);c=f===-1?t.length+1:f+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],f=Ry(t,c),h=f===-1?t.length+1:f+1;if(c===h)break;n.push(h)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function Ry(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 Zi={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/"},Ly={}.hasOwnProperty,vR=Object.prototype;function kR(e,t){const n=t||{};return dh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ws:dl,verbose:n.verbose||!1},e)}function dh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Al(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:Dy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=AR(a),c=u.toPoint(0),f=u.toPoint(a.length);n.position={start:c,end:f}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Al(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Al(e,r,n),n}default:return n=NR(e,t),n}}function Dy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=dh(e,t[n]);r.push(o)}return r}function NR(e,t){const n=e.schema;e.schema=t.namespaceURI===Zi.svg?Ws:dl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],f=(c.prefix?c.prefix+":":"")+c.name;Ly.call(vR,f)||(o[f]=c.value)}const u=(e.schema.space==="svg"?CR:wR)(t.tagName,o,Dy(e,t.childNodes));if(Al(e,t,u),u.tagName==="template"){const c=t,f=c.sourceCodeLocation,h=f&&f.startTag&&Zs(f.startTag),m=f&&f.endTag&&Zs(f.endTag),E=dh(e,c.content);h&&m&&e.file&&(E.position={start:h.end,end:m.start}),u.content=E}return e.schema=n,u}function Al(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=OR(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function OR(e,t,n){const r=Zs(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)Ly.call(n.attrs,u)&&(a[Ld(e.schema,u).property]=Zs(n.attrs[u]));n.startTag;const c=Zs(n.startTag),f=n.endTag?Zs(n.endTag):void 0,h={opening:c};f&&(h.closing=f),h.properties=a,t.data={position:h}}}return r}function Zs(e){const t=My({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=My({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function My(e){return e.line&&e.column?e:void 0}class Ea{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ea.prototype.property={},Ea.prototype.normal={},Ea.prototype.space=null;function Fy(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 Ea(n,r,t)}function hh(e){return e.toLowerCase()}class Gn{constructor(t,n){this.property=t,this.attribute=n}}Gn.prototype.space=null,Gn.prototype.boolean=!1,Gn.prototype.booleanish=!1,Gn.prototype.overloadedBoolean=!1,Gn.prototype.number=!1,Gn.prototype.commaSeparated=!1,Gn.prototype.spaceSeparated=!1,Gn.prototype.commaOrSpaceSeparated=!1,Gn.prototype.mustUseProperty=!1,Gn.prototype.defined=!1;let IR=0;const je=es(),Ft=es(),By=es(),me=es(),ft=es(),eo=es(),Mn=es();function es(){return Qc(2,++IR)}const ph=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Ft,commaOrSpaceSeparated:Mn,commaSeparated:eo,number:me,overloadedBoolean:By,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),mh=Object.keys(ph);class gh extends Gn{constructor(t,n,r,o){let a=-1;if(super(t,n),Uy(this,"space",o),typeof r=="number")for(;++a<mh.length;){const u=mh[a];Uy(this,mh[a],(r&ph[u])===ph[u])}}}gh.prototype.defined=!0;function Uy(e,t,n){n&&(e[t]=n)}const PR={}.hasOwnProperty;function to(e){const t={},n={};let r;for(r in e.properties)if(PR.call(e.properties,r)){const o=e.properties[r],a=new gh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[hh(r)]=r,n[hh(a.attribute)]=r}return new Ea(t,n,e.space)}const Hy=to({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}}),zy=to({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function jy(e,t){return t in e?e[t]:t}function $y(e,t){return jy(e,t.toLowerCase())}const Vy=to({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:$y,properties:{xmlns:null,xmlnsXLink:null}}),qy=to({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ft,ariaAutoComplete:null,ariaBusy:Ft,ariaChecked:Ft,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:Ft,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:Ft,ariaFlowTo:ft,ariaGrabbed:Ft,ariaHasPopup:null,ariaHidden:Ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:me,ariaLive:null,ariaModal:Ft,ariaMultiLine:Ft,ariaMultiSelectable:Ft,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Ft,ariaReadOnly:Ft,ariaRelevant:null,ariaRequired:Ft,ariaRoleDescription:ft,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Ft,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}}),RR=to({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:$y,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:eo,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:ft,autoFocus:je,autoPlay:je,blocking:ft,capture:null,charSet:null,checked:je,cite:null,className:ft,cols:me,colSpan:null,content:null,contentEditable:Ft,controls:je,controlsList:ft,coords:me|eo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:By,draggable:Ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:ft,height:me,hidden:je,high:me,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:ft,itemRef:ft,itemScope:je,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:me,pattern:null,ping:ft,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:ft,required:je,reversed:je,rows:me,rowSpan:me,sandbox:ft,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Ft,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:je,useMap:null,value:Ft,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,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:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Ft,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:je,disableRemotePlayback:je,prefix:null,property:null,results:me,security:null,unselectable:null}}),LR=to({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:jy,properties:{about:Mn,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:ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:je,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:eo,g2:eo,glyphName:eo,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:Mn,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:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mn,rev:Mn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mn,requiredFeatures:Mn,requiredFonts:Mn,requiredFormats:Mn,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:Mn,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:Mn,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:Mn,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}}),DR=/^data[-\w.:]+$/i,Yy=/-[a-z]/g,MR=/[A-Z]/g;function FR(e,t){const n=hh(t);let r=t,o=Gn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&DR.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Yy,UR);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Yy.test(a)){let u=a.replace(MR,BR);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=gh}return new o(r,t)}function BR(e){return"-"+e.toLowerCase()}function UR(e){return e.charAt(1).toUpperCase()}const HR=Fy([zy,Hy,Vy,qy,RR],"html"),Wy=Fy([zy,Hy,Vy,qy,LR],"svg"),Gy={}.hasOwnProperty;function Ky(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&Gy.call(o,e)){const f=String(o[e]);u=Gy.call(c,f)?c[f]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const zR={},jR={}.hasOwnProperty,Qy=Ky("type",{handlers:{root:VR,element:KR,text:WR,comment:GR,doctype:YR}});function $R(e,t){const r=(t||zR).space;return Qy(e,r==="svg"?Wy:HR)}function VR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Eh(e.children,n,t),no(e,n),n}function qR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Eh(e.children,n,t),no(e,n),n}function YR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return no(e,t),t}function WR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return no(e,t),t}function GR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return no(e,t),t}function KR(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Wy);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&jR.call(e.properties,a)){const f=QR(r,a,e.properties[a]);f&&o.push(f)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Zi[u],childNodes:[],parentNode:null};return c.childNodes=Eh(e.children,c,r),no(e,c),e.tagName==="template"&&e.content&&(c.content=qR(e.content,r)),c}function QR(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?fE(n):wE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=Zi[r.space]}return o}function Eh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Qy(e[r],n);a.parentNode=t,o.push(a)}return o}function no(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const XR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],JR=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]),bt="�";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 Cn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Xy(e){return e>=55296&&e<=57343}function ZR(e){return e>=56320&&e<=57343}function eL(e,t){return(e-55296)*1024+9216+t}function Jy(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||JR.has(e)}var X;(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"})(X||(X={}));const tL=65536;class nL{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=tL,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(ZR(n))return this.pos++,this._addGap(),eL(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(X.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,Xy(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){Jy(t)?this._err(X.controlCharacterInInputStream):Zy(t)&&this._err(X.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 eT(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 rL=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))),iL=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 sL(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=iL.get(e))!==null&&t!==void 0?t:e}var Vt;(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"})(Vt||(Vt={}));const oL=32;var mi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(mi||(mi={}));function yh(e){return e>=Vt.ZERO&&e<=Vt.NINE}function aL(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_F||e>=Vt.LOWER_A&&e<=Vt.LOWER_F}function uL(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_Z||e>=Vt.LOWER_A&&e<=Vt.LOWER_Z||yh(e)}function lL(e){return e===Vt.EQUALS||uL(e)}var qt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(qt||(qt={}));var Qr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Qr||(Qr={}));class cL{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Qr.Strict}startEntity(t){this.decodeMode=t,this.state=qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case qt.EntityStart:return t.charCodeAt(n)===Vt.NUM?(this.state=qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=qt.NamedEntity,this.stateNamedEntity(t,n));case qt.NumericStart:return this.stateNumericStart(t,n);case qt.NumericDecimal:return this.stateNumericDecimal(t,n);case qt.NumericHex:return this.stateNumericHex(t,n);case qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|oL)===Vt.LOWER_X?(this.state=qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=qt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(yh(o)||aL(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(yh(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===Vt.SEMI)this.consumed+=1;else if(this.decodeMode===Qr.Strict)return 0;return this.emitCodePoint(sL(this.result),this.consumed),this.errors&&(t!==Vt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&mi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=fL(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Qr.Attribute&&(a===0||lL(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&mi.VALUE_LENGTH)>>14,a!==0){if(u===Vt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Qr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&mi.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]&~mi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case qt.NamedEntity:return this.result!==0&&(this.decodeMode!==Qr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case qt.NumericDecimal:return this.emitNumericEntity(0,2);case qt.NumericHex:return this.emitNumericEntity(0,3);case qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case qt.EntityStart:return 0}}}function fL(e,t,n,r){const o=(t&mi.BRANCH_LENGTH)>>7,a=t&mi.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const f=r-a;return f<0||f>=o?-1:e[n+f]-1}let u=n,c=u+o-1;for(;u<=c;){const f=u+c>>>1,h=e[f];if(h<r)u=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 ts;(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"})(ts||(ts={}));var Kn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Kn||(Kn={}));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 dL=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 ro(e){var t;return(t=dL.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const ae=p,hL={[re.HTML]:new Set([ae.ADDRESS,ae.APPLET,ae.AREA,ae.ARTICLE,ae.ASIDE,ae.BASE,ae.BASEFONT,ae.BGSOUND,ae.BLOCKQUOTE,ae.BODY,ae.BR,ae.BUTTON,ae.CAPTION,ae.CENTER,ae.COL,ae.COLGROUP,ae.DD,ae.DETAILS,ae.DIR,ae.DIV,ae.DL,ae.DT,ae.EMBED,ae.FIELDSET,ae.FIGCAPTION,ae.FIGURE,ae.FOOTER,ae.FORM,ae.FRAME,ae.FRAMESET,ae.H1,ae.H2,ae.H3,ae.H4,ae.H5,ae.H6,ae.HEAD,ae.HEADER,ae.HGROUP,ae.HR,ae.HTML,ae.IFRAME,ae.IMG,ae.INPUT,ae.LI,ae.LINK,ae.LISTING,ae.MAIN,ae.MARQUEE,ae.MENU,ae.META,ae.NAV,ae.NOEMBED,ae.NOFRAMES,ae.NOSCRIPT,ae.OBJECT,ae.OL,ae.P,ae.PARAM,ae.PLAINTEXT,ae.PRE,ae.SCRIPT,ae.SECTION,ae.SELECT,ae.SOURCE,ae.STYLE,ae.SUMMARY,ae.TABLE,ae.TBODY,ae.TD,ae.TEMPLATE,ae.TEXTAREA,ae.TFOOT,ae.TH,ae.THEAD,ae.TITLE,ae.TR,ae.TRACK,ae.UL,ae.WBR,ae.XMP]),[re.MATHML]:new Set([ae.MI,ae.MO,ae.MN,ae.MS,ae.MTEXT,ae.ANNOTATION_XML]),[re.SVG]:new Set([ae.TITLE,ae.FOREIGN_OBJECT,ae.DESC]),[re.XLINK]:new Set,[re.XML]:new Set,[re.XMLNS]:new Set},Th=new Set([ae.H1,ae.H2,ae.H3,ae.H4,ae.H5,ae.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 Pt={DATA:v.DATA,RCDATA:v.RCDATA,RAWTEXT:v.RAWTEXT,SCRIPT_DATA:v.SCRIPT_DATA,PLAINTEXT:v.PLAINTEXT,CDATA_SECTION:v.CDATA_SECTION};function pL(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function ya(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function mL(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function gi(e){return mL(e)||ya(e)}function tT(e){return gi(e)||pL(e)}function vl(e){return e+32}function nT(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function rT(e){return nT(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function gL(e){return e===A.NULL?X.nullCharacterReference:e>1114111?X.characterReferenceOutsideUnicodeRange:Xy(e)?X.surrogateCharacterReference:Zy(e)?X.noncharacterCharacterReference:Jy(e)||e===A.CARRIAGE_RETURN?X.controlCharacterReference:null}class EL{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 nL(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new cL(rL,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(X.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(X.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=gL(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(eT(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(X.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=ro(t.tagName),t.type===qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(X.endTagWithAttributes),t.selfClosing&&this._err(X.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=nT(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()?Qr.Attribute:Qr.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(X.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(X.unexpectedNullCharacter),this._emitChars(bt);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(X.unexpectedNullCharacter),this._emitChars(bt);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(X.unexpectedNullCharacter),this._emitChars(bt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(X.unexpectedNullCharacter),this._emitChars(bt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(gi(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(X.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=v.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(X.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(X.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=v.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(gi(t))this._createEndTagToken(),this.state=v.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(X.missingEndTagName),this.state=v.DATA;break}case A.EOF:{this._err(X.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(X.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(X.unexpectedNullCharacter),n.tagName+=bt;break}case A.EOF:{this._err(X.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ya(t)?vl(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){gi(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){gi(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){gi(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(X.unexpectedNullCharacter),this._emitChars(bt);break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_ESCAPED,this._emitChars(bt);break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_ESCAPED,this._emitChars(bt);break}case A.EOF:{this._err(X.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:gi(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){gi(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(Cn.SCRIPT,!1)&&rT(this.preprocessor.peek(Cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Cn.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(X.unexpectedNullCharacter),this._emitChars(bt);break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(bt);break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(bt);break}case A.EOF:{this._err(X.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(Cn.SCRIPT,!1)&&rT(this.preprocessor.peek(Cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Cn.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(X.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(X.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(X.unexpectedNullCharacter),this.currentAttr.name+=bt;break}default:this.currentAttr.name+=String.fromCodePoint(ya(t)?vl(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(X.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(X.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(X.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(X.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(X.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(X.eofInTag),this._emitEOFToken();break}default:this._err(X.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(X.eofInTag),this._emitEOFToken();break}default:this._err(X.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(X.unexpectedNullCharacter),n.data+=bt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Cn.DASH_DASH,!0)?(this._createCommentToken(Cn.DASH_DASH.length+1),this.state=v.COMMENT_START):this._consumeSequenceIfMatch(Cn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Cn.DOCTYPE.length+1),this.state=v.DOCTYPE):this._consumeSequenceIfMatch(Cn.CDATA_START,!0)?this.inForeignNode?this.state=v.CDATA_SECTION:(this._err(X.cdataInHtmlContent),this._createCommentToken(Cn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=v.BOGUS_COMMENT):this._ensureHibernation()||(this._err(X.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(X.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(X.abruptClosingOfEmptyComment),this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),n.data+=bt;break}case A.EOF:{this._err(X.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(X.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(X.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(X.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(X.incorrectlyClosedComment),this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(X.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(X.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.missingWhitespaceBeforeDoctypeName),this.state=v.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ya(t))this._createDoctypeToken(String.fromCharCode(vl(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(X.unexpectedNullCharacter),this._createDoctypeToken(bt),this.state=v.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(X.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),n.name+=bt;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ya(t)?vl(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(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Cn.PUBLIC,!1)?this.state=v.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Cn.SYSTEM,!1)?this.state=v.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(X.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(X.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(X.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(X.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.unexpectedNullCharacter),n.publicId+=bt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),n.publicId+=bt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.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(X.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(X.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(X.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(X.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.unexpectedNullCharacter),n.systemId+=bt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),n.systemId+=bt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.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(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.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(X.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()&&tT(this.preprocessor.peek(1))?v.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){tT(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(X.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const iT=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),sT=new Set([...iT,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),kl=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),yL=new Set([...kl,p.OL,p.UL]),TL=new Set([...kl,p.BUTTON]),oT=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),aT=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),bL=new Set([p.TR,p.TEMPLATE,p.HTML]),_L=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),xL=new Set([p.TABLE,p.TEMPLATE,p.HTML]),SL=new Set([p.TD,p.TH]);class wL{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(Th,re.HTML)}popUntilTableCellPopped(){this.popUntilPopped(SL,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(xL,re.HTML)}clearBackToTableBodyContext(){this.clearBackTo(_L,re.HTML)}clearBackToTableRowContext(){this.clearBackTo(bL,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(aT.has(o))return!1;break}case re.MATHML:{if(oT.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,kl)}hasInListItemScope(t){return this.hasInDynamicScope(t,yL)}hasInButtonScope(t){return this.hasInDynamicScope(t,TL)}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(Th.has(n))return!0;if(kl.has(n))return!1;break}case re.SVG:{if(aT.has(n))return!1;break}case re.MATHML:{if(oT.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&&iT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&sT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&sT.has(this.currentTagId);)this.pop()}}const bh=3;var Pr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Pr||(Pr={}));const uT={type:Pr.Marker};class CL{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===Pr.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===a&&this.treeAdapter.getNamespaceURI(h)===u){const m=this.treeAdapter.getAttrList(h);m.length===o&&r.push({idx:c,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<bh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<bh)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(f=>o.get(f.name)===f.value)&&(a+=1,a>=bh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(uT)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Pr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Pr.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(uT);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Pr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Pr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Pr.Element&&n.element===t)}}const Ei={createDocument(){return{nodeName:"#document",mode:Kn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ei.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ei.isTextNode(n)){n.value+=t;return}}Ei.appendChild(e,Ei.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ei.isTextNode(r)?r.value+=t:Ei.insertBefore(e,Ei.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)}},lT="html",AL="about:legacy-compat",vL="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",cT=["+//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//"],kL=[...cT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],NL=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),fT=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],OL=[...fT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function dT(e,t){return t.some(n=>e.startsWith(n))}function IL(e){return e.name===lT&&e.publicId===null&&(e.systemId===null||e.systemId===AL)}function PL(e){if(e.name!==lT)return Kn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===vL)return Kn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),NL.has(n))return Kn.QUIRKS;let r=t===null?kL:cT;if(dT(n,r))return Kn.QUIRKS;if(r=t===null?fT:OL,dT(n,r))return Kn.LIMITED_QUIRKS}return Kn.NO_QUIRKS}const hT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},RL="definitionurl",LL="definitionURL",DL=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])),ML=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])),BL=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 UL(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:r})=>r===ts.COLOR||r===ts.SIZE||r===ts.FACE)||BL.has(t)}function pT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===RL){e.attrs[t].name=LL;break}}function mT(e){for(let t=0;t<e.attrs.length;t++){const n=DL.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function _h(e){for(let t=0;t<e.attrs.length;t++){const n=ML.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 HL(e){const t=FL.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ro(e.tagName))}function zL(e,t){return t===re.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function jL(e,t,n){if(t===re.MATHML&&e===p.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ts.ENCODING){const o=n[r].value.toLowerCase();return o===hT.TEXT_HTML||o===hT.APPLICATION_XML}}return t===re.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function $L(e,t,n,r){return(!r||r===re.HTML)&&jL(e,t,n)||(!r||r===re.MATHML)&&zL(e,t)}const VL="hidden",qL=8,YL=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 WL={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},gT=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),ET={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ei,onParseError:null};class yT{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({},ET),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 EL(this.options,this),this.activeFormattingElements=new CL(this.treeAdapter),this.fragmentContextID=r?ro(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new wL(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({},ET),n);t!=null||(t=r.treeAdapter.createElement(j.TEMPLATE,re.HTML,[]));const o=r.treeAdapter.createElement("documentmock",re.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===p.TEMPLATE&&a.tmplInsertionModeStack.unshift(P.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:WL,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===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=Pt.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=Pt.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=Pt.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=Pt.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=Pt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&ye(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),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:f,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:f,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),a=n.type===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,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===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),a=this.treeAdapter.getAttrList(n);return $L(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Pr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=P.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=P.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=P.IN_TABLE;return}case p.BODY:{this.insertionMode=P.IN_BODY;return}case p.FRAMESET:{this.insertionMode=P.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?P.AFTER_HEAD:P.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===p.TEMPLATE)break;if(r===p.TABLE){this.insertionMode=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return gT.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 hL[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){SD(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ta(this,t);break}case P.BEFORE_HTML:{ba(this,t);break}case P.BEFORE_HEAD:{_a(this,t);break}case P.IN_HEAD:{xa(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Sa(this,t);break}case P.AFTER_HEAD:{wa(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{bT(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:{Ch(this,t);break}case P.IN_TABLE_TEXT:{kT(this,t);break}case P.IN_COLUMN_GROUP:{Il(this,t);break}case P.AFTER_BODY:{Ll(this,t);break}case P.AFTER_AFTER_BODY:{Dl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){xD(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ta(this,t);break}case P.BEFORE_HTML:{ba(this,t);break}case P.BEFORE_HEAD:{_a(this,t);break}case P.IN_HEAD:{xa(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Sa(this,t);break}case P.AFTER_HEAD:{wa(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Ch(this,t);break}case P.IN_COLUMN_GROUP:{Il(this,t);break}case P.AFTER_BODY:{Ll(this,t);break}case P.AFTER_AFTER_BODY:{Dl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Sh(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:{Sh(this,t);break}case P.IN_TABLE_TEXT:{va(this,t);break}case P.AFTER_BODY:{e6(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{t6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{n6(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,X.misplacedDoctype);break}case P.IN_TABLE_TEXT:{va(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,X.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?wD(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ta(this,t);break}case P.BEFORE_HTML:{r6(this,t);break}case P.BEFORE_HEAD:{s6(this,t);break}case P.IN_HEAD:{hr(this,t);break}case P.IN_HEAD_NO_SCRIPT:{u6(this,t);break}case P.AFTER_HEAD:{c6(this,t);break}case P.IN_BODY:{sn(this,t);break}case P.IN_TABLE:{io(this,t);break}case P.IN_TABLE_TEXT:{va(this,t);break}case P.IN_CAPTION:{oD(this,t);break}case P.IN_COLUMN_GROUP:{Ah(this,t);break}case P.IN_TABLE_BODY:{Pl(this,t);break}case P.IN_ROW:{Rl(this,t);break}case P.IN_CELL:{lD(this,t);break}case P.IN_SELECT:{IT(this,t);break}case P.IN_SELECT_IN_TABLE:{fD(this,t);break}case P.IN_TEMPLATE:{hD(this,t);break}case P.AFTER_BODY:{mD(this,t);break}case P.IN_FRAMESET:{gD(this,t);break}case P.AFTER_FRAMESET:{yD(this,t);break}case P.AFTER_AFTER_BODY:{bD(this,t);break}case P.AFTER_AFTER_FRAMESET:{_D(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?CD(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ta(this,t);break}case P.BEFORE_HTML:{i6(this,t);break}case P.BEFORE_HEAD:{o6(this,t);break}case P.IN_HEAD:{a6(this,t);break}case P.IN_HEAD_NO_SCRIPT:{l6(this,t);break}case P.AFTER_HEAD:{f6(this,t);break}case P.IN_BODY:{Ol(this,t);break}case P.TEXT:{Q6(this,t);break}case P.IN_TABLE:{Ca(this,t);break}case P.IN_TABLE_TEXT:{va(this,t);break}case P.IN_CAPTION:{aD(this,t);break}case P.IN_COLUMN_GROUP:{uD(this,t);break}case P.IN_TABLE_BODY:{vh(this,t);break}case P.IN_ROW:{OT(this,t);break}case P.IN_CELL:{cD(this,t);break}case P.IN_SELECT:{PT(this,t);break}case P.IN_SELECT_IN_TABLE:{dD(this,t);break}case P.IN_TEMPLATE:{pD(this,t);break}case P.AFTER_BODY:{LT(this,t);break}case P.IN_FRAMESET:{ED(this,t);break}case P.AFTER_FRAMESET:{TD(this,t);break}case P.AFTER_AFTER_BODY:{Dl(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{Ta(this,t);break}case P.BEFORE_HTML:{ba(this,t);break}case P.BEFORE_HEAD:{_a(this,t);break}case P.IN_HEAD:{xa(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Sa(this,t);break}case P.AFTER_HEAD:{wa(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:{AT(this,t);break}case P.TEXT:{X6(this,t);break}case P.IN_TABLE_TEXT:{va(this,t);break}case P.IN_TEMPLATE:{RT(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:{wh(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:{TT(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Ch(this,t);break}case P.IN_TABLE_TEXT:{vT(this,t);break}}}}function GL(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):CT(e,t),n}function KL(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 QL(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),f=c&&a>=YL;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=XL(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function XL(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 JL(e,t,n){const r=e.treeAdapter.getTagName(t),o=ro(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===p.TEMPLATE&&a===re.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ZL(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function xh(e,t){for(let n=0;n<qL;n++){const r=GL(e,t);if(!r)break;const o=KL(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=QL(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&JL(e,u,a),ZL(e,o,r)}}function Sh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function e6(e,t){e._appendCommentNode(t,e.openElements.items[0])}function t6(e,t){e._appendCommentNode(t,e.document)}function wh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function n6(e,t){e._setDocumentType(t);const n=t.forceQuirks?Kn.QUIRKS:PL(t);IL(t)||e._err(t,X.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function Ta(e,t){e._err(t,X.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Kn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function r6(e,t){t.tagID===p.HTML?(e._insertElement(t,re.HTML),e.insertionMode=P.BEFORE_HEAD):ba(e,t)}function i6(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&ba(e,t)}function ba(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function s6(e,t){switch(t.tagID){case p.HTML:{sn(e,t);break}case p.HEAD:{e._insertElement(t,re.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:_a(e,t)}}function o6(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?_a(e,t):e._err(t,X.endTagWithoutMatchingOpenElement)}function _a(e,t){e._insertFakeElement(j.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function hr(e,t){switch(t.tagID){case p.HTML:{sn(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,Pt.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Pt.RAWTEXT):(e._insertElement(t,re.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,Pt.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,Pt.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,X.misplacedStartTagForHeadElement);break}default:xa(e,t)}}function a6(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:{xa(e,t);break}case p.TEMPLATE:{ns(e,t);break}default:e._err(t,X.endTagWithoutMatchingOpenElement)}}function ns(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,X.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,X.endTagWithoutMatchingOpenElement)}function xa(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function u6(e,t){switch(t.tagID){case p.HTML:{sn(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{hr(e,t);break}case p.NOSCRIPT:{e._err(t,X.nestedNoscriptInHead);break}default:Sa(e,t)}}function l6(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case p.BR:{Sa(e,t);break}default:e._err(t,X.endTagWithoutMatchingOpenElement)}}function Sa(e,t){const n=t.type===qe.EOF?X.openElementsLeftAfterEof:X.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function c6(e,t){switch(t.tagID){case p.HTML:{sn(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,X.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),hr(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,X.misplacedStartTagForHeadElement);break}default:wa(e,t)}}function f6(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{wa(e,t);break}case p.TEMPLATE:{ns(e,t);break}default:e._err(t,X.endTagWithoutMatchingOpenElement)}}function wa(e,t){e._insertFakeElement(j.BODY,p.BODY),e.insertionMode=P.IN_BODY,Nl(e,t)}function Nl(e,t){switch(t.type){case qe.CHARACTER:{bT(e,t);break}case qe.WHITESPACE_CHARACTER:{TT(e,t);break}case qe.COMMENT:{Sh(e,t);break}case qe.START_TAG:{sn(e,t);break}case qe.END_TAG:{Ol(e,t);break}case qe.EOF:{AT(e,t);break}}}function TT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function bT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function d6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function h6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function p6(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 m6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML)}function g6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Th.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,re.HTML)}function E6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function y6(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 T6(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 b6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.tokenizer.state=Pt.PLAINTEXT}function _6(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 x6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(xh(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 S6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function w6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(xh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function C6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function A6(e,t){e.treeAdapter.getDocumentMode(e.document)!==Kn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function _T(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,re.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xT(e){const t=eT(e,ts.TYPE);return t!=null&&t.toLowerCase()===VL}function v6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,re.HTML),xT(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function k6(e,t){e._appendElement(t,re.HTML),t.ackSelfClosing=!0}function N6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,re.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function O6(e,t){t.tagName=j.IMG,t.tagID=p.IMG,_T(e,t)}function I6(e,t){e._insertElement(t,re.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Pt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function P6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Pt.RAWTEXT)}function R6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Pt.RAWTEXT)}function ST(e,t){e._switchToTextParsing(t,Pt.RAWTEXT)}function L6(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 D6(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML)}function M6(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 B6(e,t){e._reconstructActiveFormattingElements(),pT(t),_h(t),t.selfClosing?e._appendElement(t,re.MATHML):e._insertElement(t,re.MATHML),t.ackSelfClosing=!0}function U6(e,t){e._reconstructActiveFormattingElements(),mT(t),_h(t),t.selfClosing?e._appendElement(t,re.SVG):e._insertElement(t,re.SVG),t.ackSelfClosing=!0}function wT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML)}function sn(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:{S6(e,t);break}case p.A:{x6(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{g6(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:{m6(e,t);break}case p.LI:case p.DD:case p.DT:{T6(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{_T(e,t);break}case p.HR:{N6(e,t);break}case p.RB:case p.RTC:{M6(e,t);break}case p.RT:case p.RP:{F6(e,t);break}case p.PRE:case p.LISTING:{E6(e,t);break}case p.XMP:{P6(e,t);break}case p.SVG:{U6(e,t);break}case p.HTML:{d6(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:{hr(e,t);break}case p.BODY:{h6(e,t);break}case p.FORM:{y6(e,t);break}case p.NOBR:{w6(e,t);break}case p.MATH:{B6(e,t);break}case p.TABLE:{A6(e,t);break}case p.INPUT:{v6(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{k6(e,t);break}case p.IMAGE:{O6(e,t);break}case p.BUTTON:{_6(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{C6(e,t);break}case p.IFRAME:{R6(e,t);break}case p.SELECT:{L6(e,t);break}case p.OPTION:case p.OPTGROUP:{D6(e,t);break}case p.NOEMBED:case p.NOFRAMES:{ST(e,t);break}case p.FRAMESET:{p6(e,t);break}case p.TEXTAREA:{I6(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?ST(e,t):wT(e,t);break}case p.PLAINTEXT:{b6(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:wT(e,t)}}function H6(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 z6(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,LT(e,t))}function j6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function $6(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 V6(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(j.P,p.P),e._closePElement()}function q6(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function Y6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function W6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function G6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function K6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function CT(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==p.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Ol(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:{xh(e,t);break}case p.P:{V6(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:{j6(e,t);break}case p.LI:{q6(e);break}case p.DD:case p.DT:{Y6(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{W6(e);break}case p.BR:{K6(e);break}case p.BODY:{H6(e,t);break}case p.HTML:{z6(e,t);break}case p.FORM:{$6(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{G6(e,t);break}case p.TEMPLATE:{ns(e,t);break}default:CT(e,t)}}function AT(e,t){e.tmplInsertionModeStack.length>0?RT(e,t):wh(e,t)}function Q6(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 X6(e,t){e._err(t,X.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ch(e,t){if(e.openElements.currentTagId!==void 0&&gT.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:{kT(e,t);break}case qe.WHITESPACE_CHARACTER:{vT(e,t);break}}else Aa(e,t)}function J6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_CAPTION}function Z6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function eD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,p.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,Ah(e,t)}function tD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_TABLE_BODY}function nD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,p.TBODY),e.insertionMode=P.IN_TABLE_BODY,Pl(e,t)}function rD(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function iD(e,t){xT(t)?e._appendElement(t,re.HTML):Aa(e,t),t.ackSelfClosing=!0}function sD(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,re.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function io(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{nD(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{hr(e,t);break}case p.COL:{eD(e,t);break}case p.FORM:{sD(e,t);break}case p.TABLE:{rD(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{tD(e,t);break}case p.INPUT:{iD(e,t);break}case p.CAPTION:{J6(e,t);break}case p.COLGROUP:{Z6(e,t);break}default:Aa(e,t)}}function Ca(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{ns(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:Aa(e,t)}}function Aa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Nl(e,t),e.fosterParentingEnabled=n}function vT(e,t){e.pendingCharacterTokens.push(t)}function kT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function va(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Aa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const NT=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function oD(e,t){const n=t.tagID;NT.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,io(e,t)):sn(e,t)}function aD(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&&Ca(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:Ol(e,t)}}function Ah(e,t){switch(t.tagID){case p.HTML:{sn(e,t);break}case p.COL:{e._appendElement(t,re.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{hr(e,t);break}default:Il(e,t)}}function uD(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:{ns(e,t);break}case p.COL:break;default:Il(e,t)}}function Il(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function Pl(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,Rl(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,io(e,t));break}default:io(e,t)}}function vh(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,Ca(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:Ca(e,t)}}function Rl(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,Pl(e,t));break}default:io(e,t)}}function OT(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,vh(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,vh(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:Ca(e,t)}}function lD(e,t){const n=t.tagID;NT.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),Rl(e,t)):sn(e,t)}function cD(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(),OT(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Ol(e,t)}}function IT(e,t){switch(t.tagID){case p.HTML:{sn(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:{hr(e,t);break}}}function PT(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:{ns(e,t);break}}}function fD(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)):IT(e,t)}function dD(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)):PT(e,t)}function hD(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:{hr(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,io(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,Ah(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,Pl(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,Rl(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,sn(e,t)}}function pD(e,t){t.tagID===p.TEMPLATE&&ns(e,t)}function RT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wh(e,t)}function mD(e,t){t.tagID===p.HTML?sn(e,t):Ll(e,t)}function LT(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 Ll(e,t)}function Ll(e,t){e.insertionMode=P.IN_BODY,Nl(e,t)}function gD(e,t){switch(t.tagID){case p.HTML:{sn(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:{hr(e,t);break}}}function ED(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 yD(e,t){switch(t.tagID){case p.HTML:{sn(e,t);break}case p.NOFRAMES:{hr(e,t);break}}}function TD(e,t){t.tagID===p.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function bD(e,t){t.tagID===p.HTML?sn(e,t):Dl(e,t)}function Dl(e,t){e.insertionMode=P.IN_BODY,Nl(e,t)}function _D(e,t){switch(t.tagID){case p.HTML:{sn(e,t);break}case p.NOFRAMES:{hr(e,t);break}}}function xD(e,t){t.chars=bt,e._insertCharacters(t)}function SD(e,t){e._insertCharacters(t),e.framesetOk=!1}function DT(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 wD(e,t){if(UL(t))DT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===re.MATHML?pT(t):r===re.SVG&&(HL(t),mT(t)),_h(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function CD(e,t){if(t.tagID===p.P||t.tagID===p.BR){DT(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 AD=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,vD=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),MT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function FT(e,t){const n=FD(e),r=Ky("type",{handlers:{root:kD,element:ND,text:OD,comment:UT,doctype:ID,raw:RD},unknown:LD}),o={parser:n?new yT(MT):yT.getFragmentParser(void 0,MT),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),so(o,Or());const a=n?o.parser.document:o.parser.getFragment(),u=kR(a,{file:o.options.file});return o.stitches&&wl(u,"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}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function BT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function kD(e,t){BT(e.children,t)}function ND(e,t){DD(e,t),BT(e.children,t),MD(e,t)}function OD(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:ka(e)};so(t,Or(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ID(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ka(e)};so(t,Or(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function PD(e,t){t.stitches=!0;const n=BD(e);if("children"in e&&"children"in n){const r=FT({type:"root",children:e.children},t.options);n.children=r.children}UT({type:"comment",value:{stitch:n}},t)}function UT(e,t){const n=e.value,r={type:qe.COMMENT,data:n,location:ka(e)};so(t,Or(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function RD(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,HT(t,Or(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(AD,"&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 LD(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))PD(n,t);else{let r="";throw vD.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function so(e,t){HT(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=Pt.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 HT(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 DD(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Pt.PLAINTEXT)return;so(t,Or(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Zi.html;o===Zi.html&&n==="svg"&&(o=Zi.svg);const a=$R(ye(U({},e),{children:[]}),{space:o===Zi.svg?"svg":"html"}),u={type:qe.START_TAG,tagName:n,tagID:ro(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ka(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function MD(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&XR.includes(n)||t.parser.tokenizer.state===Pt.PLAINTEXT)return;so(t,hl(e));const r={type:qe.END_TAG,tagName:n,tagID:ro(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ka(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Pt.RCDATA||t.parser.tokenizer.state===Pt.RAWTEXT||t.parser.tokenizer.state===Pt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Pt.DATA)}function FD(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ka(e){const t=Or(e)||{line:void 0,column:void 0,offset:void 0},n=hl(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 BD(e){return"children"in e?Js(ye(U({},e),{children:[]})):Js(e)}function UD(e){return function(t,n){return FT(t,ye(U({},e),{file:n}))}}function zT(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 HD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function zD(e,t,n){const o=xl((n||{}).ignore||[]),a=jD(t);let u=-1;for(;++u<a.length;)Ty(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=a[u][0],T=a[u][1];let _=0;const C=E.children.indexOf(h);let I=!1,F=[];b.lastIndex=0;let D=b.exec(h.value);for(;D;){const G=D.index,W={index:D.index,input:D.input,stack:[...m,h]};let B=T(...D,W);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?b.lastIndex=G+1:(_!==G&&F.push({type:"text",value:h.value.slice(_,G)}),Array.isArray(B)?F.push(...B):B&&F.push(B),_=G+D[0].length,I=!0),!b.global)break;D=b.exec(h.value)}return I?(_<h.value.length&&F.push({type:"text",value:h.value.slice(_)}),E.children.splice(C,1,...F)):F=[h],C+F.length}}function jD(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([$D(o[0]),VD(o[1])])}return t}function $D(e){return typeof e=="string"?new RegExp(HD(e),"g"):e}function VD(e){return typeof e=="function"?e:function(){return e}}const kh="phrasing",Nh=["autolink","link","image","label"];function qD(){return{transforms:[JD],enter:{literalAutolink:WD,literalAutolinkEmail:Oh,literalAutolinkHttp:Oh,literalAutolinkWww:Oh},exit:{literalAutolink:XD,literalAutolinkEmail:QD,literalAutolinkHttp:GD,literalAutolinkWww:KD}}}function YD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:kh,notInConstruct:Nh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:kh,notInConstruct:Nh},{character:":",before:"[ps]",after:"\\/",inConstruct:kh,notInConstruct:Nh}]}}function WD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Oh(e){this.config.enter.autolinkProtocol.call(this,e)}function GD(e){this.config.exit.autolinkProtocol.call(this,e)}function KD(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 QD(e){this.config.exit.autolinkEmail.call(this,e)}function XD(e){this.exit(e)}function JD(e){zD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ZD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),e4]],{ignore:["link","linkReference"]})}function ZD(e,t,n,r,o){let a="";if(!jT(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!t4(n)))return!1;const u=n4(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function e4(e,t,n,r){return!jT(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function t4(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 n4(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=zT(e,"(");let a=zT(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function jT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ji(n)||ml(n))&&(!t||n!==47)}$T.peek=f4;function r4(){this.buffer()}function i4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function s4(){this.buffer()}function o4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function a4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function u4(e){this.exit(e)}function l4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function c4(e){this.exit(e)}function f4(){return"["}function $T(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function d4(){return{enter:{gfmFootnoteCallString:r4,gfmFootnoteCall:i4,gfmFootnoteDefinitionLabelString:s4,gfmFootnoteDefinition:o4},exit:{gfmFootnoteCallString:a4,gfmFootnoteCall:u4,gfmFootnoteDefinitionLabelString:l4,gfmFootnoteDefinition:c4}}}function h4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:$T},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let f=c.move("[^");const h=a.enter("footnoteDefinition"),m=a.enter("label");return f+=c.move(a.safe(a.associationId(r),{before:f,after:"]"})),m(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
29
- `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?VT:p4))),h(),f}}function p4(e,t,n){return t===0?e:VT(e,t,n)}function VT(e,t,n){return(n?"":" ")+e}const m4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qT.peek=b4;function g4(){return{canContainEols:["delete"],enter:{strikethrough:y4},exit:{strikethrough:T4}}}function E4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:m4}],handlers:{delete:qT}}}function y4(e){this.enter({type:"delete",children:[]},e)}function T4(e){this.exit(e)}function qT(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,ye(U({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function b4(){return"~"}function _4(e){return e.length}function x4(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||_4,a=[],u=[],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 F=S4(e[m][I]);if(n.alignDelimiters!==!1){const D=o(F);C[I]=D,(f[I]===void 0||D>f[I])&&(f[I]=D)}S.push(F)}u[m]=S,c[m]=C}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<h;)a[E]=YT(r[E]);else{const S=YT(r);for(;++E<h;)a[E]=S}E=-1;const b=[],T=[];for(;++E<h;){const S=a[E];let C="",I="";S===99?(C=":",I=":"):S===108?C=":":S===114&&(I=":");let F=n.alignDelimiters===!1?1:Math.max(1,f[E]-C.length-I.length);const D=C+"-".repeat(F)+I;n.alignDelimiters!==!1&&(F=C.length+F+I.length,F>f[E]&&(f[E]=F),T[E]=F),b[E]=D}u.splice(1,0,b),c.splice(1,0,T),m=-1;const _=[];for(;++m<u.length;){const S=u[m],C=c[m];E=-1;const I=[];for(;++E<h;){const F=S[E]||"";let D="",G="";if(n.alignDelimiters!==!1){const W=f[E]-(C[E]||0),B=a[E];B===114?D=" ".repeat(W):B===99?W%2?(D=" ".repeat(W/2+.5),G=" ".repeat(W/2-.5)):(D=" ".repeat(W/2),G=D):G=" ".repeat(W)}n.delimiterStart!==!1&&!E&&I.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&F==="")&&(n.delimiterStart!==!1||E)&&I.push(" "),n.alignDelimiters!==!1&&I.push(D),I.push(F),n.alignDelimiters!==!1&&I.push(G),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 S4(e){return e==null?"":String(e)}function YT(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 w4(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),C4);return o(),u}function C4(e,t,n){return">"+(n?"":" ")+e}function A4(e,t){return WT(e,t.inConstruct,!0)&&!WT(e,t.notInConstruct,!1)}function WT(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 GT(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
31
- `&&A4(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
32
- `}function v4(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function k4(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 N4(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 O4(e,t,n,r){const o=N4(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(k4(e,n)){const E=n.enter("codeIndented"),b=n.indentLines(a,I4);return E(),b}const c=n.createTracker(r),f=o.repeat(Math.max(v4(a,o)+1,3)),h=n.enter("codeFenced");let m=c.move(f);if(e.lang){const E=n.enter(`codeFencedLang${u}`);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${u}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,U({before:m,after:`
26
+ `}),n}function _y(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function xy(e,t){const n=BP(e,t),r=n.one(e,void 0),o=kP(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
27
+ `},o),a}function $P(e,t){return e&&"run"in e?function(n,r){return it(this,null,function*(){const o=xy(n,U({file:r},t));yield e.run(o,r)})}:function(n,r){return xy(n,U({file:r},e||t))}}function Sy(e){if(e)throw e}var rh,wy;function VP(){if(wy)return rh;wy=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]"},a=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)},u=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 rh=function f(){var h,m,E,b,T,_,x=arguments[0],C=1,O=arguments.length,F=!1;for(typeof x=="boolean"&&(F=x,x=arguments[1]||{},C=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});C<O;++C)if(h=arguments[C],h!=null)for(m in h)E=c(x,m),b=c(h,m),x!==b&&(F&&b&&(a(b)||(T=o(b)))?(T?(T=!1,_=E&&o(E)?E:[]):_=E&&a(E)?E:{},u(x,{name:m,newValue:f(F,_,b)})):typeof b!="undefined"&&u(x,{name:m,newValue:b}));return x},rh}var qP=VP();const ih=Ge(qP);function sh(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 YP(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(f,...h){const m=e[++a];let E=-1;if(f){u(f);return}for(;++E<o.length;)(h[E]===null||h[E]===void 0)&&(h[E]=o[E]);o=h,m?WP(m,c)(...h):u(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 WP(e,t){let n;return r;function r(...u){const c=e.length>u.length;let f;c&&u.push(o);try{f=e.apply(this,u)}catch(h){const m=h;if(c&&n)throw m;return o(m)}c||(f&&f.then&&typeof f.then=="function"?f.then(a,o):f instanceof Error?o(f):a(f))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const Or={basename:GP,dirname:KP,extname:QP,join:XP,sep:"/"};function GP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ga(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function KP(e){if(ga(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 QP(e){ga(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function XP(...e){let t=-1,n;for(;++t<e.length;)ga(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":JP(n)}function JP(e){ga(e);const t=e.codePointAt(0)===47;let n=ZP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ZP(e,t){let n="",r=0,o=-1,a=0,u=-1,c,f;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function ga(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const eR={cwd:tR};function tR(){return"/"}function oh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function nR(e){if(typeof e=="string")e=new URL(e);else if(!oh(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 rR(e)}function rR(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ah=["history","path","basename","stem","extname","dirname"];class Cy{constructor(t){let n;t?oh(t)?n={path:t}:typeof t=="string"||iR(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":eR.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ah.length;){const a=ah[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)ah.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Or.basename(this.path):void 0}set basename(t){lh(t,"basename"),uh(t,"basename"),this.path=Or.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Or.dirname(this.path):void 0}set dirname(t){Ay(this.basename,"dirname"),this.path=Or.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Or.extname(this.path):void 0}set extname(t){if(uh(t,"extname"),Ay(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=Or.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){oh(t)&&(t=nR(t)),lh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Or.basename(this.path,this.extname):void 0}set stem(t){lh(t,"stem"),uh(t,"stem"),this.path=Or.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 sn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function uh(e,t){if(e&&e.includes(Or.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Or.sep+"`")}function lh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ay(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function iR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const sR=function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},oR={}.hasOwnProperty;class ch extends sR{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=YP()}copy(){const t=new ch;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ih(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(hh("data",this.frozen),this.namespace[t]=n,this):oR.call(this.namespace,t)&&this.namespace[t]||void 0:t?(hh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Al(t),r=this.parser||this.Parser;return fh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),fh("process",this.parser||this.Parser),dh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=Al(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);lR(_)?b.value=_:b.result=_,h(m,b)});function h(m,E){m||!E?u(m):a?a(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),fh("processSync",this.parser||this.Parser),dh("processSync",this.compiler||this.Compiler),this.process(t,o),ky("processSync","process",n),r;function o(a,u){n=!0,Sy(a),r=u}}run(t,n,r){vy(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const f=Al(n);o.run(t,f,h);function h(m,E,b){const T=E||t;m?c(m):u?u(T):r(void 0,T,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),ky("runSync","run",r),o;function a(u,c){Sy(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=Al(n),o=this.compiler||this.Compiler;return dh("stringify",o),vy(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(hh("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...E]=h;f(m,E)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(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=ih(!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];a(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 x=r[b][1];sh(x)&&sh(T)&&(T=ih(!0,x,T)),r[b]=[h,T,..._]}}}}const aR=new ch().freeze();function fh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function hh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function vy(e){if(!sh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ky(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Al(e){return uR(e)?e:new Cy(e)}function uR(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function lR(e){return typeof e=="string"||cR(e)}function cR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const fR="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ny=[],Oy={allowDangerousHtml:!0},dR=/^(https?|ircs?|mailto|xmpp)$/i,hR=[{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 pR(e){const t=mR(e),n=gR(e);return ER(t.runSync(t.parse(n),n),e)}function mR(e){const t=e.rehypePlugins||Ny,n=e.remarkPlugins||Ny,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),Oy):Oy;return aR().use(KI).use(n).use($P,r).use(t)}function gR(e){const t=e.children||"",n=new Cy;return typeof t=="string"&&(n.value=t),n}function ER(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||yR;for(const m of hR)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+fR+m.id,void 0);return Cl(e,h),zO(e,{Fragment:N.Fragment,components:o,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function h(m,E,b){if(m.type==="raw"&&b&&typeof E=="number")return u?b.children.splice(E,1):b.children[E]={type:"text",value:m.value},E;if(m.type==="element"){let T;for(T in $d)if(Object.hasOwn($d,T)&&Object.hasOwn(m.properties,T)){const _=m.properties[T],x=$d[T];(x===null||x.includes(m.tagName))&&(m.properties[T]=f(String(_||""),T,m))}}if(m.type==="element"){let T=n?!n.includes(m.tagName):a?a.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 yR(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||dR.test(e.slice(0,t))?e:""}const Iy=/[#.]/g;function TR(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){Iy.lastIndex=o;const c=Iy.exec(n),f=n.slice(o,c?c.index:n.length);f&&(a?a==="#"?r.id=f:Array.isArray(r.className)?r.className.push(f):r.className=[f]:u=f,o+=f.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function Py(e,t,n){const r=n?SR(n):void 0;function o(a,u,...c){let f;if(a==null){f={type:"root",children:[]};const h=u;c.unshift(h)}else{f=TR(a,t);const h=f.tagName.toLowerCase(),m=r?r.get(h):void 0;if(f.tagName=m||h,bR(u))c.unshift(u);else for(const[E,b]of Object.entries(u))_R(e,f.properties,E,b)}for(const h of c)ph(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return o}function bR(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function _R(e,t,n,r){const o=Fd(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=wE(r):o.commaSeparated?a=fE(r):o.commaOrSpaceSeparated?a=wE(fE(r).join(" ")):a=Ry(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?xR(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(Ry(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function ph(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)ph(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?ph(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Ry(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||oa(n)===oa(t)))return!0}return n}function xR(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function SR(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const wR=["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"],CR=Py(hl,"div"),AR=Py(Ws,"g",wR);function vR(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const f=Ly(t,n[u-1]);c=f===-1?t.length+1:f+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],f=Ly(t,c),h=f===-1?t.length+1:f+1;if(c===h)break;n.push(h)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function Ly(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 Ji={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/"},Dy={}.hasOwnProperty,kR=Object.prototype;function NR(e,t){const n=t||{};return mh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ws:hl,verbose:n.verbose||!1},e)}function mh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},vl(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:My(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=vR(a),c=u.toPoint(0),f=u.toPoint(a.length);n.position={start:c,end:f}}return n}case"#documentType":{const r=t;return n={type:"doctype"},vl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},vl(e,r,n),n}default:return n=OR(e,t),n}}function My(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=mh(e,t[n]);r.push(o)}return r}function OR(e,t){const n=e.schema;e.schema=t.namespaceURI===Ji.svg?Ws:hl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],f=(c.prefix?c.prefix+":":"")+c.name;Dy.call(kR,f)||(o[f]=c.value)}const u=(e.schema.space==="svg"?AR:CR)(t.tagName,o,My(e,t.childNodes));if(vl(e,t,u),u.tagName==="template"){const c=t,f=c.sourceCodeLocation,h=f&&f.startTag&&Zs(f.startTag),m=f&&f.endTag&&Zs(f.endTag),E=mh(e,c.content);h&&m&&e.file&&(E.position={start:h.end,end:m.start}),u.content=E}return e.schema=n,u}function vl(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=Zs(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)Dy.call(n.attrs,u)&&(a[Fd(e.schema,u).property]=Zs(n.attrs[u]));n.startTag;const c=Zs(n.startTag),f=n.endTag?Zs(n.endTag):void 0,h={opening:c};f&&(h.closing=f),h.properties=a,t.data={position:h}}}return r}function Zs(e){const t=Fy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Fy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Fy(e){return e.line&&e.column?e:void 0}class Ea{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ea.prototype.property={},Ea.prototype.normal={},Ea.prototype.space=null;function By(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 Ea(n,r,t)}function gh(e){return e.toLowerCase()}class Wn{constructor(t,n){this.property=t,this.attribute=n}}Wn.prototype.space=null,Wn.prototype.boolean=!1,Wn.prototype.booleanish=!1,Wn.prototype.overloadedBoolean=!1,Wn.prototype.number=!1,Wn.prototype.commaSeparated=!1,Wn.prototype.spaceSeparated=!1,Wn.prototype.commaOrSpaceSeparated=!1,Wn.prototype.mustUseProperty=!1,Wn.prototype.defined=!1;let PR=0;const ze=Zi(),Ut=Zi(),Uy=Zi(),pe=Zi(),ft=Zi(),eo=Zi(),Mn=Zi();function Zi(){return Xc(2,++PR)}const Eh=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Ut,commaOrSpaceSeparated:Mn,commaSeparated:eo,number:pe,overloadedBoolean:Uy,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),yh=Object.keys(Eh);class Th extends Wn{constructor(t,n,r,o){let a=-1;if(super(t,n),Hy(this,"space",o),typeof r=="number")for(;++a<yh.length;){const u=yh[a];Hy(this,yh[a],(r&Eh[u])===Eh[u])}}}Th.prototype.defined=!0;function Hy(e,t,n){n&&(e[t]=n)}const RR={}.hasOwnProperty;function to(e){const t={},n={};let r;for(r in e.properties)if(RR.call(e.properties,r)){const o=e.properties[r],a=new Th(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gh(r)]=r,n[gh(a.attribute)]=r}return new Ea(t,n,e.space)}const zy=to({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}}),jy=to({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function $y(e,t){return t in e?e[t]:t}function Vy(e,t){return $y(e,t.toLowerCase())}const qy=to({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Vy,properties:{xmlns:null,xmlnsXLink:null}}),Yy=to({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:ft,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:pe,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:ft,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Ut,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null}}),LR=to({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Vy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:eo,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:ft,autoFocus:ze,autoPlay:ze,blocking:ft,capture:null,charSet:null,checked:ze,cite:null,className:ft,cols:pe,colSpan:null,content:null,contentEditable:Ut,controls:ze,controlsList:ft,coords:pe|eo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:Uy,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:ft,height:pe,hidden:ze,high:pe,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:ft,itemRef:ft,itemScope:ze,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:pe,pattern:null,ping:ft,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:ft,required:ze,reversed:ze,rows:pe,rowSpan:pe,sandbox:ft,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Ut,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:ze,useMap:null,value:Ut,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Ut,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:ze,disableRemotePlayback:ze,prefix:null,property:null,results:pe,security:null,unselectable:null}}),DR=to({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:$y,properties:{about:Mn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:ze,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:eo,g2:eo,glyphName:eo,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:Mn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:pe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mn,rev:Mn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mn,requiredFeatures:Mn,requiredFonts:Mn,requiredFormats:Mn,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:Mn,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:Mn,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:Mn,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}}),MR=/^data[-\w.:]+$/i,Wy=/-[a-z]/g,FR=/[A-Z]/g;function BR(e,t){const n=gh(t);let r=t,o=Wn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&MR.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Wy,HR);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Wy.test(a)){let u=a.replace(FR,UR);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Th}return new o(r,t)}function UR(e){return"-"+e.toLowerCase()}function HR(e){return e.charAt(1).toUpperCase()}const zR=By([jy,zy,qy,Yy,LR],"html"),Gy=By([jy,zy,qy,Yy,DR],"svg"),Ky={}.hasOwnProperty;function Qy(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&Ky.call(o,e)){const f=String(o[e]);u=Ky.call(c,f)?c[f]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const jR={},$R={}.hasOwnProperty,Xy=Qy("type",{handlers:{root:qR,element:QR,text:GR,comment:KR,doctype:WR}});function VR(e,t){const r=(t||jR).space;return Xy(e,r==="svg"?Gy:zR)}function qR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=bh(e.children,n,t),no(e,n),n}function YR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=bh(e.children,n,t),no(e,n),n}function WR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return no(e,t),t}function GR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return no(e,t),t}function KR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return no(e,t),t}function QR(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Gy);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&$R.call(e.properties,a)){const f=XR(r,a,e.properties[a]);f&&o.push(f)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Ji[u],childNodes:[],parentNode:null};return c.childNodes=bh(e.children,c,r),no(e,c),e.tagName==="template"&&e.content&&(c.content=YR(e.content,r)),c}function XR(e,t,n){const r=BR(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?dE(n):CE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=Ji[r.space]}return o}function bh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Xy(e[r],n);a.parentNode=t,o.push(a)}return o}function no(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const JR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],ZR=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]),Tt="�";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 Cn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Jy(e){return e>=55296&&e<=57343}function eL(e){return e>=56320&&e<=57343}function tL(e,t){return(e-55296)*1024+9216+t}function Zy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function eT(e){return e>=64976&&e<=65007||ZR.has(e)}var X;(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"})(X||(X={}));const nL=65536;class rL{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=nL,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(eL(n))return this.pos++,this._addGap(),tL(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(X.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,Jy(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){Zy(t)?this._err(X.controlCharacterInInputStream):eT(t)&&this._err(X.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 tT(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 iL=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))),sL=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 oL(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=sL.get(e))!==null&&t!==void 0?t:e}var Yt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Yt||(Yt={}));const aL=32;var mi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(mi||(mi={}));function _h(e){return e>=Yt.ZERO&&e<=Yt.NINE}function uL(e){return e>=Yt.UPPER_A&&e<=Yt.UPPER_F||e>=Yt.LOWER_A&&e<=Yt.LOWER_F}function lL(e){return e>=Yt.UPPER_A&&e<=Yt.UPPER_Z||e>=Yt.LOWER_A&&e<=Yt.LOWER_Z||_h(e)}function cL(e){return e===Yt.EQUALS||lL(e)}var Wt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Wt||(Wt={}));var Kr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Kr||(Kr={}));class fL{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Kr.Strict}startEntity(t){this.decodeMode=t,this.state=Wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Wt.EntityStart:return t.charCodeAt(n)===Yt.NUM?(this.state=Wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Wt.NamedEntity,this.stateNamedEntity(t,n));case Wt.NumericStart:return this.stateNumericStart(t,n);case Wt.NumericDecimal:return this.stateNumericDecimal(t,n);case Wt.NumericHex:return this.stateNumericHex(t,n);case Wt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|aL)===Yt.LOWER_X?(this.state=Wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Wt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o)||uL(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Yt.SEMI)this.consumed+=1;else if(this.decodeMode===Kr.Strict)return 0;return this.emitCodePoint(oL(this.result),this.consumed),this.errors&&(t!==Yt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&mi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=dL(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Kr.Attribute&&(a===0||cL(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&mi.VALUE_LENGTH)>>14,a!==0){if(u===Yt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Kr.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]&mi.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]&~mi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Wt.NamedEntity:return this.result!==0&&(this.decodeMode!==Kr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Wt.NumericDecimal:return this.emitNumericEntity(0,2);case Wt.NumericHex:return this.emitNumericEntity(0,3);case Wt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Wt.EntityStart:return 0}}}function dL(e,t,n,r){const o=(t&mi.BRANCH_LENGTH)>>7,a=t&mi.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const f=r-a;return f<0||f>=o?-1:e[n+f]-1}let u=n,c=u+o-1;for(;u<=c;){const f=u+c>>>1,h=e[f];if(h<r)u=f+1;else if(h>r)c=f-1;else return e[f+o]}return-1}var se;(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/"})(se||(se={}));var es;(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"})(es||(es={}));var Gn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Gn||(Gn={}));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 hL=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 ro(e){var t;return(t=hL.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const le=p,pL={[se.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]),[se.MATHML]:new Set([le.MI,le.MO,le.MN,le.MS,le.MTEXT,le.ANNOTATION_XML]),[se.SVG]:new Set([le.TITLE,le.FOREIGN_OBJECT,le.DESC]),[se.XLINK]:new Set,[se.XML]:new Set,[se.XMLNS]:new Set},xh=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 Ot={DATA:v.DATA,RCDATA:v.RCDATA,RAWTEXT:v.RAWTEXT,SCRIPT_DATA:v.SCRIPT_DATA,PLAINTEXT:v.PLAINTEXT,CDATA_SECTION:v.CDATA_SECTION};function mL(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function ya(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function gL(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function gi(e){return gL(e)||ya(e)}function nT(e){return gi(e)||mL(e)}function kl(e){return e+32}function rT(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function iT(e){return rT(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function EL(e){return e===A.NULL?X.nullCharacterReference:e>1114111?X.characterReferenceOutsideUnicodeRange:Jy(e)?X.surrogateCharacterReference:eT(e)?X.noncharacterCharacterReference:Zy(e)||e===A.CARRIAGE_RETURN?X.controlCharacterReference:null}class yL{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 rL(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new fL(iL,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(X.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(X.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=EL(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(tT(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(X.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=ro(t.tagName),t.type===qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(X.endTagWithAttributes),t.selfClosing&&this._err(X.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=rT(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()?Kr.Attribute:Kr.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(X.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(X.unexpectedNullCharacter),this._emitChars(Tt);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(X.unexpectedNullCharacter),this._emitChars(Tt);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(X.unexpectedNullCharacter),this._emitChars(Tt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(X.unexpectedNullCharacter),this._emitChars(Tt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(gi(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(X.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=v.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(X.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(X.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=v.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(gi(t))this._createEndTagToken(),this.state=v.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(X.missingEndTagName),this.state=v.DATA;break}case A.EOF:{this._err(X.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(X.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(X.unexpectedNullCharacter),n.tagName+=Tt;break}case A.EOF:{this._err(X.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ya(t)?kl(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){gi(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){gi(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){gi(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(X.unexpectedNullCharacter),this._emitChars(Tt);break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_ESCAPED,this._emitChars(Tt);break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_ESCAPED,this._emitChars(Tt);break}case A.EOF:{this._err(X.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:gi(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){gi(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(Cn.SCRIPT,!1)&&iT(this.preprocessor.peek(Cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Cn.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(X.unexpectedNullCharacter),this._emitChars(Tt);break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Tt);break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.state=v.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Tt);break}case A.EOF:{this._err(X.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(Cn.SCRIPT,!1)&&iT(this.preprocessor.peek(Cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Cn.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(X.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(X.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(X.unexpectedNullCharacter),this.currentAttr.name+=Tt;break}default:this.currentAttr.name+=String.fromCodePoint(ya(t)?kl(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(X.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(X.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(X.unexpectedNullCharacter),this.currentAttr.value+=Tt;break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.currentAttr.value+=Tt;break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),this.currentAttr.value+=Tt;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(X.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(X.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(X.eofInTag),this._emitEOFToken();break}default:this._err(X.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(X.eofInTag),this._emitEOFToken();break}default:this._err(X.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(X.unexpectedNullCharacter),n.data+=Tt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Cn.DASH_DASH,!0)?(this._createCommentToken(Cn.DASH_DASH.length+1),this.state=v.COMMENT_START):this._consumeSequenceIfMatch(Cn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Cn.DOCTYPE.length+1),this.state=v.DOCTYPE):this._consumeSequenceIfMatch(Cn.CDATA_START,!0)?this.inForeignNode?this.state=v.CDATA_SECTION:(this._err(X.cdataInHtmlContent),this._createCommentToken(Cn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=v.BOGUS_COMMENT):this._ensureHibernation()||(this._err(X.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(X.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(X.abruptClosingOfEmptyComment),this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),n.data+=Tt;break}case A.EOF:{this._err(X.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(X.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(X.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(X.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(X.incorrectlyClosedComment),this.state=v.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(X.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(X.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.missingWhitespaceBeforeDoctypeName),this.state=v.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ya(t))this._createDoctypeToken(String.fromCharCode(kl(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(X.unexpectedNullCharacter),this._createDoctypeToken(Tt),this.state=v.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(X.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),n.name+=Tt;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ya(t)?kl(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(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Cn.PUBLIC,!1)?this.state=v.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Cn.SYSTEM,!1)?this.state=v.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(X.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(X.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(X.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=v.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(X.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.unexpectedNullCharacter),n.publicId+=Tt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),n.publicId+=Tt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.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(X.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(X.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(X.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=v.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(X.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=v.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.unexpectedNullCharacter),n.systemId+=Tt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.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(X.unexpectedNullCharacter),n.systemId+=Tt;break}case A.GREATER_THAN_SIGN:{this._err(X.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=v.DATA;break}case A.EOF:{this._err(X.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(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(X.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(X.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(X.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()&&nT(this.preprocessor.peek(1))?v.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){nT(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(X.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const sT=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),oT=new Set([...sT,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Nl=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),TL=new Set([...Nl,p.OL,p.UL]),bL=new Set([...Nl,p.BUTTON]),aT=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),uT=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),_L=new Set([p.TR,p.TEMPLATE,p.HTML]),xL=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),SL=new Set([p.TABLE,p.TEMPLATE,p.HTML]),wL=new Set([p.TD,p.TH]);class CL{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)===se.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])!==se.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(xh,se.HTML)}popUntilTableCellPopped(){this.popUntilPopped(wL,se.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(SL,se.HTML)}clearBackToTableBodyContext(){this.clearBackTo(xL,se.HTML)}clearBackToTableRowContext(){this.clearBackTo(_L,se.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 se.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case se.SVG:{if(uT.has(o))return!1;break}case se.MATHML:{if(aT.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Nl)}hasInListItemScope(t){return this.hasInDynamicScope(t,TL)}hasInButtonScope(t){return this.hasInDynamicScope(t,bL)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case se.HTML:{if(xh.has(n))return!0;if(Nl.has(n))return!1;break}case se.SVG:{if(uT.has(n))return!1;break}case se.MATHML:{if(aT.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===se.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])===se.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])===se.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&&sT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&oT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&oT.has(this.currentTagId);)this.pop()}}const Sh=3;var Ir;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ir||(Ir={}));const lT={type:Ir.Marker};class AL{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===Ir.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===a&&this.treeAdapter.getNamespaceURI(h)===u){const m=this.treeAdapter.getAttrList(h);m.length===o&&r.push({idx:c,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Sh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Sh)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(f=>o.get(f.name)===f.value)&&(a+=1,a>=Sh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(lT)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ir.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ir.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(lT);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ir.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ir.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ir.Element&&n.element===t)}}const Ei={createDocument(){return{nodeName:"#document",mode:Gn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ei.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ei.isTextNode(n)){n.value+=t;return}}Ei.appendChild(e,Ei.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ei.isTextNode(r)?r.value+=t:Ei.insertBefore(e,Ei.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)}},cT="html",vL="about:legacy-compat",kL="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",fT=["+//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=[...fT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],OL=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),dT=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],IL=[...dT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function hT(e,t){return t.some(n=>e.startsWith(n))}function PL(e){return e.name===cT&&e.publicId===null&&(e.systemId===null||e.systemId===vL)}function RL(e){if(e.name!==cT)return Gn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===kL)return Gn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),OL.has(n))return Gn.QUIRKS;let r=t===null?NL:fT;if(hT(n,r))return Gn.QUIRKS;if(r=t===null?dT:IL,hT(n,r))return Gn.LIMITED_QUIRKS}return Gn.NO_QUIRKS}const pT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},LL="definitionurl",DL="definitionURL",ML=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])),FL=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:se.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:se.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:se.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:se.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:se.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:se.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:se.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:se.XML}],["xml:space",{prefix:"xml",name:"space",namespace:se.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:se.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:se.XMLNS}]]),BL=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])),UL=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===es.COLOR||r===es.SIZE||r===es.FACE)||UL.has(t)}function mT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===LL){e.attrs[t].name=DL;break}}function gT(e){for(let t=0;t<e.attrs.length;t++){const n=ML.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function wh(e){for(let t=0;t<e.attrs.length;t++){const n=FL.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 zL(e){const t=BL.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ro(e.tagName))}function jL(e,t){return t===se.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function $L(e,t,n){if(t===se.MATHML&&e===p.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===es.ENCODING){const o=n[r].value.toLowerCase();return o===pT.TEXT_HTML||o===pT.APPLICATION_XML}}return t===se.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function VL(e,t,n,r){return(!r||r===se.HTML)&&$L(e,t,n)||(!r||r===se.MATHML)&&jL(e,t)}const qL="hidden",YL=8,WL=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 GL={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ET=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),yT={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ei,onParseError:null};class TT{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({},yT),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 yL(this.options,this),this.activeFormattingElements=new AL(this.treeAdapter),this.fragmentContextID=r?ro(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new CL(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({},yT),n);t!=null||(t=r.treeAdapter.createElement(j.TEMPLATE,se.HTML,[]));const o=r.treeAdapter.createElement("documentmock",se.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===p.TEMPLATE&&a.tmplInsertionModeStack.unshift(P.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:GL,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===se.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,se.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=Ot.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)!==se.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=Ot.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=Ot.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=Ot.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=Ot.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&ye(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,se.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,se.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,se.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:f,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:f,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),a=n.type===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,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===se.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,se.HTML)}_processToken(t){switch(t.type){case qe.CHARACTER:{this.onCharacter(t);break}case qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case qe.COMMENT:{this.onComment(t);break}case qe.DOCTYPE:{this.onDoctype(t);break}case qe.START_TAG:{this._processStartTag(t);break}case qe.END_TAG:{this.onEndTag(t);break}case qe.EOF:{this.onEof(t);break}case qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return VL(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Ir.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=P.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=P.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=P.IN_TABLE;return}case p.BODY:{this.insertionMode=P.IN_BODY;return}case p.FRAMESET:{this.insertionMode=P.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?P.AFTER_HEAD:P.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===p.TEMPLATE)break;if(r===p.TABLE){this.insertionMode=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return ET.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)===se.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 pL[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){wD(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ta(this,t);break}case P.BEFORE_HTML:{ba(this,t);break}case P.BEFORE_HEAD:{_a(this,t);break}case P.IN_HEAD:{xa(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Sa(this,t);break}case P.AFTER_HEAD:{wa(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{_T(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:{kh(this,t);break}case P.IN_TABLE_TEXT:{NT(this,t);break}case P.IN_COLUMN_GROUP:{Pl(this,t);break}case P.AFTER_BODY:{Dl(this,t);break}case P.AFTER_AFTER_BODY:{Ml(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){SD(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ta(this,t);break}case P.BEFORE_HTML:{ba(this,t);break}case P.BEFORE_HEAD:{_a(this,t);break}case P.IN_HEAD:{xa(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Sa(this,t);break}case P.AFTER_HEAD:{wa(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{kh(this,t);break}case P.IN_COLUMN_GROUP:{Pl(this,t);break}case P.AFTER_BODY:{Dl(this,t);break}case P.AFTER_AFTER_BODY:{Ml(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ah(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:{Ah(this,t);break}case P.IN_TABLE_TEXT:{va(this,t);break}case P.AFTER_BODY:{t6(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{n6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{r6(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,X.misplacedDoctype);break}case P.IN_TABLE_TEXT:{va(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,X.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?CD(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ta(this,t);break}case P.BEFORE_HTML:{i6(this,t);break}case P.BEFORE_HEAD:{o6(this,t);break}case P.IN_HEAD:{dr(this,t);break}case P.IN_HEAD_NO_SCRIPT:{l6(this,t);break}case P.AFTER_HEAD:{f6(this,t);break}case P.IN_BODY:{an(this,t);break}case P.IN_TABLE:{io(this,t);break}case P.IN_TABLE_TEXT:{va(this,t);break}case P.IN_CAPTION:{aD(this,t);break}case P.IN_COLUMN_GROUP:{Nh(this,t);break}case P.IN_TABLE_BODY:{Rl(this,t);break}case P.IN_ROW:{Ll(this,t);break}case P.IN_CELL:{cD(this,t);break}case P.IN_SELECT:{PT(this,t);break}case P.IN_SELECT_IN_TABLE:{dD(this,t);break}case P.IN_TEMPLATE:{pD(this,t);break}case P.AFTER_BODY:{gD(this,t);break}case P.IN_FRAMESET:{ED(this,t);break}case P.AFTER_FRAMESET:{TD(this,t);break}case P.AFTER_AFTER_BODY:{_D(this,t);break}case P.AFTER_AFTER_FRAMESET:{xD(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?AD(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ta(this,t);break}case P.BEFORE_HTML:{s6(this,t);break}case P.BEFORE_HEAD:{a6(this,t);break}case P.IN_HEAD:{u6(this,t);break}case P.IN_HEAD_NO_SCRIPT:{c6(this,t);break}case P.AFTER_HEAD:{d6(this,t);break}case P.IN_BODY:{Il(this,t);break}case P.TEXT:{X6(this,t);break}case P.IN_TABLE:{Ca(this,t);break}case P.IN_TABLE_TEXT:{va(this,t);break}case P.IN_CAPTION:{uD(this,t);break}case P.IN_COLUMN_GROUP:{lD(this,t);break}case P.IN_TABLE_BODY:{Oh(this,t);break}case P.IN_ROW:{IT(this,t);break}case P.IN_CELL:{fD(this,t);break}case P.IN_SELECT:{RT(this,t);break}case P.IN_SELECT_IN_TABLE:{hD(this,t);break}case P.IN_TEMPLATE:{mD(this,t);break}case P.AFTER_BODY:{DT(this,t);break}case P.IN_FRAMESET:{yD(this,t);break}case P.AFTER_FRAMESET:{bD(this,t);break}case P.AFTER_AFTER_BODY:{Ml(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{Ta(this,t);break}case P.BEFORE_HTML:{ba(this,t);break}case P.BEFORE_HEAD:{_a(this,t);break}case P.IN_HEAD:{xa(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Sa(this,t);break}case P.AFTER_HEAD:{wa(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:{vT(this,t);break}case P.TEXT:{J6(this,t);break}case P.IN_TABLE_TEXT:{va(this,t);break}case P.IN_TEMPLATE:{LT(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:{vh(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:{bT(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{kh(this,t);break}case P.IN_TABLE_TEXT:{kT(this,t);break}}}}function KL(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):AT(e,t),n}function QL(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 XL(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),f=c&&a>=WL;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=JL(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function JL(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 ZL(e,t,n){const r=e.treeAdapter.getTagName(t),o=ro(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===p.TEMPLATE&&a===se.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function e6(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function Ch(e,t){for(let n=0;n<YL;n++){const r=KL(e,t);if(!r)break;const o=QL(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=XL(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&ZL(e,u,a),e6(e,o,r)}}function Ah(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function t6(e,t){e._appendCommentNode(t,e.openElements.items[0])}function n6(e,t){e._appendCommentNode(t,e.document)}function vh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function r6(e,t){e._setDocumentType(t);const n=t.forceQuirks?Gn.QUIRKS:RL(t);PL(t)||e._err(t,X.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function Ta(e,t){e._err(t,X.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Gn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function i6(e,t){t.tagID===p.HTML?(e._insertElement(t,se.HTML),e.insertionMode=P.BEFORE_HEAD):ba(e,t)}function s6(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&ba(e,t)}function ba(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function o6(e,t){switch(t.tagID){case p.HTML:{an(e,t);break}case p.HEAD:{e._insertElement(t,se.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:_a(e,t)}}function a6(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?_a(e,t):e._err(t,X.endTagWithoutMatchingOpenElement)}function _a(e,t){e._insertFakeElement(j.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function dr(e,t){switch(t.tagID){case p.HTML:{an(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,se.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,Ot.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ot.RAWTEXT):(e._insertElement(t,se.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,Ot.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,Ot.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,X.misplacedStartTagForHeadElement);break}default:xa(e,t)}}function u6(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:{xa(e,t);break}case p.TEMPLATE:{ts(e,t);break}default:e._err(t,X.endTagWithoutMatchingOpenElement)}}function ts(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,X.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,X.endTagWithoutMatchingOpenElement)}function xa(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function l6(e,t){switch(t.tagID){case p.HTML:{an(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{dr(e,t);break}case p.NOSCRIPT:{e._err(t,X.nestedNoscriptInHead);break}default:Sa(e,t)}}function c6(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case p.BR:{Sa(e,t);break}default:e._err(t,X.endTagWithoutMatchingOpenElement)}}function Sa(e,t){const n=t.type===qe.EOF?X.openElementsLeftAfterEof:X.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function f6(e,t){switch(t.tagID){case p.HTML:{an(e,t);break}case p.BODY:{e._insertElement(t,se.HTML),e.framesetOk=!1,e.insertionMode=P.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,se.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,X.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),dr(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,X.misplacedStartTagForHeadElement);break}default:wa(e,t)}}function d6(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{wa(e,t);break}case p.TEMPLATE:{ts(e,t);break}default:e._err(t,X.endTagWithoutMatchingOpenElement)}}function wa(e,t){e._insertFakeElement(j.BODY,p.BODY),e.insertionMode=P.IN_BODY,Ol(e,t)}function Ol(e,t){switch(t.type){case qe.CHARACTER:{_T(e,t);break}case qe.WHITESPACE_CHARACTER:{bT(e,t);break}case qe.COMMENT:{Ah(e,t);break}case qe.START_TAG:{an(e,t);break}case qe.END_TAG:{Il(e,t);break}case qe.EOF:{vT(e,t);break}}}function bT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function _T(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function h6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function p6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function m6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,se.HTML),e.insertionMode=P.IN_FRAMESET)}function g6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,se.HTML)}function E6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&xh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,se.HTML)}function y6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,se.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function T6(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,se.HTML),n||(e.formElement=e.openElements.current))}function b6(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,se.HTML)}function _6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,se.HTML),e.tokenizer.state=Ot.PLAINTEXT}function x6(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.framesetOk=!1}function S6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(Ch(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function w6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function C6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(Ch(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,se.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function A6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function v6(e,t){e.treeAdapter.getDocumentMode(e.document)!==Gn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,se.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function xT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,se.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ST(e){const t=tT(e,es.TYPE);return t!=null&&t.toLowerCase()===qL}function k6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,se.HTML),ST(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function N6(e,t){e._appendElement(t,se.HTML),t.ackSelfClosing=!0}function O6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,se.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function I6(e,t){t.tagName=j.IMG,t.tagID=p.IMG,xT(e,t)}function P6(e,t){e._insertElement(t,se.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ot.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function R6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ot.RAWTEXT)}function L6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ot.RAWTEXT)}function wT(e,t){e._switchToTextParsing(t,Ot.RAWTEXT)}function D6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.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 M6(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML)}function F6(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,se.HTML)}function B6(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,se.HTML)}function U6(e,t){e._reconstructActiveFormattingElements(),mT(t),wh(t),t.selfClosing?e._appendElement(t,se.MATHML):e._insertElement(t,se.MATHML),t.ackSelfClosing=!0}function H6(e,t){e._reconstructActiveFormattingElements(),gT(t),wh(t),t.selfClosing?e._appendElement(t,se.SVG):e._insertElement(t,se.SVG),t.ackSelfClosing=!0}function CT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML)}function an(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:{w6(e,t);break}case p.A:{S6(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{E6(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:{g6(e,t);break}case p.LI:case p.DD:case p.DT:{b6(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{xT(e,t);break}case p.HR:{O6(e,t);break}case p.RB:case p.RTC:{F6(e,t);break}case p.RT:case p.RP:{B6(e,t);break}case p.PRE:case p.LISTING:{y6(e,t);break}case p.XMP:{R6(e,t);break}case p.SVG:{H6(e,t);break}case p.HTML:{h6(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:{dr(e,t);break}case p.BODY:{p6(e,t);break}case p.FORM:{T6(e,t);break}case p.NOBR:{C6(e,t);break}case p.MATH:{U6(e,t);break}case p.TABLE:{v6(e,t);break}case p.INPUT:{k6(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:{x6(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{A6(e,t);break}case p.IFRAME:{L6(e,t);break}case p.SELECT:{D6(e,t);break}case p.OPTION:case p.OPTGROUP:{M6(e,t);break}case p.NOEMBED:case p.NOFRAMES:{wT(e,t);break}case p.FRAMESET:{m6(e,t);break}case p.TEXTAREA:{P6(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?wT(e,t):CT(e,t);break}case p.PLAINTEXT:{_6(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:CT(e,t)}}function z6(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 j6(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,DT(e,t))}function $6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function V6(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 q6(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(j.P,p.P),e._closePElement()}function Y6(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function W6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function G6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function K6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Q6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function AT(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==p.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Il(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:{Ch(e,t);break}case p.P:{q6(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:{$6(e,t);break}case p.LI:{Y6(e);break}case p.DD:case p.DT:{W6(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{G6(e);break}case p.BR:{Q6(e);break}case p.BODY:{z6(e,t);break}case p.HTML:{j6(e,t);break}case p.FORM:{V6(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{K6(e,t);break}case p.TEMPLATE:{ts(e,t);break}default:AT(e,t)}}function vT(e,t){e.tmplInsertionModeStack.length>0?LT(e,t):vh(e,t)}function X6(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 J6(e,t){e._err(t,X.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function kh(e,t){if(e.openElements.currentTagId!==void 0&&ET.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:{NT(e,t);break}case qe.WHITESPACE_CHARACTER:{kT(e,t);break}}else Aa(e,t)}function Z6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,se.HTML),e.insertionMode=P.IN_CAPTION}function eD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,se.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function tD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,p.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,Nh(e,t)}function nD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,se.HTML),e.insertionMode=P.IN_TABLE_BODY}function rD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,p.TBODY),e.insertionMode=P.IN_TABLE_BODY,Rl(e,t)}function iD(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function sD(e,t){ST(t)?e._appendElement(t,se.HTML):Aa(e,t),t.ackSelfClosing=!0}function oD(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,se.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function io(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{rD(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{dr(e,t);break}case p.COL:{tD(e,t);break}case p.FORM:{oD(e,t);break}case p.TABLE:{iD(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{nD(e,t);break}case p.INPUT:{sD(e,t);break}case p.CAPTION:{Z6(e,t);break}case p.COLGROUP:{eD(e,t);break}default:Aa(e,t)}}function Ca(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{ts(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:Aa(e,t)}}function Aa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ol(e,t),e.fosterParentingEnabled=n}function kT(e,t){e.pendingCharacterTokens.push(t)}function NT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function va(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Aa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const OT=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function aD(e,t){const n=t.tagID;OT.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,io(e,t)):an(e,t)}function uD(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&&Ca(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:Il(e,t)}}function Nh(e,t){switch(t.tagID){case p.HTML:{an(e,t);break}case p.COL:{e._appendElement(t,se.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{dr(e,t);break}default:Pl(e,t)}}function lD(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:{ts(e,t);break}case p.COL:break;default:Pl(e,t)}}function Pl(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function Rl(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,se.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,Ll(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,io(e,t));break}default:io(e,t)}}function Oh(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,Ca(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:Ca(e,t)}}function Ll(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,se.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,Rl(e,t));break}default:io(e,t)}}function IT(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,Oh(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,Oh(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:Ca(e,t)}}function cD(e,t){const n=t.tagID;OT.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),Ll(e,t)):an(e,t)}function fD(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(),IT(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Il(e,t)}}function PT(e,t){switch(t.tagID){case p.HTML:{an(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,se.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,se.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,se.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:{dr(e,t);break}}}function RT(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:{ts(e,t);break}}}function dD(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)):PT(e,t)}function hD(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)):RT(e,t)}function pD(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:{dr(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,io(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,Nh(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,Rl(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,Ll(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,an(e,t)}}function mD(e,t){t.tagID===p.TEMPLATE&&ts(e,t)}function LT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):vh(e,t)}function gD(e,t){t.tagID===p.HTML?an(e,t):Dl(e,t)}function DT(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 Dl(e,t)}function Dl(e,t){e.insertionMode=P.IN_BODY,Ol(e,t)}function ED(e,t){switch(t.tagID){case p.HTML:{an(e,t);break}case p.FRAMESET:{e._insertElement(t,se.HTML);break}case p.FRAME:{e._appendElement(t,se.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{dr(e,t);break}}}function yD(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 TD(e,t){switch(t.tagID){case p.HTML:{an(e,t);break}case p.NOFRAMES:{dr(e,t);break}}}function bD(e,t){t.tagID===p.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function _D(e,t){t.tagID===p.HTML?an(e,t):Ml(e,t)}function Ml(e,t){e.insertionMode=P.IN_BODY,Ol(e,t)}function xD(e,t){switch(t.tagID){case p.HTML:{an(e,t);break}case p.NOFRAMES:{dr(e,t);break}}}function SD(e,t){t.chars=Tt,e._insertCharacters(t)}function wD(e,t){e._insertCharacters(t),e.framesetOk=!1}function MT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==se.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function CD(e,t){if(HL(t))MT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===se.MATHML?mT(t):r===se.SVG&&(zL(t),gT(t)),wh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function AD(e,t){if(t.tagID===p.P||t.tagID===p.BR){MT(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)===se.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 vD=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,kD=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),FT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function BT(e,t){const n=BD(e),r=Qy("type",{handlers:{root:ND,element:OD,text:ID,comment:HT,doctype:PD,raw:LD},unknown:DD}),o={parser:n?new TT(FT):TT.getFragmentParser(void 0,FT),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),so(o,Nr());const a=n?o.parser.document:o.parser.getFragment(),u=NR(a,{file:o.options.file});return o.stitches&&Cl(u,"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}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function UT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function ND(e,t){UT(e.children,t)}function OD(e,t){MD(e,t),UT(e.children,t),FD(e,t)}function ID(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:ka(e)};so(t,Nr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function PD(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ka(e)};so(t,Nr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function RD(e,t){t.stitches=!0;const n=UD(e);if("children"in e&&"children"in n){const r=BT({type:"root",children:e.children},t.options);n.children=r.children}HT({type:"comment",value:{stitch:n}},t)}function HT(e,t){const n=e.value,r={type:qe.COMMENT,data:n,location:ka(e)};so(t,Nr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function LD(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,zT(t,Nr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(vD,"&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 DD(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))RD(n,t);else{let r="";throw kD.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function so(e,t){zT(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=Ot.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 zT(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 MD(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ot.PLAINTEXT)return;so(t,Nr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Ji.html;o===Ji.html&&n==="svg"&&(o=Ji.svg);const a=VR(ye(U({},e),{children:[]}),{space:o===Ji.svg?"svg":"html"}),u={type:qe.START_TAG,tagName:n,tagID:ro(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ka(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function FD(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&JR.includes(n)||t.parser.tokenizer.state===Ot.PLAINTEXT)return;so(t,pl(e));const r={type:qe.END_TAG,tagName:n,tagID:ro(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ka(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ot.RCDATA||t.parser.tokenizer.state===Ot.RAWTEXT||t.parser.tokenizer.state===Ot.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ot.DATA)}function BD(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ka(e){const t=Nr(e)||{line:void 0,column:void 0,offset:void 0},n=pl(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 UD(e){return"children"in e?Js(ye(U({},e),{children:[]})):Js(e)}function HD(e){return function(t,n){return BT(t,ye(U({},e),{file:n}))}}function jT(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 zD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function jD(e,t,n){const o=Sl((n||{}).ignore||[]),a=$D(t);let u=-1;for(;++u<a.length;)by(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=a[u][0],T=a[u][1];let _=0;const C=E.children.indexOf(h);let O=!1,F=[];b.lastIndex=0;let D=b.exec(h.value);for(;D;){const G=D.index,W={index:D.index,input:D.input,stack:[...m,h]};let B=T(...D,W);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?b.lastIndex=G+1:(_!==G&&F.push({type:"text",value:h.value.slice(_,G)}),Array.isArray(B)?F.push(...B):B&&F.push(B),_=G+D[0].length,O=!0),!b.global)break;D=b.exec(h.value)}return O?(_<h.value.length&&F.push({type:"text",value:h.value.slice(_)}),E.children.splice(C,1,...F)):F=[h],C+F.length}}function $D(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([VD(o[0]),qD(o[1])])}return t}function VD(e){return typeof e=="string"?new RegExp(zD(e),"g"):e}function qD(e){return typeof e=="function"?e:function(){return e}}const Ih="phrasing",Ph=["autolink","link","image","label"];function YD(){return{transforms:[ZD],enter:{literalAutolink:GD,literalAutolinkEmail:Rh,literalAutolinkHttp:Rh,literalAutolinkWww:Rh},exit:{literalAutolink:JD,literalAutolinkEmail:XD,literalAutolinkHttp:KD,literalAutolinkWww:QD}}}function WD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ih,notInConstruct:Ph},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ih,notInConstruct:Ph},{character:":",before:"[ps]",after:"\\/",inConstruct:Ih,notInConstruct:Ph}]}}function GD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Rh(e){this.config.enter.autolinkProtocol.call(this,e)}function KD(e){this.config.exit.autolinkProtocol.call(this,e)}function QD(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 XD(e){this.config.exit.autolinkEmail.call(this,e)}function JD(e){this.exit(e)}function ZD(e){jD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,e4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),t4]],{ignore:["link","linkReference"]})}function e4(e,t,n,r,o){let a="";if(!$T(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!n4(n)))return!1;const u=r4(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function t4(e,t,n,r){return!$T(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 r4(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=jT(e,"(");let a=jT(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function $T(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xi(n)||gl(n))&&(!t||n!==47)}VT.peek=d4;function i4(){this.buffer()}function s4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function o4(){this.buffer()}function a4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function u4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function l4(e){this.exit(e)}function c4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function f4(e){this.exit(e)}function d4(){return"["}function VT(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function h4(){return{enter:{gfmFootnoteCallString:i4,gfmFootnoteCall:s4,gfmFootnoteDefinitionLabelString:o4,gfmFootnoteDefinition:a4},exit:{gfmFootnoteCallString:u4,gfmFootnoteCall:l4,gfmFootnoteDefinitionLabelString:c4,gfmFootnoteDefinition:f4}}}function p4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:VT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let f=c.move("[^");const h=a.enter("footnoteDefinition"),m=a.enter("label");return f+=c.move(a.safe(a.associationId(r),{before:f,after:"]"})),m(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
29
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?qT:m4))),h(),f}}function m4(e,t,n){return t===0?e:qT(e,t,n)}function qT(e,t,n){return(n?"":" ")+e}const g4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];YT.peek=_4;function E4(){return{canContainEols:["delete"],enter:{strikethrough:T4},exit:{strikethrough:b4}}}function y4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:g4}],handlers:{delete:YT}}}function T4(e){this.enter({type:"delete",children:[]},e)}function b4(e){this.exit(e)}function YT(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,ye(U({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function _4(){return"~"}function x4(e){return e.length}function S4(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||x4,a=[],u=[],c=[],f=[];let h=0,m=-1;for(;++m<e.length;){const x=[],C=[];let O=-1;for(e[m].length>h&&(h=e[m].length);++O<e[m].length;){const F=w4(e[m][O]);if(n.alignDelimiters!==!1){const D=o(F);C[O]=D,(f[O]===void 0||D>f[O])&&(f[O]=D)}x.push(F)}u[m]=x,c[m]=C}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<h;)a[E]=WT(r[E]);else{const x=WT(r);for(;++E<h;)a[E]=x}E=-1;const b=[],T=[];for(;++E<h;){const x=a[E];let C="",O="";x===99?(C=":",O=":"):x===108?C=":":x===114&&(O=":");let F=n.alignDelimiters===!1?1:Math.max(1,f[E]-C.length-O.length);const D=C+"-".repeat(F)+O;n.alignDelimiters!==!1&&(F=C.length+F+O.length,F>f[E]&&(f[E]=F),T[E]=F),b[E]=D}u.splice(1,0,b),c.splice(1,0,T),m=-1;const _=[];for(;++m<u.length;){const x=u[m],C=c[m];E=-1;const O=[];for(;++E<h;){const F=x[E]||"";let D="",G="";if(n.alignDelimiters!==!1){const W=f[E]-(C[E]||0),B=a[E];B===114?D=" ".repeat(W):B===99?W%2?(D=" ".repeat(W/2+.5),G=" ".repeat(W/2-.5)):(D=" ".repeat(W/2),G=D):G=" ".repeat(W)}n.delimiterStart!==!1&&!E&&O.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&F==="")&&(n.delimiterStart!==!1||E)&&O.push(" "),n.alignDelimiters!==!1&&O.push(D),O.push(F),n.alignDelimiters!==!1&&O.push(G),n.padding!==!1&&O.push(" "),(n.delimiterEnd!==!1||E!==h-1)&&O.push("|")}_.push(n.delimiterEnd===!1?O.join("").replace(/ +$/,""):O.join(""))}return _.join(`
30
+ `)}function w4(e){return e==null?"":String(e)}function WT(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 C4(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),A4);return o(),u}function A4(e,t,n){return">"+(n?"":" ")+e}function v4(e,t){return GT(e,t.inConstruct,!0)&&!GT(e,t.notInConstruct,!1)}function GT(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function KT(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
31
+ `&&v4(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
32
+ `}function k4(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function N4(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 O4(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 I4(e,t,n,r){const o=O4(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(N4(e,n)){const E=n.enter("codeIndented"),b=n.indentLines(a,P4);return E(),b}const c=n.createTracker(r),f=o.repeat(Math.max(k4(a,o)+1,3)),h=n.enter("codeFenced");let m=c.move(f);if(e.lang){const E=n.enter(`codeFencedLang${u}`);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${u}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,U({before:m,after:`
33
33
  `,encode:["`"]},c.current()))),E()}return m+=c.move(`
34
34
  `),a&&(m+=c.move(a+`
35
- `)),m+=c.move(f),h(),m}function I4(e,t,n){return(n?"":" ")+e}function Ih(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 P4(e,t,n,r){const o=Ih(n),a=o==='"'?"Quote":"Apostrophe",u=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${a}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,U({before:h,after:o},f.current()))),h+=f.move(o),c()),u(),h}function R4(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 Na(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ml(e,t,n){const r=Qs(e),o=Qs(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}}KT.peek=L4;function KT(e,t,n,r){const o=R4(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let f=u.move(n.containerPhrasing(e,U({after:o,before:c},u.current())));const h=f.charCodeAt(0),m=Ml(r.before.charCodeAt(r.before.length-1),h,o);m.inside&&(f=Na(h)+f.slice(1));const E=f.charCodeAt(f.length-1),b=Ml(r.after.charCodeAt(0),E,o);b.inside&&(f=f.slice(0,-1)+Na(E));const T=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+T}function L4(e,t,n){return n.options.emphasis||"*"}function D4(e,t){let n=!1;return wl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Jd}),!!((!e.depth||e.depth<3)&&zd(e)&&(t.options.setext||n))}function M4(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(D4(e,n)){const m=n.enter("headingSetext"),E=n.enter("phrasing"),b=n.containerPhrasing(e,ye(U({},a.current()),{before:`
35
+ `)),m+=c.move(f),h(),m}function P4(e,t,n){return(n?"":" ")+e}function Lh(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 R4(e,t,n,r){const o=Lh(n),a=o==='"'?"Quote":"Apostrophe",u=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${a}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,U({before:h,after:o},f.current()))),h+=f.move(o),c()),u(),h}function L4(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 Na(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Fl(e,t,n){const r=Qs(e),o=Qs(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}}QT.peek=D4;function QT(e,t,n,r){const o=L4(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let f=u.move(n.containerPhrasing(e,U({after:o,before:c},u.current())));const h=f.charCodeAt(0),m=Fl(r.before.charCodeAt(r.before.length-1),h,o);m.inside&&(f=Na(h)+f.slice(1));const E=f.charCodeAt(f.length-1),b=Fl(r.after.charCodeAt(0),E,o);b.inside&&(f=f.slice(0,-1)+Na(E));const T=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+T}function D4(e,t,n){return n.options.emphasis||"*"}function M4(e,t){let n=!1;return Cl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,th}),!!((!e.depth||e.depth<3)&&Vd(e)&&(t.options.setext||n))}function F4(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(M4(e,n)){const m=n.enter("headingSetext"),E=n.enter("phrasing"),b=n.containerPhrasing(e,ye(U({},a.current()),{before:`
37
37
  `,after:`
38
38
  `}));return E(),m(),b+`
39
39
  `+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
40
40
  `))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),f=n.enter("phrasing");a.move(u+" ");let h=n.containerPhrasing(e,U({before:"# ",after:`
41
- `},a.current()));return/^[\t ]/.test(h)&&(h=Na(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,n.options.closeAtx&&(h+=" "+u),f(),c(),h}QT.peek=F4;function QT(e){return e.value||""}function F4(){return"<"}XT.peek=B4;function XT(e,t,n,r){const o=Ih(n),a=o==='"'?"Quote":"Apostrophe",u=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${a}`),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(")"),u(),h}function B4(){return"!"}JT.peek=U4;function JT(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=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+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),U({before:f,after:"]"},c.current()));return u(),n.stack=m,a(),o==="full"||!h||h!==E?f+=c.move(E+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function U4(){return"!"}ZT.peek=H4;function ZT(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let f;if(u.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 H4(){return"`"}function eb(e,t){const n=zd(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))}tb.peek=z4;function tb(e,t,n,r){const o=Ih(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,f;if(eb(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let E=u.move("<");return E+=u.move(n.containerPhrasing(e,U({before:E,after:">"},u.current()))),E+=u.move(">"),c(),n.stack=m,E}c=n.enter("link"),f=n.enter("label");let h=u.move("[");return h+=u.move(n.containerPhrasing(e,U({before:h,after:"]("},u.current()))),h+=u.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(n.safe(e.url,U({before:h,after:">"},u.current()))),h+=u.move(">")):(f=n.enter("destinationRaw"),h+=u.move(n.safe(e.url,U({before:h,after:e.title?" ":")"},u.current())))),f(),e.title&&(f=n.enter(`title${a}`),h+=u.move(" "+o),h+=u.move(n.safe(e.title,U({before:h,after:o},u.current()))),h+=u.move(o),f()),h+=u.move(")"),c(),h}function z4(e,t,n){return eb(e,n)?"<":"["}nb.peek=j4;function nb(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=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+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),U({before:f,after:"]"},c.current()));return u(),n.stack=m,a(),o==="full"||!h||h!==E?f+=c.move(E+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function j4(){return"["}function Ph(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 $4(e){const t=Ph(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 V4(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 rb(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 q4(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?V4(n):Ph(n);const c=e.ordered?u==="."?")":".":$4(n);let f=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),rb(n)===u&&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&&(u=c),n.bulletCurrent=u;const h=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),h}function Y4(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 W4(e,t,n,r){const o=Y4(n);let a=n.bulletCurrent||Ph(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const 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(u))+E:(T?a:a+" ".repeat(u-a.length))+E}}function G4(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const K4=xl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Q4(e,t,n,r){return(e.children.some(function(u){return K4(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function X4(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ib.peek=J4;function ib(e,t,n,r){const o=X4(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let f=u.move(n.containerPhrasing(e,U({after:o,before:c},u.current())));const h=f.charCodeAt(0),m=Ml(r.before.charCodeAt(r.before.length-1),h,o);m.inside&&(f=Na(h)+f.slice(1));const E=f.charCodeAt(f.length-1),b=Ml(r.after.charCodeAt(0),E,o);b.inside&&(f=f.slice(0,-1)+Na(E));const T=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+T}function J4(e,t,n){return n.options.strong||"*"}function Z4(e,t,n,r){return n.safe(e.value,r)}function e5(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 t5(e,t,n){const r=(rb(n)+(n.options.ruleSpaces?" ":"")).repeat(e5(n));return n.options.ruleSpaces?r.slice(0,-1):r}const sb={blockquote:w4,break:GT,code:O4,definition:P4,emphasis:KT,hardBreak:GT,heading:M4,html:QT,image:XT,imageReference:JT,inlineCode:ZT,link:tb,linkReference:nb,list:q4,listItem:W4,paragraph:G4,root:Q4,strong:ib,text:Z4,thematicBreak:t5};function n5(){return{enter:{table:r5,tableData:ob,tableHeader:ob,tableRow:s5},exit:{codeText:o5,table:i5,tableData:Rh,tableHeader:Rh,tableRow:Rh}}}function r5(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 i5(e){this.exit(e),this.data.inTable=void 0}function s5(e){this.enter({type:"tableRow",children:[]},e)}function Rh(e){this.exit(e)}function ob(e){this.enter({type:"tableCell",children:[]},e)}function o5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,a5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function a5(e,t){return t==="|"?t:e}function u5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=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:u,tableCell:f,tableRow:c}};function u(T,_,S,C){return h(m(T,S,C),T.align)}function c(T,_,S,C){const I=E(T,S,C),F=h([I]);return F.slice(0,F.indexOf(`
43
- `))}function f(T,_,S,C){const I=S.enter("tableCell"),F=S.enter("phrasing"),D=S.containerPhrasing(T,ye(U({},C),{before:a,after:a}));return F(),I(),D}function h(T,_){return x4(T,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function m(T,_,S){const C=T.children;let I=-1;const F=[],D=_.enter("table");for(;++I<C.length;)F[I]=E(C[I],_,S);return D(),F}function E(T,_,S){const C=T.children;let I=-1;const F=[],D=_.enter("tableRow");for(;++I<C.length;)F[I]=f(C[I],T,_,S);return D(),F}function b(T,_,S){let C=sb.inlineCode(T,_,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function l5(){return{exit:{taskListCheckValueChecked:ab,taskListCheckValueUnchecked:ab,paragraph:f5}}}function c5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:d5}}}function ab(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function f5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function d5(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let f=sb.listItem(e,t,n,U(U({},r),c.current()));return a&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(m){return m+u}}function h5(){return[qD(),d4(),g4(),n5(),l5()]}function p5(e){return{extensions:[YD(),h4(e),E4(),u5(e),c5()]}}const m5={tokenize:_5,partial:!0},ub={tokenize:x5,partial:!0},lb={tokenize:S5,partial:!0},cb={tokenize:w5,partial:!0},g5={tokenize:C5,partial:!0},fb={name:"wwwAutolink",tokenize:T5,previous:hb},db={name:"protocolAutolink",tokenize:b5,previous:pb},Xr={name:"emailAutolink",tokenize:y5,previous:mb},Rr={};function E5(){return{text:Rr}}let rs=48;for(;rs<123;)Rr[rs]=Xr,rs++,rs===58?rs=65:rs===91&&(rs=97);Rr[43]=Xr,Rr[45]=Xr,Rr[46]=Xr,Rr[95]=Xr,Rr[72]=[Xr,db],Rr[104]=[Xr,db],Rr[87]=[Xr,fb],Rr[119]=[Xr,fb];function y5(e,t,n){const r=this;let o,a;return u;function u(E){return!Lh(E)||!mb.call(r,r.previous)||Dh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return Lh(E)?(e.consume(E),c):E===64?(e.consume(E),f):n(E)}function f(E){return E===46?e.check(g5,m,h)(E):E===45||E===95||rn(E)?(a=!0,e.consume(E),f):m(E)}function h(E){return e.consume(E),o=!0,f}function m(E){return a&&o&&hn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function T5(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!hb.call(r,r.previous)||Dh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(m5,e.attempt(ub,e.attempt(lb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function b5(e,t,n){const r=this;let o="",a=!1;return u;function u(E){return(E===72||E===104)&&pb.call(r,r.previous)&&!Dh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(hn(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),a?h:(a=!0,f)):n(E)}function h(E){return E===null||pl(E)||lt(E)||Ji(E)||ml(E)?n(E):e.attempt(ub,e.attempt(lb,m),n)(E)}function m(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function _5(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function x5(e,t,n){let r,o,a;return u;function u(h){return h===46||h===95?e.check(cb,f,c)(h):h===null||lt(h)||Ji(h)||h!==45&&ml(h)?f(h):(a=!0,e.consume(h),u)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),u}function f(h){return o||r||!a?n(h):t(h)}}function S5(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(cb,t,a)(u):u===null||lt(u)||Ji(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function w5(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||lt(c)||Ji(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||lt(c)||Ji(c)?t(c):r(c)}function a(c){return hn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):hn(c)?(e.consume(c),u):n(c)}}function C5(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return rn(a)?n(a):t(a)}}function hb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||lt(e)}function pb(e){return!hn(e)}function mb(e){return!(e===47||Lh(e))}function Lh(e){return e===43||e===45||e===46||e===95||rn(e)}function Dh(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 A5={tokenize:L5,partial:!0};function v5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:I5,continuation:{tokenize:P5},exit:R5}},text:{91:{name:"gfmFootnoteCall",tokenize:O5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:k5,resolveTo:N5}}}}function k5(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const f=r.events[o][1];if(f.type==="labelImage"){u=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(!u||!u._balanced)return n(f);const h=dr(r.sliceSerialize({start:u.end,end:r.now()}));return h.codePointAt(0)!==94||!a.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function N5(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function O5(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),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(a>999||E===93&&!u||E===null||E===91||lt(E))return n(E);if(E===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(dr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return lt(E)||(u=!0),a++,e.consume(E),E===92?m:h}function m(E){return E===91||E===92||E===93?(e.consume(E),a++,h):h(E)}}function I5(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=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(u>999||_===93&&!c||_===null||_===91||lt(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=dr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return lt(_)||(c=!0),u++,e.consume(_),_===92?E:m}function E(_){return _===91||_===92||_===93?(e.consume(_),u++,m):m(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),Xe(e,T,"gfmFootnoteDefinitionWhitespace")):n(_)}function T(_){return t(_)}}function P5(e,t,n){return e.check(fa,t,e.attempt(A5,t,n))}function R5(e){e.exit("gfmFootnoteDefinition")}function L5(e,t,n){const r=this;return Xe(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function D5(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let f=-1;for(;++f<u.length;)if(u[f][0]==="enter"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._close){let h=f;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[f][1].end.offset-u[f][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[f][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[f][1].end)},E={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[f][1].start)},b=[["enter",m,c],["enter",u[h][1],c],["exit",u[h][1],c],["enter",E,c]],T=c.parser.constructs.insideSpan.null;T&&Dn(b,b.length,0,gl(T,u.slice(h+1,f),c)),Dn(b,b.length,0,[["exit",E,c],["enter",u[f][1],c],["exit",u[f][1],c],["exit",m,c]]),Dn(u,h-1,f-h+3,b),f=h+b.length-2;break}}for(f=-1;++f<u.length;)u[f][1].type==="strikethroughSequenceTemporary"&&(u[f][1].type="data");return u}function a(u,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(_):(u.enter("strikethroughSequenceTemporary"),T(_))}function T(_){const S=Qs(h);if(_===126)return E>1?f(_):(u.consume(_),E++,T);if(E<2&&!n)return f(_);const C=u.exit("strikethroughSequenceTemporary"),I=Qs(_);return C._open=!I||I===2&&!!S,C._close=!S||S===2&&!!I,c(_)}}}class M5{constructor(){this.map=[]}add(t,n,r){F5(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function 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 B5(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function U5(){return{flow:{null:{name:"table",tokenize:H5,resolveAll:z5}}}}function H5(e,t,n){const r=this;let o=0,a=0,u;return c;function c(H){let le=r.events.length-1;for(;le>-1;){const fe=r.events[le][1].type;if(fe==="lineEnding"||fe==="linePrefix")le--;else break}const de=le>-1?r.events[le][1].type:null,ce=de==="tableHead"||de==="tableRow"?B:f;return ce===B&&r.parser.lazy[r.now().line]?n(H):ce(H)}function f(H){return e.enter("tableHead"),e.enter("tableRow"),h(H)}function h(H){return H===124||(u=!0,a+=1),m(H)}function m(H){return H===null?n(H):Le(H)?a>1?(a=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):(a+=1,u&&(u=!1,o+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),u=!0,m):(e.enter("data"),E(H)))}function E(H){return H===null||H===124||lt(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"),u=!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?(u=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),S):W(H)}function S(H){return Ke(H)?Xe(e,C,"whitespace")(H):C(H)}function C(H){return H===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),I):H===45?(a+=1,I(H)):H===null||Le(H)?G(H):W(H)}function I(H){return H===45?(e.enter("tableDelimiterFiller"),F(H)):W(H)}function F(H){return H===45?(e.consume(H),F):H===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),D):(e.exit("tableDelimiterFiller"),D(H))}function D(H){return Ke(H)?Xe(e,G,"whitespace")(H):G(H)}function G(H){return H===124?_(H):H===null||Le(H)?!u||o!==a?W(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):W(H)}function W(H){return n(H)}function B(H){return e.enter("tableRow"),te(H)}function te(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),te):H===null||Le(H)?(e.exit("tableRow"),t(H)):Ke(H)?Xe(e,te,"whitespace")(H):(e.enter("data"),be(H))}function be(H){return H===null||H===124||lt(H)?(e.exit("data"),te(H)):(e.consume(H),H===92?he:be)}function he(H){return H===92||H===124?(e.consume(H),be):be(H)}}function z5(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,f=0,h,m,E;const b=new M5;for(;++n<e.length;){const T=e[n],_=T[1];T[0]==="enter"?_.type==="tableHead"?(c=!1,f!==0&&(gb(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,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",m,t]])),o=_.type==="tableDelimiterRow"?2:m?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],E=Fl(b,t,a,o,void 0,E),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],E=Fl(b,t,a,o,void 0,E)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,f=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(f=n,a[1]!==0?(u[0]=u[1],E=Fl(b,t,a,o,n,E)):u[1]!==0&&(E=Fl(b,t,u,o,n,E)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(f!==0&&gb(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=B5(t.events,n))}return e}function Fl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},oo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const f=oo(t.events,n[1]);if(a={type:u,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const h=oo(t.events,n[2]),m=oo(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&&(a.end=Object.assign({},oo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function gb(e,t,n,r,o){const a=[],u=oo(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function oo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const j5={name:"tasklistCheck",tokenize:V5};function $5(){return{text:{91:j5}}}function V5(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"),a)}function a(f){return lt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),u):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),u):n(f)}function u(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return Le(f)?t(f):Ke(f)?e.check({tokenize:q5},t,n)(f):n(f)}}function q5(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function Y5(e){return HE([E5(),v5(),D5(e),U5(),$5()])}const W5={};function G5(e){const t=this,n=e||W5,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(Y5(n)),a.push(h5()),u.push(p5(n))}const Bl=()=>N.jsx("span",{className:`${Z}-blinking-cursor`,children:N.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:N.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Eb=({globalClassName:e,message:t})=>{const{isLoading:n,isResponseLoading:r}=Vr(),o=n&&r((t==null?void 0:t.eventSourceId)||"")&&t.name==="partial_inquiry";return N.jsx(hR,{remarkPlugins:[G5],rehypePlugins:[UD],components:{h1:({children:a})=>N.jsx("h1",{className:se(e,`${Z}-header h1`),children:a}),h2:({children:a})=>N.jsx("h2",{className:se(e,`${Z}-header h2`),children:a}),h3:({children:a})=>N.jsx("h3",{className:se(e,`${Z}-header h3`),children:a}),ul:({children:a})=>N.jsx("ul",{className:se(e,`${Z}-ul`),children:a}),ol:({children:a})=>N.jsx("ol",{className:se(e,`${Z}-ol`),children:a}),li:({children:a})=>N.jsx("li",{className:se(e,`${Z}-li`),children:a}),a:({href:a,children:u})=>N.jsx("a",ye(U({className:se(e,`${Z}-link`)},a?{href:a,target:"_blank"}:{}),{rel:"noopener noreferrer",children:u})),table:({children:a})=>N.jsx("table",{className:se(e,`${Z}-table`),children:a}),thead:({children:a})=>N.jsx("thead",{className:se(e,`${Z}-thead`),children:a}),tbody:({children:a})=>N.jsx("tbody",{className:se(e,`${Z}-tbody`),children:a}),tr:({children:a})=>N.jsx("tr",{className:se(e,`${Z}-tr`),children:a}),th:({children:a})=>N.jsx("th",{className:se(e,`${Z}-th`),children:a}),td:({children:a})=>N.jsx("td",{className:se(e,`${Z}-td`),children:a}),span:({className:a,children:u})=>a===`${Z}-blinking-cursor`?N.jsx(Bl,{}):N.jsx("span",{children:u})},children:t.message+(o?`<span className='${Z}-blinking-cursor'></span>`:"")})},K5=({globalClassName:e,message:t})=>{const[n,r]=q.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(f=>!f)};return N.jsxs("div",{children:[N.jsxs("div",{className:se(e,`${Z}-progress-message`,"standalone"),children:[N.jsx("span",{className:se(e,`${Z}-message-icon`,"progress-icon","standalone"),children:N.jsx(Bg,{})}),N.jsx("p",{className:se(e,`${Z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&N.jsxs(N.Fragment,{children:[N.jsx(qf,{className:se(e,`${Z}-thought-context-button`),onClick:c,children:n?N.jsxs(N.Fragment,{children:["Hide ",N.jsx(kA,{})]}):N.jsxs(N.Fragment,{children:["Context ",N.jsx(NA,{})]})}),n&&N.jsx("div",{className:se(e,`${Z}-thought-container`),children:a&&N.jsx("p",{className:se(e,`${Z}-progress-thought`),children:t.thought})})]})]})},Q5=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?N.jsx(K5,{globalClassName:e,message:t}):N.jsxs("div",{className:se(e,`${Z}-progress-message`,"embedded"),title:t.message,children:[N.jsx("span",{className:se(e,`${Z}-message-icon`,"progress-icon","embedded"),children:N.jsx(Bg,{})}),N.jsx("i",{className:se(e,`${Z}-progress-text`,"embedded"),children:t.message})]}),X5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return N.jsxs("div",{className:se(e,`${Z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&N.jsxs("div",{className:se(e,`${Z}-refined-event-query`,{embedded:!n,standalone:n}),children:[N.jsx("span",{className:se(e,`${Z}-message-icon`,`${Z}-refined-event-icon`,{embedded:!n,standalone:n}),children:N.jsx(Vu,{role:"img"})}),N.jsx("p",{className:se(e,`${Z}-text`,"bold"),children:r})]}),N.jsx(Eb,{message:t})]})},yb=e=>{var f,h;const{configModule:t}=bn(),n=((f=e.request)==null?void 0:f.searchParams)||((h=e.request)==null?void 0:h.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).filter(([m])=>!r.includes(m))),u=Object.keys(a),c=Object.values(a).reduce((m,E)=>m+E.length,0);return{facetFiltersList:u,filterCount:c}},Ul=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>N.jsx("span",{className:se(t,`${Z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filters`}),Tb=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var h;const f=((h=o[c])==null?void 0:h.join(", "))||"";return N.jsxs("div",{className:se(e,`${Z}-facets`),children:[N.jsx("p",{className:se(e,`${Z}-facet-category`),children:c}),N.jsx("p",{className:se(e,`${Z}-facet-values`),children:f})]},c)})},J5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var a,u;const{facetFiltersList:r,filterCount:o}=yb(t);return n?N.jsxs("div",{children:[N.jsxs("div",{className:se(e,`${Z}-user-message standalone`),children:[N.jsx("span",{className:se(e,`${Z}-message-icon user-message-icon standalone`),children:N.jsx(Ug,{})}),N.jsx("p",{className:se(e,`${Z}-user-message-text`),children:(a=t.request)==null?void 0:a.userPrompt}),r.length>0&&N.jsx(Ul,{isWidgetStandalone:!0,globalClassName:e,filterCount:o})]}),N.jsx(Tb,{globalClassName:e,facetFiltersList:r,message:t})]}):N.jsxs("div",{className:se(e,`${Z}-user-message embedded`),children:[N.jsx("span",{className:se(e,`${Z}-message-icon user-message-icon embedded`),children:N.jsx(Ug,{})}),N.jsx("p",{children:(u=t.request)==null?void 0:u.userPrompt}),r.length>0&&N.jsx(Ul,{isWidgetStandalone:!1,filterCount:o})]})},Z5=({globalClassName:e,actionLabel:t,query:n,queryLabel:r,message:o,facetFiltersList:a,filterCount:u})=>N.jsxs("div",{className:se(e,`${Z}-user-search standalone`),children:[N.jsxs("div",{className:se(e,`${Z}-user-search-query`),children:[N.jsx("span",{className:se(e,`${Z}-message-icon user-search-icon standalone`),children:N.jsx(Vu,{})}),N.jsx("p",{className:se(e,`${Z}-text bold`),children:`${t}: ${r||n}`}),a.length>0&&N.jsx(Ul,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),N.jsx(Tb,{globalClassName:e,facetFiltersList:a,message:o})]}),e8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{const{facetFiltersList:r,filterCount:o}=yb(t),{actionLabel:a,query:u,queryLabel:c}=q.useMemo(()=>{var h,m,E,b,T,_;switch(t.name){case"copilot_search":return{actionLabel:"Your search",query:(h=t.request)==null?void 0:h.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(E=(m=t.request)==null?void 0:m.browseParams)==null?void 0:E.categoryId,queryLabel:((b=t.request)==null?void 0:b.label)||""};case"product_view":return{actionLabel:"Viewing product",query:(T=t.request)==null?void 0:T.productId,queryLabel:((_=t.request)==null?void 0:_.label)||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[t]);return!t.isUserAction||!u?null:n?N.jsx(Z5,{globalClassName:e,message:t,actionLabel:a,query:u,queryLabel:c,facetFiltersList:r,filterCount:o}):N.jsxs("div",{className:se(e,`${Z}-user-search embedded`),children:[N.jsx("span",{className:se(e,`${Z}-message-icon user-search-icon embedded`),children:N.jsx(Vu,{})}),N.jsx("p",{children:c||u}),r.length>0&&N.jsx(Ul,{isWidgetStandalone:!1,filterCount:o})]})},bb=["copilot_search","copilot_browse","product_view"],_b=({message:e,globalClassName:t,resetConversationMessage:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var u;if(!e)return null;let a=e.name;if(bb.includes(a)&&(e.isInitial||e.isUserAction)&&(a="faceted_navigation"),bb.includes(a)&&!((u=e.request)!=null&&u.userPrompt))return null;switch(a){case"copilot_search":case"copilot_browse":case"product_view":return N.jsx(J5,{globalClassName:t,isWidgetStandalone:r,message:e});case"faceted_navigation":return N.jsx(e8,{globalClassName:t,message:e,isWidgetStandalone:r});case"refined_search":case"refined_browse":return N.jsx(X5,{globalClassName:t,message:e,isWidgetStandalone:r});case"follow_up":return N.jsx(m3,{globalClassName:t,isWidgetStandalone:r,message:e,handleSuggestionClick:o});case"inquiry":case"partial_inquiry":return N.jsx(Eb,{globalClassName:t,message:e});case"error":return N.jsx(d3,{message:e,isWidgetStandalone:r});case"display_products":return N.jsx(f3,{message:e,isWidgetStandalone:r});case"progress":return N.jsx(Q5,{globalClassName:t,isWidgetStandalone:r,message:e});case"conversation_reset":return N.jsxs(N.Fragment,{children:[N.jsx("p",{className:se(t,`${Z}-reset-message`),children:"This conversation has been reset."}),N.jsx("p",{className:se(t,`${Z}-start-search-message`),children:n})]});default:return null}},Mh=({isWidgetStandalone:e,messages:t,handleSuggestionClick:n})=>{const{globalClassName:r,resetConversationMessage:o}=bn();return t.map(a=>a.messages&&a.type==="group"?N.jsx("div",{className:se(r,`${Z}-message-group`,e?"standalone":"embedded"),children:a.messages.length>0&&a.messages.map(u=>N.jsx("div",{className:`${Z}-message-group-child`,children:N.jsx(_b,{id:u.id,globalClassName:r,isWidgetStandalone:e,message:u,resetConversationMessage:o,handleSuggestionClick:n})},u.id))},`group-${a.eventSourceId}`):a.type==="individual"&&a.message?N.jsx("div",{className:se(r,`${Z}-message`,e?"standalone":"embedded",{error:a.message.name.includes("error")}),children:N.jsx(_b,{id:a.message.id,globalClassName:r,isWidgetStandalone:e,message:a.message,resetConversationMessage:o,handleSuggestionClick:n})},a.message.id):null)},xb=()=>{const{globalClassName:e,themeVariables:t}=bn(),{status:n}=Ns(),{copilot:r,messages:o,groupedMessages:a,isLoading:u,handleUserInput:c,handleSuggestion:f}=Vr(),{isOpen:h}=n||{},m=q.useRef(null);return q.useEffect(()=>{m.current&&m.current.scrollIntoView({behavior:"smooth",block:"end"})},[o]),r?!h||a.length===0?null:N.jsxs("div",{className:se(e,`${Z}-container`,`${Z}-embedded-chat`),style:t,children:[N.jsxs("div",{className:se(e,`${Z}-message-container`,"embedded"),children:[N.jsx(Mh,{isWidgetStandalone:!1,messages:a,handleSuggestionClick:f}),u&&N.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:N.jsx(Bl,{})}),N.jsx("div",{ref:m})]}),N.jsx(Yf,{componentType:"chat",className:"embedded-chat",isLoading:u,onSubmit:c}),N.jsx("div",{className:se(`${Z}-embedded-chat-menu`),children:N.jsx(u3,{componentType:"chat",children:N.jsx(lE,{componentType:"chat"})})})]}):N.jsx("div",{children:"Loading Copilot..."})},[t8,n8]=Ds({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),r8=e=>d1()(e,["lazyMount","unmountOnExit"]),[i8,Oa]=Ds({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Sb=q.forwardRef((e,t)=>{const n=Oa(),r=n8(),o=dd(ye(U({},r),{present:n.open})),a=lr(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:N.jsx(ci.div,ye(U({},a),{ref:el(o.ref,t)}))});Sb.displayName="DialogBackdrop";const Fh=q.forwardRef((e,t)=>{const n=Oa(),r=Jo(),o=lr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:N.jsx(ci.div,ye(U({},o),{ref:el(r.ref,t)}))});Fh.displayName="DialogContent";const Bh=q.forwardRef((e,t)=>{const n=Oa(),r=lr(n.getDescriptionProps(),e);return N.jsx(ci.div,ye(U({},r),{ref:t}))});Bh.displayName="DialogDescription";const Uh=q.forwardRef((e,t)=>{const n=Oa(),r=lr(n.getPositionerProps(),e);return Jo().unmounted?null:N.jsx(ci.div,ye(U({},r),{ref:t}))});Uh.displayName="DialogPositioner";var s8=Ms("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),is=s8.build(),wb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Cb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Hh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},vb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Hl=e=>e.getById(Hh(e)),o8=e=>e.getById(wb(e)),a8=e=>e.getById(Cb(e)),u8=e=>e.getById(Ab(e)),l8=e=>e.getById(zh(e)),c8=e=>e.getById(jh(e)),f8=e=>e.getById(vb(e));function d8(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),f=n.matches("open");return{open:f,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ye(U({},is.trigger.attrs),{dir:a("dir"),id:Ab(u),"aria-haspopup":"dialog",type:"button","aria-expanded":f,"data-state":f?"open":"closed","aria-controls":Hh(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ye(U({},is.backdrop.attrs),{dir:a("dir"),hidden:!f,id:Cb(u),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(ye(U({},is.positioner.attrs),{dir:a("dir"),id:wb(u),style:{pointerEvents:f?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(ye(U({},is.content.attrs),{dir:a("dir"),role:a("role"),hidden:!f,id:Hh(u),tabIndex:-1,"data-state":f?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:zh(u),"aria-describedby":h.description?jh(u):void 0}))},getTitleProps(){return t.element(ye(U({},is.title.attrs),{dir:a("dir"),id:zh(u)}))},getDescriptionProps(){return t.element(ye(U({},is.description.attrs),{dir:a("dir"),id:jh(u)}))},getCloseTriggerProps(){return t.button(ye(U({},is.closeTrigger.attrs),{dir:a("dir"),id:vb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var h8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>f8(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 Y1(()=>Hl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[u8(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return X1(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?K1(()=>Hl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?F1(()=>[Hl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){_n(()=>{e.set("rendered",{title:!!l8(t),description:!!c8(t)})})},syncZIndex({scope:e}){_n(()=>{const t=Hl(e);if(!t)return;const n=Ku(t);[o8(e),a8(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})}}}};ud()(["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 p8=e=>{const t=q.useId(),{getRootNode:n}=Nd(),{dir:r}=rE(),o=U({id:t,getRootNode:n,dir:r},e),a=ld(h8,o);return d8(a,u1)},kb=e=>{const[t,c]=h1(e),f=c,{children:n}=f,r=Zt(f,["children"]),[o]=r8(t),a=p8(r),u=dd(lr({present:a.open},t));return N.jsx(i8,{value:a,children:N.jsx(t8,{value:o,children:N.jsx(l1,{value:u,children:n})})})},$h=q.forwardRef((e,t)=>{const n=Oa(),r=lr(n.getTitleProps(),e);return N.jsx(ci.h2,ye(U({},r),{ref:t}))});$h.displayName="DialogTitle";const Nb=e=>{var f;const{children:t,disabled:n}=e,[r,o]=q.useState((f=e.container)==null?void 0:f.current),a=q.useSyncExternalStore(g8,()=>!1,()=>!0),{getRootNode:u}=Nd();if(q.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),a||n)return N.jsx(N.Fragment,{children:t});const c=r!=null?r:m8(u);return N.jsx(N.Fragment,{children:q.Children.map(t,h=>Ju.createPortal(h,c))})},m8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Gi(n)?n:wr(t).body},g8=()=>()=>{},E8=()=>{const{globalClassName:e}=bn(),{dialogPosition:t}=Ns(),n=t==="bottom-left",r=()=>{tg(n?"bottom-right":"bottom-left")},o=n?s3:i3,a=n?"Move right":"Move left";return N.jsx(Os,{className:se(e,`${Z}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:N.jsx(o,{})})},Ob=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=bn(),{mode:o,status:a,dialogPosition:u}=Ns(),{copilot:c,messages:f,groupedMessages:h,isLoading:m,handleUserInput:E,handleSuggestion:b}=Vr(),T=q.useRef(null),{isOpen:_}=a||{},S=o==="standalone";q.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[f]);const C=()=>{Hu(!1)};return!_||h.length===0?null:c?N.jsx(kb,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:N.jsx(Nb,{children:N.jsx(Uh,{className:se(n,`${Z}-container`,`${Z}-dialog`,u),style:r,children:N.jsxs(Fh,{className:se(n,`${Z}-dialog-content`,{standalone:S,embedded:!S}),children:[N.jsxs("div",{className:se(n,`${Z}-dialog-header`,{standalone:S,embedded:!S}),children:[e&&N.jsx("img",{alt:"",role:"img",className:se(n,`${Z}-dialog-logo`,{standalone:S,embedded:!S}),src:e}),N.jsx($h,{className:se(n,`${Z}-dialog-title`,{standalone:S,embedded:!S}),children:t}),N.jsxs("div",{className:se(n,`${Z}-dialog-controls`),children:[N.jsx(lE,{componentType:"dialog",isIcon:!0}),N.jsx(E8,{}),N.jsx(uE,{componentType:"dialog"}),N.jsx(aE,{className:`dialog ${n}`,onClick:C})]})]}),N.jsxs(Bh,{className:se(n,`${Z}-message-container`,{standalone:S,embedded:!S}),children:[N.jsx(Mh,{isWidgetStandalone:S,messages:h,handleSuggestionClick:b}),m&&N.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:N.jsx(Bl,{})}),N.jsx("div",{ref:T})]}),N.jsx(Yf,{componentType:"dialog",isLoading:m,onSubmit:E})]})})})}):N.jsx("div",{children:"Loading Copilot..."})},Ib=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=bn(),{mode:o,status:a,isModalFullscreen:u,previousComponentType:c}=Ns(),{copilot:f,messages:h,groupedMessages:m,isLoading:E,handleUserInput:b,handleSuggestion:T}=Vr(),_=q.useRef(null),{isOpen:S}=a||{},C=o==="standalone";q.useEffect(()=>{_.current&&_.current.scrollIntoView({behavior:"smooth",block:"end"})},[h]);const I=({open:W})=>{Hu(W)},F=()=>{eg(!u)},D=()=>{Vf(c||"dialog")},G=()=>{Hu(!1)};return!S||m.length===0?null:f?N.jsx(kb,{lazyMount:!0,open:S,onOpenChange:I,children:N.jsx(Nb,{children:N.jsxs("div",{className:se(n,`${Z}-modal-container`),style:r,children:[N.jsx(Sb,{className:se(n,`${Z}-modal-backdrop`)}),N.jsx(Uh,{className:se(n,`${Z}-container`,`${Z}-modal`,{fullscreen:u,standalone:C,embedded:!C}),children:N.jsxs(Fh,{className:se(n,`${Z}-modal-content`,{standalone:C,embedded:!C}),children:[N.jsxs("div",{className:se(n,`${Z}-modal-header`,{standalone:C,embedded:!C}),children:[e&&N.jsx("img",{alt:"",role:"img",className:se(n,`${Z}-modal-logo`,{standalone:C,embedded:!C}),src:e}),N.jsx($h,{className:se(n,`${Z}-modal-title`,{standalone:C,embedded:!C}),children:t}),N.jsxs("div",{className:se(n,`${Z}-modal-controls`),children:[N.jsx(Os,{ariaLabel:"Toggle Fullscreen",className:se(n,`${Z}-modal-fullscreen-button`),icon:u?N.jsx(OA,{}):N.jsx(IA,{}),onClick:F}),N.jsx(Os,{ariaLabel:"Toggle Dialog",className:se(n,`${Z}-modal-toggle-dialog-button`),onClick:D,icon:N.jsx(l3,{})}),N.jsx(uE,{componentType:"modal"}),N.jsx(aE,{className:`modal ${n}`,onClick:G})]})]}),N.jsxs(Bh,{className:se(n,`${Z}-message-container`,{standalone:C,embedded:!C}),children:[N.jsx(Mh,{isWidgetStandalone:C,messages:m,handleSuggestionClick:T}),E&&N.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:N.jsx(Bl,{})}),N.jsx("div",{ref:_})]}),N.jsx(Yf,{componentType:"modal",isLoading:E,onSubmit:b})]})})]})})}):N.jsx("div",{children:"Loading Copilot..."})},y8=()=>{const e=Ns(),{status:{type:t}}=e||{status:{}};return t==="dialog"?N.jsx(Ob,{}):t==="modal"?N.jsx(Ib,{}):N.jsx(xb,{})},Vh=e=>N.jsx(Pg,ye(U({},e),{children:N.jsx(y8,{})}));var zl={},Pb;function T8(){if(Pb)return zl;Pb=1;var e=i1();return zl.createRoot=e.createRoot,zl.hydrateRoot=e.hydrateRoot,zl}var Rb=T8();const b8=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=Zt(o,["elementId","timeout"]);let a;const u=(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&&(ks(!0,"log","Target element found, rendering Copilot Widget"),h.disconnect(),clearTimeout(a),(m=Rb.createRoot(b))==null||m.render(N.jsx(Vh,U({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),ks(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},_8=r=>{var o=r,{timeout:e,elementId:t}=o,n=Zt(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){ks(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){ks(!0,"warn","Container element not found for id:",t),ks(!0,"warn","Beginning observation for element"),b8(U({elementId:t,timeout:e},n));return}Rb.createRoot(a).render(N.jsx(Vh,U({},n)))},x8={search:iA,browse:GC,pdp:{setPdpContext:Tg,updatePdpProductId:QC,updatePdpLink:XC},components:{toggleWidgetOpen:Hu,toggleModalFullscreen:eg,setWidgetType:Vf,setWidgetDialogPosition:tg},session:JC},S8=()=>Object.freeze({search:Object.freeze(pt.state),browse:Object.freeze(ot.state),pdp:Object.freeze(ar.state),isConnected:St.state.connected,isOpen:St.isOpen});Oe.CopilotDialog=Ob,Oe.CopilotEmbed=xb,Oe.CopilotModal=Ib,Oe.CopilotWidget=Vh,Oe.WidgetProvider=Pg,Oe.eventHandlers=x8,Oe.injectCopilotWidget=_8,Oe.state=S8,Oe.useCopilot=Vr,Object.defineProperty(Oe,Symbol.toStringTag,{value:"Module"})});
41
+ `},a.current()));return/^[\t ]/.test(h)&&(h=Na(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,n.options.closeAtx&&(h+=" "+u),f(),c(),h}XT.peek=B4;function XT(e){return e.value||""}function B4(){return"<"}JT.peek=U4;function JT(e,t,n,r){const o=Lh(n),a=o==='"'?"Quote":"Apostrophe",u=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${a}`),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(")"),u(),h}function U4(){return"!"}ZT.peek=H4;function ZT(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=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+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),U({before:f,after:"]"},c.current()));return u(),n.stack=m,a(),o==="full"||!h||h!==E?f+=c.move(E+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function H4(){return"!"}eb.peek=z4;function eb(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let f;if(u.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 z4(){return"`"}function tb(e,t){const n=Vd(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))}nb.peek=j4;function nb(e,t,n,r){const o=Lh(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,f;if(tb(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let E=u.move("<");return E+=u.move(n.containerPhrasing(e,U({before:E,after:">"},u.current()))),E+=u.move(">"),c(),n.stack=m,E}c=n.enter("link"),f=n.enter("label");let h=u.move("[");return h+=u.move(n.containerPhrasing(e,U({before:h,after:"]("},u.current()))),h+=u.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(n.safe(e.url,U({before:h,after:">"},u.current()))),h+=u.move(">")):(f=n.enter("destinationRaw"),h+=u.move(n.safe(e.url,U({before:h,after:e.title?" ":")"},u.current())))),f(),e.title&&(f=n.enter(`title${a}`),h+=u.move(" "+o),h+=u.move(n.safe(e.title,U({before:h,after:o},u.current()))),h+=u.move(o),f()),h+=u.move(")"),c(),h}function j4(e,t,n){return tb(e,n)?"<":"["}rb.peek=$4;function rb(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=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+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),U({before:f,after:"]"},c.current()));return u(),n.stack=m,a(),o==="full"||!h||h!==E?f+=c.move(E+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function $4(){return"["}function Dh(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 V4(e){const t=Dh(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 q4(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 ib(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 Y4(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?q4(n):Dh(n);const c=e.ordered?u==="."?")":".":V4(n);let f=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),ib(n)===u&&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&&(u=c),n.bulletCurrent=u;const h=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),h}function W4(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 G4(e,t,n,r){const o=W4(n);let a=n.bulletCurrent||Dh(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const 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(u))+E:(T?a:a+" ".repeat(u-a.length))+E}}function K4(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const Q4=Sl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function X4(e,t,n,r){return(e.children.some(function(u){return Q4(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function J4(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}sb.peek=Z4;function sb(e,t,n,r){const o=J4(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let f=u.move(n.containerPhrasing(e,U({after:o,before:c},u.current())));const h=f.charCodeAt(0),m=Fl(r.before.charCodeAt(r.before.length-1),h,o);m.inside&&(f=Na(h)+f.slice(1));const E=f.charCodeAt(f.length-1),b=Fl(r.after.charCodeAt(0),E,o);b.inside&&(f=f.slice(0,-1)+Na(E));const T=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+T}function Z4(e,t,n){return n.options.strong||"*"}function e5(e,t,n,r){return n.safe(e.value,r)}function t5(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 n5(e,t,n){const r=(ib(n)+(n.options.ruleSpaces?" ":"")).repeat(t5(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ob={blockquote:C4,break:KT,code:I4,definition:R4,emphasis:QT,hardBreak:KT,heading:F4,html:XT,image:JT,imageReference:ZT,inlineCode:eb,link:nb,linkReference:rb,list:Y4,listItem:G4,paragraph:K4,root:X4,strong:sb,text:e5,thematicBreak:n5};function r5(){return{enter:{table:i5,tableData:ab,tableHeader:ab,tableRow:o5},exit:{codeText:a5,table:s5,tableData:Mh,tableHeader:Mh,tableRow:Mh}}}function i5(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 s5(e){this.exit(e),this.data.inTable=void 0}function o5(e){this.enter({type:"tableRow",children:[]},e)}function Mh(e){this.exit(e)}function ab(e){this.enter({type:"tableCell",children:[]},e)}function a5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,u5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function u5(e,t){return t==="|"?t:e}function l5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=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:u,tableCell:f,tableRow:c}};function u(T,_,x,C){return h(m(T,x,C),T.align)}function c(T,_,x,C){const O=E(T,x,C),F=h([O]);return F.slice(0,F.indexOf(`
43
+ `))}function f(T,_,x,C){const O=x.enter("tableCell"),F=x.enter("phrasing"),D=x.containerPhrasing(T,ye(U({},C),{before:a,after:a}));return F(),O(),D}function h(T,_){return S4(T,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function m(T,_,x){const C=T.children;let O=-1;const F=[],D=_.enter("table");for(;++O<C.length;)F[O]=E(C[O],_,x);return D(),F}function E(T,_,x){const C=T.children;let O=-1;const F=[],D=_.enter("tableRow");for(;++O<C.length;)F[O]=f(C[O],T,_,x);return D(),F}function b(T,_,x){let C=ob.inlineCode(T,_,x);return x.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function c5(){return{exit:{taskListCheckValueChecked:ub,taskListCheckValueUnchecked:ub,paragraph:d5}}}function f5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:h5}}}function ub(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function d5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function h5(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let f=ob.listItem(e,t,n,U(U({},r),c.current()));return a&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(m){return m+u}}function p5(){return[YD(),h4(),E4(),r5(),c5()]}function m5(e){return{extensions:[WD(),p4(e),y4(),l5(e),f5()]}}const g5={tokenize:x5,partial:!0},lb={tokenize:S5,partial:!0},cb={tokenize:w5,partial:!0},fb={tokenize:C5,partial:!0},E5={tokenize:A5,partial:!0},db={name:"wwwAutolink",tokenize:b5,previous:pb},hb={name:"protocolAutolink",tokenize:_5,previous:mb},Qr={name:"emailAutolink",tokenize:T5,previous:gb},Pr={};function y5(){return{text:Pr}}let ns=48;for(;ns<123;)Pr[ns]=Qr,ns++,ns===58?ns=65:ns===91&&(ns=97);Pr[43]=Qr,Pr[45]=Qr,Pr[46]=Qr,Pr[95]=Qr,Pr[72]=[Qr,hb],Pr[104]=[Qr,hb],Pr[87]=[Qr,db],Pr[119]=[Qr,db];function T5(e,t,n){const r=this;let o,a;return u;function u(E){return!Fh(E)||!gb.call(r,r.previous)||Bh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return Fh(E)?(e.consume(E),c):E===64?(e.consume(E),f):n(E)}function f(E){return E===46?e.check(E5,m,h)(E):E===45||E===95||on(E)?(a=!0,e.consume(E),f):m(E)}function h(E){return e.consume(E),o=!0,f}function m(E){return a&&o&&mn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function b5(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!pb.call(r,r.previous)||Bh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(g5,e.attempt(lb,e.attempt(cb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function _5(e,t,n){const r=this;let o="",a=!1;return u;function u(E){return(E===72||E===104)&&mb.call(r,r.previous)&&!Bh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(mn(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),a?h:(a=!0,f)):n(E)}function h(E){return E===null||ml(E)||lt(E)||Xi(E)||gl(E)?n(E):e.attempt(lb,e.attempt(cb,m),n)(E)}function m(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function x5(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function S5(e,t,n){let r,o,a;return u;function u(h){return h===46||h===95?e.check(fb,f,c)(h):h===null||lt(h)||Xi(h)||h!==45&&gl(h)?f(h):(a=!0,e.consume(h),u)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),u}function f(h){return o||r||!a?n(h):t(h)}}function w5(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(fb,t,a)(u):u===null||lt(u)||Xi(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function C5(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||lt(c)||Xi(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||lt(c)||Xi(c)?t(c):r(c)}function a(c){return mn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):mn(c)?(e.consume(c),u):n(c)}}function A5(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return on(a)?n(a):t(a)}}function pb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||lt(e)}function mb(e){return!mn(e)}function gb(e){return!(e===47||Fh(e))}function Fh(e){return e===43||e===45||e===46||e===95||on(e)}function Bh(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 v5={tokenize:D5,partial:!0};function k5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:P5,continuation:{tokenize:R5},exit:L5}},text:{91:{name:"gfmFootnoteCall",tokenize:I5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:N5,resolveTo:O5}}}}function N5(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const f=r.events[o][1];if(f.type==="labelImage"){u=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(!u||!u._balanced)return n(f);const h=fr(r.sliceSerialize({start:u.end,end:r.now()}));return h.codePointAt(0)!==94||!a.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function O5(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function I5(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),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(a>999||E===93&&!u||E===null||E===91||lt(E))return n(E);if(E===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(fr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return lt(E)||(u=!0),a++,e.consume(E),E===92?m:h}function m(E){return E===91||E===92||E===93?(e.consume(E),a++,h):h(E)}}function P5(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=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(u>999||_===93&&!c||_===null||_===91||lt(_))return n(_);if(_===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=fr(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return lt(_)||(c=!0),u++,e.consume(_),_===92?E:m}function E(_){return _===91||_===92||_===93?(e.consume(_),u++,m):m(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),Xe(e,T,"gfmFootnoteDefinitionWhitespace")):n(_)}function T(_){return t(_)}}function R5(e,t,n){return e.check(fa,t,e.attempt(v5,t,n))}function L5(e){e.exit("gfmFootnoteDefinition")}function D5(e,t,n){const r=this;return Xe(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function M5(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let f=-1;for(;++f<u.length;)if(u[f][0]==="enter"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._close){let h=f;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[f][1].end.offset-u[f][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[f][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[f][1].end)},E={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[f][1].start)},b=[["enter",m,c],["enter",u[h][1],c],["exit",u[h][1],c],["enter",E,c]],T=c.parser.constructs.insideSpan.null;T&&Dn(b,b.length,0,El(T,u.slice(h+1,f),c)),Dn(b,b.length,0,[["exit",E,c],["enter",u[f][1],c],["exit",u[f][1],c],["exit",m,c]]),Dn(u,h-1,f-h+3,b),f=h+b.length-2;break}}for(f=-1;++f<u.length;)u[f][1].type==="strikethroughSequenceTemporary"&&(u[f][1].type="data");return u}function a(u,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(_):(u.enter("strikethroughSequenceTemporary"),T(_))}function T(_){const x=Qs(h);if(_===126)return E>1?f(_):(u.consume(_),E++,T);if(E<2&&!n)return f(_);const C=u.exit("strikethroughSequenceTemporary"),O=Qs(_);return C._open=!O||O===2&&!!x,C._close=!x||x===2&&!!O,c(_)}}}class F5{constructor(){this.map=[]}add(t,n,r){B5(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function B5(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 U5(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function H5(){return{flow:{null:{name:"table",tokenize:z5,resolveAll:j5}}}}function z5(e,t,n){const r=this;let o=0,a=0,u;return c;function c(H){let ee=r.events.length-1;for(;ee>-1;){const ae=r.events[ee][1].type;if(ae==="lineEnding"||ae==="linePrefix")ee--;else break}const de=ee>-1?r.events[ee][1].type:null,fe=de==="tableHead"||de==="tableRow"?B:f;return fe===B&&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||(u=!0,a+=1),m(H)}function m(H){return H===null?n(H):Le(H)?a>1?(a=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):(a+=1,u&&(u=!1,o+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),u=!0,m):(e.enter("data"),E(H)))}function E(H){return H===null||H===124||lt(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"),u=!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?(u=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),x):W(H)}function x(H){return Ke(H)?Xe(e,C,"whitespace")(H):C(H)}function C(H){return H===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),O):H===45?(a+=1,O(H)):H===null||Le(H)?G(H):W(H)}function O(H){return H===45?(e.enter("tableDelimiterFiller"),F(H)):W(H)}function F(H){return H===45?(e.consume(H),F):H===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),D):(e.exit("tableDelimiterFiller"),D(H))}function D(H){return Ke(H)?Xe(e,G,"whitespace")(H):G(H)}function G(H){return H===124?_(H):H===null||Le(H)?!u||o!==a?W(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):W(H)}function W(H){return n(H)}function B(H){return e.enter("tableRow"),te(H)}function te(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),te):H===null||Le(H)?(e.exit("tableRow"),t(H)):Ke(H)?Xe(e,te,"whitespace")(H):(e.enter("data"),Te(H))}function Te(H){return H===null||H===124||lt(H)?(e.exit("data"),te(H)):(e.consume(H),H===92?xe:Te)}function xe(H){return H===92||H===124?(e.consume(H),Te):Te(H)}}function j5(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,f=0,h,m,E;const b=new F5;for(;++n<e.length;){const T=e[n],_=T[1];T[0]==="enter"?_.type==="tableHead"?(c=!1,f!==0&&(Eb(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,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",m,t]])),o=_.type==="tableDelimiterRow"?2:m?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],E=Bl(b,t,a,o,void 0,E),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],E=Bl(b,t,a,o,void 0,E)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,f=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(f=n,a[1]!==0?(u[0]=u[1],E=Bl(b,t,a,o,n,E)):u[1]!==0&&(E=Bl(b,t,u,o,n,E)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(f!==0&&Eb(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=U5(t.events,n))}return e}function Bl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},oo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const f=oo(t.events,n[1]);if(a={type:u,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const h=oo(t.events,n[2]),m=oo(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,x=n[3]-n[2]-1;e.add(_,x,[])}}e.add(n[3]+1,0,[["exit",E,t]])}return o!==void 0&&(a.end=Object.assign({},oo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function Eb(e,t,n,r,o){const a=[],u=oo(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function oo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const $5={name:"tasklistCheck",tokenize:q5};function V5(){return{text:{91:$5}}}function q5(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"),a)}function a(f){return lt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),u):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),u):n(f)}function u(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return Le(f)?t(f):Ke(f)?e.check({tokenize:Y5},t,n)(f):n(f)}}function Y5(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function W5(e){return zE([y5(),k5(),M5(e),H5(),V5()])}const G5={};function K5(e){const t=this,n=e||G5,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(W5(n)),a.push(p5()),u.push(m5(n))}const Ul=()=>N.jsx("span",{className:`${Z}-blinking-cursor`,children:N.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:N.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Q5=({globalClassName:e,openLinksInNewTab:t,href:n,children:r})=>{const o=n?t?"_blank":"_self":void 0;return N.jsx("a",ye(U({className:re(e,`${Z}-link`)},n?{href:n,target:o}:{}),{rel:"noopener noreferrer",children:r}))},yb=({globalClassName:e,openLinksInNewTab:t,message:n})=>{const{isLoading:r,isResponseLoading:o}=$r(),a=r&&o((n==null?void 0:n.eventSourceId)||"")&&n.name==="partial_inquiry";return N.jsx(pR,{remarkPlugins:[K5],rehypePlugins:[HD],components:{h1:({children:u})=>N.jsx("h1",{className:re(e,`${Z}-header h1`),children:u}),h2:({children:u})=>N.jsx("h2",{className:re(e,`${Z}-header h2`),children:u}),h3:({children:u})=>N.jsx("h3",{className:re(e,`${Z}-header h3`),children:u}),ul:({children:u})=>N.jsx("ul",{className:re(e,`${Z}-ul`),children:u}),ol:({children:u})=>N.jsx("ol",{className:re(e,`${Z}-ol`),children:u}),li:({children:u})=>N.jsx("li",{className:re(e,`${Z}-li`),children:u}),a:({href:u,children:c})=>N.jsx(Q5,{globalClassName:e,openLinksInNewTab:t,href:u,children:c}),table:({children:u})=>N.jsx("table",{className:re(e,`${Z}-table`),children:u}),thead:({children:u})=>N.jsx("thead",{className:re(e,`${Z}-thead`),children:u}),tbody:({children:u})=>N.jsx("tbody",{className:re(e,`${Z}-tbody`),children:u}),tr:({children:u})=>N.jsx("tr",{className:re(e,`${Z}-tr`),children:u}),th:({children:u})=>N.jsx("th",{className:re(e,`${Z}-th`),children:u}),td:({children:u})=>N.jsx("td",{className:re(e,`${Z}-td`),children:u}),span:({className:u,children:c})=>u===`${Z}-blinking-cursor`?N.jsx(Ul,{}):N.jsx("span",{children:c})},children:n.message+(a?`<span className='${Z}-blinking-cursor'></span>`:"")})},X5=({globalClassName:e,message:t})=>{const[n,r]=V.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(f=>!f)};return N.jsxs("div",{children:[N.jsxs("div",{className:re(e,`${Z}-progress-message`,"standalone"),children:[N.jsx("span",{className:re(e,`${Z}-message-icon`,"progress-icon","standalone"),children:N.jsx(Ug,{})}),N.jsx("p",{className:re(e,`${Z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&N.jsxs(N.Fragment,{children:[N.jsx(Gf,{className:re(e,`${Z}-thought-context-button`),onClick:c,children:n?N.jsxs(N.Fragment,{children:["Hide ",N.jsx(NA,{})]}):N.jsxs(N.Fragment,{children:["Context ",N.jsx(OA,{})]})}),n&&N.jsx("div",{className:re(e,`${Z}-thought-container`),children:a&&N.jsx("p",{className:re(e,`${Z}-progress-thought`),children:t.thought})})]})]})},J5=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?N.jsx(X5,{globalClassName:e,message:t}):N.jsxs("div",{className:re(e,`${Z}-progress-message`,"embedded"),title:t.message,children:[N.jsx("span",{className:re(e,`${Z}-message-icon`,"progress-icon","embedded"),children:N.jsx(Ug,{})}),N.jsx("i",{className:re(e,`${Z}-progress-text`,"embedded"),children:t.message})]}),Z5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return N.jsxs("div",{className:re(e,`${Z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&N.jsxs("div",{className:re(e,`${Z}-refined-event-query`,{embedded:!n,standalone:n}),children:[N.jsx("span",{className:re(e,`${Z}-message-icon`,`${Z}-refined-event-icon`,{embedded:!n,standalone:n}),children:N.jsx(qu,{role:"img"})}),N.jsx("p",{className:re(e,`${Z}-text`,"bold"),children:r})]}),N.jsx(yb,{message:t})]})},Tb=e=>{var f,h;const{configModule:t}=hn(),n=((f=e.request)==null?void 0:f.searchParams)||((h=e.request)==null?void 0:h.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).filter(([m])=>!r.includes(m))),u=Object.keys(a),c=Object.values(a).reduce((m,E)=>m+E.length,0);return{facetFiltersList:u,filterCount:c}},Hl=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>N.jsx("span",{className:re(t,`${Z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filters`}),bb=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var h;const f=((h=o[c])==null?void 0:h.join(", "))||"";return N.jsxs("div",{className:re(e,`${Z}-facets`),children:[N.jsx("p",{className:re(e,`${Z}-facet-category`),children:c}),N.jsx("p",{className:re(e,`${Z}-facet-values`),children:f})]},c)})},Oa=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>N.jsx("span",{className:re(e,`${Z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),e8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var u,c;const{facetFiltersList:r,filterCount:o}=Tb(t),a=new Date(t.createdAt).toLocaleString();return n?N.jsxs("div",{className:re(e,`${Z}-user-message standalone`),children:[N.jsxs("div",{className:re(e,`${Z}-user-message-row standalone`),children:[N.jsx("span",{className:re(e,`${Z}-message-icon user-message-icon standalone`),children:N.jsx(Hg,{})}),N.jsx("p",{className:re(e,`${Z}-user-message-text`),children:(u=t.request)==null?void 0:u.userPrompt}),r.length>0&&N.jsx(Hl,{isWidgetStandalone:!0,globalClassName:e,filterCount:o})]}),N.jsx(bb,{globalClassName:e,facetFiltersList:r,message:t}),N.jsx(Oa,{globalClassName:e,timestamp:a,isWidgetStandalone:!0})]}):N.jsxs("div",{className:re(e,`${Z}-user-message embedded`),children:[N.jsxs("div",{className:re(e,`${Z}-user-message-row embedded`),children:[N.jsx("span",{className:re(e,`${Z}-message-icon user-message-icon embedded`),children:N.jsx(Hg,{})}),N.jsx("p",{children:(c=t.request)==null?void 0:c.userPrompt}),r.length>0&&N.jsx(Hl,{isWidgetStandalone:!1,filterCount:o})]}),N.jsx(Oa,{globalClassName:e,timestamp:a,isWidgetStandalone:!1})]})},t8=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c})=>N.jsxs("div",{className:re(e,`${Z}-user-search standalone`),children:[N.jsxs("div",{children:[N.jsxs("div",{className:re(e,`${Z}-user-search-query standalone`),children:[N.jsx("span",{className:re(e,`${Z}-message-icon user-search-icon standalone`),children:N.jsx(qu,{})}),N.jsx("p",{className:re(e,`${Z}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&N.jsx(Hl,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),N.jsx(bb,{globalClassName:e,facetFiltersList:u,message:a})]}),N.jsx(Oa,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),n8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{const{facetFiltersList:r,filterCount:o}=Tb(t),a=new Date(t.createdAt).toLocaleString(),{actionLabel:u,query:c,queryLabel:f}=V.useMemo(()=>{var m,E,b,T,_,x;switch(t.name){case"copilot_search":return{actionLabel:"Your search",query:(m=t.request)==null?void 0:m.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(b=(E=t.request)==null?void 0:E.browseParams)==null?void 0:b.categoryId,queryLabel:((T=t.request)==null?void 0:T.label)||""};case"product_view":return{actionLabel:"Viewing product",query:(_=t.request)==null?void 0:_.productId,queryLabel:((x=t.request)==null?void 0:x.label)||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[t]);return c?n?N.jsx(t8,{globalClassName:e,timestamp:a,message:t,actionLabel:u,query:c,queryLabel:f,facetFiltersList:r,filterCount:o}):N.jsxs("div",{className:re(e,`${Z}-user-search embedded`),children:[N.jsxs("div",{className:re(e,`${Z}-user-search-query embedded`),children:[N.jsx("span",{className:re(e,`${Z}-message-icon user-search-icon embedded`),children:N.jsx(qu,{})}),N.jsx("p",{children:f||c}),r.length>0&&N.jsx(Hl,{isWidgetStandalone:!1,filterCount:o})]}),N.jsx(Oa,{globalClassName:e,timestamp:a,isWidgetStandalone:!1})]}):null},_b=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,isWidgetStandalone:o,handleSuggestionClick:a})=>{var f;if(!e)return null;const u=e.name,c=!!((f=e.request)!=null&&f.userPrompt);switch(u){case"copilot_search":case"copilot_browse":case"product_view":return c?N.jsx(e8,{globalClassName:t,isWidgetStandalone:o,message:e}):N.jsx(n8,{globalClassName:t,message:e,isWidgetStandalone:o});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return N.jsx(Z5,{globalClassName:t,message:e,isWidgetStandalone:o});case"follow_up":return N.jsx(gO,{globalClassName:t,isWidgetStandalone:o,message:e,handleSuggestionClick:a});case"inquiry":case"partial_inquiry":return N.jsx(yb,{globalClassName:t,openLinksInNewTab:n,message:e});case"error":return N.jsx(hO,{message:e,isWidgetStandalone:o});case"display_products":return N.jsx(dO,{message:e,isWidgetStandalone:o});case"progress":return N.jsx(J5,{globalClassName:t,isWidgetStandalone:o,message:e});case"conversation_reset":return N.jsxs(N.Fragment,{children:[N.jsx("p",{className:re(t,`${Z}-reset-message`),children:"This conversation has been reset."}),N.jsx("p",{className:re(t,`${Z}-start-search-message`),children:r})]});default:return null}},Uh=({isWidgetStandalone:e,messages:t,handleSuggestionClick:n})=>{const{globalClassName:r,openLinksInNewTab:o,resetConversationMessage:a}=hn();return t.map(u=>{if(u.messages&&u.type==="group"){let c=new Date(u.createdAt).toLocaleString();const f=u.messages[u.messages.length-1];return f&&(c=new Date(f.createdAt).toLocaleString()),N.jsxs("div",{className:re(r,`${Z}-message-group`,e?"standalone":"embedded"),children:[u.messages.length>0&&u.messages.map(h=>N.jsx("div",{className:`${Z}-message-group-child`,children:N.jsx(_b,{id:h.id,openLinksInNewTab:o,globalClassName:r,isWidgetStandalone:e,message:h,resetConversationMessage:a,handleSuggestionClick:n})},h.id)),N.jsx(Oa,{globalClassName:r,timestamp:c,isWidgetStandalone:e})]},`group-${u.eventSourceId}`)}else if(u.type==="individual"&&u.message)return N.jsx("div",{className:re(r,`${Z}-message`,e?"standalone":"embedded",{error:u.message.name.includes("error")}),children:N.jsx(_b,{id:u.message.id,openLinksInNewTab:o,globalClassName:r,isWidgetStandalone:e,message:u.message,resetConversationMessage:a,handleSuggestionClick:n})},u.message.id);return null})},xb=()=>{const{globalClassName:e,themeVariables:t}=hn(),{status:n}=Ns(),{copilot:r,messages:o,groupedMessages:a,isLoading:u,handleUserInput:c,handleSuggestion:f}=$r(),{isOpen:h}=n||{},m=V.useRef(null);return V.useEffect(()=>{m.current&&m.current.scrollIntoView({behavior:"smooth",block:"end"})},[o]),r?!h||a.length===0?null:N.jsxs("div",{className:re(e,`${Z}-container`,`${Z}-embedded-chat`),style:t,children:[N.jsxs("div",{className:re(e,`${Z}-message-container`,"embedded"),children:[N.jsx(Uh,{isWidgetStandalone:!1,messages:a,handleSuggestionClick:f}),u&&N.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:N.jsx(Ul,{})}),N.jsx("div",{ref:m})]}),N.jsx(Kf,{componentType:"chat",className:"embedded-chat",isLoading:u,onSubmit:c}),N.jsx("div",{className:re(`${Z}-embedded-chat-menu`),children:N.jsx(lO,{componentType:"chat",children:N.jsx(cE,{componentType:"chat"})})})]}):N.jsx("div",{children:"Loading Copilot..."})},[r8,i8]=Ds({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),s8=e=>h1()(e,["lazyMount","unmountOnExit"]),[o8,Ia]=Ds({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Sb=V.forwardRef((e,t)=>{const n=Ia(),r=i8(),o=md(ye(U({},r),{present:n.open})),a=ur(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:N.jsx(ci.div,ye(U({},a),{ref:tl(o.ref,t)}))});Sb.displayName="DialogBackdrop";const Hh=V.forwardRef((e,t)=>{const n=Ia(),r=Jo(),o=ur(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:N.jsx(ci.div,ye(U({},o),{ref:tl(r.ref,t)}))});Hh.displayName="DialogContent";const zh=V.forwardRef((e,t)=>{const n=Ia(),r=ur(n.getDescriptionProps(),e);return N.jsx(ci.div,ye(U({},r),{ref:t}))});zh.displayName="DialogDescription";const jh=V.forwardRef((e,t)=>{const n=Ia(),r=ur(n.getPositionerProps(),e);return Jo().unmounted?null:N.jsx(ci.div,ye(U({},r),{ref:t}))});jh.displayName="DialogPositioner";var a8=Ms("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),rs=a8.build(),wb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Cb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},$h=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Vh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},vb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},zl=e=>e.getById($h(e)),u8=e=>e.getById(wb(e)),l8=e=>e.getById(Cb(e)),c8=e=>e.getById(Ab(e)),f8=e=>e.getById(Vh(e)),d8=e=>e.getById(qh(e)),h8=e=>e.getById(vb(e));function p8(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),f=n.matches("open");return{open:f,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ye(U({},rs.trigger.attrs),{dir:a("dir"),id:Ab(u),"aria-haspopup":"dialog",type:"button","aria-expanded":f,"data-state":f?"open":"closed","aria-controls":$h(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ye(U({},rs.backdrop.attrs),{dir:a("dir"),hidden:!f,id:Cb(u),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(ye(U({},rs.positioner.attrs),{dir:a("dir"),id:wb(u),style:{pointerEvents:f?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(ye(U({},rs.content.attrs),{dir:a("dir"),role:a("role"),hidden:!f,id:$h(u),tabIndex:-1,"data-state":f?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:Vh(u),"aria-describedby":h.description?qh(u):void 0}))},getTitleProps(){return t.element(ye(U({},rs.title.attrs),{dir:a("dir"),id:Vh(u)}))},getDescriptionProps(){return t.element(ye(U({},rs.description.attrs),{dir:a("dir"),id:qh(u)}))},getCloseTriggerProps(){return t.button(ye(U({},rs.closeTrigger.attrs),{dir:a("dir"),id:vb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var m8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>h8(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 W1(()=>zl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[c8(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return J1(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Q1(()=>zl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?B1(()=>[zl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){_n(()=>{e.set("rendered",{title:!!f8(t),description:!!d8(t)})})},syncZIndex({scope:e}){_n(()=>{const t=zl(e);if(!t)return;const n=Qu(t);[u8(e),l8(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})}}}};fd()(["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 g8=e=>{const t=V.useId(),{getRootNode:n}=Pd(),{dir:r}=iE(),o=U({id:t,getRootNode:n,dir:r},e),a=dd(m8,o);return p8(a,l1)},kb=e=>{const[t,c]=p1(e),f=c,{children:n}=f,r=tn(f,["children"]),[o]=s8(t),a=g8(r),u=md(ur({present:a.open},t));return N.jsx(o8,{value:a,children:N.jsx(r8,{value:o,children:N.jsx(c1,{value:u,children:n})})})},Yh=V.forwardRef((e,t)=>{const n=Ia(),r=ur(n.getTitleProps(),e);return N.jsx(ci.h2,ye(U({},r),{ref:t}))});Yh.displayName="DialogTitle";const Nb=e=>{var f;const{children:t,disabled:n}=e,[r,o]=V.useState((f=e.container)==null?void 0:f.current),a=V.useSyncExternalStore(y8,()=>!1,()=>!0),{getRootNode:u}=Pd();if(V.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),a||n)return N.jsx(N.Fragment,{children:t});const c=r!=null?r:E8(u);return N.jsx(N.Fragment,{children:V.Children.map(t,h=>Zu.createPortal(h,c))})},E8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Wi(n)?n:Sr(t).body},y8=()=>()=>{},T8=()=>{const{globalClassName:e}=hn(),{dialogPosition:t}=Ns(),n=t==="bottom-left",r=()=>{ig(n?"bottom-right":"bottom-left")},o=n?oO:sO,a=n?"Move right":"Move left";return N.jsx(Os,{className:re(e,`${Z}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:N.jsx(o,{})})},Ob=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=hn(),{mode:o,status:a,dialogPosition:u}=Ns(),{copilot:c,messages:f,groupedMessages:h,isLoading:m,handleUserInput:E,handleSuggestion:b}=$r(),T=V.useRef(null),{isOpen:_}=a||{},x=o==="standalone";V.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[f]);const C=()=>{zu(!1)};return!_||h.length===0?null:c?N.jsx(kb,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:N.jsx(Nb,{children:N.jsx(jh,{className:re(n,`${Z}-container`,`${Z}-dialog`,u),style:r,children:N.jsxs(Hh,{className:re(n,`${Z}-dialog-content`,{standalone:x,embedded:!x}),children:[N.jsxs("div",{className:re(n,`${Z}-dialog-header`,{standalone:x,embedded:!x}),children:[e&&N.jsx("img",{alt:"",role:"img",className:re(n,`${Z}-dialog-logo`,{standalone:x,embedded:!x}),src:e}),N.jsx(Yh,{className:re(n,`${Z}-dialog-title`,{standalone:x,embedded:!x}),children:t}),N.jsxs("div",{className:re(n,`${Z}-dialog-controls`),children:[N.jsx(cE,{componentType:"dialog",isIcon:!0}),N.jsx(T8,{}),N.jsx(lE,{componentType:"dialog"}),N.jsx(uE,{className:`dialog ${n}`,onClick:C})]})]}),N.jsxs(zh,{className:re(n,`${Z}-message-container`,{standalone:x,embedded:!x}),children:[N.jsx(Uh,{isWidgetStandalone:x,messages:h,handleSuggestionClick:b}),m&&N.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:N.jsx(Ul,{})}),N.jsx("div",{ref:T})]}),N.jsx(Kf,{componentType:"dialog",isLoading:m,onSubmit:E})]})})})}):N.jsx("div",{children:"Loading Copilot..."})},Ib=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=hn(),{mode:o,status:a,isModalFullscreen:u,previousComponentType:c}=Ns(),{copilot:f,messages:h,groupedMessages:m,isLoading:E,handleUserInput:b,handleSuggestion:T}=$r(),_=V.useRef(null),{isOpen:x}=a||{},C=o==="standalone";V.useEffect(()=>{_.current&&_.current.scrollIntoView({behavior:"smooth",block:"end"})},[h]);const O=({open:W})=>{zu(W)},F=()=>{rg(!u)},D=()=>{qf(c||"dialog")},G=()=>{zu(!1)};return!x||m.length===0?null:f?N.jsx(kb,{lazyMount:!0,open:x,onOpenChange:O,children:N.jsx(Nb,{children:N.jsxs("div",{className:re(n,`${Z}-modal-container`),style:r,children:[N.jsx(Sb,{className:re(n,`${Z}-modal-backdrop`)}),N.jsx(jh,{className:re(n,`${Z}-container`,`${Z}-modal`,{fullscreen:u,standalone:C,embedded:!C}),children:N.jsxs(Hh,{className:re(n,`${Z}-modal-content`,{standalone:C,embedded:!C}),children:[N.jsxs("div",{className:re(n,`${Z}-modal-header`,{standalone:C,embedded:!C}),children:[e&&N.jsx("img",{alt:"",role:"img",className:re(n,`${Z}-modal-logo`,{standalone:C,embedded:!C}),src:e}),N.jsx(Yh,{className:re(n,`${Z}-modal-title`,{standalone:C,embedded:!C}),children:t}),N.jsxs("div",{className:re(n,`${Z}-modal-controls`),children:[N.jsx(Os,{ariaLabel:"Toggle Fullscreen",className:re(n,`${Z}-modal-fullscreen-button`),icon:u?N.jsx(IA,{}):N.jsx(PA,{}),onClick:F}),N.jsx(Os,{ariaLabel:"Toggle Dialog",className:re(n,`${Z}-modal-toggle-dialog-button`),onClick:D,icon:N.jsx(cO,{})}),N.jsx(lE,{componentType:"modal"}),N.jsx(uE,{className:`modal ${n}`,onClick:G})]})]}),N.jsxs(zh,{className:re(n,`${Z}-message-container`,{standalone:C,embedded:!C}),children:[N.jsx(Uh,{isWidgetStandalone:C,messages:m,handleSuggestionClick:T}),E&&N.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:N.jsx(Ul,{})}),N.jsx("div",{ref:_})]}),N.jsx(Kf,{componentType:"modal",isLoading:E,onSubmit:b})]})})]})})}):N.jsx("div",{children:"Loading Copilot..."})},b8=()=>{const e=Ns(),{status:{type:t}}=e||{status:{}};return t==="dialog"?N.jsx(Ob,{}):t==="modal"?N.jsx(Ib,{}):N.jsx(xb,{})},Wh=e=>N.jsx(Rg,ye(U({},e),{children:N.jsx(b8,{})}));var jl={},Pb;function _8(){if(Pb)return jl;Pb=1;var e=s1();return jl.createRoot=e.createRoot,jl.hydrateRoot=e.hydrateRoot,jl}var Rb=_8();const x8=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=tn(o,["elementId","timeout"]);let a;const u=(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&&(ks(!0,"log","Target element found, rendering Copilot Widget"),h.disconnect(),clearTimeout(a),(m=Rb.createRoot(b))==null||m.render(N.jsx(Wh,U({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),ks(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},S8=r=>{var o=r,{timeout:e,elementId:t}=o,n=tn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){ks(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){ks(!0,"warn","Container element not found for id:",t),ks(!0,"warn","Beginning observation for element"),x8(U({elementId:t,timeout:e},n));return}Rb.createRoot(a).render(N.jsx(Wh,U({},n)))},w8={search:iA,browse:GC,pdp:{setPdpContext:xg,updatePdpProductId:QC,updatePdpLink:XC},components:{toggleWidgetOpen:zu,toggleModalFullscreen:rg,setWidgetType:qf,setWidgetDialogPosition:ig},session:JC},C8=()=>Object.freeze({search:Object.freeze(pt.state),browse:Object.freeze(st.state),pdp:Object.freeze(or.state),isConnected:xt.state.connected,isOpen:xt.isOpen});Ie.CopilotDialog=Ob,Ie.CopilotEmbed=xb,Ie.CopilotModal=Ib,Ie.CopilotWidget=Wh,Ie.WidgetProvider=Rg,Ie.eventHandlers=w8,Ie.injectCopilotWidget=S8,Ie.state=C8,Ie.useCopilot=$r,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})});