@cimulate/copilot-widget 0.28.0 → 0.30.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,Me){typeof exports=="object"&&typeof module!="undefined"?Me(exports):typeof define=="function"&&define.amd?define(["exports"],Me):(Oe=typeof globalThis!="undefined"?globalThis:Oe||self,Me(Oe["cimulate-copilot-widget"]={}))})(this,function(Oe){"use strict";var EF=Object.defineProperty,yF=Object.defineProperties;var TF=Object.getOwnPropertyDescriptors;var Gc=Object.getOwnPropertySymbols;var y2=Object.prototype.hasOwnProperty,T2=Object.prototype.propertyIsEnumerable;var Po=(Oe,Me)=>(Me=Symbol[Oe])?Me:Symbol.for("Symbol."+Oe),bF=Oe=>{throw TypeError(Oe)},Kc=Math.pow,km=(Oe,Me,We)=>Me in Oe?EF(Oe,Me,{enumerable:!0,configurable:!0,writable:!0,value:We}):Oe[Me]=We,U=(Oe,Me)=>{for(var We in Me||(Me={}))y2.call(Me,We)&&km(Oe,We,Me[We]);if(Gc)for(var We of Gc(Me))T2.call(Me,We)&&km(Oe,We,Me[We]);return Oe},Te=(Oe,Me)=>yF(Oe,TF(Me));var en=(Oe,Me)=>{var We={};for(var ut in Oe)y2.call(Oe,ut)&&Me.indexOf(ut)<0&&(We[ut]=Oe[ut]);if(Oe!=null&&Gc)for(var ut of Gc(Oe))Me.indexOf(ut)<0&&T2.call(Oe,ut)&&(We[ut]=Oe[ut]);return We};var ke=(Oe,Me,We)=>km(Oe,typeof Me!="symbol"?Me+"":Me,We);var st=(Oe,Me,We)=>new Promise((ut,At)=>{var gt=kt=>{try{jt(We.next(kt))}catch(mn){At(mn)}},Pe=kt=>{try{jt(We.throw(kt))}catch(mn){At(mn)}},jt=kt=>kt.done?ut(kt.value):Promise.resolve(kt.value).then(gt,Pe);jt((We=We.apply(Oe,Me)).next())}),zr=function(Oe,Me){this[0]=Oe,this[1]=Me},Qc=(Oe,Me,We)=>{var ut=(Pe,jt,kt,mn)=>{try{var ys=We[Pe](jt),Ro=(jt=ys.value)instanceof zr,Xc=ys.done;Promise.resolve(Ro?jt[0]:jt).then(nr=>Ro?ut(Pe==="return"?Pe:"next",jt[1]?{done:nr.done,value:nr.value}:nr,kt,mn):kt({value:nr,done:Xc})).catch(nr=>ut("throw",nr,kt,mn))}catch(nr){mn(nr)}},At=Pe=>gt[Pe]=jt=>new Promise((kt,mn)=>ut(Pe,jt,kt,mn)),gt={};return We=We.apply(Oe,Me),gt[Po("asyncIterator")]=()=>gt,At("next"),At("throw"),At("return"),gt},Nm=Oe=>{var Me=Oe[Po("asyncIterator")],We=!1,ut,At={};return Me==null?(Me=Oe[Po("iterator")](),ut=gt=>At[gt]=Pe=>Me[gt](Pe)):(Me=Me.call(Oe),ut=gt=>At[gt]=Pe=>{if(We){if(We=!1,gt==="throw")throw Pe;return Pe}return We=!0,{done:!1,value:new zr(new Promise(jt=>{var kt=Me[gt](Pe);kt instanceof Object||bF("Object expected"),jt(kt)}),1)}}),At[Po("iterator")]=()=>At,ut("next"),"throw"in Me?ut("throw"):At.throw=gt=>{throw gt},"return"in Me&&ut("return"),At},b2=(Oe,Me,We)=>(Me=Oe[Po("asyncIterator")])?Me.call(Oe):(Oe=Oe[Po("iterator")](),Me={},We=(ut,At)=>(At=Oe[ut])&&(Me[ut]=gt=>new Promise((Pe,jt,kt)=>(gt=At.call(Oe,gt),kt=gt.done,Promise.resolve(gt.value).then(mn=>Pe({value:mn,done:kt}),jt)))),We("next"),We("return"),Me);var Me=document.createElement("style");Me.textContent=`.cim-widget-button{padding:.5rem;background-color:var(--cim-widget-primary-color, #3182ce);border-radius:4px;border-color:var(--cim-widget-primary-color, #3182ce);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}}.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;background-color:transparent;border:1px solid transparent;border-radius:4px;padding:6px;cursor:pointer;color:#333;font-size:18px;&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-bar{display:flex;align-items:center;justify-content:space-between;padding:1px;border:1px solid var(--cim-widget-border-color);border-radius:4px;font-family:var(--cim-widget-font-family)}.cim-widget-search-input{width:100%;height:100%;margin-left:2px;background-color:transparent;border:none;outline:none}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:130px;background:#fff;padding:.25rem 0;border-radius:.5rem;border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;background-color:#fff;border:1px solid transparent;border-radius:4px;padding:6px;cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;svg{font-size:.75rem}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;border-radius:4px;border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-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-secondary-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(Me);function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ut={exports:{}},At={},gt={exports:{}},Pe={};var jt;function kt(){if(jt)return Pe;jt=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,Fe={},Ie=null,Ke=null;if(Q!=null)for(xe in Q.ref!==void 0&&(Ke=Q.ref),Q.key!==void 0&&(Ie=""+Q.key),Q)W.call(Q,xe)&&!te.hasOwnProperty(xe)&&(Fe[xe]=Q[xe]);var Ve=arguments.length-2;if(Ve===1)Fe.children=k;else if(1<Ve){for(var Je=Array(Ve),xt=0;xt<Ve;xt++)Je[xt]=arguments[xt+2];Fe.children=Je}if(R&&R.defaultProps)for(xe in Ve=R.defaultProps,Ve)Fe[xe]===void 0&&(Fe[xe]=Ve[xe]);return{$$typeof:e,type:R,key:Ie,ref:Ke,props:Fe,_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,Fe){var Ie=typeof R;(Ie==="undefined"||Ie==="boolean")&&(R=null);var Ke=!1;if(R===null)Ke=!0;else switch(Ie){case"string":case"number":Ke=!0;break;case"object":switch(R.$$typeof){case e:case t:Ke=!0}}if(Ke)return Ke=R,Fe=Fe(Ke),R=xe===""?"."+ce(Ke,0):xe,G(Fe)?(k="",R!=null&&(k=R.replace(de,"$&/")+"/"),fe(Fe,Q,k,"",function(xt){return xt})):Fe!=null&&(H(Fe)&&(Fe=he(Fe,k+(!Fe.key||Ke&&Ke.key===Fe.key?"":(""+Fe.key).replace(de,"$&/")+"/")+R)),Q.push(Fe)),1;if(Ke=0,xe=xe===""?".":xe+":",G(R))for(var Ve=0;Ve<R.length;Ve++){Ie=R[Ve];var Je=xe+ce(Ie,Ve);Ke+=fe(Ie,Q,k,Je,Fe)}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++),Ke+=fe(Ie,Q,k,Je,Fe);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 Ke}function ye(R,Q,k){if(R==null)return R;var xe=[],Fe=0;return fe(R,xe,"","",function(Ie){return Q.call(k,Ie,Fe++)}),xe}function Ae(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 ie={current:null},$={transition:null},ee={ReactCurrentDispatcher:ie,ReactCurrentBatchConfig:$,ReactCurrentOwner:B};function w(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:ye,forEach:function(R,Q,k){ye(R,function(){Q.apply(this,arguments)},k)},count:function(R){var Q=0;return ye(R,function(){Q++}),Q},toArray:function(R){return ye(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),Fe=R.key,Ie=R.ref,Ke=R._owner;if(Q!=null){if(Q.ref!==void 0&&(Ie=Q.ref,Ke=B.current),Q.key!==void 0&&(Fe=""+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 xt=0;xt<Je;xt++)Ve[xt]=arguments[xt+2];xe.children=Ve}return{$$typeof:e,type:R.type,key:Fe,ref:Ie,props:xe,_owner:Ke}},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:Ae}},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 ie.current.useCallback(R,Q)},Pe.useContext=function(R){return ie.current.useContext(R)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(R){return ie.current.useDeferredValue(R)},Pe.useEffect=function(R,Q){return ie.current.useEffect(R,Q)},Pe.useId=function(){return ie.current.useId()},Pe.useImperativeHandle=function(R,Q,k){return ie.current.useImperativeHandle(R,Q,k)},Pe.useInsertionEffect=function(R,Q){return ie.current.useInsertionEffect(R,Q)},Pe.useLayoutEffect=function(R,Q){return ie.current.useLayoutEffect(R,Q)},Pe.useMemo=function(R,Q){return ie.current.useMemo(R,Q)},Pe.useReducer=function(R,Q,k){return ie.current.useReducer(R,Q,k)},Pe.useRef=function(R){return ie.current.useRef(R)},Pe.useState=function(R){return ie.current.useState(R)},Pe.useSyncExternalStore=function(R,Q,k){return ie.current.useSyncExternalStore(R,Q,k)},Pe.useTransition=function(){return ie.current.useTransition()},Pe.version="18.3.1",Pe}var mn;function ys(){return mn||(mn=1,gt.exports=kt()),gt.exports}var Ro;function Xc(){if(Ro)return At;Ro=1;var e=ys(),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 At.Fragment=n,At.jsx=u,At.jsxs=u,At}var nr;function S2(){return nr||(nr=1,ut.exports=Xc()),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 du=Object.create(null);Object.keys(_r).forEach(e=>{du[_r[e]]=e});const Jc={type:"error",data:"parser error"},Om=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Im=typeof ArrayBuffer=="function",Pm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Zc=({type:e,data:t},n,r)=>Om&&t instanceof Blob?n?r(t):Rm(t,r):Im&&(t instanceof ArrayBuffer||Pm(t))?n?r(t):Rm(new Blob([t]),r):r(_r[e]+(t||"")),Rm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Lm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ef;function w2(e,t){if(Om&&e.data instanceof Blob)return e.data.arrayBuffer().then(Lm).then(t);if(Im&&(e.data instanceof ArrayBuffer||Pm(e.data)))return t(Lm(e.data));Zc(e,!1,n=>{ef||(ef=new TextEncoder),t(ef.encode(n))})}const Dm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Dm.length;e++)Lo[Dm.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",tf=(e,t)=>{if(typeof e!="string")return{type:"message",data:Mm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:v2(e.substring(1),t)}:du[n]?e.length>1?{type:du[n],data:e.substring(1)}:{type:du[n]}:Jc},v2=(e,t)=>{if(A2){const n=C2(e);return Mm(n,t)}else return{base64:!0,data:e}},Mm=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Fm="",k2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Zc(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Fm))})})},N2=(e,t)=>{const n=e.split(Fm),r=[];for(let o=0;o<n.length;o++){const a=tf(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 nf;function hu(e){return e.reduce((t,n)=>t+n.length,0)}function pu(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){nf||(nf=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(hu(n)<1)break;const f=pu(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(hu(n)<2)break;const f=pu(n,2);o=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),r=3}else if(r===2){if(hu(n)<8)break;const f=pu(n,8),h=new DataView(f.buffer,f.byteOffset,f.length),m=h.getUint32(0);if(m>Math.pow(2,21)-1){c.enqueue(Jc);break}o=m*Math.pow(2,32)+h.getUint32(4),r=3}else{if(hu(n)<o)break;const f=pu(n,o);c.enqueue(tf(a?f:nf.decode(f),t)),r=0}if(o===0||o>e){c.enqueue(Jc);break}}}})}const Bm=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 mu=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 _F(){}function Um(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const L2=jn.setTimeout,D2=jn.clearTimeout;function gu(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 Hm(){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 rf extends Dt{constructor(t){super(),this.writable=!1,gu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new 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=tf(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 rf{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]=Hm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let zm=!1;try{zm=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const $2=zm;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,gu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Um(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=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",jm);else if(typeof addEventListener=="function"){const e="onpagehide"in jn?"pagehide":"unload";addEventListener(e,jm,!1)}}function jm(){for(let e in xr.requests)xr.requests.hasOwnProperty(e)&&xr.requests[e].abort()}const Y2=function(){const e=$m({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($m,this.uri(),t)}}function $m(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 Vm=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class G2 extends rf{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Vm?{}:Um(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Zc(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&mu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Hm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const sf=jn.WebSocket||jn.MozWebSocket;class K2 extends G2{createSocket(t,n,r){return Vm?new sf(t,n,r):n?new sf(t,n):new sf(t)}doWrite(t,n){this.ws.send(n)}}class Q2 extends rf{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&&mu(()=>{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 of(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 af=typeof addEventListener=="function"&&typeof removeEventListener=="function",Eu=[];af&&addEventListener("offline",()=>{Eu.forEach(e=>e())},!1);class li 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=of(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=of(n.host).host);gu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=H2(this.opts.query)),af&&(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"})},Eu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Bm,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&li.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",li.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=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,mu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(li.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),af&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Eu.indexOf(this._offlineEventListener);r!==-1&&Eu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}li.protocol=Bm;class nS extends li{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;li.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",E=>{if(!r)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;li.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(m(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const 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=of(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 uf(e){return sS&&(e instanceof ArrayBuffer||oS(e))||aS&&e instanceof Blob||uS&&e instanceof File}function yu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(yu(e[n]))return!0;return!1}if(uf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return yu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&yu(e[n]))return!0;return!1}function lS(e){const t=[],n=e.data,r=e;return r.data=lf(n,t),r.attachments=t.length,{packet:r,buffers:t}}function lf(e,t){if(!e)return e;if(uf(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]=lf(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]=lf(e[r],t));return n}return e}function cS(e,t){return e.data=cf(e.data,t),delete e.attachments,e}function cf(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]=cf(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=cf(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)&&yu(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 Ym(e){return Object.prototype.toString.call(e)==="[object Object]"}class ff 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(uf(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(ff.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 Ym(n);case Qe.DISCONNECT:return n===void 0;case Qe.CONNECT_ERROR:return typeof n=="string"||Ym(n);case Qe.EVENT:case Qe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&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:ff,Encoder:hS,get PacketType(){return Qe},protocol:dS},Symbol.toStringTag,{value:"Module"}));function rr(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 Wm 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=[rr(t,"open",this.onopen.bind(this)),rr(t,"packet",this.onpacket.bind(this)),rr(t,"error",this.onerror.bind(this)),rr(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 Ts(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}Ts.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},Ts.prototype.reset=function(){this.attempts=0},Ts.prototype.setMin=function(e){this.ms=e},Ts.prototype.setMax=function(e){this.max=e},Ts.prototype.setJitter=function(e){this.jitter=e};class df 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,gu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ts({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=rr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=rr(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(rr(t,"ping",this.onping.bind(this)),rr(t,"data",this.ondata.bind(this)),rr(t,"error",this.onerror.bind(this)),rr(t,"close",this.onclose.bind(this)),rr(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){mu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Wm(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Do={};function Tu(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 df(r,t):(Do[o]||(Do[o]=new df(r,t)),f=Do[o]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(Tu,{Manager:df,Socket:Wm,io:Tu,connect:Tu});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)?bs((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 Gm(e){return Object.keys(e).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(n){return Object.propertyIsEnumerable.call(t,n)}):[]}(e))}function Km(e,t){try{return t in e}catch(n){return!1}}function bS(e,t,n){var r={};return n.isMergeableObject(e)&&Gm(e).forEach(function(o){r[o]=Mo(e[o],n)}),Gm(t).forEach(function(o){(function(a,u){return Km(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(Km(e,o)&&n.isMergeableObject(t[o])?r[o]=function(a,u){if(!u.customMerge)return bs;var c=u.customMerge(a);return typeof c=="function"?c:bs}(o,n)(e[o],t[o],n):r[o]=Mo(t[o],n))}),r}function bs(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)}bs.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,r){return bs(n,r,t)},{})};var _S=bs;class xS{constructor(t){Object.assign(this,t)}}function cn(e){if(e)return function(t){for(var n in cn.prototype)t[n]=cn.prototype[n];return t}(e)}cn.prototype.on=cn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},cn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},cn.prototype.off=cn.prototype.removeListener=cn.prototype.removeAllListeners=cn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},cn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},cn.prototype.emitReserved=cn.prototype.emit,cn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},cn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const SS=typeof ArrayBuffer=="function",Qm=Object.prototype.toString,wS=typeof Blob=="function"||typeof Blob!="undefined"&&Qm.call(Blob)==="[object BlobConstructor]",CS=typeof File=="function"||typeof File!="undefined"&&Qm.call(File)==="[object FileConstructor]";function hf(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 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(hf(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 AS(e){const t=[],n=e.data,r=e;return r.data=pf(n,t),r.attachments=t.length,{packet:r,buffers:t}}function pf(e,t){if(!e)return e;if(hf(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]=pf(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]=pf(e[r],t));return n}return e}function vS(e,t){return e.data=mf(e.data,t),delete e.attachments,e}function mf(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]=mf(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=mf(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||!bu(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 Xm(e){return Object.prototype.toString.call(e)==="[object Object]"}class gf extends cn{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(!hf(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(!gf.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 Xm(n);case _t.DISCONNECT:return n===void 0;case _t.CONNECT_ERROR:return typeof n=="string"||Xm(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 Jm=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],Zm=(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)},e0=e=>e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),IS=Zm(e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),e=>e,Jm),PS=Zm(e0,e0,Jm),RS={Encoder:class extends NS{encode(e){var t,n;return super.encode(Te(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 gf{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=Tu(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*Kc(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 Qc(this,null,function*(){const c=[];let f=!1,h=null;const m=yield new zr(u({emit:E=>{c.push(E),h&&(h(),h=null)},cancel:()=>{f=!0}}));try{for(;!f;)c.length>0?yield c.shift():yield new zr(new Promise(E=>{h=E}));for(;c.length>0;)yield c.shift()}finally{yield new zr(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=ys();const zi=We(q);function t0(e,t){return function(){return e.apply(t,arguments)}}const{toString:MS}=Object.prototype,{getPrototypeOf:Ef}=Object,{iterator:_u,toStringTag:n0}=Symbol,xu=(e=>t=>{const n=MS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ir=e=>(e=e.toLowerCase(),t=>xu(t)===e),Su=e=>t=>typeof t===e,{isArray:_s}=Array,xs=Su("undefined");function Fo(e){return e!==null&&!xs(e)&&e.constructor!==null&&!xs(e.constructor)&&gn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const r0=ir("ArrayBuffer");function FS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&r0(e.buffer),t}const BS=Su("string"),gn=Su("function"),i0=Su("number"),Bo=e=>e!==null&&typeof e=="object",US=e=>e===!0||e===!1,wu=e=>{if(xu(e)!=="object")return!1;const t=Ef(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(n0 in e)&&!(_u 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=ir("Date"),jS=ir("File"),$S=ir("Blob"),VS=ir("FileList"),qS=e=>Bo(e)&&gn(e.pipe),YS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||gn(e.append)&&((t=xu(e))==="formdata"||t==="object"&&gn(e.toString)&&e.toString()==="[object FormData]"))},WS=ir("URLSearchParams"),[GS,KS,QS,XS]=["ReadableStream","Request","Response","Headers"].map(ir),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]),_s(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 s0(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,o0=e=>!xs(e)&&e!==ji;function yf(){const{caseless:e,skipUndefined:t}=o0(this)&&this||{},n={},r=(o,a)=>{const u=e&&s0(n,a)||a;wu(n[u])&&wu(o)?n[u]=yf(n[u],o):wu(o)?n[u]=yf({},o):_s(o)?n[u]=o.slice():(!t||!xs(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&&gn(o)?e[a]=t0(o,n):e[a]=o},{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),e.prototype.constructor=e,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&&Ef(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(_s(e))return e;let t=e.length;if(!i0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sw=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ef(Uint8Array)),ow=(e,t)=>{const r=(e&&e[_u]).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=ir("HTMLFormElement"),lw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),a0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cw=ir("RegExp"),u0=(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=>{u0(e,(t,n)=>{if(gn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(gn(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 _s(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&&gn(e.append)&&e[n0]==="FormData"&&e[_u])}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=_s(r)?[]:{};return Uo(r,(u,c)=>{const f=n(u,o+1);!xs(f)&&(a[c]=f)}),t[o]=void 0,a}}return r};return n(e,0)},Ew=ir("AsyncFunction"),yw=e=>e&&(Bo(e)||gn(e))&&gn(e.then)&&gn(e.catch),l0=((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",gn(ji.postMessage)),Tw=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ji):typeof process!="undefined"&&process.nextTick||l0,K={isArray:_s,isArrayBuffer:r0,isBuffer:Fo,isFormData:YS,isArrayBufferView:FS,isString:BS,isNumber:i0,isBoolean:US,isObject:Bo,isPlainObject:wu,isEmptyObject:HS,isReadableStream:GS,isRequest:KS,isResponse:QS,isHeaders:XS,isUndefined:xs,isDate:zS,isFile:jS,isBlob:$S,isRegExp:cw,isFunction:gn,isStream:qS,isURLSearchParams:WS,isTypedArray:sw,isFileList:VS,forEach:Uo,merge:yf,extend:ZS,trim:JS,stripBOM:ew,inherits:tw,toFlatObject:nw,kindOf:xu,kindOfTest:ir,endsWith:rw,toArray:iw,forEachEntry:ow,matchAll:aw,isHTMLForm:uw,hasOwnProperty:a0,hasOwnProp:a0,reduceDescriptors:u0,freezeMethods:fw,toObjectSet:dw,toCamelCase:lw,noop:hw,toFiniteNumber:pw,findKey:s0,global:ji,isContextDefined:o0,isSpecCompliantForm:mw,toJSONObject:gw,isAsyncFn:Ew,isThenable:yw,setImmediate:l0,asap:Tw,isIterable:e=>e!=null&&gn(e[_u])};function ze(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}K.inherits(ze,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const c0=ze.prototype,f0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{f0[e]={value:e}}),Object.defineProperties(ze,f0),Object.defineProperty(c0,"isAxiosError",{value:!0}),ze.from=(e,t,n,r,o,a)=>{const u=Object.create(c0);K.toFlatObject(e,u,function(m){return m!==Error.prototype},h=>h!=="isAxiosError");const c=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return ze.call(u,c,f,n,r,o),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",a&&Object.assign(u,a),u};const bw=null;function Tf(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(Tf)}const xw=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function Cu(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 ze("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 Tf(_)?!0:(t.append(h0(C,S,a),h(_)),!1)}const E=[],b=Object.assign(xw,{defaultVisitor:m,convertValue:h,isVisitable:Tf});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 bf(e,t){this._pairs=[],e&&Cu(e,this,t)}const m0=bf.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;K.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=K.isURLSearchParams(t)?t.toString():new bf(t,n).toString(r),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}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 y0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ww={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:bf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},_f=typeof window!="undefined"&&typeof document!="undefined",xf=typeof navigator=="object"&&navigator||void 0,Cw=_f&&(!xf||["ReactNative","NativeScript","NS"].indexOf(xf.product)<0),Aw=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vw=_f&&window.location.href||"http://localhost",tn=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_f,hasStandardBrowserEnv:Cw,hasStandardBrowserWebWorkerEnv:Aw,navigator:xf,origin:vw},Symbol.toStringTag,{value:"Module"}))),ww);function kw(e,t){return Cu(e,new tn.classes.URLSearchParams,U({visitor:function(n,r,o,a){return tn.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 T0(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:y0,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(T0(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 Cu(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"?ze.from(c,ze.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:tn.classes.FormData,Blob:tn.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},
|
|
4
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[b0]=this[b0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=zo(u);r[c]||(Fw(o,u),r[c]=!0)}return K.isArray(t)?t.forEach(a):a(t),this}};En.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(En.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),K.freezeMethods(En);function wf(e,t){const n=this||Ho,r=t||n,o=En.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 _0(e){return!!(e&&e.__CANCEL__)}function Ss(e,t,n){ze.call(this,e==null?"canceled":e,ze.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(Ss,ze,{__CANCEL__:!0});function x0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ze("Request failed with status code "+n.status,[ze.ERR_BAD_REQUEST,ze.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 vu=(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)},S0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},w0=e=>(...t)=>K.asap(()=>e(...t)),zw=tn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,tn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(tn.origin),tn.navigator&&/(msie|trident)/i.test(tn.navigator.userAgent)):()=>!0,jw=tn.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const u=[e+"="+encodeURIComponent(t)];K.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),K.isString(r)&&u.push("path="+r),K.isString(o)&&u.push("domain="+o),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $w(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Vw(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function C0(e,t,n){let r=!$w(t);return e&&(r||n==!1)?Vw(e,t):t}const A0=e=>e instanceof En?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(A0(h),A0(m),E,!0)};return K.forEach(Object.keys(U(U({},e),t)),function(m){const E=f[m]||o,b=E(e[m],t[m],m);K.isUndefined(b)&&E!==c||(n[m]=b)}),n}const v0=e=>{const t=$i({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:c}=t;if(t.headers=u=En.from(u),t.url=g0(C0(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(tn.hasStandardBrowserEnv||tn.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(tn.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=v0(e);let a=o.data;const u=En.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=En.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};x0(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 ze("Request aborted",ze.ECONNABORTED,e,C)),C=null)},C.onerror=function(G){const W=G&&G.message?G.message:"Network Error",B=new ze(W,ze.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||y0;o.timeoutErrorMessage&&(G=o.timeoutErrorMessage),r(new ze(G,W.clarifyTimeoutError?ze.ETIMEDOUT:ze.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,_]=vu(h,!0),C.addEventListener("progress",b)),f&&C.upload&&([E,T]=vu(f),C.upload.addEventListener("progress",E),C.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(m=D=>{C&&(r(!D||D.type?new Ss(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&&tn.protocols.indexOf(F)===-1){r(new ze("Unsupported protocol "+F+":",ze.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 ze?m:new Ss(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,a(new ze(`timeout ${t} of ms exceeded`,ze.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 Qc(this,null,function*(){try{for(var n=b2(Kw(e)),r,o,a;r=!(o=yield new zr(n.next())).done;r=!1){const u=o.value;yield*Nm(Ww(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new zr(o.call(n)))}finally{if(a)throw a[0]}}})},Kw=function(e){return Qc(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Nm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new zr(t.read());if(n)break;yield r}}finally{yield new zr(t.cancel())}})},k0=(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})},N0=64*1024,{isFunction:ku}=K,Qw=(({Request:e,Response:t})=>({Request:e,Response:t}))(K.global),{ReadableStream:O0,TextEncoder:I0}=K.global,P0=(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?ku(t):typeof fetch=="function",a=ku(n),u=ku(r);if(!o)return!1;const c=o&&ku(O0),f=o&&(typeof I0=="function"?(_=>S=>_.encode(S))(new I0):_=>st(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),h=a&&c&&P0(()=>{let _=!1;const S=new n(tn.origin,{body:new O0,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!S}),m=u&&c&&P0(()=>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 ze(`Response type '${_}' is not supported`,ze.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(tn.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}=v0(_),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 ye;try{if(B&&h&&C!=="get"&&C!=="head"&&(ye=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]=S0(ye,vu(w0(B)));I=k0(R.body,N0,k,xe)}}K.isString(he)||(he=he?"include":"omit");const Ae=a&&"credentials"in n.prototype,ie=Te(U({},H),{signal:de,method:C.toUpperCase(),headers:be.normalize().toJSON(),body:I,duplex:"half",credentials:Ae?he:void 0});ce=a&&new n(S,ie);let $=yield a?le(ce,H):le(S,ie);const ee=m&&(te==="stream"||te==="response");if(m&&(W||ee&&fe)){const R={};["status","statusText","headers"].forEach(Fe=>{R[Fe]=$[Fe]});const Q=K.toFiniteNumber($.headers.get("content-length")),[k,xe]=W&&S0(Q,vu(w0(W),!0))||[];$=new r(k0($.body,N0,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)=>{x0(R,Q,{data:w,headers:En.from($.headers),status:$.status,statusText:$.statusText,config:_,request:ce})})}catch(Ae){throw fe&&fe(),Ae&&Ae.name==="TypeError"&&/Load failed|fetch/i.test(Ae.message)?Object.assign(new ze("Network Error",ze.ERR_NETWORK,_,ce),{cause:Ae.cause||Ae}):ze.from(Ae,Ae&&Ae.code,_,ce)}})},Jw=new Map,R0=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};R0();const Cf={http:bw,xhr:qw,fetch:{get:R0}};K.forEach(Cf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const L0=e=>`- ${e}`,Zw=e=>K.isFunction(e)||e===null||e===!1,D0={getAdapter:(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=Cf[(c=String(r)).toLowerCase()],o===void 0))throw new ze(`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(
|
|
6
|
-
`):" "+
|
|
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&&Ou.assertOptions(r,{silentJSONParsing:Sr.transitional(Sr.boolean),forcedJSONParsing:Sr.transitional(Sr.boolean),clarifyTimeoutError:Sr.transitional(Sr.boolean)},!1),o!=null&&(K.isFunction(o)?n.paramsSerializer={serialize:o}:Ou.assertOptions(o,{encode:Sr.function,serialize:Sr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ou.assertOptions(n,{baseUrl:Sr.spelling("baseURL"),withXsrfToken:Sr.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=En.concat(u,a);const c=[];let f=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(f=f&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let m,E=0,b;if(!f){const _=[M0.bind(this),void 0];for(_.unshift(...c),_.push(...h),b=_.length,m=Promise.resolve(n);E<b;)m=m.then(_[E++],_[E++]);return m}b=c.length;let T=n;for(;E<b;){const _=c[E++],S=c[E++];try{T=_(T)}catch(C){S.call(this,C);break}}try{m=M0.call(this,T)}catch(_){return Promise.reject(_)}for(E=0,b=h.length;E<b;)m=m.then(h[E++],h[E++]);return m}getUri(t){t=$i(this.defaults,t);const n=C0(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 tC=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 Ss(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 nC(e){return function(n){return e.apply(null,n)}}function rC(e){return K.isObject(e)&&e.isAxiosError===!0}const vf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vf).forEach(([e,t])=>{vf[t]=e});function U0(e){const t=new Vi(e),n=t0(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 U0($i(e,o))},n}const Nt=U0(Ho);Nt.Axios=Vi,Nt.CanceledError=Ss,Nt.CancelToken=tC,Nt.isCancel=_0,Nt.VERSION=F0,Nt.toFormData=Cu,Nt.AxiosError=ze,Nt.Cancel=Nt.CanceledError,Nt.all=function(t){return Promise.all(t)},Nt.spread=nC,Nt.isAxiosError=rC,Nt.mergeConfig=$i,Nt.AxiosHeaders=En,Nt.formToJSON=e=>T0(K.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=D0.getAdapter,Nt.HttpStatusCode=vf,Nt.default=Nt;const{Axios:kF,AxiosError:NF,CanceledError:OF,isCancel:IF,CancelToken:PF,VERSION:RF,all:LF,Cancel:DF,isAxiosError:MF,spread:FF,toFormData:BF,AxiosHeaders:UF,HttpStatusCode:HF,formToJSON:zF,getAdapter:jF,mergeConfig:$F}=Nt;class H0{constructor(t,n,r=!1){ke(this,"CIMULATE_API_HEADER","x-cimulate-api-key");ke(this,"CIMULATE_SEARCH_API_PATH","api/v1");ke(this,"baseApiUrl");ke(this,"headers",{});ke(this,"fetchConfig",()=>st(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 iC=q.createContext(void 0),sC=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=q.useMemo(()=>new H0(e,t,n),[e,t,n]);return N.jsx(iC.Provider,{value:o,children:r})};var z0=Symbol.for("immer-nothing"),j0=Symbol.for("immer-draftable"),it=Symbol.for("immer-state");function $n(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ws=Object.getPrototypeOf;function Cs(e){return!!e&&!!e[it]}function jr(e){var t;return e?$0(e)||Array.isArray(e)||!!e[j0]||!!((t=e.constructor)!=null&&t[j0])||Pu(e)||Ru(e):!1}var oC=Object.prototype.constructor.toString();function $0(e){if(!e||typeof e!="object")return!1;const t=ws(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)===oC}function jo(e,t){Iu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Iu(e){const t=e[it];return t?t.type_:Array.isArray(e)?1:Pu(e)?2:Ru(e)?3:0}function kf(e,t){return Iu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function V0(e,t,n){const r=Iu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function aC(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Pu(e){return e instanceof Map}function Ru(e){return e instanceof Set}function $t(e){return e.copy_||e.base_}function Nf(e,t){if(Pu(e))return new Map(e);if(Ru(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=$0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[it];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(ws(e),r)}else{const r=ws(e);if(r!==null&&n)return U({},e);const o=Object.create(r);return Object.assign(o,e)}}function Of(e,t=!1){return Lu(e)||Cs(e)||!jr(e)||(Iu(e)>1&&(e.set=e.add=e.clear=e.delete=uC),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Of(r,!0))),e}function uC(){$n(2)}function Lu(e){return Object.isFrozen(e)}var If={};function qi(e){const t=If[e];return t||$n(0,e),t}function lC(e,t){If[e]||(If[e]=t)}var $o;function Du(){return $o}function cC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function q0(e,t){t&&(qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Pf(e){Rf(e),e.drafts_.forEach(fC),e.drafts_=null}function Rf(e){e===$o&&($o=e.parent_)}function Y0(e){return $o=cC($o,e)}function fC(e){const t=e[it];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function W0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[it].modified_&&(Pf(t),$n(4)),jr(e)&&(e=Mu(t,e),t.parent_||Fu(t,e)),t.patches_&&qi("Patches").generateReplacementPatches_(n[it].base_,e,t.patches_,t.inversePatches_)):e=Mu(t,n,[]),Pf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==z0?e:void 0}function Mu(e,t,n){if(Lu(t))return t;const r=t[it];if(!r)return jo(t,(o,a)=>G0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Fu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),jo(a,(c,f)=>G0(e,r,o,c,f,n,u)),Fu(e,o,!1),n&&e.patches_&&qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function G0(e,t,n,r,o,a,u){if(Cs(o)){const c=a&&t&&t.type_!==3&&!kf(t.assigned_,r)?a.concat(r):void 0,f=Mu(e,o,c);if(V0(n,r,f),Cs(f))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(jr(o)&&!Lu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Mu(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Fu(e,o)}}function Fu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Of(t,n)}function dC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Du(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Lf;n&&(o=[r],a=Vo);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Lf={get(e,t){if(t===it)return e;const n=$t(e);if(!kf(n,t))return hC(e,n,t);const r=n[t];return e.finalized_||!jr(r)?r:r===Df(e.base_,t)?(Mf(e),e.copy_[t]=qo(r,e)):r},has(e,t){return t in $t(e)},ownKeys(e){return Reflect.ownKeys($t(e))},set(e,t,n){const r=K0($t(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Df($t(e),t),a=o==null?void 0:o[it];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(aC(n,o)&&(n!==void 0||kf(e.base_,t)))return!0;Mf(e),$r(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Df(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Mf(e),$r(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=$t(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){$n(11)},getPrototypeOf(e){return ws(e.base_)},setPrototypeOf(){$n(12)}},Vo={};jo(Lf,(e,t)=>{Vo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Vo.deleteProperty=function(e,t){return Vo.set.call(this,e,t,void 0)},Vo.set=function(e,t,n){return Lf.set.call(this,e[0],t,n,e[0])};function Df(e,t){const n=e[it];return(n?$t(n):e)[t]}function hC(e,t,n){var o;const r=K0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function K0(e,t){if(!(t in e))return;let n=ws(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ws(n)}}function $r(e){e.modified_||(e.modified_=!0,e.parent_&&$r(e.parent_))}function Mf(e){e.copy_||(e.copy_=Nf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pC=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"&&$n(6),r!==void 0&&typeof r!="function"&&$n(7);let o;if(jr(t)){const a=Y0(this),u=qo(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Pf(a):Rf(a)}return q0(a,r),W0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===z0&&(o=void 0),this.autoFreeze_&&Of(o,!0),r){const a=[],u=[];qi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else $n(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,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){jr(e)||$n(8),Cs(e)&&(e=mC(e));const t=Y0(this),n=qo(e,void 0);return n[it].isManual_=!0,Rf(t),n}finishDraft(e,t){const n=e&&e[it];(!n||!n.isManual_)&&$n(9);const{scope_:r}=n;return q0(r,t),W0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=qi("Patches").applyPatches_;return Cs(e)?r(e,t):this.produce(e,o=>r(o,t))}};function qo(e,t){const n=Pu(e)?qi("MapSet").proxyMap_(e,t):Ru(e)?qi("MapSet").proxySet_(e,t):dC(e,t);return(t?t.scope_:Du()).drafts_.push(n),n}function mC(e){return Cs(e)||$n(10,e),Q0(e)}function Q0(e){if(!jr(e)||Lu(e))return e;const t=e[it];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Nf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Nf(e,!0);return jo(n,(r,o)=>{V0(n,r,Q0(o))}),t&&(t.finalized_=!1),n}function gC(){class e extends Map{constructor(f,h){super(),this[it]={type_:2,parent_:h,scope_:h?h.scope_:Du(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:f,draft_:this,isManual_:!1,revoked_:!1}}get size(){return $t(this[it]).size}has(f){return $t(this[it]).has(f)}set(f,h){const m=this[it];return u(m),(!$t(m).has(f)||$t(m).get(f)!==h)&&(n(m),$r(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[it];return u(h),n(h),$r(h),h.base_.has(f)?h.assigned_.set(f,!1):h.assigned_.delete(f),h.copy_.delete(f),!0}clear(){const f=this[it];u(f),$t(f).size&&(n(f),$r(f),f.assigned_=new Map,jo(f.base_,h=>{f.assigned_.set(h,!1)}),f.copy_.clear())}forEach(f,h){const m=this[it];$t(m).forEach((E,b,T)=>{f.call(h,this.get(b),b,this)})}get(f){const h=this[it];u(h);const m=$t(h).get(f);if(h.finalized_||!jr(m)||m!==h.base_.get(f))return m;const E=qo(m,h);return n(h),h.copy_.set(f,E),E}keys(){return $t(this[it]).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[it]={type_:3,parent_:h,scope_:h?h.scope_:Du(),modified_:!1,finalized_:!1,copy_:void 0,base_:f,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return $t(this[it]).size}has(f){const h=this[it];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[it];return u(h),this.has(f)||(a(h),$r(h),h.copy_.add(f)),this}delete(f){if(!this.has(f))return!1;const h=this[it];return u(h),a(h),$r(h),h.copy_.delete(f)||(h.drafts_.has(f)?h.copy_.delete(h.drafts_.get(f)):!1)}clear(){const f=this[it];u(f),$t(f).size&&(a(f),$r(f),f.copy_.clear())}values(){const f=this[it];return u(f),a(f),f.copy_.values()}entries(){const f=this[it];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(jr(f)){const h=qo(f,c);c.drafts_.set(f,h),c.copy_.add(h)}else c.copy_.add(f)}))}function u(c){c.revoked_&&$n(3,JSON.stringify($t(c)))}lC("MapSet",{proxyMap_:t,proxySet_:o})}var On=new pC,EC=On.produce;On.produceWithPatches.bind(On),On.setAutoFreeze.bind(On),On.setUseStrictShallowCopy.bind(On),On.applyPatches.bind(On),On.createDraft.bind(On),On.finishDraft.bind(On);function yC(e,t,n){var r=q.useMemo(function(){return EC(e)},[e]);return q.useReducer(r,t,n)}const X0={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},yn={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"},Bu={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set},Yo="cimulate",Ff=`${Yo}:pdp-update`,Bf=`${Yo}:browse-update`,Uf=`${Yo}:search-update`,Hf=`${Yo}:ui-state-update`,zf=`${Yo}:session-state`,wr=U({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},X0),TC={"browse-context":wr.CONTEXT_UPDATED,categoryId:wr.CATEGORY_ID_CHANGED,categoryName:wr.CATEGORY_NAME_CHANGED,page:wr.PAGE_CHANGED,pageSize:wr.PAGE_SIZE_CHANGED,includeFacets:wr.FACET_FILTERS_CHANGED,facetFilters:wr.FACET_FILTERS_CHANGED,rangeFilters:wr.RANGE_FILTERS_CHANGED,catalogSegment:wr.CATALOG_SEGMENT_CHANGED,pricebooks:wr.PRICEBOOKS_CHANGED},Vr=U({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},X0),bC={"search-context":Vr.SEARCH_CONTEXT_UPDATED,query:Vr.QUERY_CHANGED,page:Vr.PAGE_CHANGED,pageSize:Vr.PAGE_SIZE_CHANGED,includeFacets:Vr.FACET_FILTERS_CHANGED,facetFilters:Vr.FACET_FILTERS_CHANGED,rangeFilters:Vr.RANGE_FILTERS_CHANGED,catalogSegment:Vr.CATALOG_SEGMENT_CHANGED,pricebooks:Vr.PRICEBOOKS_CHANGED},Z="cim-widget",As=`--${Z}`,Yi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},_C=(e=Yi)=>({[`${As}-primary-color`]:e.primaryColor||Yi.primaryColor,[`${As}-secondary-color`]:e.secondaryColor||Yi.secondaryColor,[`${As}-font-color`]:e.fontColor||Yi.fontColor,[`${As}-font-family`]:e.fontFamily||Yi.fontFamily,[`${As}-background-color`]:e.backgroundColor||Yi.backgroundColor,[`${As}-border-color`]:e.borderColor||Yi.borderColor}),ci={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},J0=q.createContext(null),Z0=q.createContext(null);class xC{constructor(t,n,r=!1){ke(this,"apiService");ke(this,"config",null);ke(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}}));ke(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));ke(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));ke(this,"getDescription",t=>this.getProductFieldValue(t,"description"));ke(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));ke(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));ke(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));ke(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));ke(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));ke(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});ke(this,"getProductField",t=>this.config?this.config[t]:"");ke(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new H0(t,n,r)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const vs=(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 SC{constructor(t=!1){ke(this,"isDevelopment");ke(this,"_log",(t,n,...r)=>{vs(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 eg=q.createContext(null),wC=({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 xC(u,c,h),[u,c,h]),b=q.useMemo(()=>new SC(h),[h]);q.useEffect(()=>{E.config||E.getConfig()},[E]);const T=q.useMemo(()=>_C(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(eg.Provider,{value:_,children:m})},Tn=()=>{const e=q.useContext(eg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class CC{constructor(){ke(this,"initialState",{connected:!1,mode:"embedded",status:{type:"dialog",isOpen:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});ke(this,"connectedProxy");ke(this,"modeProxy");ke(this,"statusProxy");ke(this,"dialogProxy");ke(this,"modalProxy",{isFullscreen:!1});ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));ke(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return kC(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 Ot=new CC,ks=()=>Ot.connected,AC=e=>{window.addEventListener(Hf,e)},vC=e=>{window.removeEventListener(Hf,e)},kC=(e,t)=>{const n=new CustomEvent(Hf,{detail:{property:e,value:t}});window.dispatchEvent(n)},NC=e=>{Ot.connectedProxy.connected=e},Uu=e=>{if(typeof e!="boolean"){Ot.statusProxy.isOpen=!Ot.statusProxy.isOpen;return}Ot.statusProxy.isOpen=e},tg=e=>{Ot.modalProxy.isFullscreen=e},jf=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Ot.statusProxy.type=e,e==="dialog"||e==="chat"?Ot.modeProxy.mode="embedded":Ot.modeProxy.mode="standalone"},ng=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);Ot.dialogProxy.position=e},OC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=Tn(),o=q.useCallback(b=>{n({type:yn.SET_COPILOT,payload:b})},[n]),a=q.useCallback(b=>{NC(b),n({type:yn.SET_CONNECTED,payload:b})},[n]),u=q.useCallback(()=>{n({type:yn.RESET_COPILOT,payload:{}})},[n]),c=q.useCallback(()=>{n({type:yn.RESET_STATE,payload:{}})},[n]),f=q.useCallback(b=>{r==null||r.log(`${b.name} event received`,b),n({type:yn.ADD_MESSAGE,payload:b}),e==null||e(b)},[e,r,n]),h=q.useCallback(b=>{n({type:yn.ADD_LOADING_MESSAGE,payload:b})},[n]),m=q.useCallback(b=>{n({type:yn.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(Z0.Provider,{value:E,children:t})};gC();const IC=(e,t)=>{const{type:n,payload:r}=t;if(n===yn.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 yn.RESET_STATE:e.messages=Bu.messages,e.groupedMessages=Bu.groupedMessages,e.loadingMessages=Bu.loadingMessages;break;case yn.RESET_COPILOT:e.copilot=null;break;case yn.SET_COPILOT:e.copilot=r;break;case yn.SET_CONNECTED:e.connected=r;break;case yn.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case yn.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break}},PC=({onCopilotEvent:e,children:t})=>{const[n,r]=yC(IC,Bu);return N.jsx(J0.Provider,{value:n,children:N.jsx(OC,{onCopilotEvent:e,dispatch:r,children:t})})};function RC(){var e=q.useRef(!0);return e.current?(e.current=!1,!0):e.current}var LC=function(e){q.useEffect(e,[])},DC=function(e,t){return e===t};function MC(e,t){t===void 0&&(t=DC);var n=q.useRef(),r=q.useRef(e),o=RC();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class FC{constructor(){ke(this,"items",[]);ke(this,"add",t=>{this.items.push(t)});ke(this,"remove",()=>this.items.shift());ke(this,"first",()=>this.items.length>0?this.items[0]:null);ke(this,"processQueue",t=>{new Array(sr.size).fill(1).forEach(()=>{const r=sr.first();r&&(t(r),sr.remove())})})}get size(){return this.items.length}}const sr=new FC,rg=e=>{window.addEventListener(Uf,e)},ig=e=>{window.removeEventListener(Uf,e)},BC=(e,t,n)=>{const r=new CustomEvent(Uf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},sg=e=>{window.addEventListener(Bf,e)},og=e=>{window.removeEventListener(Bf,e)},UC=(e,t,n)=>{const r=new CustomEvent(Bf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},ag=e=>{window.addEventListener(Ff,e)},ug=e=>{window.removeEventListener(Ff,e)},lg=(e,t,n)=>{const r=new CustomEvent(Ff,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},HC=e=>{window.addEventListener(zf,e)},zC=e=>{window.removeEventListener(zf,e)},Hu=(e,t,n)=>{const r=new CustomEvent(zf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class jC{constructor(){ke(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ke(this,"categoryIdProxy");ke(this,"facetFiltersProxy");ke(this,"rangeFiltersProxy");ke(this,"catalogSegmentProxy");ke(this,"pricebooksProxy");ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));ke(this,"_fullSet",(t,n,r)=>{const o=TC[n];return UC(o,n,r),Reflect.set(t,n,r)});ke(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ke(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ke(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 jC,cg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},fg=(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},dg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},hg=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const 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},pg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},mg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},$C=e=>{ot.categoryIdProxy.categoryId=e,ks()||sr.add({context:"browse",payload:U({},ot.state)})},gg=e=>{cg(e,ot)},VC=(e,t)=>{fg(e,t,ot)},Eg=e=>{dg(e,ot)},qC=({field:e,value:t})=>{hg({field:e,value:t},ot)},YC=e=>{pg(e,ot)},yg=e=>{mg(e,ot)},Tg=e=>{if(!e||!e.categoryId)throw new Error("Browse context must include a categoryId");if(!ks()){sr.add({context:"browse",payload:U({},e)});return}"facetFilters"in e&&gg(e.facetFilters||{}),"rangeFilters"in e&&Eg(e.rangeFilters||[]),"catalogSegment"in e&&(ot.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&yg(e.pricebooks||[]),"categoryName"in e&&(ot.categoryIdProxy.categoryName=e.categoryName||""),ot.categoryIdProxy.categoryId=e.categoryId},WC=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Tg,updateBrowseCategoryId:$C,updateCatalogSegment:YC,updateFacetFilter:VC,updateFacetFilters:gg,updatePricebooks:yg,updateRangeFilter:qC,updateRangeFilters:Eg},Symbol.toStringTag,{value:"Module"}));class GC{constructor(){ke(this,"initialParams",{productId:"",productName:"",pdpLink:""});ke(this,"proxy");ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));ke(this,"_fullSet",(t,n,r)=>(lg(n,r),Reflect.set(t,n,r)));ke(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 GC,bg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");if(!ks()){sr.add({context:"pdp",payload:U({},e)});return}or.updateProxy(e),lg("pdp-context",e)},KC=e=>{or.proxy.productId=e,ks()||sr.add({context:"pdp",payload:U({},or.state)})},QC=e=>{or.proxy.pdpLink=e},XC=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{Hu("getConversationMessages",{payload:e,callback:t},ci.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Hu("getSessionInformation",{callback:e},ci.GET_SESSION_INFORMATION)},loadConversation:e=>{Hu("loadConversation",e,ci.LOAD_CONVERSATION)},resetConversation:()=>{Hu("resetConversation",!0,ci.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class JC{constructor(){ke(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ke(this,"queryProxy");ke(this,"facetFiltersProxy");ke(this,"rangeFiltersProxy");ke(this,"catalogSegmentProxy");ke(this,"pricebooksProxy");ke(this,"_fullGet",(t,n)=>Reflect.get(t,n));ke(this,"_fullSet",(t,n,r)=>{const o=bC[n];return BC(o,n,r),Reflect.set(t,n,r)});ke(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ke(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ke(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 ht=new JC,ZC=e=>{ht.queryProxy.query=e,ks()||sr.add({context:"search",payload:U({},ht.state)})},_g=e=>{cg(e,ht)},eA=(e,t)=>{fg(e,t,ht)},xg=e=>{dg(e,ht)},tA=({field:e,value:t})=>{hg({field:e,value:t},ht)},nA=e=>{pg(e,ht)},Sg=e=>{mg(e,ht)},wg=e=>{if(!e||!e.query)throw new Error("Search context must include a query");if(!ks()){sr.add({context:"search",payload:U({},e)});return}"facetFilters"in e&&_g(e.facetFilters||{}),"rangeFilters"in e&&xg(e.rangeFilters||[]),"catalogSegment"in e&&(ht.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Sg(e.pricebooks||[]),ht.queryProxy.query=e.query},rA=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:wg,updateCatalogSegment:nA,updateFacetFilter:eA,updateFacetFilters:_g,updatePricebooks:Sg,updateRangeFilter:tA,updateRangeFilters:xg,updateSearchQuery:ZC},Symbol.toStringTag,{value:"Module"})),Cg=q.createContext({entryType:"search",setEntryType:()=>{}}),iA=({children:e})=>{const[t,n]=q.useState("search"),r=q.useMemo(()=>({entryType:t,setEntryType:n}),[t,n]);return N.jsx(Cg.Provider,{value:r,children:e})},sA=()=>{const e=q.useContext(Cg);if(!e)throw new Error("useEntry must be used within an EntryProvider");return e},oA={categoryId:ot.categoryId,categoryName:ot.categoryIdProxy.categoryName||"",facetFilters:ot.facetFilters,rangeFilters:ot.rangeFilters,catalogSegment:ot.catalogSegment,pricebooks:ot.pricebooks},Ag=q.createContext(oA),aA=({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 sg(_),()=>{og(_)}},[]);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(Ag.Provider,{value:T,children:e})},uA=()=>{const e=q.useContext(Ag);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},lA={searchQuery:ht.query,facetFilters:ht.facetFilters,rangeFilters:ht.rangeFilters,catalogSegment:ht.catalogSegment,pricebooks:ht.pricebooks},vg=q.createContext(lA),cA=({children:e})=>{const[t,n]=q.useState(ht.query),[r,o]=q.useState(ht.facetFilters),[a,u]=q.useState(ht.rangeFilters),[c,f]=q.useState(ht.catalogSegment),[h,m]=q.useState(ht.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 rg(b),()=>{ig(b)}},[]);const E=q.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:h}),[t,r,a,c,h]);return N.jsx(vg.Provider,{value:E,children:e})},fA=()=>{const e=q.useContext(vg);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},dA={productId:or.productId,pdpLink:or.pdpLink},kg=q.createContext(dA),hA=({children:e})=>{const[t,n]=q.useState(or.productId),[r,o]=q.useState(or.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 ag(u),()=>{ug(u)}},[]);const a=q.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return N.jsx(kg.Provider,{value:a,children:e})},pA=()=>{const e=q.useContext(kg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},Ng=()=>{const e=q.useContext(Z0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Og=()=>{const e=q.useContext(J0);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:()=>{}}),mA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:f}=Tn(),Zr=fA(),{searchQuery:h}=Zr,m=en(Zr,["searchQuery"]),Ti=uA(),{categoryId:E}=Ti,b=en(Ti,["categoryId"]),{productId:T,pdpLink:_}=pA(),{entryType:S,setEntryType:C}=sA(),{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(),ce=q.useRef(!1),fe=q.useRef(!1),ye=q.useMemo(()=>de.size>0,[de]),Ae=q.useCallback(_e=>de.has(_e),[de]),ie=q.useCallback(_e=>{W(_e),B(_e.id)},[W,B]),$=q.useCallback(({query:_e,facetFilters:He,rangeFilters:nt,catalogSegment:Tt,pricebooks:St,userPrompt:Pt,isUserAction:Ut})=>{if(!he){f==null||f.error("Copilot is not initialized");return}if(!_e)return;const Ze={searchParams:{query:_e}};Pt&&(Ze.userPrompt=Pt),He&&Object.keys(He).length>0&&(Ze.searchParams.facetFilters=He),nt&&nt.length>0&&(Ze.searchParams.rangeFilters=nt),Tt&&(Ze.searchParams.catalogSegment=Tt),St&&(Ze.searchParams.pricebooks=St);const Mn=!ce.current;C("search"),he.search(Ze,bi=>{const hr=U({},bi);Mn&&(hr.isInitial=!0,hr.isUserAction=!0),Ut&&(hr.isUserAction=Ut),ce.current=!0,ie(hr)})},[f,C,ie,he]),ee=q.useCallback(({categoryId:_e,categoryName:He,facetFilters:nt,rangeFilters:Tt,catalogSegment:St,pricebooks:Pt,userPrompt:Ut,isUserAction:Ze})=>{if(!he){f==null||f.error("Copilot is not initialized");return}if(!_e)return;const Mn={browseParams:{categoryId:_e}};Ut&&(Mn.userPrompt=Ut),nt&&Object.keys(nt).length>0&&(Mn.browseParams.facetFilters=nt),Tt&&Tt.length>0&&(Mn.browseParams.rangeFilters=Tt),St&&(Mn.browseParams.catalogSegment=St),Pt&&(Mn.browseParams.pricebooks=Pt);const bi=!fe.current;C("browse"),he.browse(Mn,hr=>{const J=U({},hr);bi&&(J.isInitial=!0,J.isUserAction=!0),Ze&&(J.isUserAction=Ze),He&&J.request&&(J.request.label=He),fe.current=!0,ie(J)})},[f,C,ie,he]),w=q.useCallback(({productId:_e,productName:He,pdpLink:nt,userPrompt:Tt,isUserAction:St})=>{if(!he){f==null||f.error("Copilot is not initialized");return}if(!_e)return;const Pt={productId:_e};Tt&&(Pt.userPrompt=Tt),nt&&(Pt.pdpLink=nt),C("pdp"),he.productView(Pt,Ut=>{const Ze=U({},Ut);St&&(Ze.isUserAction=St),He&&Ze.request&&(Ze.request.label=He),ie(Ze)})},[f,C,he,ie]),R=q.useCallback(_e=>{const He=Te(U({},_e),{id:_e.inquiryLinkId||_e.id});W(He)},[W]),Q=q.useCallback(_e=>{W(_e),a==null||a(_e)},[W,a]),k=q.useCallback(_e=>{W(_e),u==null||u(_e)},[W,u]),xe=q.useCallback(_e=>{o==null||o(_e),F(!0)},[o,F]);q.useEffect(()=>{!he||!be||sr.size>0&&sr.processQueue(_e=>{if(_e.context==="search"){const He=Te(U({},_e.payload),{isUserAction:!0});wg(He)}if(_e.context==="browse"){const He=Te(U({},_e.payload),{isUserAction:!0});Tg(He)}if(_e.context==="pdp"){const He=Te(U({},_e.payload),{isUserAction:!0});bg(He)}})},[he,be]);const Fe=q.useCallback(_e=>{he&&he.requestSessionInformation(He=>{f==null||f.log("Retrieved session information: ",He),_e==null||_e(He)})},[he,f]),Ie=q.useCallback((_e,He)=>{he&&_e.conversationId&&he.getConversationEvents(_e,nt=>{f==null||f.log("Retrieved conversation messages: ",nt),He(nt)})},[he,f]),Ke=q.useCallback(_e=>{_e.on("connect_ack",xe),_e.on("follow_up",W),_e.on("inquiry",R),_e.on("partial_inquiry",R),_e.on("display_products",W),_e.on("progress",W),_e.on("refined_search",Q),_e.on("refined_browse",k),_e.on("done",He=>{te(He.eventSourceId)}),_e.on("error",He=>{W(He),te(He.eventSourceId)}),_e.onDisconnect(He=>{const nt=["io server disconnect","transport error","server shutting down"];if(f==null||f.log("Connection disconnected with reason: ",He),!nt.includes(He)){F(!1);return}f==null||f.log("De-registering event listeners");const Tt=new Date().toISOString();W({name:"error",message:"Connection was lost. Please try again.",createdAt:Tt,id:`error-${Tt}`,sessionId:"session"}),_e.off()})},[f,F,te,R,Q,k,W,xe]);LC(()=>{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 nt=new DS(He);return I(nt),Ke(nt),nt.connect(),nt.requestSessionInformation(Tt=>{f==null||f.log("Session Information: ",Tt)}),()=>{nt.disconnect(),nt.off(),D()}});const Ve=q.useCallback(_e=>{if(!he)return;const He={eventId:_e,reason:"User cancelled the request"};he.cancelRequest(He,nt=>{W(nt),te(_e)})},[W,te,he]),Je=q.useCallback(()=>{he&&he.conversationReset({},_e=>{G(),W(_e),he.requestSessionInformation(He=>{f==null||f.log("Session Information: ",He)})})},[he,f,W,G]),xt=q.useCallback(_e=>{if(_e)switch(S){case"search":$(Te(U({query:h},m),{userPrompt:_e}));return;case"browse":ee(Te(U({categoryId:E},b),{userPrompt:_e}));return;case"pdp":w({productId:T,pdpLink:_||"",userPrompt:_e});return}},[S,h,m,$,E,b,ee,w,T,_]),Gn=q.useCallback((_e,He)=>{var Pt,Ut;const Tt=_e.params.userPrompt||"";if(!Tt)return;const St=H.find(Ze=>Ze.id===He);if(St){if(St.name==="copilot_search"){const{query:Ze}=((Pt=St.request)==null?void 0:Pt.searchParams)||{};Ze&&$(Te(U({query:Ze||h},m),{userPrompt:Tt}));return}if(St.name==="copilot_browse"){const{categoryId:Ze}=((Ut=St.request)==null?void 0:Ut.browseParams)||{};if(Ze){ee(Te(U({categoryId:Ze||E},b),{userPrompt:Tt}));return}}if(St.name==="product_view"){const Ze=St.request;Ze!=null&&Ze.productId&&w(Te(U({},Ze),{userPrompt:Tt}))}}},[h,m,E,b,H,$,ee,w]),oo=q.useMemo(()=>({copilot:he,messages:H,groupedMessages:le,isLoading:ye,isResponseLoading:Ae,handleSearch:$,handleBrowse:ee,handlePdp:w,handleUserInput:xt,handleSuggestion:Gn,handleCancel:Ve,resetConversation:Je,getSessionInformation:Fe,getConversationMessages:Ie}),[he,H,le,ye,Ae,$,ee,w,xt,Gn,Ve,Je,Fe,Ie]);return N.jsx(Ig.Provider,{value:oo,children:c})},qr=()=>{const e=q.useContext(Ig);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},gA=()=>{const{resetCopilotState:e,addCopilotEvent:t}=Ng(),{copilot:n,handleSearch:r,handleBrowse:o,handlePdp:a,resetConversation:u,getSessionInformation:c,getConversationMessages:f}=qr(),h=q.useCallback(({query:b,isUserAction:T})=>{if(!n||!b)return;const{facetFilters:_}=ht.facetFiltersProxy,{rangeFilters:S}=ht.rangeFiltersProxy,{catalogSegment:C}=ht.catalogSegmentProxy,{pricebooks:I}=ht.pricebooksProxy,F={query:b};F.facetFilters=_||{},F.rangeFilters=S||[],F.catalogSegment=C||"",F.pricebooks=I||[],r(Te(U({},F),{isUserAction:T}))},[n,r]),m=q.useCallback(({categoryId:b,isUserAction:T})=>{if(!n||!b)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(Te(U({},D),{isUserAction:T}))},[n,o]),E=q.useCallback(({productId:b,isUserAction:T})=>{if(!n||!b)return;const _={productId:b,pdpLink:or.pdpLink,productName:or.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 rg(b),()=>{ig(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 ag(b),()=>{ug(b)}},[E]),q.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="categoryId"&&m({categoryId:T.value,isUserAction:!0})};return sg(b),()=>{og(b)}},[m]),q.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.event)==ci.RESET_CONVERSATION&&u(),(T==null?void 0:T.event)==ci.GET_SESSION_INFORMATION){const _=T.value.callback;c(_)}if((T==null?void 0:T.event)==ci.GET_CONVERSATION_MESSAGES){const{payload:_,callback:S}=T.value;if(!_.conversationId||typeof S!="function")return;f(_,S)}if((T==null?void 0:T.event)==ci.LOAD_CONVERSATION){const _=T.value;if(!_.conversationId)return;f(_,C=>{e(),C.forEach(I=>{t(I)})})}};return HC(b),()=>{zC(b)}},[u,c,f,e,t]),null},EA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onCopilotEvent:a,onRefinedSearch:u,onRefinedBrowse:c,children:f})=>N.jsx(PC,{onCopilotEvent:a,children:N.jsxs(mA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:u,onRefinedBrowse:c,children:[N.jsx(gA,{}),f]})}),Pg=q.createContext({mode:Ot.modeProxy.mode,status:Ot.statusProxy,dialogPosition:Ot.dialogProxy.position,isModalFullscreen:Ot.modalProxy.isFullscreen,previousComponentType:Ot.statusProxy.type}),yA=({componentType:e,children:t})=>{const[n,r]=q.useState(Ot.modeProxy.mode),[o,a]=q.useState({type:e||Ot.statusProxy.type,isOpen:Ot.statusProxy.isOpen}),[u,c]=q.useState(Ot.dialogProxy.position),[f,h]=q.useState(Ot.modalProxy.isFullscreen),m=MC(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=>Te(U({},C),{isOpen:S}));return}if(_==="type"){a(C=>Te(U({},C),{type:S}));return}if(_==="position"){c(S);return}if(_==="isFullscreen"){h(S);return}}};return AC(b),()=>{vC(b)}},[]);const E=q.useMemo(()=>({mode:n,status:o,previousComponentType:m||"dialog",dialogPosition:u,isModalFullscreen:f}),[n,o,m,u,f]);return N.jsx(Pg.Provider,{value:E,children:t})},Rg=({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(wC,{apiKey:e,logoUrl:r,headerText:o,theme:a,globalClassName:u,searchPlaceholder:h,searchButtonLabel:m,resetConversationMessage:E,isDevelopment:c,children:N.jsx(sC,{apiKey:e,apiToken:t,isDevelopment:c,children:N.jsx(iA,{children:N.jsx(hA,{children:N.jsx(aA,{children:N.jsx(cA,{children:N.jsx(yA,{componentType:f,children:N.jsx(EA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:c,onConnect:b,onCopilotEvent:T,onRefinedSearch:_,onRefinedBrowse:S,children:C})})})})})})})}),Wo=()=>{const e=q.useContext(Pg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};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 oe(){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=zi.createContext&&zi.createContext(Dg),TA=["attr","size","title"];function bA(e,t){if(e==null)return{};var n=_A(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 _A(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zu(){return zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zu.apply(this,arguments)}function 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 ju(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){xA(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 xA(e,t,n){return t=SA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SA(e){var t=wA(e,"string");return typeof t=="symbol"?t:t+""}function wA(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)=>zi.createElement(t.tag,ju({key:n},t.attr),Bg(t.child)))}function fn(e){return t=>zi.createElement(CA,zu({attr:ju({},e.attr)},t),Bg(e.child))}function CA(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=bA(e,TA),c=o||n.size||"1em",f;return n.className&&(f=n.className),e.className&&(f=(f?f+" ":"")+e.className),zi.createElement("svg",zu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:f,style:ju(ju({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 Mg!==void 0?zi.createElement(Mg.Consumer,null,n=>t(n)):t(Dg)}function Ug(e){return fn({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 $u(e){return fn({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 AA(e){return fn({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 fn({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 vA(e){return fn({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 kA(e){return fn({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 NA(e){return fn({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 OA(e){return fn({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 $f=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>N.jsx("button",{className:oe(`${Z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Ns=({className:e,icon:t,type:n="button",ariaLabel:r,disabled:o=!1,onClick:a})=>N.jsx("button",{className:oe(e,`${Z}-icon-button`),type:n,"aria-label":r,onClick:a,disabled:o,children:t}),IA=({className:e,searchButtonLabel:t,globalClassName:n,componentType:r,isLoading:o})=>t?N.jsx($f,{className:oe(n,r,e),type:"submit",disabled:o,children:t}):N.jsx(Ns,{className:oe(n,r,e),type:"submit",disabled:o,ariaLabel:"Search Copilot",icon:N.jsx($u,{})}),Vf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o}=Og(),{globalClassName:a,searchPlaceholder:u,searchButtonLabel:c}=Tn(),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:oe(a,e,n,`${Z}-search-bar`),name:`${Z}-search-form`,onSubmit:h,children:[N.jsx("span",{role:"status",className:oe(`${Z}-connection-status-icon`,E)}),N.jsx("input",{className:oe(a,e,n,`${Z}-search-input`),type:"text",ref:f,placeholder:u,name:`${Z}-user-input`}),N.jsx(IA,{searchButtonLabel:c,globalClassName:a,componentType:n,isLoading:t||!m})]})};function PA(e){return e==null?[]:Array.isArray(e)?e:[e]}var RA=e=>e!=null&&typeof e=="object",Vu=e=>typeof e=="string",Os=e=>typeof e=="function",LA=e=>e==null,DA=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),MA=e=>Object.prototype.toString.call(e),zg=Function.prototype.toString,FA=zg.call(Object),BA=e=>{if(!RA(e)||MA(e)!="[object Object]"||zA(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=DA(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&zg.call(n)==FA},UA=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,HA=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,zA=e=>UA(e)||HA(e),jA=e=>e(),$A=()=>{},qf=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function Yf(e){if(!BA(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]=Yf(o))}return n}function Wf(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function VA(e,t){if(e==null)throw new Error(t())}var qA=Object.defineProperty,YA=(e,t,n)=>t in e?qA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gf=(e,t,n)=>YA(e,typeof t!="symbol"?t+"":t,n),jg=()=>{},qu=e=>typeof e=="object"&&e!==null,WA=e=>e?"":void 0,GA=e=>e?"true":void 0,KA=1,QA=9,XA=11,Vt=e=>qu(e)&&e.nodeType===KA&&typeof e.nodeName=="string",Yu=e=>qu(e)&&e.nodeType===QA,JA=e=>qu(e)&&e===e.window,$g=e=>Vt(e)?e.localName||"":"#document";function ZA(e){return["html","body","#document"].includes($g(e))}var ev=e=>qu(e)&&e.nodeType!==void 0,Wi=e=>ev(e)&&e.nodeType===XA&&"host"in e,tv=e=>Vt(e)&&e.localName==="input",nv=e=>Vt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Go(e){if(!e)return!1;const t=e.getRootNode();return Ps(t)===e}var rv=/(textarea|select)/;function iv(e){if(e==null||!Vt(e))return!1;try{return tv(e)&&e.selectionStart!=null||rv.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Wu(e,t){var r;if(!e||!t||!Vt(e)||!Vt(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 Cr(e){var t;return Yu(e)?e:JA(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function sv(e){return Cr(e).documentElement}function Is(e){var t,n,r;return Wi(e)?Is(e.host):Yu(e)?(t=e.defaultView)!=null?t:window:Vt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Ps(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function ov(e){if($g(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wi(e)&&e.host||sv(e);return Wi(t)?t.host:t}function Kf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Yu(t)||Wi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Qf=new WeakMap;function Gu(e){return Qf.has(e)||Qf.set(e,Is(e).getComputedStyle(e)),Qf.get(e)}var Xf=new Set(["menu","listbox","dialog","grid","tree","region"]),av=e=>Xf.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=Kf(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&&av(E)&&!b&&(m===t||m.contains(t)||o(m)))return!0}}}return!1};return o(e)}function Yg(e,t){const n=Kf(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&&Xf.has(E)&&!b&&(t(m),o(m))}}}};o(e)}function uv(e){const t=new Set;return Yg(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function lv(e){const t=e.getAttribute("role");return!!(t&&Xf.has(t))}function cv(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function fv(e){var t;return cv(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function dv(e){if(!e.id)return!1;const t=Kf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&lv(e))}var Jf=()=>typeof document!="undefined";function hv(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Zf=e=>Jf()&&e.test(hv()),pv=e=>Jf()&&e.test(navigator.vendor),Wg=()=>Jf()&&!!navigator.maxTouchPoints,mv=()=>Zf(/^iPhone/i),gv=()=>Zf(/^iPad/i)||ed()&&navigator.maxTouchPoints>1,Gg=()=>mv()||gv(),Ev=()=>ed()||Gg(),ed=()=>Zf(/^Mac/i),yv=()=>Ev()&&pv(/apple/i);function Tv(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Yr(e){var n;const t=Tv(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var bv=e=>e.button===0,_v=e=>e.button===2||ed()&&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=>Vt(e)&&e.tagName==="IFRAME",xv=/^(audio|video|details)$/;function Qg(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var Sv=e=>!Number.isNaN(Qg(e)),wv=e=>Qg(e)<0;function Cv(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=Cv(f,t);if(h){const m=Array.from(h.querySelectorAll(Ku)).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 Ku="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(Ku));(n==!0||n=="if-empty"&&o.length===0)&&Vt(e)&&Wr(e)&&o.unshift(e);const u=[];for(const c of o)if(Wr(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,Wr):u};function Wr(e){return!Vt(e)||e.closest("[inert]")?!1:e.matches(Ku)&&nv(e)}function Ko(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Ku));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(...Ko(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 Vt(e)&&e.tabIndex>0?!0:Wr(e)&&!wv(e)}function Av(e,t={}){const n=Ko(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function vv(e,t={}){const{current:n,getShadowRoot:r}=t,o=Ko(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Ps(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Qo(e){return e.tabIndex<0&&(xv.test(e.localName)||iv(e))&&!Sv(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=Ko(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var kv=class x2{constructor(){Gf(this,"id",null),Gf(this,"fn_cleanup"),Gf(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 bn(e){const t=kv.create();return t.request(e),t.cleanup}function Nv(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 td(e){const t=ov(e);return ZA(t)?Cr(t).body:Vt(t)&&Pv(t)?t:td(t)}var Ov=/auto|scroll|overlay|hidden|clip/,Iv=new Set(["inline","contents"]);function Pv(e){const t=Is(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return Ov.test(n+o+r)&&!Iv.has(a)}function Rv(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]=Av(e,{includeContainer:!0,getShadowRoot:a}),T=vv(c,{current:n,getShadowRoot:a}),_=!E&&!b;h.shiftKey&&Go(T)?(o==null||o(),m=b):h.shiftKey&&(Go(E)||_)?m=n:!h.shiftKey&&Go(n)?(o==null||o(),m=E):!h.shiftKey&&(Go(b)||_)&&(m=T),m&&(h.preventDefault(),typeof r=="function"?r(m):m.focus())}return ar(u,"keydown",f,!0)}function Lv(e,t){const c=t,{defer:n,triggerElement:r}=c,o=en(c,["defer","triggerElement"]),a=n?bn:f=>f(),u=[];return u.push(a(()=>{const f=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(Rv(f,U({triggerElement:h},o)))})),()=>{u.forEach(f=>f==null?void 0:f())}}function Qu(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 Dv(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 Mv(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 Fv(e,t){const{timeout:n,rootNode:r}=t,o=Is(r),a=Cr(r),u=new o.AbortController;return Mv(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 Bv=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),Uv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,e1=e=>{const t={};let n;for(;n=Uv.exec(e);)t[n[1]]=n[2];return t},Hv=(e,t)=>{if(Vu(e)){if(Vu(t))return`${e};${t}`;e=e1(e)}else Vu(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]=Bv(t[o],n[o]);continue}if(o==="style"){t[o]=Hv(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 GF(e){return e}var Rs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Rs||{}),nd="__init__";function zv(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Cr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Ps(t()),a=u=>t().getElementById(u);return Te(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Go,getById:a})}var rd={exports:{}},_n={},id={exports:{}},sd={};var t1;function jv(){return t1||(t1=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,Fe=$[xe],Ie=xe+1,Ke=$[Ie];if(0>o(Fe,w))Ie<Q&&0>o(Ke,Fe)?($[R]=Ke,$[Ie]=w,R=Ie):($[R]=Fe,$[xe]=w,R=xe);else if(Ie<Q&&0>o(Ke,w))$[R]=Ke,$[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,Ae(W);else{var ee=n(h);ee!==null&&ie(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&&ie(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,ye=fe.port2;fe.port1.onmessage=de,ce=function(){ye.postMessage(null)}}else ce=function(){C(de,0)};function Ae($){te=$,B||(B=!0,ce())}function ie($,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,Ae(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,ie(G,w-R))):($.sortIndex=Q,t(f,$),_||T||(_=!0,Ae(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}}}}(sd)),sd}var n1;function $v(){return n1||(n1=1,id.exports=jv()),id.exports}var r1;function Vv(){if(r1)return _n;r1=1;var e=ys(),t=$v();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"),ye=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),ie=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`
|
|
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
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(`
|
|
9
9
|
`),y=d.stack.split(`
|
|
10
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 Fe(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 ye:return s=i.displayName||null,s!==null?s:Ie(i.type)||"Memo";case Ae:s=i._payload,i=i._init;try{return Ie(i(s))}catch(l){}}return null}function Ke(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 xt(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 Gn(i){i._valueTracker||(i._valueTracker=xt(i))}function oo(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 Zr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function 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 _e(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 He(i,s){s=s.checked,s!=null&&D(i,"checked",s,!1)}function nt(i,s){He(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")?St(i,s.type,l):s.hasOwnProperty("defaultValue")&&St(i,s.type,Ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Tt(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 St(i,s,l){(s!=="number"||Zr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Pt=Array.isArray;function Ut(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 Ze(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return w({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Mn(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(Pt(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 bi(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 hr(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 Be,Ye=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(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function et(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Qt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ei=["Webkit","ms","Moz","O"];Object.keys(Qt).forEach(function(i){ei.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Qt[s]=Qt[i]})});function Kn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Qt.hasOwnProperty(i)&&Qt[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=Kn(l,s[l],d);l==="float"&&(l="cssFloat"),d?i.setProperty(l,g):i[l]=g}}var is=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 Xt(i,s){if(s){if(is[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Dr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Fn=null;function $h(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Vh=null,ao=null,uo=null;function Db(i){if(i=Xa(i)){if(typeof Vh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=lc(s),Vh(i.stateNode,i.type,s))}}function Mb(i){ao?uo?uo.push(i):uo=[i]:ao=i}function Fb(){if(ao){var i=ao,s=uo;if(uo=ao=null,Db(i),s)for(i=0;i<s.length;i++)Db(s[i])}}function Bb(i,s){return i(s)}function Ub(){}var qh=!1;function Hb(i,s,l){if(qh)return i(s,l);qh=!0;try{return Bb(i,s,l)}finally{qh=!1,(ao!==null||uo!==null)&&(Ub(),Fb())}}function Oa(i,s){var l=i.stateNode;if(l===null)return null;var d=lc(l);if(d===null)return null;l=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(i=i.type,d=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!d;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var Yh=!1;if(c)try{var Ia={};Object.defineProperty(Ia,"passive",{get:function(){Yh=!0}}),window.addEventListener("test",Ia,Ia),window.removeEventListener("test",Ia,Ia)}catch(i){Yh=!1}function S8(i,s,l,d,g,y,x,O,L){var Y=Array.prototype.slice.call(arguments,3);try{s.apply(l,Y)}catch(se){this.onError(se)}}var Pa=!1,zl=null,jl=!1,Wh=null,w8={onError:function(i){Pa=!0,zl=i}};function C8(i,s,l,d,g,y,x,O,L){Pa=!1,zl=null,S8.apply(w8,arguments)}function A8(i,s,l,d,g,y,x,O,L){if(C8.apply(this,arguments),Pa){if(Pa){var Y=zl;Pa=!1,zl=null}else throw Error(n(198));jl||(jl=!0,Wh=Y)}}function ss(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 zb(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 jb(i){if(ss(i)!==i)throw Error(n(188))}function v8(i){var s=i.alternate;if(!s){if(s=ss(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 jb(g),i;if(y===d)return jb(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 $b(i){return i=v8(i),i!==null?Vb(i):null}function Vb(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Vb(i);if(s!==null)return s;i=i.sibling}return null}var qb=t.unstable_scheduleCallback,Yb=t.unstable_cancelCallback,k8=t.unstable_shouldYield,N8=t.unstable_requestPaint,Rt=t.unstable_now,O8=t.unstable_getCurrentPriorityLevel,Gh=t.unstable_ImmediatePriority,Wb=t.unstable_UserBlockingPriority,$l=t.unstable_NormalPriority,I8=t.unstable_LowPriority,Gb=t.unstable_IdlePriority,Vl=null,Mr=null;function P8(i){if(Mr&&typeof Mr.onCommitFiberRoot=="function")try{Mr.onCommitFiberRoot(Vl,i,void 0,(i.current.flags&128)===128)}catch(s){}}var pr=Math.clz32?Math.clz32:D8,R8=Math.log,L8=Math.LN2;function D8(i){return i>>>=0,i===0?32:31-(R8(i)/L8|0)|0}var ql=64,Yl=4194304;function Ra(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 Wl(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=Ra(O):(y&=x,y!==0&&(d=Ra(y)))}else x=l&~g,x!==0?d=Ra(x):y!==0&&(d=Ra(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 M8(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function F8(i,s){for(var l=i.suspendedLanes,d=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var x=31-pr(y),O=1<<x,L=g[x];L===-1?((O&l)===0||(O&d)!==0)&&(g[x]=M8(O,s)):L<=s&&(i.expiredLanes|=O),y&=~O}}function Kh(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Kb(){var i=ql;return ql<<=1,(ql&4194240)===0&&(ql=64),i}function Qh(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function La(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 B8(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 Xh(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 Qb(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Xb,Jh,Jb,Zb,e_,Zh=!1,Gl=[],xi=null,Si=null,wi=null,Da=new Map,Ma=new Map,Ci=[],U8="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 t_(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":Da.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ma.delete(s.pointerId)}}function Fa(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=Xa(s),s!==null&&Jh(s)),i):(i.eventSystemFlags|=d,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function H8(i,s,l,d,g){switch(s){case"focusin":return xi=Fa(xi,i,s,l,d,g),!0;case"dragenter":return Si=Fa(Si,i,s,l,d,g),!0;case"mouseover":return wi=Fa(wi,i,s,l,d,g),!0;case"pointerover":var y=g.pointerId;return Da.set(y,Fa(Da.get(y)||null,i,s,l,d,g)),!0;case"gotpointercapture":return y=g.pointerId,Ma.set(y,Fa(Ma.get(y)||null,i,s,l,d,g)),!0}return!1}function n_(i){var s=os(i.target);if(s!==null){var l=ss(s);if(l!==null){if(s=l.tag,s===13){if(s=zb(l),s!==null){i.blockedOn=s,e_(i.priority,function(){Jb(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 Kl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=tp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var d=new l.constructor(l.type,l);Fn=d,l.target.dispatchEvent(d),Fn=null}else return s=Xa(l),s!==null&&Jh(s),i.blockedOn=l,!1;s.shift()}return!0}function r_(i,s,l){Kl(i)&&l.delete(s)}function z8(){Zh=!1,xi!==null&&Kl(xi)&&(xi=null),Si!==null&&Kl(Si)&&(Si=null),wi!==null&&Kl(wi)&&(wi=null),Da.forEach(r_),Ma.forEach(r_)}function Ba(i,s){i.blockedOn===s&&(i.blockedOn=null,Zh||(Zh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,z8)))}function Ua(i){function s(g){return Ba(g,i)}if(0<Gl.length){Ba(Gl[0],i);for(var l=1;l<Gl.length;l++){var d=Gl[l];d.blockedOn===i&&(d.blockedOn=null)}}for(xi!==null&&Ba(xi,i),Si!==null&&Ba(Si,i),wi!==null&&Ba(wi,i),Da.forEach(s),Ma.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);)n_(l),l.blockedOn===null&&Ci.shift()}var lo=G.ReactCurrentBatchConfig,Ql=!0;function j8(i,s,l,d){var g=at,y=lo.transition;lo.transition=null;try{at=1,ep(i,s,l,d)}finally{at=g,lo.transition=y}}function $8(i,s,l,d){var g=at,y=lo.transition;lo.transition=null;try{at=4,ep(i,s,l,d)}finally{at=g,lo.transition=y}}function ep(i,s,l,d){if(Ql){var g=tp(i,s,l,d);if(g===null)yp(i,s,d,Xl,l),t_(i,d);else if(H8(g,i,s,l,d))d.stopPropagation();else if(t_(i,d),s&4&&-1<U8.indexOf(i)){for(;g!==null;){var y=Xa(g);if(y!==null&&Xb(y),y=tp(i,s,l,d),y===null&&yp(i,s,d,Xl,l),y===g)break;g=y}g!==null&&d.stopPropagation()}else yp(i,s,d,null,l)}}var Xl=null;function tp(i,s,l,d){if(Xl=null,i=$h(d),i=os(i),i!==null)if(s=ss(i),s===null)i=null;else if(l=s.tag,l===13){if(i=zb(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 Xl=i,null}function i_(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(O8()){case Gh:return 1;case Wb:return 4;case $l:case I8:return 16;case Gb:return 536870912;default:return 16}default:return 16}}var Ai=null,np=null,Jl=null;function s_(){if(Jl)return Jl;var i,s=np,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 Jl=g.slice(i,1<d?1-d:void 0)}function Zl(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 ec(){return!0}function o_(){return!1}function Bn(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)?ec:o_,this.isPropagationStopped=o_,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=ec)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ec)},persist:function(){},isPersistent:ec}),s}var co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rp=Bn(co),Ha=w({},co,{view:0,detail:0}),V8=Bn(Ha),ip,sp,za,tc=w({},Ha,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ap,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==za&&(za&&i.type==="mousemove"?(ip=i.screenX-za.screenX,sp=i.screenY-za.screenY):sp=ip=0,za=i),ip)},movementY:function(i){return"movementY"in i?i.movementY:sp}}),a_=Bn(tc),q8=w({},tc,{dataTransfer:0}),Y8=Bn(q8),W8=w({},Ha,{relatedTarget:0}),op=Bn(W8),G8=w({},co,{animationName:0,elapsedTime:0,pseudoElement:0}),K8=Bn(G8),Q8=w({},co,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),X8=Bn(Q8),J8=w({},co,{data:0}),u_=Bn(J8),Z8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eM={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"},tM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=tM[i])?!!s[i]:!1}function ap(){return nM}var rM=w({},Ha,{key:function(i){if(i.key){var s=Z8[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Zl(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?eM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ap,charCode:function(i){return i.type==="keypress"?Zl(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Zl(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),iM=Bn(rM),sM=w({},tc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),l_=Bn(sM),oM=w({},Ha,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ap}),aM=Bn(oM),uM=w({},co,{propertyName:0,elapsedTime:0,pseudoElement:0}),lM=Bn(uM),cM=w({},tc,{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}),fM=Bn(cM),dM=[9,13,27,32],up=c&&"CompositionEvent"in window,ja=null;c&&"documentMode"in document&&(ja=document.documentMode);var hM=c&&"TextEvent"in window&&!ja,c_=c&&(!up||ja&&8<ja&&11>=ja),f_=" ",d_=!1;function h_(i,s){switch(i){case"keyup":return dM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function p_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var fo=!1;function pM(i,s){switch(i){case"compositionend":return p_(s);case"keypress":return s.which!==32?null:(d_=!0,f_);case"textInput":return i=s.data,i===f_&&d_?null:i;default:return null}}function mM(i,s){if(fo)return i==="compositionend"||!up&&h_(i,s)?(i=s_(),Jl=np=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 c_&&s.locale!=="ko"?null:s.data;default:return null}}var gM={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 m_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!gM[i.type]:s==="textarea"}function g_(i,s,l,d){Mb(d),s=oc(s,"onChange"),0<s.length&&(l=new rp("onChange","change",null,l,d),i.push({event:l,listeners:s}))}var $a=null,Va=null;function EM(i){L_(i,0)}function nc(i){var s=Eo(i);if(oo(s))return i}function yM(i,s){if(i==="change")return s}var E_=!1;if(c){var lp;if(c){var cp="oninput"in document;if(!cp){var y_=document.createElement("div");y_.setAttribute("oninput","return;"),cp=typeof y_.oninput=="function"}lp=cp}else lp=!1;E_=lp&&(!document.documentMode||9<document.documentMode)}function T_(){$a&&($a.detachEvent("onpropertychange",b_),Va=$a=null)}function b_(i){if(i.propertyName==="value"&&nc(Va)){var s=[];g_(s,Va,i,$h(i)),Hb(EM,s)}}function TM(i,s,l){i==="focusin"?(T_(),$a=s,Va=l,$a.attachEvent("onpropertychange",b_)):i==="focusout"&&T_()}function bM(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return nc(Va)}function _M(i,s){if(i==="click")return nc(s)}function xM(i,s){if(i==="input"||i==="change")return nc(s)}function SM(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var mr=typeof Object.is=="function"?Object.is:SM;function qa(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 __(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function x_(i,s){var l=__(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=__(l)}}function S_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?S_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function w_(){for(var i=window,s=Zr();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=Zr(i.document)}return s}function fp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function wM(i){var s=w_(),l=i.focusedElem,d=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&S_(l.ownerDocument.documentElement,l)){if(d!==null&&fp(l)){if(s=d.start,i=d.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=l.textContent.length,y=Math.min(d.start,g);d=d.end===void 0?y:Math.min(d.end,g),!i.extend&&y>d&&(g=d,d=y,y=g),g=x_(l,y);var x=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 CM=c&&"documentMode"in document&&11>=document.documentMode,ho=null,dp=null,Ya=null,hp=!1;function C_(i,s,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;hp||ho==null||ho!==Zr(d)||(d=ho,"selectionStart"in d&&fp(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Ya&&qa(Ya,d)||(Ya=d,d=oc(dp,"onSelect"),0<d.length&&(s=new rp("onSelect","select",null,s,l),i.push({event:s,listeners:d}),s.target=ho)))}function rc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var po={animationend:rc("Animation","AnimationEnd"),animationiteration:rc("Animation","AnimationIteration"),animationstart:rc("Animation","AnimationStart"),transitionend:rc("Transition","TransitionEnd")},pp={},A_={};c&&(A_=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 ic(i){if(pp[i])return pp[i];if(!po[i])return i;var s=po[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in A_)return pp[i]=s[l];return i}var v_=ic("animationend"),k_=ic("animationiteration"),N_=ic("animationstart"),O_=ic("transitionend"),I_=new Map,P_="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){I_.set(i,s),a(s,[i])}for(var mp=0;mp<P_.length;mp++){var gp=P_[mp],AM=gp.toLowerCase(),vM=gp[0].toUpperCase()+gp.slice(1);vi(AM,"on"+vM)}vi(v_,"onAnimationEnd"),vi(k_,"onAnimationIteration"),vi(N_,"onAnimationStart"),vi("dblclick","onDoubleClick"),vi("focusin","onFocus"),vi("focusout","onBlur"),vi(O_,"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 Wa="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(" "),kM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wa));function R_(i,s,l){var d=i.type||"unknown-event";i.currentTarget=l,A8(d,s,void 0,i),i.currentTarget=null}function L_(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;R_(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;R_(g,O,Y),y=L}}}if(jl)throw i=Wh,jl=!1,Wh=null,i}function pt(i,s){var l=s[wp];l===void 0&&(l=s[wp]=new Set);var d=i+"__bubble";l.has(d)||(D_(s,i,2,!1),l.add(d))}function Ep(i,s,l){var d=0;s&&(d|=4),D_(l,i,d,s)}var sc="_reactListening"+Math.random().toString(36).slice(2);function Ga(i){if(!i[sc]){i[sc]=!0,r.forEach(function(l){l!=="selectionchange"&&(kM.has(l)||Ep(l,!1,i),Ep(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[sc]||(s[sc]=!0,Ep("selectionchange",!1,s))}}function D_(i,s,l,d){switch(i_(s)){case 1:var g=j8;break;case 4:g=$8;break;default:g=ep}l=g.bind(null,s,l,i),g=void 0,!Yh||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?i.addEventListener(s,l,{capture:!0,passive:g}):i.addEventListener(s,l,!0):g!==void 0?i.addEventListener(s,l,{passive:g}):i.addEventListener(s,l,!1)}function yp(i,s,l,d,g){var y=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var x=d.tag;if(x===3||x===4){var 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=os(O),x===null)return;if(L=x.tag,L===5||L===6){d=y=x;continue e}O=O.parentNode}}d=d.return}Hb(function(){var Y=y,se=$h(l),ue=[];e:{var ne=I_.get(i);if(ne!==void 0){var Se=rp,Ce=i;switch(i){case"keypress":if(Zl(l)===0)break e;case"keydown":case"keyup":Se=iM;break;case"focusin":Ce="focus",Se=op;break;case"focusout":Ce="blur",Se=op;break;case"beforeblur":case"afterblur":Se=op;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Se=a_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Se=Y8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Se=aM;break;case v_:case k_:case N_:Se=K8;break;case O_:Se=lM;break;case"scroll":Se=V8;break;case"wheel":Se=fM;break;case"copy":case"cut":case"paste":Se=X8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Se=l_}var ve=(s&4)!==0,Lt=!ve&&i==="scroll",z=ve?ne!==null?ne+"Capture":null:ne;ve=[];for(var M=Y,V;M!==null;){V=M;var ge=V.stateNode;if(V.tag===5&&ge!==null&&(V=ge,z!==null&&(ge=Oa(M,z),ge!=null&&ve.push(Ka(M,ge,V)))),Lt)break;M=M.return}0<ve.length&&(ne=new Se(ne,Ce,null,l,se),ue.push({event:ne,listeners:ve}))}}if((s&7)===0){e:{if(ne=i==="mouseover"||i==="pointerover",Se=i==="mouseout"||i==="pointerout",ne&&l!==Fn&&(Ce=l.relatedTarget||l.fromElement)&&(os(Ce)||Ce[ti]))break e;if((Se||ne)&&(ne=se.window===se?se:(ne=se.ownerDocument)?ne.defaultView||ne.parentWindow:window,Se?(Ce=l.relatedTarget||l.toElement,Se=Y,Ce=Ce?os(Ce):null,Ce!==null&&(Lt=ss(Ce),Ce!==Lt||Ce.tag!==5&&Ce.tag!==6)&&(Ce=null)):(Se=null,Ce=Y),Se!==Ce)){if(ve=a_,ge="onMouseLeave",z="onMouseEnter",M="mouse",(i==="pointerout"||i==="pointerover")&&(ve=l_,ge="onPointerLeave",z="onPointerEnter",M="pointer"),Lt=Se==null?ne:Eo(Se),V=Ce==null?ne:Eo(Ce),ne=new ve(ge,M+"leave",Se,l,se),ne.target=Lt,ne.relatedTarget=V,ge=null,os(se)===Y&&(ve=new ve(z,M+"enter",Ce,l,se),ve.target=V,ve.relatedTarget=Lt,ge=ve),Lt=ge,Se&&Ce)t:{for(ve=Se,z=Ce,M=0,V=ve;V;V=mo(V))M++;for(V=0,ge=z;ge;ge=mo(ge))V++;for(;0<M-V;)ve=mo(ve),M--;for(;0<V-M;)z=mo(z),V--;for(;M--;){if(ve===z||z!==null&&ve===z.alternate)break t;ve=mo(ve),z=mo(z)}ve=null}else ve=null;Se!==null&&M_(ue,ne,Se,ve,!1),Ce!==null&&Lt!==null&&M_(ue,Lt,Ce,ve,!0)}}e:{if(ne=Y?Eo(Y):window,Se=ne.nodeName&&ne.nodeName.toLowerCase(),Se==="select"||Se==="input"&&ne.type==="file")var Ne=yM;else if(m_(ne))if(E_)Ne=xM;else{Ne=bM;var Le=TM}else(Se=ne.nodeName)&&Se.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(Ne=_M);if(Ne&&(Ne=Ne(i,Y))){g_(ue,Ne,l,se);break e}Le&&Le(i,ne,Y),i==="focusout"&&(Le=ne._wrapperState)&&Le.controlled&&ne.type==="number"&&St(ne,"number",ne.value)}switch(Le=Y?Eo(Y):window,i){case"focusin":(m_(Le)||Le.contentEditable==="true")&&(ho=Le,dp=Y,Ya=null);break;case"focusout":Ya=dp=ho=null;break;case"mousedown":hp=!0;break;case"contextmenu":case"mouseup":case"dragend":hp=!1,C_(ue,l,se);break;case"selectionchange":if(CM)break;case"keydown":case"keyup":C_(ue,l,se)}var De;if(up)e:{switch(i){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else fo?h_(i,l)&&(Ue="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ue="onCompositionStart");Ue&&(c_&&l.locale!=="ko"&&(fo||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&fo&&(De=s_()):(Ai=se,np="value"in Ai?Ai.value:Ai.textContent,fo=!0)),Le=oc(Y,Ue),0<Le.length&&(Ue=new u_(Ue,i,null,l,se),ue.push({event:Ue,listeners:Le}),De?Ue.data=De:(De=p_(l),De!==null&&(Ue.data=De)))),(De=hM?pM(i,l):mM(i,l))&&(Y=oc(Y,"onBeforeInput"),0<Y.length&&(se=new u_("onBeforeInput","beforeinput",null,l,se),ue.push({event:se,listeners:Y}),se.data=De))}L_(ue,s)})}function Ka(i,s,l){return{instance:i,listener:s,currentTarget:l}}function oc(i,s){for(var l=s+"Capture",d=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=Oa(i,l),y!=null&&d.unshift(Ka(i,y,g)),y=Oa(i,s),y!=null&&d.push(Ka(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 M_(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=Oa(l,y),L!=null&&x.unshift(Ka(l,L,O))):g||(L=Oa(l,y),L!=null&&x.push(Ka(l,L,O)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var NM=/\r\n?/g,OM=/\u0000|\uFFFD/g;function F_(i){return(typeof i=="string"?i:""+i).replace(NM,`
|
|
12
|
-
`).replace(OM,"")}function ac(i,s,l){if(s=F_(s),F_(i)!==s&&l)throw Error(n(425))}function uc(){}var Tp=null,bp=null;function _p(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var xp=typeof setTimeout=="function"?setTimeout:void 0,IM=typeof clearTimeout=="function"?clearTimeout:void 0,B_=typeof Promise=="function"?Promise:void 0,PM=typeof queueMicrotask=="function"?queueMicrotask:typeof B_!="undefined"?function(i){return B_.resolve(null).then(i).catch(RM)}:xp;function RM(i){setTimeout(function(){throw i})}function Sp(i,s){var l=s,d=0;do{var g=l.nextSibling;if(i.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(d===0){i.removeChild(g),Ua(s);return}d--}else l!=="$"&&l!=="$?"&&l!=="$!"||d++;l=g}while(l);Ua(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 U_(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),Fr="__reactFiber$"+go,Qa="__reactProps$"+go,ti="__reactContainer$"+go,wp="__reactEvents$"+go,LM="__reactListeners$"+go,DM="__reactHandles$"+go;function os(i){var s=i[Fr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[ti]||l[Fr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=U_(i);i!==null;){if(l=i[Fr])return l;i=U_(i)}return s}i=l,l=i.parentNode}return null}function Xa(i){return i=i[Fr]||i[ti],!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 lc(i){return i[Qa]||null}var Cp=[],yo=-1;function Ni(i){return{current:i}}function mt(i){0>yo||(i.current=Cp[yo],Cp[yo]=null,yo--)}function dt(i,s){yo++,Cp[yo]=i.current,i.current=s}var Oi={},on=Ni(Oi),Cn=Ni(!1),as=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 An(i){return i=i.childContextTypes,i!=null}function cc(){mt(Cn),mt(on)}function H_(i,s,l){if(on.current!==Oi)throw Error(n(168));dt(on,s),dt(Cn,l)}function z_(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,Ke(i)||"Unknown",g));return w({},l,d)}function fc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Oi,as=on.current,dt(on,i),dt(Cn,Cn.current),!0}function j_(i,s,l){var d=i.stateNode;if(!d)throw Error(n(169));l?(i=z_(i,s,as),d.__reactInternalMemoizedMergedChildContext=i,mt(Cn),mt(on),dt(on,i)):mt(Cn),dt(Cn,l)}var ni=null,dc=!1,Ap=!1;function $_(i){ni===null?ni=[i]:ni.push(i)}function MM(i){dc=!0,$_(i)}function Ii(){if(!Ap&&ni!==null){Ap=!0;var i=0,s=at;try{var l=ni;for(at=1;i<l.length;i++){var d=l[i];do d=d(!0);while(d!==null)}ni=null,dc=!1}catch(g){throw ni!==null&&(ni=ni.slice(i+1)),qb(Gh,Ii),g}finally{at=s,Ap=!1}}return null}var bo=[],_o=0,hc=null,pc=0,Qn=[],Xn=0,us=null,ri=1,ii="";function ls(i,s){bo[_o++]=pc,bo[_o++]=hc,hc=i,pc=s}function V_(i,s,l){Qn[Xn++]=ri,Qn[Xn++]=ii,Qn[Xn++]=us,us=i;var d=ri;i=ii;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,ri=1<<32-pr(s)+g|l<<g|d,ii=y+i}else ri=1<<y|l<<g|d,ii=i}function vp(i){i.return!==null&&(ls(i,1),V_(i,1,0))}function kp(i){for(;i===hc;)hc=bo[--_o],bo[_o]=null,pc=bo[--_o],bo[_o]=null;for(;i===us;)us=Qn[--Xn],Qn[Xn]=null,ii=Qn[--Xn],Qn[Xn]=null,ri=Qn[--Xn],Qn[Xn]=null}var Un=null,Hn=null,bt=!1,gr=null;function q_(i,s){var l=tr(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 Y_(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=ki(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=us!==null?{id:ri,overflow:ii}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=tr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Un=i,Hn=null,!0):!1;default:return!1}}function Np(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Op(i){if(bt){var s=Hn;if(s){var l=s;if(!Y_(i,s)){if(Np(i))throw Error(n(418));s=ki(l.nextSibling);var d=Un;s&&Y_(i,s)?q_(d,l):(i.flags=i.flags&-4097|2,bt=!1,Un=i)}}else{if(Np(i))throw Error(n(418));i.flags=i.flags&-4097|2,bt=!1,Un=i}}}function W_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Un=i}function mc(i){if(i!==Un)return!1;if(!bt)return W_(i),bt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!_p(i.type,i.memoizedProps)),s&&(s=Hn)){if(Np(i))throw G_(),Error(n(418));for(;s;)q_(i,s),s=ki(s.nextSibling)}if(W_(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=ki(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Hn=null}}else Hn=Un?ki(i.stateNode.nextSibling):null;return!0}function G_(){for(var i=Hn;i;)i=ki(i.nextSibling)}function xo(){Hn=Un=null,bt=!1}function Ip(i){gr===null?gr=[i]:gr.push(i)}var FM=G.ReactCurrentBatchConfig;function Ja(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 gc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function K_(i){var s=i._init;return s(i._payload)}function Q_(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=xm(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?se(z,M,V.props.children,ge,V.key):M!==null&&(M.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ae&&K_(Ne)===M.type)?(ge=g(M,V.props),ge.ref=Ja(z,M,V),ge.return=z,ge):(ge=Hc(V.type,V.key,V.props,null,z.mode,ge),ge.ref=Ja(z,M,V),ge.return=z,ge)}function Y(z,M,V,ge){return M===null||M.tag!==4||M.stateNode.containerInfo!==V.containerInfo||M.stateNode.implementation!==V.implementation?(M=Sm(V,z.mode,ge),M.return=z,M):(M=g(M,V.children||[]),M.return=z,M)}function se(z,M,V,ge,Ne){return M===null||M.tag!==7?(M=Es(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=xm(""+M,z.mode,V),M.return=z,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case W:return V=Hc(M.type,M.key,M.props,null,z.mode,V),V.ref=Ja(z,null,M),V.return=z,V;case B:return M=Sm(M,z.mode,V),M.return=z,M;case Ae:var ge=M._init;return ue(z,ge(M._payload),V)}if(Pt(M)||ee(M))return M=Es(M,z.mode,V,null),M.return=z,M;gc(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 Ae:return Ne=V._init,ne(z,M,Ne(V._payload),ge)}if(Pt(V)||ee(V))return Ne!==null?null:se(z,M,V,ge,null);gc(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 Ae:var Le=ge._init;return Se(z,M,V,Le(ge._payload),Ne)}if(Pt(ge)||ee(ge))return z=z.get(V)||null,se(M,z,ge,Ne,null);gc(M,ge)}return null}function Ce(z,M,V,ge){for(var Ne=null,Le=null,De=M,Ue=M=0,Kt=null;De!==null&&Ue<V.length;Ue++){De.index>Ue?(Kt=De,De=null):Kt=De.sibling;var rt=ne(z,De,V[Ue],ge);if(rt===null){De===null&&(De=Kt);break}i&&De&&rt.alternate===null&&s(z,De),M=y(rt,M,Ue),Le===null?Ne=rt:Le.sibling=rt,Le=rt,De=Kt}if(Ue===V.length)return l(z,De),bt&&ls(z,Ue),Ne;if(De===null){for(;Ue<V.length;Ue++)De=ue(z,V[Ue],ge),De!==null&&(M=y(De,M,Ue),Le===null?Ne=De:Le.sibling=De,Le=De);return bt&&ls(z,Ue),Ne}for(De=d(z,De);Ue<V.length;Ue++)Kt=Se(De,z,Ue,V[Ue],ge),Kt!==null&&(i&&Kt.alternate!==null&&De.delete(Kt.key===null?Ue:Kt.key),M=y(Kt,M,Ue),Le===null?Ne=Kt:Le.sibling=Kt,Le=Kt);return i&&De.forEach(function(Hi){return s(z,Hi)}),bt&&ls(z,Ue),Ne}function ve(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 Le=Ne=null,De=M,Ue=M=0,Kt=null,rt=V.next();De!==null&&!rt.done;Ue++,rt=V.next()){De.index>Ue?(Kt=De,De=null):Kt=De.sibling;var Hi=ne(z,De,rt.value,ge);if(Hi===null){De===null&&(De=Kt);break}i&&De&&Hi.alternate===null&&s(z,De),M=y(Hi,M,Ue),Le===null?Ne=Hi:Le.sibling=Hi,Le=Hi,De=Kt}if(rt.done)return l(z,De),bt&&ls(z,Ue),Ne;if(De===null){for(;!rt.done;Ue++,rt=V.next())rt=ue(z,rt.value,ge),rt!==null&&(M=y(rt,M,Ue),Le===null?Ne=rt:Le.sibling=rt,Le=rt);return bt&&ls(z,Ue),Ne}for(De=d(z,De);!rt.done;Ue++,rt=V.next())rt=Se(De,z,Ue,rt.value,ge),rt!==null&&(i&&rt.alternate!==null&&De.delete(rt.key===null?Ue:rt.key),M=y(rt,M,Ue),Le===null?Ne=rt:Le.sibling=rt,Le=rt);return i&&De.forEach(function(gF){return s(z,gF)}),bt&&ls(z,Ue),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,Le=M;Le!==null;){if(Le.key===Ne){if(Ne=V.type,Ne===te){if(Le.tag===7){l(z,Le.sibling),M=g(Le,V.props.children),M.return=z,z=M;break e}}else if(Le.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ae&&K_(Ne)===Le.type){l(z,Le.sibling),M=g(Le,V.props),M.ref=Ja(z,Le,V),M.return=z,z=M;break e}l(z,Le);break}else s(z,Le);Le=Le.sibling}V.type===te?(M=Es(V.props.children,z.mode,ge,V.key),M.return=z,z=M):(ge=Hc(V.type,V.key,V.props,null,z.mode,ge),ge.ref=Ja(z,M,V),ge.return=z,z=ge)}return x(z);case B:e:{for(Le=V.key;M!==null;){if(M.key===Le)if(M.tag===4&&M.stateNode.containerInfo===V.containerInfo&&M.stateNode.implementation===V.implementation){l(z,M.sibling),M=g(M,V.children||[]),M.return=z,z=M;break e}else{l(z,M);break}else s(z,M);M=M.sibling}M=Sm(V,z.mode,ge),M.return=z,z=M}return x(z);case Ae:return Le=V._init,Lt(z,M,Le(V._payload),ge)}if(Pt(V))return Ce(z,M,V,ge);if(ee(V))return ve(z,M,V,ge);gc(z,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,M!==null&&M.tag===6?(l(z,M.sibling),M=g(M,V),M.return=z,z=M):(l(z,M),M=xm(V,z.mode,ge),M.return=z,z=M),x(z)):l(z,M)}return Lt}var So=Q_(!0),X_=Q_(!1),Ec=Ni(null),yc=null,wo=null,Pp=null;function Rp(){Pp=wo=yc=null}function Lp(i){var s=Ec.current;mt(Ec),i._currentValue=s}function Dp(i,s,l){for(;i!==null;){var d=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),i===l)break;i=i.return}}function Co(i,s){yc=i,Pp=wo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(vn=!0),i.firstContext=null)}function Jn(i){var s=i._currentValue;if(Pp!==i)if(i={context:i,memoizedValue:s,next:null},wo===null){if(yc===null)throw Error(n(308));wo=i,yc.dependencies={lanes:0,firstContext:i}}else wo=wo.next=i;return s}var cs=null;function Mp(i){cs===null?cs=[i]:cs.push(i)}function J_(i,s,l,d){var g=s.interleaved;return g===null?(l.next=l,Mp(s)):(l.next=g.next,g.next=l),s.interleaved=l,si(i,d)}function si(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Pi=!1;function Fp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Z_(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function oi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Ri(i,s,l){var d=i.updateQueue;if(d===null)return null;if(d=d.shared,(tt&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,si(i,l)}return g=d.interleaved,g===null?(s.next=s,Mp(d)):(s.next=g.next,g.next=s),d.interleaved=s,si(i,l)}function Tc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var d=s.lanes;d&=i.pendingLanes,l|=d,s.lanes=l,Xh(i,l)}}function ex(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 bc(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 se=i.alternate;se!==null&&(se=se.updateQueue,O=se.lastBaseUpdate,O!==x&&(O===null?se.firstBaseUpdate=Y:O.next=Y,se.lastBaseUpdate=L))}if(y!==null){var ue=g.baseState;x=0,se=Y=L=null,O=y;do{var ne=O.lane,Se=O.eventTime;if((d&ne)===ne){se!==null&&(se=se.next={eventTime:Se,lane:0,tag:O.tag,payload:O.payload,callback:O.callback,next:null});e:{var Ce=i,ve=O;switch(ne=s,Se=l,ve.tag){case 1:if(Ce=ve.payload,typeof Ce=="function"){ue=Ce.call(Se,ue,ne);break e}ue=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=ve.payload,ne=typeof Ce=="function"?Ce.call(Se,ue,ne):Ce,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},se===null?(Y=se=Se,L=ue):se=se.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(se===null&&(L=ue),g.baseState=L,g.firstBaseUpdate=Y,g.lastBaseUpdate=se,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);hs|=x,i.lanes=x,i.memoizedState=ue}}function tx(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 Za={},Br=Ni(Za),eu=Ni(Za),tu=Ni(Za);function fs(i){if(i===Za)throw Error(n(174));return i}function Bp(i,s){switch(dt(tu,s),dt(eu,i),dt(Br,Za),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)}mt(Br),dt(Br,s)}function Ao(){mt(Br),mt(eu),mt(tu)}function nx(i){fs(tu.current);var s=fs(Br.current),l=Ee(s,i.type);s!==l&&(dt(eu,i),dt(Br,l))}function Up(i){eu.current===i&&(mt(Br),mt(eu))}var wt=Ni(0);function _c(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Hp=[];function zp(){for(var i=0;i<Hp.length;i++)Hp[i]._workInProgressVersionPrimary=null;Hp.length=0}var xc=G.ReactCurrentDispatcher,jp=G.ReactCurrentBatchConfig,ds=0,Ct=null,Ht=null,Wt=null,Sc=!1,nu=!1,ru=0,BM=0;function an(){throw Error(n(321))}function $p(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!mr(i[l],s[l]))return!1;return!0}function Vp(i,s,l,d,g,y){if(ds=y,Ct=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,xc.current=i===null||i.memoizedState===null?jM:$M,i=l(d,g),nu){y=0;do{if(nu=!1,ru=0,25<=y)throw Error(n(301));y+=1,Wt=Ht=null,s.updateQueue=null,xc.current=VM,i=l(d,g)}while(nu)}if(xc.current=Ac,s=Ht!==null&&Ht.next!==null,ds=0,Wt=Ht=Ct=null,Sc=!1,s)throw Error(n(300));return i}function qp(){var i=ru!==0;return ru=0,i}function Ur(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wt===null?Ct.memoizedState=Wt=i:Wt=Wt.next=i,Wt}function Zn(){if(Ht===null){var i=Ct.alternate;i=i!==null?i.memoizedState:null}else i=Ht.next;var s=Wt===null?Ct.memoizedState:Wt.next;if(s!==null)Wt=s,Ht=i;else{if(i===null)throw Error(n(310));Ht=i,i={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},Wt===null?Ct.memoizedState=Wt=i:Wt=Wt.next=i}return Wt}function iu(i,s){return typeof s=="function"?s(i):s}function Yp(i){var s=Zn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var d=Ht,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 se=Y.lane;if((ds&se)===se)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:se,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};L===null?(O=L=ue,x=d):L=L.next=ue,Ct.lanes|=se,hs|=se}Y=Y.next}while(Y!==null&&Y!==y);L===null?x=d:L.next=O,mr(d,s.memoizedState)||(vn=!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,Ct.lanes|=y,hs|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Wp(i){var s=Zn(),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)||(vn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,d]}function rx(){}function ix(i,s){var l=Ct,d=Zn(),g=s(),y=!mr(d.memoizedState,g);if(y&&(d.memoizedState=g,vn=!0),d=d.queue,Gp(ax.bind(null,l,d,i),[i]),d.getSnapshot!==s||y||Wt!==null&&Wt.memoizedState.tag&1){if(l.flags|=2048,su(9,ox.bind(null,l,d,g,s),void 0,null),Gt===null)throw Error(n(349));(ds&30)!==0||sx(l,s,g)}return g}function sx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Ct.updateQueue,s===null?(s={lastEffect:null,stores:null},Ct.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function ox(i,s,l,d){s.value=l,s.getSnapshot=d,ux(s)&&lx(i)}function ax(i,s,l){return l(function(){ux(s)&&lx(i)})}function ux(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!mr(i,l)}catch(d){return!0}}function lx(i){var s=si(i,1);s!==null&&br(s,i,1,-1)}function cx(i){var s=Ur();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:iu,lastRenderedState:i},s.queue=i,i=i.dispatch=zM.bind(null,Ct,i),[s.memoizedState,i]}function su(i,s,l,d){return i={tag:i,create:s,destroy:l,deps:d,next:null},s=Ct.updateQueue,s===null?(s={lastEffect:null,stores:null},Ct.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 fx(){return Zn().memoizedState}function wc(i,s,l,d){var g=Ur();Ct.flags|=i,g.memoizedState=su(1|s,l,void 0,d===void 0?null:d)}function Cc(i,s,l,d){var g=Zn();d=d===void 0?null:d;var y=void 0;if(Ht!==null){var x=Ht.memoizedState;if(y=x.destroy,d!==null&&$p(d,x.deps)){g.memoizedState=su(s,l,y,d);return}}Ct.flags|=i,g.memoizedState=su(1|s,l,y,d)}function dx(i,s){return wc(8390656,8,i,s)}function Gp(i,s){return Cc(2048,8,i,s)}function hx(i,s){return Cc(4,2,i,s)}function px(i,s){return Cc(4,4,i,s)}function mx(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 gx(i,s,l){return l=l!=null?l.concat([i]):null,Cc(4,4,mx.bind(null,s,i),l)}function Kp(){}function Ex(i,s){var l=Zn();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&$p(s,d[1])?d[0]:(l.memoizedState=[i,s],i)}function yx(i,s){var l=Zn();s=s===void 0?null:s;var d=l.memoizedState;return d!==null&&s!==null&&$p(s,d[1])?d[0]:(i=i(),l.memoizedState=[i,s],i)}function Tx(i,s,l){return(ds&21)===0?(i.baseState&&(i.baseState=!1,vn=!0),i.memoizedState=l):(mr(l,s)||(l=Kb(),Ct.lanes|=l,hs|=l,i.baseState=!0),s)}function UM(i,s){var l=at;at=l!==0&&4>l?l:4,i(!0);var d=jp.transition;jp.transition={};try{i(!1),s()}finally{at=l,jp.transition=d}}function bx(){return Zn().memoizedState}function HM(i,s,l){var d=Fi(i);if(l={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null},_x(i))xx(s,l);else if(l=J_(i,s,l,d),l!==null){var g=pn();br(l,i,d,g),Sx(l,s,d)}}function zM(i,s,l){var d=Fi(i),g={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null};if(_x(i))xx(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,Mp(s)):(g.next=L.next,L.next=g),s.interleaved=g;return}}catch(Y){}finally{}l=J_(i,s,g,d),l!==null&&(g=pn(),br(l,i,d,g),Sx(l,s,d))}}function _x(i){var s=i.alternate;return i===Ct||s!==null&&s===Ct}function xx(i,s){nu=Sc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function Sx(i,s,l){if((l&4194240)!==0){var d=s.lanes;d&=i.pendingLanes,l|=d,s.lanes=l,Xh(i,l)}}var Ac={readContext:Jn,useCallback:an,useContext:an,useEffect:an,useImperativeHandle:an,useInsertionEffect:an,useLayoutEffect:an,useMemo:an,useReducer:an,useRef:an,useState:an,useDebugValue:an,useDeferredValue:an,useTransition:an,useMutableSource:an,useSyncExternalStore:an,useId:an,unstable_isNewReconciler:!1},jM={readContext:Jn,useCallback:function(i,s){return Ur().memoizedState=[i,s===void 0?null:s],i},useContext:Jn,useEffect:dx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,wc(4194308,4,mx.bind(null,s,i),l)},useLayoutEffect:function(i,s){return wc(4194308,4,i,s)},useInsertionEffect:function(i,s){return wc(4,2,i,s)},useMemo:function(i,s){var l=Ur();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var d=Ur();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=HM.bind(null,Ct,i),[d.memoizedState,i]},useRef:function(i){var s=Ur();return i={current:i},s.memoizedState=i},useState:cx,useDebugValue:Kp,useDeferredValue:function(i){return Ur().memoizedState=i},useTransition:function(){var i=cx(!1),s=i[0];return i=UM.bind(null,i[1]),Ur().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var d=Ct,g=Ur();if(bt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Gt===null)throw Error(n(349));(ds&30)!==0||sx(d,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,dx(ax.bind(null,d,y,i),[i]),d.flags|=2048,su(9,ox.bind(null,d,y,l,s),void 0,null),l},useId:function(){var i=Ur(),s=Gt.identifierPrefix;if(bt){var l=ii,d=ri;l=(d&~(1<<32-pr(d)-1)).toString(32)+l,s=":"+s+"R"+l,l=ru++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=BM++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},$M={readContext:Jn,useCallback:Ex,useContext:Jn,useEffect:Gp,useImperativeHandle:gx,useInsertionEffect:hx,useLayoutEffect:px,useMemo:yx,useReducer:Yp,useRef:fx,useState:function(){return Yp(iu)},useDebugValue:Kp,useDeferredValue:function(i){var s=Zn();return Tx(s,Ht.memoizedState,i)},useTransition:function(){var i=Yp(iu)[0],s=Zn().memoizedState;return[i,s]},useMutableSource:rx,useSyncExternalStore:ix,useId:bx,unstable_isNewReconciler:!1},VM={readContext:Jn,useCallback:Ex,useContext:Jn,useEffect:Gp,useImperativeHandle:gx,useInsertionEffect:hx,useLayoutEffect:px,useMemo:yx,useReducer:Wp,useRef:fx,useState:function(){return Wp(iu)},useDebugValue:Kp,useDeferredValue:function(i){var s=Zn();return Ht===null?s.memoizedState=i:Tx(s,Ht.memoizedState,i)},useTransition:function(){var i=Wp(iu)[0],s=Zn().memoizedState;return[i,s]},useMutableSource:rx,useSyncExternalStore:ix,useId:bx,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 Qp(i,s,l,d){s=i.memoizedState,l=l(d,s),l=l==null?s:w({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var vc={isMounted:function(i){return(i=i._reactInternals)?ss(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var d=pn(),g=Fi(i),y=oi(d,g);y.payload=s,l!=null&&(y.callback=l),s=Ri(i,y,g),s!==null&&(br(s,i,g,d),Tc(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var d=pn(),g=Fi(i),y=oi(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),Tc(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=pn(),d=Fi(i),g=oi(l,d);g.tag=2,s!=null&&(g.callback=s),s=Ri(i,g,d),s!==null&&(br(s,i,d,l),Tc(s,i,d))}};function wx(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?!qa(l,d)||!qa(g,y):!0}function Cx(i,s,l){var d=!1,g=Oi,y=s.contextType;return typeof y=="object"&&y!==null?y=Jn(y):(g=An(s)?as:on.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=vc,i.stateNode=s,s._reactInternals=i,d&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function Ax(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&&vc.enqueueReplaceState(s,s.state,null)}function Xp(i,s,l,d){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},Fp(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Jn(y):(y=An(s)?as:on.current,g.context=To(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Qp(i,s,y,l),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&vc.enqueueReplaceState(g,g.state,null),bc(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+=Fe(d),d=d.return;while(d);var g=l}catch(y){g=`
|
|
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=`
|
|
13
13
|
Error generating stack: `+y.message+`
|
|
14
|
-
`+y.stack}return{value:i,source:s,stack:g,digest:null}}function Jp(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function Zp(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var qM=typeof WeakMap=="function"?WeakMap:Map;function vx(i,s,l){l=oi(-1,l),l.tag=3,l.payload={element:null};var d=s.value;return l.callback=function(){Lc||(Lc=!0,pm=d),Zp(i,s)},l}function kx(i,s,l){l=oi(-1,l),l.tag=3;var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;l.payload=function(){return d(g)},l.callback=function(){Zp(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){Zp(i,s),typeof d!="function"&&(Di===null?Di=new Set([this]):Di.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function Nx(i,s,l){var d=i.pingCache;if(d===null){d=i.pingCache=new qM;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=sF.bind(null,i,s,l),s.then(i,i))}function Ox(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 Ix(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=oi(-1,1),s.tag=2,Ri(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var YM=G.ReactCurrentOwner,vn=!1;function hn(i,s,l,d){s.child=i===null?X_(s,null,l,d):So(s,i.child,l,d)}function Px(i,s,l,d,g){l=l.render;var y=s.ref;return Co(s,g),d=Vp(i,s,l,d,y,g),l=qp(),i!==null&&!vn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ai(i,s,g)):(bt&&l&&vp(s),s.flags|=1,hn(i,s,d,g),s.child)}function Rx(i,s,l,d,g){if(i===null){var y=l.type;return typeof y=="function"&&!_m(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,Lx(i,s,y,d,g)):(i=Hc(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:qa,l(x,d)&&i.ref===s.ref)return ai(i,s,g)}return s.flags|=1,i=Ui(y,d),i.ref=s.ref,i.return=s,s.child=i}function Lx(i,s,l,d,g){if(i!==null){var y=i.memoizedProps;if(qa(y,d)&&i.ref===s.ref)if(vn=!1,s.pendingProps=d=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(vn=!0);else return s.lanes=i.lanes,ai(i,s,g)}return em(i,s,l,d,g)}function Dx(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},dt(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,dt(No,zn),zn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:l,dt(No,zn),zn|=d}else y!==null?(d=y.baseLanes|l,s.memoizedState=null):d=l,dt(No,zn),zn|=d;return hn(i,s,g,l),s.child}function Mx(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function em(i,s,l,d,g){var y=An(l)?as:on.current;return y=To(s,y),Co(s,g),l=Vp(i,s,l,d,y,g),d=qp(),i!==null&&!vn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ai(i,s,g)):(bt&&d&&vp(s),s.flags|=1,hn(i,s,l,g),s.child)}function Fx(i,s,l,d,g){if(An(l)){var y=!0;fc(s)}else y=!1;if(Co(s,g),s.stateNode===null)Nc(i,s),Cx(s,l,d),Xp(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=Jn(Y):(Y=An(l)?as:on.current,Y=To(s,Y));var se=l.getDerivedStateFromProps,ue=typeof se=="function"||typeof x.getSnapshotBeforeUpdate=="function";ue||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O!==d||L!==Y)&&Ax(s,x,d,Y),Pi=!1;var ne=s.memoizedState;x.state=ne,bc(s,d,x,g),L=s.memoizedState,O!==d||ne!==L||Cn.current||Pi?(typeof se=="function"&&(Qp(s,l,se,d),L=s.memoizedState),(O=Pi||wx(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,Z_(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=Jn(L):(L=An(l)?as:on.current,L=To(s,L));var Se=l.getDerivedStateFromProps;(se=typeof Se=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O!==ue||ne!==L)&&Ax(s,x,d,L),Pi=!1,ne=s.memoizedState,x.state=ne,bc(s,d,x,g);var Ce=s.memoizedState;O!==ue||ne!==Ce||Cn.current||Pi?(typeof Se=="function"&&(Qp(s,l,Se,d),Ce=s.memoizedState),(Y=Pi||wx(s,l,Y,d,ne,Ce,L)||!1)?(se||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,Ce,L),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,Ce,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=Ce),x.props=d,x.state=Ce,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 tm(i,s,l,d,y,g)}function tm(i,s,l,d,g,y){Mx(i,s);var x=(s.flags&128)!==0;if(!d&&!x)return g&&j_(s,l,!1),ai(i,s,y);d=s.stateNode,YM.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)):hn(i,s,O,y),s.memoizedState=d.state,g&&j_(s,l,!0),s.child}function Bx(i){var s=i.stateNode;s.pendingContext?H_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&H_(i,s.context,!1),Bp(i,s.containerInfo)}function Ux(i,s,l,d,g){return xo(),Ip(g),s.flags|=256,hn(i,s,l,d),s.child}var nm={dehydrated:null,treeContext:null,retryLane:0};function rm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Hx(i,s,l){var d=s.pendingProps,g=wt.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),dt(wt,g&1),i===null)return Op(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=d.children,i=d.fallback,y?(d=s.mode,y=s.child,x={mode:"hidden",children:x},(d&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=zc(x,d,0,null),i=Es(i,d,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=rm(l),s.memoizedState=nm,i):im(s,x));if(g=i.memoizedState,g!==null&&(O=g.dehydrated,O!==null))return WM(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=Es(y,x,l,null),y.flags|=2),y.return=s,d.return=s,d.sibling=y,s.child=d,d=y,y=s.child,x=i.child.memoizedState,x=x===null?rm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=i.childLanes&~l,s.memoizedState=nm,d}return y=i.child,i=y.sibling,d=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 im(i,s){return s=zc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function kc(i,s,l,d){return d!==null&&Ip(d),So(s,i.child,null,l),i=im(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function WM(i,s,l,d,g,y,x){if(l)return s.flags&256?(s.flags&=-257,d=Jp(Error(n(422))),kc(i,s,x,d)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=d.fallback,g=s.mode,d=zc({mode:"visible",children:d.children},g,0,null),y=Es(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=rm(x),s.memoizedState=nm,y);if((s.mode&1)===0)return kc(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=Jp(y,d,void 0),kc(i,s,x,d)}if(O=(x&i.childLanes)!==0,vn||O){if(d=Gt,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,si(i,g),br(d,i,g,-1))}return bm(),d=Jp(Error(n(421))),kc(i,s,x,d)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=oF.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,Hn=ki(g.nextSibling),Un=s,bt=!0,gr=null,i!==null&&(Qn[Xn++]=ri,Qn[Xn++]=ii,Qn[Xn++]=us,ri=i.id,ii=i.overflow,us=s),s=im(s,d.children),s.flags|=4096,s)}function zx(i,s,l){i.lanes|=s;var d=i.alternate;d!==null&&(d.lanes|=s),Dp(i.return,s,l)}function sm(i,s,l,d,g){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=d,y.tail=l,y.tailMode=g)}function jx(i,s,l){var d=s.pendingProps,g=d.revealOrder,y=d.tail;if(hn(i,s,d.children,l),d=wt.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&&zx(i,l,s);else if(i.tag===19)zx(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(dt(wt,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&&_c(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),sm(s,!1,g,l,y);break;case"backwards":for(l=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&_c(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}sm(s,!0,l,null,y);break;case"together":sm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Nc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ai(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),hs|=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 GM(i,s,l){switch(s.tag){case 3:Bx(s),xo();break;case 5:nx(s);break;case 1:An(s.type)&&fc(s);break;case 4:Bp(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;dt(Ec,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(dt(wt,wt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?Hx(i,s,l):(dt(wt,wt.current&1),i=ai(i,s,l),i!==null?i.sibling:null);dt(wt,wt.current&1);break;case 19:if(d=(l&s.childLanes)!==0,(i.flags&128)!==0){if(d)return jx(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),dt(wt,wt.current),d)break;return null;case 22:case 23:return s.lanes=0,Dx(i,s,l)}return ai(i,s,l)}var $x,om,Vx,qx;$x=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},om=function(){},Vx=function(i,s,l,d){var g=i.memoizedProps;if(g!==d){i=s.stateNode,fs(Br.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=Ze(i,g),d=Ze(i,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(i.onclick=uc)}Xt(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"&&pt("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)}},qx=function(i,s,l,d){l!==d&&(s.flags|=4)};function ou(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 un(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 KM(i,s,l){var d=s.pendingProps;switch(kp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return un(s),null;case 1:return An(s.type)&&cc(),un(s),null;case 3:return d=s.stateNode,Ao(),mt(Cn),mt(on),zp(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(mc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,gr!==null&&(Em(gr),gr=null))),om(i,s),un(s),null;case 5:Up(s);var g=fs(tu.current);if(l=s.type,i!==null&&s.stateNode!=null)Vx(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 un(s),null}if(i=fs(Br.current),mc(s)){d=s.stateNode,l=s.type;var y=s.memoizedProps;switch(d[Fr]=s,d[Qa]=y,i=(s.mode&1)!==0,l){case"dialog":pt("cancel",d),pt("close",d);break;case"iframe":case"object":case"embed":pt("load",d);break;case"video":case"audio":for(g=0;g<Wa.length;g++)pt(Wa[g],d);break;case"source":pt("error",d);break;case"img":case"image":case"link":pt("error",d),pt("load",d);break;case"details":pt("toggle",d);break;case"input":_e(d,y),pt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},pt("invalid",d);break;case"textarea":Mn(d,y),pt("invalid",d)}Xt(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&&ac(d.textContent,O,i),g=["children",O]):typeof O=="number"&&d.textContent!==""+O&&(y.suppressHydrationWarning!==!0&&ac(d.textContent,O,i),g=["children",""+O]):o.hasOwnProperty(x)&&O!=null&&x==="onScroll"&&pt("scroll",d)}switch(l){case"input":Gn(d),Tt(d,y,!0);break;case"textarea":Gn(d),hr(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=uc)}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[Fr]=s,i[Qa]=d,$x(i,s,!1,!1),s.stateNode=i;e:{switch(x=Dr(l,d),l){case"dialog":pt("cancel",i),pt("close",i),g=d;break;case"iframe":case"object":case"embed":pt("load",i),g=d;break;case"video":case"audio":for(g=0;g<Wa.length;g++)pt(Wa[g],i);g=d;break;case"source":pt("error",i),g=d;break;case"img":case"image":case"link":pt("error",i),pt("load",i),g=d;break;case"details":pt("toggle",i),g=d;break;case"input":_e(i,d),g=Ti(i,d),pt("invalid",i);break;case"option":g=d;break;case"select":i._wrapperState={wasMultiple:!!d.multiple},g=w({},d,{value:void 0}),pt("invalid",i);break;case"textarea":Mn(i,d),g=Ze(i,d),pt("invalid",i);break;default:g=d}Xt(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&&Ye(i,L)):y==="children"?typeof L=="string"?(l!=="textarea"||L!=="")&&et(i,L):typeof L=="number"&&et(i,""+L):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?L!=null&&y==="onScroll"&&pt("scroll",i):L!=null&&D(i,y,L,x))}switch(l){case"input":Gn(i),Tt(i,d,!1);break;case"textarea":Gn(i),hr(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?Ut(i,!!d.multiple,y,!1):d.defaultValue!=null&&Ut(i,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=uc)}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 un(s),null;case 6:if(i&&s.stateNode!=null)qx(i,s,i.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(l=fs(tu.current),fs(Br.current),mc(s)){if(d=s.stateNode,l=s.memoizedProps,d[Fr]=s,(y=d.nodeValue!==l)&&(i=Un,i!==null))switch(i.tag){case 3:ac(d.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&ac(d.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else d=(l.nodeType===9?l:l.ownerDocument).createTextNode(d),d[Fr]=s,s.stateNode=d}return un(s),null;case 13:if(mt(wt),d=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(bt&&Hn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)G_(),xo(),s.flags|=98560,y=!1;else if(y=mc(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[Fr]=s}else xo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;un(s),y=!1}else gr!==null&&(Em(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||(wt.current&1)!==0?zt===0&&(zt=3):bm())),s.updateQueue!==null&&(s.flags|=4),un(s),null);case 4:return Ao(),om(i,s),i===null&&Ga(s.stateNode.containerInfo),un(s),null;case 10:return Lp(s.type._context),un(s),null;case 17:return An(s.type)&&cc(),un(s),null;case 19:if(mt(wt),y=s.memoizedState,y===null)return un(s),null;if(d=(s.flags&128)!==0,x=y.rendering,x===null)if(d)ou(y,!1);else{if(zt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=_c(i),x!==null){for(s.flags|=128,ou(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 dt(wt,wt.current&1|2),s.child}i=i.sibling}y.tail!==null&&Rt()>Oo&&(s.flags|=128,d=!0,ou(y,!1),s.lanes=4194304)}else{if(!d)if(i=_c(x),i!==null){if(s.flags|=128,d=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),ou(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!bt)return un(s),null}else 2*Rt()-y.renderingStartTime>Oo&&l!==1073741824&&(s.flags|=128,d=!0,ou(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=wt.current,dt(wt,d?l&1|2:l&1),s):(un(s),null);case 22:case 23:return Tm(),d=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(zn&1073741824)!==0&&(un(s),s.subtreeFlags&6&&(s.flags|=8192)):un(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function QM(i,s){switch(kp(s),s.tag){case 1:return An(s.type)&&cc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ao(),mt(Cn),mt(on),zp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Up(s),null;case 13:if(mt(wt),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 mt(wt),null;case 4:return Ao(),null;case 10:return Lp(s.type._context),null;case 22:case 23:return Tm(),null;case 24:return null;default:return null}}var Oc=!1,ln=!1,XM=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 am(i,s,l){try{l()}catch(d){vt(i,s,d)}}var Yx=!1;function JM(i,s){if(Tp=Ql,i=w_(),fp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{l.nodeType,y.nodeType}catch(ge){l=null;break e}var x=0,O=-1,L=-1,Y=0,se=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&&++se===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(bp={focusedElem:i,selectionRange:l},Ql=!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 Ce=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ce!==null){var ve=Ce.memoizedProps,Lt=Ce.memoizedState,z=s.stateNode,M=z.getSnapshotBeforeUpdate(s.elementType===s.type?ve:Er(s.type,ve),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){vt(s,s.return,ge)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return Ce=Yx,Yx=!1,Ce}function au(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&&am(s,l,y)}g=g.next}while(g!==d)}}function Ic(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 um(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 Wx(i){var s=i.alternate;s!==null&&(i.alternate=null,Wx(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Fr],delete s[Qa],delete s[wp],delete s[LM],delete s[DM])),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 Gx(i){return i.tag===5||i.tag===3||i.tag===4}function Kx(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Gx(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function lm(i,s,l){var d=i.tag;if(d===5||d===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=uc));else if(d!==4&&(i=i.child,i!==null))for(lm(i,s,l),i=i.sibling;i!==null;)lm(i,s,l),i=i.sibling}function cm(i,s,l){var d=i.tag;if(d===5||d===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(d!==4&&(i=i.child,i!==null))for(cm(i,s,l),i=i.sibling;i!==null;)cm(i,s,l),i=i.sibling}var Jt=null,yr=!1;function Li(i,s,l){for(l=l.child;l!==null;)Qx(i,s,l),l=l.sibling}function Qx(i,s,l){if(Mr&&typeof Mr.onCommitFiberUnmount=="function")try{Mr.onCommitFiberUnmount(Vl,l)}catch(O){}switch(l.tag){case 5:ln||ko(l,s);case 6:var d=Jt,g=yr;Jt=null,Li(i,s,l),Jt=d,yr=g,Jt!==null&&(yr?(i=Jt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Jt.removeChild(l.stateNode));break;case 18:Jt!==null&&(yr?(i=Jt,l=l.stateNode,i.nodeType===8?Sp(i.parentNode,l):i.nodeType===1&&Sp(i,l),Ua(i)):Sp(Jt,l.stateNode));break;case 4:d=Jt,g=yr,Jt=l.stateNode.containerInfo,yr=!0,Li(i,s,l),Jt=d,yr=g;break;case 0:case 11:case 14:case 15:if(!ln&&(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)&&am(l,s,x),g=g.next}while(g!==d)}Li(i,s,l);break;case 1:if(!ln&&(ko(l,s),d=l.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=l.memoizedProps,d.state=l.memoizedState,d.componentWillUnmount()}catch(O){vt(l,s,O)}Li(i,s,l);break;case 21:Li(i,s,l);break;case 22:l.mode&1?(ln=(d=ln)||l.memoizedState!==null,Li(i,s,l),ln=d):Li(i,s,l);break;default:Li(i,s,l)}}function Xx(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new XM),s.forEach(function(d){var g=aF.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:Jt=O.stateNode,yr=!1;break e;case 3:Jt=O.stateNode.containerInfo,yr=!0;break e;case 4:Jt=O.stateNode.containerInfo,yr=!0;break e}O=O.return}if(Jt===null)throw Error(n(160));Qx(y,x,g),Jt=null,yr=!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;)Jx(s,i),s=s.sibling}function Jx(i,s){var l=i.alternate,d=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Tr(s,i),Hr(i),d&4){try{au(3,i,i.return),Ic(3,i)}catch(ve){vt(i,i.return,ve)}try{au(5,i,i.return)}catch(ve){vt(i,i.return,ve)}}break;case 1:Tr(s,i),Hr(i),d&512&&l!==null&&ko(l,l.return);break;case 5:if(Tr(s,i),Hr(i),d&512&&l!==null&&ko(l,l.return),i.flags&32){var g=i.stateNode;try{et(g,"")}catch(ve){vt(i,i.return,ve)}}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&&He(g,y),Dr(O,x);var Y=Dr(O,y);for(x=0;x<L.length;x+=2){var se=L[x],ue=L[x+1];se==="style"?_i(g,ue):se==="dangerouslySetInnerHTML"?Ye(g,ue):se==="children"?et(g,ue):D(g,se,ue,Y)}switch(O){case"input":nt(g,y);break;case"textarea":bi(g,y);break;case"select":var ne=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var Se=y.value;Se!=null?Ut(g,!!y.multiple,Se,!1):ne!==!!y.multiple&&(y.defaultValue!=null?Ut(g,!!y.multiple,y.defaultValue,!0):Ut(g,!!y.multiple,y.multiple?[]:"",!1))}g[Qa]=y}catch(ve){vt(i,i.return,ve)}}break;case 6:if(Tr(s,i),Hr(i),d&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ve){vt(i,i.return,ve)}}break;case 3:if(Tr(s,i),Hr(i),d&4&&l!==null&&l.memoizedState.isDehydrated)try{Ua(s.containerInfo)}catch(ve){vt(i,i.return,ve)}break;case 4:Tr(s,i),Hr(i);break;case 13:Tr(s,i),Hr(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(hm=Rt())),d&4&&Xx(i);break;case 22:if(se=l!==null&&l.memoizedState!==null,i.mode&1?(ln=(Y=ln)||se,Tr(s,i),ln=Y):Tr(s,i),Hr(i),d&8192){if(Y=i.memoizedState!==null,(i.stateNode.isHidden=Y)&&!se&&(i.mode&1)!==0)for(we=i,se=i.child;se!==null;){for(ue=we=se;we!==null;){switch(ne=we,Se=ne.child,ne.tag){case 0:case 11:case 14:case 15:au(4,ne,ne.return);break;case 1:ko(ne,ne.return);var Ce=ne.stateNode;if(typeof Ce.componentWillUnmount=="function"){d=ne,l=ne.return;try{s=d,Ce.props=s.memoizedProps,Ce.state=s.memoizedState,Ce.componentWillUnmount()}catch(ve){vt(d,l,ve)}}break;case 5:ko(ne,ne.return);break;case 22:if(ne.memoizedState!==null){t2(ue);continue}}Se!==null?(Se.return=ne,we=Se):t2(ue)}se=se.sibling}e:for(se=null,ue=i;;){if(ue.tag===5){if(se===null){se=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=Kn("display",x))}catch(ve){vt(i,i.return,ve)}}}else if(ue.tag===6){if(se===null)try{ue.stateNode.nodeValue=Y?"":ue.memoizedProps}catch(ve){vt(i,i.return,ve)}}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;se===ue&&(se=null),ue=ue.return}se===ue&&(se=null),ue.sibling.return=ue.return,ue=ue.sibling}}break;case 19:Tr(s,i),Hr(i),d&4&&Xx(i);break;case 21:break;default:Tr(s,i),Hr(i)}}function Hr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(Gx(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&&(et(g,""),d.flags&=-33);var y=Kx(i);cm(i,y,g);break;case 3:case 4:var x=d.stateNode.containerInfo,O=Kx(i);lm(i,O,x);break;default:throw Error(n(161))}}catch(L){vt(i,i.return,L)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function ZM(i,s,l){we=i,Zx(i)}function Zx(i,s,l){for(var d=(i.mode&1)!==0;we!==null;){var g=we,y=g.child;if(g.tag===22&&d){var x=g.memoizedState!==null||Oc;if(!x){var O=g.alternate,L=O!==null&&O.memoizedState!==null||ln;O=Oc;var Y=ln;if(Oc=x,(ln=L)&&!Y)for(we=g;we!==null;)x=we,L=x.child,x.tag===22&&x.memoizedState!==null?n2(g):L!==null?(L.return=x,we=L):n2(g);for(;y!==null;)we=y,Zx(y),y=y.sibling;we=g,Oc=O,ln=Y}e2(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,we=y):e2(i)}}function e2(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:ln||Ic(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!ln)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&&tx(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}tx(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 se=Y.memoizedState;if(se!==null){var ue=se.dehydrated;ue!==null&&Ua(ue)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}ln||s.flags&512&&um(s)}catch(ne){vt(s,s.return,ne)}}if(s===i){we=null;break}if(l=s.sibling,l!==null){l.return=s.return,we=l;break}we=s.return}}function t2(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 n2(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{Ic(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{um(s)}catch(L){vt(s,y,L)}break;case 5:var x=s.return;try{um(s)}catch(L){vt(s,x,L)}}}catch(L){vt(s,s.return,L)}if(s===i){we=null;break}var O=s.sibling;if(O!==null){O.return=s.return,we=O;break}we=s.return}}var eF=Math.ceil,Pc=G.ReactCurrentDispatcher,fm=G.ReactCurrentOwner,er=G.ReactCurrentBatchConfig,tt=0,Gt=null,Bt=null,Zt=0,zn=0,No=Ni(0),zt=0,uu=null,hs=0,Rc=0,dm=0,lu=null,kn=null,hm=0,Oo=1/0,ui=null,Lc=!1,pm=null,Di=null,Dc=!1,Mi=null,Mc=0,cu=0,mm=null,Fc=-1,Bc=0;function pn(){return(tt&6)!==0?Rt():Fc!==-1?Fc:Fc=Rt()}function Fi(i){return(i.mode&1)===0?1:(tt&2)!==0&&Zt!==0?Zt&-Zt:FM.transition!==null?(Bc===0&&(Bc=Kb()),Bc):(i=at,i!==0||(i=window.event,i=i===void 0?16:i_(i.type)),i)}function br(i,s,l,d){if(50<cu)throw cu=0,mm=null,Error(n(185));La(i,l,d),((tt&2)===0||i!==Gt)&&(i===Gt&&((tt&2)===0&&(Rc|=l),zt===4&&Bi(i,Zt)),Nn(i,d),l===1&&tt===0&&(s.mode&1)===0&&(Oo=Rt()+500,dc&&Ii()))}function Nn(i,s){var l=i.callbackNode;F8(i,s);var d=Wl(i,i===Gt?Zt:0);if(d===0)l!==null&&Yb(l),i.callbackNode=null,i.callbackPriority=0;else if(s=d&-d,i.callbackPriority!==s){if(l!=null&&Yb(l),s===1)i.tag===0?MM(i2.bind(null,i)):$_(i2.bind(null,i)),PM(function(){(tt&6)===0&&Ii()}),l=null;else{switch(Qb(d)){case 1:l=Gh;break;case 4:l=Wb;break;case 16:l=$l;break;case 536870912:l=Gb;break;default:l=$l}l=d2(l,r2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function r2(i,s){if(Fc=-1,Bc=0,(tt&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Io()&&i.callbackNode!==l)return null;var d=Wl(i,i===Gt?Zt:0);if(d===0)return null;if((d&30)!==0||(d&i.expiredLanes)!==0||s)s=Uc(i,d);else{s=d;var g=tt;tt|=2;var y=o2();(Gt!==i||Zt!==s)&&(ui=null,Oo=Rt()+500,ms(i,s));do try{rF();break}catch(O){s2(i,O)}while(!0);Rp(),Pc.current=y,tt=g,Bt!==null?s=0:(Gt=null,Zt=0,s=zt)}if(s!==0){if(s===2&&(g=Kh(i),g!==0&&(d=g,s=gm(i,g))),s===1)throw l=uu,ms(i,0),Bi(i,d),Nn(i,Rt()),l;if(s===6)Bi(i,d);else{if(g=i.current.alternate,(d&30)===0&&!tF(g)&&(s=Uc(i,d),s===2&&(y=Kh(i),y!==0&&(d=y,s=gm(i,y))),s===1))throw l=uu,ms(i,0),Bi(i,d),Nn(i,Rt()),l;switch(i.finishedWork=g,i.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:gs(i,kn,ui);break;case 3:if(Bi(i,d),(d&130023424)===d&&(s=hm+500-Rt(),10<s)){if(Wl(i,0)!==0)break;if(g=i.suspendedLanes,(g&d)!==d){pn(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=xp(gs.bind(null,i,kn,ui),s);break}gs(i,kn,ui);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*eF(d/1960))-d,10<d){i.timeoutHandle=xp(gs.bind(null,i,kn,ui),d);break}gs(i,kn,ui);break;case 5:gs(i,kn,ui);break;default:throw Error(n(329))}}}return Nn(i,Rt()),i.callbackNode===l?r2.bind(null,i):null}function gm(i,s){var l=lu;return i.current.memoizedState.isDehydrated&&(ms(i,s).flags|=256),i=Uc(i,s),i!==2&&(s=kn,kn=l,s!==null&&Em(s)),i}function Em(i){kn===null?kn=i:kn.push.apply(kn,i)}function tF(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&=~dm,s&=~Rc,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 i2(i){if((tt&6)!==0)throw Error(n(327));Io();var s=Wl(i,0);if((s&1)===0)return Nn(i,Rt()),null;var l=Uc(i,s);if(i.tag!==0&&l===2){var d=Kh(i);d!==0&&(s=d,l=gm(i,d))}if(l===1)throw l=uu,ms(i,0),Bi(i,s),Nn(i,Rt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,gs(i,kn,ui),Nn(i,Rt()),null}function ym(i,s){var l=tt;tt|=1;try{return i(s)}finally{tt=l,tt===0&&(Oo=Rt()+500,dc&&Ii())}}function ps(i){Mi!==null&&Mi.tag===0&&(tt&6)===0&&Io();var s=tt;tt|=1;var l=er.transition,d=at;try{if(er.transition=null,at=1,i)return i()}finally{at=d,er.transition=l,tt=s,(tt&6)===0&&Ii()}}function Tm(){zn=No.current,mt(No)}function ms(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,IM(l)),Bt!==null)for(l=Bt.return;l!==null;){var d=l;switch(kp(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&cc();break;case 3:Ao(),mt(Cn),mt(on),zp();break;case 5:Up(d);break;case 4:Ao();break;case 13:mt(wt);break;case 19:mt(wt);break;case 10:Lp(d.type._context);break;case 22:case 23:Tm()}l=l.return}if(Gt=i,Bt=i=Ui(i.current,null),Zt=zn=s,zt=0,uu=null,dm=Rc=hs=0,kn=lu=null,cs!==null){for(s=0;s<cs.length;s++)if(l=cs[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}cs=null}return i}function s2(i,s){do{var l=Bt;try{if(Rp(),xc.current=Ac,Sc){for(var d=Ct.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}Sc=!1}if(ds=0,Wt=Ht=Ct=null,nu=!1,ru=0,fm.current=null,l===null||l.return===null){zt=1,uu=s,Bt=null;break}e:{var y=i,x=l.return,O=l,L=s;if(s=Zt,O.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var Y=L,se=O,ue=se.tag;if((se.mode&1)===0&&(ue===0||ue===11||ue===15)){var ne=se.alternate;ne?(se.updateQueue=ne.updateQueue,se.memoizedState=ne.memoizedState,se.lanes=ne.lanes):(se.updateQueue=null,se.memoizedState=null)}var Se=Ox(x);if(Se!==null){Se.flags&=-257,Ix(Se,x,O,y,s),Se.mode&1&&Nx(y,Y,s),s=Se,L=Y;var Ce=s.updateQueue;if(Ce===null){var ve=new Set;ve.add(L),s.updateQueue=ve}else Ce.add(L);break e}else{if((s&1)===0){Nx(y,Y,s),bm();break e}L=Error(n(426))}}else if(bt&&O.mode&1){var Lt=Ox(x);if(Lt!==null){(Lt.flags&65536)===0&&(Lt.flags|=256),Ix(Lt,x,O,y,s),Ip(vo(L,O));break e}}y=L=vo(L,O),zt!==4&&(zt=2),lu===null?lu=[y]:lu.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var z=vx(y,L,s);ex(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=kx(y,O,s);ex(y,ge);break e}}y=y.return}while(y!==null)}u2(l)}catch(Ne){s=Ne,Bt===l&&l!==null&&(Bt=l=l.return);continue}break}while(!0)}function o2(){var i=Pc.current;return Pc.current=Ac,i===null?Ac:i}function bm(){(zt===0||zt===3||zt===2)&&(zt=4),Gt===null||(hs&268435455)===0&&(Rc&268435455)===0||Bi(Gt,Zt)}function Uc(i,s){var l=tt;tt|=2;var d=o2();(Gt!==i||Zt!==s)&&(ui=null,ms(i,s));do try{nF();break}catch(g){s2(i,g)}while(!0);if(Rp(),tt=l,Pc.current=d,Bt!==null)throw Error(n(261));return Gt=null,Zt=0,zt}function nF(){for(;Bt!==null;)a2(Bt)}function rF(){for(;Bt!==null&&!k8();)a2(Bt)}function a2(i){var s=f2(i.alternate,i,zn);i.memoizedProps=i.pendingProps,s===null?u2(i):Bt=s,fm.current=null}function u2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=KM(l,s,zn),l!==null){Bt=l;return}}else{if(l=QM(l,s),l!==null){l.flags&=32767,Bt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{zt=6,Bt=null;return}}if(s=s.sibling,s!==null){Bt=s;return}Bt=s=i}while(s!==null);zt===0&&(zt=5)}function gs(i,s,l){var d=at,g=er.transition;try{er.transition=null,at=1,iF(i,s,l,d)}finally{er.transition=g,at=d}return null}function iF(i,s,l,d){do Io();while(Mi!==null);if((tt&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(B8(i,y),i===Gt&&(Bt=Gt=null,Zt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Dc||(Dc=!0,d2($l,function(){return Io(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=er.transition,er.transition=null;var x=at;at=1;var O=tt;tt|=4,fm.current=null,JM(i,l),Jx(l,i),wM(bp),Ql=!!Tp,bp=Tp=null,i.current=l,ZM(l),N8(),tt=O,at=x,er.transition=y}else i.current=l;if(Dc&&(Dc=!1,Mi=i,Mc=g),y=i.pendingLanes,y===0&&(Di=null),P8(l.stateNode),Nn(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(Lc)throw Lc=!1,i=pm,pm=null,i;return(Mc&1)!==0&&i.tag!==0&&Io(),y=i.pendingLanes,(y&1)!==0?i===mm?cu++:(cu=0,mm=i):cu=0,Ii(),null}function Io(){if(Mi!==null){var i=Qb(Mc),s=er.transition,l=at;try{if(er.transition=null,at=16>i?16:i,Mi===null)var d=!1;else{if(i=Mi,Mi=null,Mc=0,(tt&6)!==0)throw Error(n(331));var g=tt;for(tt|=4,we=i.current;we!==null;){var y=we,x=y.child;if((we.flags&16)!==0){var O=y.deletions;if(O!==null){for(var L=0;L<O.length;L++){var Y=O[L];for(we=Y;we!==null;){var se=we;switch(se.tag){case 0:case 11:case 15:au(8,se,y)}var ue=se.child;if(ue!==null)ue.return=se,we=ue;else for(;we!==null;){se=we;var ne=se.sibling,Se=se.return;if(Wx(se),se===Y){we=null;break}if(ne!==null){ne.return=Se,we=ne;break}we=Se}}}var Ce=y.alternate;if(Ce!==null){var ve=Ce.child;if(ve!==null){Ce.child=null;do{var Lt=ve.sibling;ve.sibling=null,ve=Lt}while(ve!==null)}}we=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,we=x;else e:for(;we!==null;){if(y=we,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:au(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;){x=we;var V=x.child;if((x.subtreeFlags&2064)!==0&&V!==null)V.return=x,we=V;else e:for(x=M;we!==null;){if(O=we,(O.flags&2048)!==0)try{switch(O.tag){case 0:case 11:case 15:Ic(9,O)}}catch(Ne){vt(O,O.return,Ne)}if(O===x){we=null;break e}var ge=O.sibling;if(ge!==null){ge.return=O.return,we=ge;break e}we=O.return}}if(tt=g,Ii(),Mr&&typeof Mr.onPostCommitFiberRoot=="function")try{Mr.onPostCommitFiberRoot(Vl,i)}catch(Ne){}d=!0}return d}finally{at=l,er.transition=s}}return!1}function l2(i,s,l){s=vo(l,s),s=vx(i,s,1),i=Ri(i,s,1),s=pn(),i!==null&&(La(i,1,s),Nn(i,s))}function vt(i,s,l){if(i.tag===3)l2(i,i,l);else for(;s!==null;){if(s.tag===3){l2(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=kx(s,i,1),s=Ri(s,i,1),i=pn(),s!==null&&(La(s,1,i),Nn(s,i));break}}s=s.return}}function sF(i,s,l){var d=i.pingCache;d!==null&&d.delete(s),s=pn(),i.pingedLanes|=i.suspendedLanes&l,Gt===i&&(Zt&l)===l&&(zt===4||zt===3&&(Zt&130023424)===Zt&&500>Rt()-hm?ms(i,0):dm|=l),Nn(i,s)}function c2(i,s){s===0&&((i.mode&1)===0?s=1:(s=Yl,Yl<<=1,(Yl&130023424)===0&&(Yl=4194304)));var l=pn();i=si(i,s),i!==null&&(La(i,s,l),Nn(i,l))}function oF(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),c2(i,l)}function aF(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),c2(i,l)}var f2;f2=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||Cn.current)vn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return vn=!1,GM(i,s,l);vn=(i.flags&131072)!==0}else vn=!1,bt&&(s.flags&1048576)!==0&&V_(s,pc,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;Nc(i,s),i=s.pendingProps;var g=To(s,on.current);Co(s,l),g=Vp(null,s,d,i,g,l);var y=qp();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,An(d)?(y=!0,fc(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Fp(s),g.updater=vc,s.stateNode=g,g._reactInternals=s,Xp(s,d,i,l),s=tm(null,s,d,!0,y,l)):(s.tag=0,bt&&y&&vp(s),hn(null,s,g,l),s=s.child),s;case 16:d=s.elementType;e:{switch(Nc(i,s),i=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=lF(d),i=Er(d,i),g){case 0:s=em(null,s,d,i,l);break e;case 1:s=Fx(null,s,d,i,l);break e;case 11:s=Px(null,s,d,i,l);break e;case 14:s=Rx(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),em(i,s,d,g,l);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:Er(d,g),Fx(i,s,d,g,l);case 3:e:{if(Bx(s),i===null)throw Error(n(387));d=s.pendingProps,y=s.memoizedState,g=y.element,Z_(i,s),bc(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=Ux(i,s,d,l,g);break e}else if(d!==g){g=vo(Error(n(424)),s),s=Ux(i,s,d,l,g);break e}else for(Hn=ki(s.stateNode.containerInfo.firstChild),Un=s,bt=!0,gr=null,l=X_(s,null,d,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(xo(),d===g){s=ai(i,s,l);break e}hn(i,s,d,l)}s=s.child}return s;case 5:return nx(s),i===null&&Op(s),d=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,x=g.children,_p(d,g)?x=null:y!==null&&_p(d,y)&&(s.flags|=32),Mx(i,s),hn(i,s,x,l),s.child;case 6:return i===null&&Op(s),null;case 13:return Hx(i,s,l);case 4:return Bp(s,s.stateNode.containerInfo),d=s.pendingProps,i===null?s.child=So(s,null,d,l):hn(i,s,d,l),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:Er(d,g),Px(i,s,d,g,l);case 7:return hn(i,s,s.pendingProps,l),s.child;case 8:return hn(i,s,s.pendingProps.children,l),s.child;case 12:return hn(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,dt(Ec,d._currentValue),d._currentValue=x,y!==null)if(mr(y.value,x)){if(y.children===g.children&&!Cn.current){s=ai(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=oi(-1,l&-l),L.tag=2;var Y=y.updateQueue;if(Y!==null){Y=Y.shared;var se=Y.pending;se===null?L.next=L:(L.next=se.next,se.next=L),Y.pending=L}}y.lanes|=l,L=y.alternate,L!==null&&(L.lanes|=l),Dp(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),Dp(x,l,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}hn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,Co(s,l),g=Jn(g),d=d(g),s.flags|=1,hn(i,s,d,l),s.child;case 14:return d=s.type,g=Er(d,s.pendingProps),g=Er(d.type,g),Rx(i,s,d,g,l);case 15:return Lx(i,s,s.type,s.pendingProps,l);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:Er(d,g),Nc(i,s),s.tag=1,An(d)?(i=!0,fc(s)):i=!1,Co(s,l),Cx(s,d,g),Xp(s,d,g,l),tm(null,s,d,!0,i,l);case 19:return jx(i,s,l);case 22:return Dx(i,s,l)}throw Error(n(156,s.tag))};function d2(i,s){return qb(i,s)}function uF(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 tr(i,s,l,d){return new uF(i,s,l,d)}function _m(i){return i=i.prototype,!(!i||!i.isReactComponent)}function lF(i){if(typeof i=="function")return _m(i)?1:0;if(i!=null){if(i=i.$$typeof,i===de)return 11;if(i===ye)return 14}return 2}function Ui(i,s){var l=i.alternate;return l===null?(l=tr(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 Hc(i,s,l,d,g,y){var x=2;if(d=i,typeof i=="function")_m(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case te:return Es(l.children,g,y,s);case be:x=8,g|=8;break;case he:return i=tr(12,l,s,g|2),i.elementType=he,i.lanes=y,i;case ce:return i=tr(13,l,s,g),i.elementType=ce,i.lanes=y,i;case fe:return i=tr(19,l,s,g),i.elementType=fe,i.lanes=y,i;case ie:return zc(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 ye:x=14;break e;case Ae:x=16,d=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=tr(x,l,s,g),s.elementType=i,s.type=d,s.lanes=y,s}function Es(i,s,l,d){return i=tr(7,i,d,s),i.lanes=l,i}function zc(i,s,l,d){return i=tr(22,i,d,s),i.elementType=ie,i.lanes=l,i.stateNode={isHidden:!1},i}function xm(i,s,l){return i=tr(6,i,null,s),i.lanes=l,i}function Sm(i,s,l){return s=tr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function cF(i,s,l,d,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qh(0),this.expirationTimes=Qh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qh(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function wm(i,s,l,d,g,y,x,O,L){return i=new cF(i,s,l,O,L),s===1?(s=1,y===!0&&(s|=8)):s=0,y=tr(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:d,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fp(y),i}function fF(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 h2(i){if(!i)return Oi;i=i._reactInternals;e:{if(ss(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(An(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(An(l))return z_(i,l,s)}return s}function p2(i,s,l,d,g,y,x,O,L){return i=wm(l,d,!0,i,g,y,x,O,L),i.context=h2(null),l=i.current,d=pn(),g=Fi(l),y=oi(d,g),y.callback=s!=null?s:null,Ri(l,y,g),i.current.lanes=g,La(i,g,d),Nn(i,d),i}function jc(i,s,l,d){var g=s.current,y=pn(),x=Fi(g);return l=h2(l),s.context===null?s.context=l:s.pendingContext=l,s=oi(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),Tc(i,g,x)),x}function $c(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 m2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function Cm(i,s){m2(i,s),(i=i.alternate)&&m2(i,s)}function dF(){return null}var g2=typeof reportError=="function"?reportError:function(i){console.error(i)};function Am(i){this._internalRoot=i}Vc.prototype.render=Am.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));jc(i,s,null,null)},Vc.prototype.unmount=Am.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;ps(function(){jc(null,i,null,null)}),s[ti]=null}};function Vc(i){this._internalRoot=i}Vc.prototype.unstable_scheduleHydration=function(i){if(i){var s=Zb();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&&n_(i)}};function vm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function qc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function E2(){}function hF(i,s,l,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var Y=$c(x);y.call(Y)}}var x=p2(s,d,i,0,null,!1,!1,"",E2);return i._reactRootContainer=x,i[ti]=x.current,Ga(i.nodeType===8?i.parentNode:i),ps(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof d=="function"){var O=d;d=function(){var Y=$c(L);O.call(Y)}}var L=wm(i,0,!1,null,null,!1,!1,"",E2);return i._reactRootContainer=L,i[ti]=L.current,Ga(i.nodeType===8?i.parentNode:i),ps(function(){jc(s,L,l,d)}),L}function Yc(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=$c(x);O.call(L)}}jc(s,x,i,g)}else x=hF(l,s,i,g,d);return $c(x)}Xb=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=Ra(s.pendingLanes);l!==0&&(Xh(s,l|1),Nn(s,Rt()),(tt&6)===0&&(Oo=Rt()+500,Ii()))}break;case 13:ps(function(){var d=si(i,1);if(d!==null){var g=pn();br(d,i,1,g)}}),Cm(i,1)}},Jh=function(i){if(i.tag===13){var s=si(i,134217728);if(s!==null){var l=pn();br(s,i,134217728,l)}Cm(i,134217728)}},Jb=function(i){if(i.tag===13){var s=Fi(i),l=si(i,s);if(l!==null){var d=pn();br(l,i,s,d)}Cm(i,s)}},Zb=function(){return at},e_=function(i,s){var l=at;try{return at=i,s()}finally{at=l}},Vh=function(i,s,l){switch(s){case"input":if(nt(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var d=l[s];if(d!==i&&d.form===i.form){var g=lc(d);if(!g)throw Error(n(90));oo(d),nt(d,g)}}}break;case"textarea":bi(i,l);break;case"select":s=l.value,s!=null&&Ut(i,!!l.multiple,s,!1)}},Bb=ym,Ub=ps;var pF={usingClientEntryPoint:!1,Events:[Xa,Eo,lc,Mb,Fb,ym]},fu={findFiberByHostInstance:os,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mF={bundleType:fu.bundleType,version:fu.version,rendererPackageName:fu.rendererPackageName,rendererConfig:fu.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=$b(i),i===null?null:i.stateNode},findFiberByHostInstance:fu.findFiberByHostInstance||dF,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 Wc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wc.isDisabled&&Wc.supportsFiber)try{Vl=Wc.inject(mF),Mr=Wc}catch(i){}}return _n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pF,_n.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vm(s))throw Error(n(200));return fF(i,s,null,l)},_n.createRoot=function(i,s){if(!vm(i))throw Error(n(299));var l=!1,d="",g=g2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=wm(i,1,!1,null,null,l,!1,d,g),i[ti]=s.current,Ga(i.nodeType===8?i.parentNode:i),new Am(s)},_n.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=$b(s),i=i===null?null:i.stateNode,i},_n.flushSync=function(i){return ps(i)},_n.hydrate=function(i,s,l){if(!qc(s))throw Error(n(200));return Yc(null,i,s,!0,l)},_n.hydrateRoot=function(i,s,l){if(!vm(i))throw Error(n(405));var d=l!=null&&l.hydratedSources||null,g=!1,y="",x=g2;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=p2(s,null,i,1,l!=null?l:null,g,!1,y,x),i[ti]=s.current,Ga(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 Vc(s)},_n.render=function(i,s,l){if(!qc(s))throw Error(n(200));return Yc(null,i,s,!1,l)},_n.unmountComponentAtNode=function(i){if(!qc(i))throw Error(n(40));return i._reactRootContainer?(ps(function(){Yc(null,null,i,!1,function(){i._reactRootContainer=null,i[ti]=null})}),!0):!1},_n.unstable_batchedUpdates=ym,_n.unstable_renderSubtreeIntoContainer=function(i,s,l,d){if(!qc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Yc(i,s,l,!1,d)},_n.version="18.3.1-next-f1338f8080-20240426",_n}var i1;function s1(){if(i1)return rd.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(),rd.exports=Vv(),rd.exports}var Xu=s1();function qv(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var od=()=>e=>Array.from(new Set(e)),o1=typeof globalThis.document!="undefined"?q.useLayoutEffect:q.useEffect;function Ju(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);o1(()=>{f.current=c.current},[o,e().value]);const h=T=>{var C,I;const _=f.current,S=Os(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?Xu.flushSync:jA)(()=>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)}}}Ju.cleanup=e=>{q.useEffect(()=>e,[])},Ju.ref=e=>{const t=q.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function Yv(e){const t=q.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var Wv=(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 ad(e,t={}){var le,de,ce,fe,ye,Ae;const n=q.useMemo(()=>{const{id:ie,ids:$,getRootNode:ee}=t;return zv({id:ie,ids:$,getRootNode:ee})},[t]),r=(...ie)=>{e.debug&&console.log(...ie)},o=(de=(le=e.props)==null?void 0:le.call(e,{props:Yf(t),scope:n}))!=null?de:t,a=Gv(o),u=(ce=e.context)==null?void 0:ce.call(e,{prop:a,bindable:Ju,scope:n,flush:u1,getContext(){return f},getComputed(){return W},getRefs(){return S},getEvent(){return T()}}),c=a1(u),f={get(ie){var $;return($=c.current)==null?void 0:$[ie].ref.current},set(ie,$){var ee;(ee=c.current)==null||ee[ie].set($)},initial(ie){var $;return($=c.current)==null?void 0:$[ie].initial},hash(ie){var ee,w;const $=(ee=c.current)==null?void 0:ee[ie].get();return(w=c.current)==null?void 0:w[ie].hash($)}},h=q.useRef(new Map),m=q.useRef(null),E=q.useRef(null),b=q.useRef({type:""}),T=()=>Te(U({},b.current),{current(){return b.current},previous(){return E.current}}),_=()=>Te(U({},B),{matches(...ie){return ie.includes(B.ref.current)},hasTag(ie){var $,ee;return!!((ee=($=e.states[B.ref.current])==null?void 0:$.tags)!=null&&ee.includes(ie))}}),S=Yv((ye=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:f}))!=null?ye:{}),C=()=>({state:_(),context:f,event:T(),prop:a,send:H,action:I,guard:F,track:Wv,refs:S,computed:W,flush:u1,scope:n,choose:G}),I=ie=>{const $=Os(ie)?ie(C()):ie;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||Wf(`[zag-js] No implementation found for action "${JSON.stringify(w)}"`),R});for(const w of ee)w==null||w(C())},F=ie=>{var $,ee;return Os(ie)?ie(C()):(ee=($=e.implementations)==null?void 0:$.guards)==null?void 0:ee[ie](C())},D=ie=>{const $=Os(ie)?ie(C()):ie;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||Wf(`[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=ie=>PA(ie).find($=>{let ee=!$.guard;return Vu($.guard)?ee=!!F($.guard):Os($.guard)&&(ee=$.guard(C())),ee}),W=ie=>{VA(e.computed,()=>"[zag-js] No computed object found on machine");const $=e.computed[ie];return $({context:f,event:T(),prop:a,refs:S,scope:n,computed:W})},B=Ju(()=>({defaultValue:e.initialState({prop:a}),onChange(ie,$){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[ie])==null?void 0:Q.effects);if(ee&&h.current.set(ie,ee),$===nd){I(e.entry);const xe=D(e.effects);xe&&h.current.set(nd,xe)}I((k=e.states[ie])==null?void 0:k.entry)}})),te=q.useRef(void 0),be=q.useRef(Rs.NotStarted);o1(()=>{queueMicrotask(()=>{var R;const ee=be.current===Rs.Started;be.current=Rs.Started,r(ee?"rehydrating...":"initializing...");const w=(R=te.current)!=null?R:B.initial;B.invoke(w,ee?B.get():nd)});const ie=h.current,$=B.ref.current;return()=>{r("unmounting..."),te.current=$,be.current=Rs.Stopped,ie.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=ie=>{queueMicrotask(()=>{var k,xe,Fe,Ie,Ke;if(be.current!==Rs.Started)return;E.current=b.current,b.current=ie;let $=he();const ee=(Fe=(k=e.states[$].on)==null?void 0:k[ie.type])!=null?Fe:(xe=e.on)==null?void 0:xe[ie.type],w=G(ee);if(!w)return;m.current=w;const R=(Ie=w.target)!=null?Ie:$;r("transition",ie.type,w.target||$,`(${w.actions})`);const Q=R!==$;Q?Xu.flushSync(()=>B.set(R)):w.reenter&&!Q?B.invoke($,$):I((Ke=w.actions)!=null?Ke:[])})};return(Ae=e.watch)==null||Ae.call(e,C()),{state:_(),send:H,context:f,prop:a,scope:n,refs:S,computed:W,event:T(),getStatus:()=>be.current}}function a1(e){const t=q.useRef(e);return t.current=e,t}function Gv(e){const t=a1(e);return function(r){return t.current[r]}}function u1(e){queueMicrotask(()=>{Xu.flushSync(()=>e())})}var l1=qv(e=>e);function Zu(...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 Kv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const ud=e=>{const t=q.memo(q.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=en(h,["asChild","children"]);if(!o)return q.createElement(e,Te(U({},u),{ref:r}),a);if(!q.isValidElement(a))return null;const c=q.Children.only(a),f=Kv(c);return q.cloneElement(c,Te(U({},ur(u,c.props)),{ref:r?Zu(r,f):f}))}));return t.displayName=e.displayName||e.name,t},fi=(()=>{const e=new Map;return new Proxy(ud,{apply(t,n,r){return ud(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,ud(r)),e.get(r)}})})();function Qv(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ls(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:Qv(r,o));throw E.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,E,f),E}return h}return[c.Provider,f,c]}const[Xv,ld]=Ls({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[c1,Xo]=Ls({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),f1=q.forwardRef((e,t)=>{const n=ld(),r=Xo(),o=ur(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:N.jsx(fi.div,Te(U({},o),{ref:Zu(r.ref,t)}))});f1.displayName="PopoverContent";const d1=q.forwardRef((e,t)=>{const n=ld(),r=Xo(),o=ur(n.getPositionerProps(),e);return r.unmounted?null:N.jsx(fi.div,Te(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 Jv(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 Zv={props({props:e}){return Te(U({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Gu(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"});bn(()=>{var c,f;const u=el(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})=>{bn(()=>{e.set("prevAnimationName",el(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",el(t.get("styles")))},u=f=>{const h=el(t.get("styles"));Yr(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=Qu(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Nv(()=>c())}}}}};function el(e){return(e==null?void 0:e.animationName)||"none"}od()(["onExitComplete","present","immediate"]);function ek(e,t={}){const{sync:n=!1}=t,r=tk(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 tk(e){const t=q.useRef(e);return t.current=e,t}const cd=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,a=en(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=q.useRef(!1),c=Te(U({},a),{present:r,onExitComplete:ek(e.onExitComplete)}),f=ad(Zv,c),h=Jv(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 Ds=(e,t=[])=>({parts:(...n)=>{if(nk(t))return Ds(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Ds(e,[...t,...n]),omit:(...n)=>Ds(e,t.filter(r=>!n.includes(r))),rename:n=>Ds(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ms(e)}"][data-part="${Ms(r)}"]`,`& [data-scope="${Ms(e)}"][data-part="${Ms(r)}"]`].join(", "),attrs:{"data-scope":Ms(e),"data-part":Ms(r)}}}),{})}),Ms=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),nk=e=>e.length===0;const rk=["top","right","bottom","left"],di=Math.min,In=Math.max,tl=Math.round,nl=Math.floor,Ar=e=>({x:e,y:e}),ik={left:"right",right:"left",bottom:"top",top:"bottom"},sk={start:"end",end:"start"};function fd(e,t,n){return In(e,di(t,n))}function Gr(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function Fs(e){return e.split("-")[1]}function dd(e){return e==="x"?"y":"x"}function hd(e){return e==="y"?"height":"width"}const ok=new Set(["top","bottom"]);function vr(e){return ok.has(Kr(e))?"y":"x"}function pd(e){return dd(vr(e))}function ak(e,t,n){n===void 0&&(n=!1);const r=Fs(e),o=pd(e),a=hd(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=rl(u)),[u,rl(u)]}function uk(e){const t=rl(e);return[md(e),t,md(t)]}function md(e){return e.replace(/start|end/g,t=>sk[t])}const m1=["left","right"],g1=["right","left"],lk=["top","bottom"],ck=["bottom","top"];function fk(e,t,n){switch(e){case"top":case"bottom":return n?t?g1:m1:t?m1:g1;case"left":case"right":return t?lk:ck;default:return[]}}function dk(e,t,n,r){const o=Fs(e);let a=fk(Kr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(md)))),a}function rl(e){return e.replace(/left|right|bottom|top/g,t=>ik[t])}function hk(e){return U({top:0,right:0,bottom:0,left:0},e)}function E1(e){return typeof e!="number"?hk(e):{top:e,right:e,bottom:e,left:e}}function il(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=vr(t),u=pd(t),c=hd(u),f=Kr(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(Fs(t)){case"start":T[u]-=b*(n&&h?-1:1);break;case"end":T[u]+=b*(n&&h?-1:1);break}return T}const pk=(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}=y1(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=Te(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)),S=-1)}return{x:m,y:E,placement:b,strategy:o,middlewareData:T}});function Jo(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}=Gr(t,e),_=E1(T),C=c[b?E==="floating"?"reference":"floating":E],I=il(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=il(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 mk=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}=Gr(e,n)||{};if(m==null)return{};const b=E1(E),T={x:r,y:o},_=pd(a),S=hd(_),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=di(b[F],H),de=di(b[D],H),ce=le,fe=be-C[S]-de,ye=be/2-C[S]/2+he,Ae=fd(ce,ye,fe),ie=!h.arrow&&Fs(a)!=null&&ye!==Ae&&u.reference[S]/2-(ye<ce?le:de)-C[S]/2<0,$=ie?ye<ce?ye-ce:ye-fe:0;return{[_]:T[_]+$,data:U({[_]:Ae,centerOffset:ye-Ae-$},ie&&{alignmentOffset:$}),reset:ie}})}}),gk=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,ye=Gr(e,n),{mainAxis:E=!0,crossAxis:b=!0,fallbackPlacements:T,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0}=ye,I=en(ye,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const F=Kr(a),D=vr(f),G=Kr(f)===f,W=yield h.isRTL==null?void 0:h.isRTL(m.floating),B=T||(G||!C?[rl(f)]:uk(f)),te=S!=="none";!T&&te&&B.push(...dk(f,C,S,W));const be=[f,...B],he=yield Jo(n,I),H=[];let le=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&H.push(he[F]),b){const Ae=ak(a,c,W);H.push(he[Ae[0]],he[Ae[1]])}if(le=[...le,{placement:a,overflows:H}],!H.every(Ae=>Ae<=0)){var de,ce;const Ae=(((de=u.flip)==null?void 0:de.index)||0)+1,ie=be[Ae];if(ie&&(!(b==="alignment"?D!==vr(ie):!1)||le.every(w=>vr(w.placement)===D?w.overflows[0]>0:!0)))return{data:{index:Ae,overflows:le},reset:{placement:ie}};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=vr(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 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 rk.some(t=>e[t]>=0)}const Ek=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return st(this,null,function*(){const{rects:r}=n,u=Gr(e,n),{strategy:o="referenceHidden"}=u,a=en(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Jo(n,Te(U({},a),{elementContext:"reference"})),f=T1(c,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:b1(f)}}}case"escaped":{const c=yield Jo(n,Te(U({},a),{altBoundary:!0})),f=T1(c,r.floating);return{data:{escapedOffsets:f,escaped:b1(f)}}}default:return{}}})}}},_1=new Set(["left","top"]);function yk(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=Kr(n),c=Fs(n),f=vr(n)==="y",h=_1.has(u)?-1:1,m=a&&f?-1:1,E=Gr(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 Tk=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 yk(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:Te(U({},h),{placement:c})}})}}},bk=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=Gr(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=en(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},E=yield Jo(n,h),b=vr(Kr(a)),T=dd(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];_=fd(G,_,W)}if(c){const F=b==="y"?"top":"left",D=b==="y"?"bottom":"right",G=S+E[F],W=S-E[D];S=fd(G,S,W)}const C=f.fn(Te(U({},n),{[T]:_,[b]:S}));return Te(U({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[T]:u,[b]:c}}})})}}},_k=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}=Gr(e,t),m={x:n,y:r},E=vr(o),b=dd(E);let T=m[b],_=m[E];const S=Gr(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=_1.has(Kr(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]:_}}}},xk=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=Gr(e,n),{apply:h=()=>{}}=le,m=en(le,["apply"]),E=yield Jo(n,m),b=Kr(a),T=Fs(a),_=vr(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=di(C-E[I],D),B=di(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=In(E.left,0),ce=In(E.right,0),fe=In(E.top,0),ye=In(E.bottom,0);_?he=S-2*(de!==0||ce!==0?de+ce:In(E.left,E.right)):be=C-2*(fe!==0||ye!==0?fe+ye:In(E.top,E.bottom))}yield h(Te(U({},n),{availableWidth:he,availableHeight:be}));const H=yield c.getDimensions(f.floating);return S!==H.width||C!==H.height?{reset:{rects:!0}}:{}})}}};function sl(){return typeof window!="undefined"}function Bs(e){return x1(e)?(e.nodeName||"").toLowerCase():"#document"}function Pn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kr(e){var t;return(t=(x1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function x1(e){return sl()?e instanceof Node||e instanceof Pn(e).Node:!1}function lr(e){return sl()?e instanceof Element||e instanceof Pn(e).Element:!1}function Nr(e){return sl()?e instanceof HTMLElement||e instanceof Pn(e).HTMLElement:!1}function S1(e){return!sl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Pn(e).ShadowRoot}const Sk=new Set(["inline","contents"]);function Zo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Sk.has(o)}const wk=new Set(["table","td","th"]);function Ck(e){return wk.has(Bs(e))}const Ak=[":popover-open",":modal"];function ol(e){return Ak.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const vk=["transform","translate","scale","rotate","perspective"],kk=["transform","translate","scale","rotate","perspective","filter"],Nk=["paint","layout","strict","content"];function gd(e){const t=Ed(),n=lr(e)?cr(e):e;return vk.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)||kk.some(r=>(n.willChange||"").includes(r))||Nk.some(r=>(n.contain||"").includes(r))}function Ok(e){let t=hi(e);for(;Nr(t)&&!Us(t);){if(gd(t))return t;if(ol(t))return null;t=hi(t)}return null}function Ed(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ik=new Set(["html","body","#document"]);function Us(e){return Ik.has(Bs(e))}function cr(e){return Pn(e).getComputedStyle(e)}function al(e){return lr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(Bs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||S1(e)&&e.host||kr(e);return S1(t)?t.host:t}function w1(e){const t=hi(e);return Us(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nr(t)&&Zo(t)?t:w1(t)}function ea(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=Pn(o);if(a){const c=yd(u);return t.concat(u,u.visualViewport||[],Zo(o)?o:[],c&&n?ea(c):[])}return t.concat(o,ea(o,[],n))}function yd(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=Nr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=tl(n)!==a||tl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Td(e){return lr(e)?e:e.contextElement}function Hs(e){const t=Td(e);if(!Nr(t))return Ar(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=C1(t);let u=(a?tl(n.width):n.width)/r,c=(a?tl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const Pk=Ar(0);function A1(e){const t=Pn(e);return!Ed()||!t.visualViewport?Pk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Rk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pn(e)?!1:t}function Ki(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Td(e);let u=Ar(1);t&&(r?lr(r)&&(u=Hs(r)):u=Hs(e));const c=Rk(a,n,r)?A1(a):Ar(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=Pn(a),T=r&&lr(r)?Pn(r):r;let _=b,S=yd(_);for(;S&&r&&T!==_;){const C=Hs(S),I=S.getBoundingClientRect(),F=cr(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,_=Pn(S),S=yd(_)}}return il({width:m,height:E,x:f,y:h})}function ul(e,t){const n=al(e).scrollLeft;return t?t.left+n:Ki(kr(e)).left+n}function v1(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ul(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Lk(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=kr(r),c=t?ol(t.floating):!1;if(r===u||c&&a)return n;let f={scrollLeft:0,scrollTop:0},h=Ar(1);const m=Ar(0),E=Nr(r);if((E||!E&&!a)&&((Bs(r)!=="body"||Zo(u))&&(f=al(r)),Nr(r))){const T=Ki(r);h=Hs(r),m.x=T.x+r.clientLeft,m.y=T.y+r.clientTop}const b=u&&!E&&!a?v1(u,f):Ar(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 Dk(e){return Array.from(e.getClientRects())}function Mk(e){const t=kr(e),n=al(e),r=e.ownerDocument.body,o=In(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=In(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+ul(e);const c=-n.scrollTop;return cr(r).direction==="rtl"&&(u+=In(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const k1=25;function Fk(e,t){const n=Pn(e),r=kr(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=Ed();(!m||m&&t==="fixed")&&(c=o.offsetLeft,f=o.offsetTop)}const h=ul(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 Bk=new Set(["absolute","fixed"]);function Uk(e,t){const n=Ki(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Nr(e)?Hs(e):Ar(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=Fk(e,n);else if(t==="document")r=Mk(kr(e));else if(lr(t))r=Uk(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 il(r)}function O1(e,t){const n=hi(e);return n===t||!lr(n)||Us(n)?!1:cr(n).position==="fixed"||O1(n,t)}function Hk(e,t){const n=t.get(e);if(n)return n;let r=ea(e,[],!1).filter(c=>lr(c)&&Bs(c)!=="body"),o=null;const a=cr(e).position==="fixed";let u=a?hi(e):e;for(;lr(u)&&!Us(u);){const c=cr(u),f=gd(u);!f&&c.position==="fixed"&&(o=null),(a?!f&&!o:!f&&c.position==="static"&&!!o&&Bk.has(o.position)||Zo(u)&&!f&&O1(e,u))?r=r.filter(m=>m!==u):o=c,u=hi(u)}return t.set(e,r),r}function zk(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ol(t)?[]:Hk(t,this._c):[].concat(n),r],c=u[0],f=u.reduce((h,m)=>{const E=N1(t,m,o);return h.top=In(E.top,h.top),h.right=di(E.right,h.right),h.bottom=di(E.bottom,h.bottom),h.left=In(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 jk(e){const{width:t,height:n}=C1(e);return{width:t,height:n}}function $k(e,t,n){const r=Nr(t),o=kr(t),a=n==="fixed",u=Ki(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const f=Ar(0);function h(){f.x=ul(o)}if(r||!r&&!a)if((Bs(t)!=="body"||Zo(o))&&(c=al(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):Ar(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 bd(e){return cr(e).position==="static"}function I1(e,t){if(!Nr(e)||cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return kr(e)===n&&(n=n.ownerDocument.body),n}function P1(e,t){const n=Pn(e);if(ol(e))return n;if(!Nr(e)){let o=hi(e);for(;o&&!Us(o);){if(lr(o)&&!bd(o))return o;o=hi(o)}return n}let r=I1(e,t);for(;r&&Ck(r)&&bd(r);)r=I1(r,t);return r&&Us(r)&&bd(r)&&!gd(r)?n:r||Ok(e)||n}const Vk=function(e){return st(this,null,function*(){const t=this.getOffsetParent||P1,n=this.getDimensions,r=yield n(e.floating);return{reference:$k(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function qk(e){return cr(e).direction==="rtl"}const Yk={convertOffsetParentRelativeRectToViewportRelativeRect:Lk,getDocumentElement:kr,getClippingRect:zk,getOffsetParent:P1,getElementRects:Vk,getClientRects:Dk,getDimensions:jk,getScale:Hs,isElement:lr,isRTL:qk};function R1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wk(e,t){let n=null,r;const o=kr(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 _=nl(E),S=nl(o.clientWidth-(m+b)),C=nl(o.clientHeight-(E+T)),I=nl(m),D={rootMargin:-_+"px "+-S+"px "+-C+"px "+-I+"px",threshold:In(0,di(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,Te(U({},D),{root:o.ownerDocument}))}catch(B){n=new IntersectionObserver(W,D)}n.observe(e)}return u(!0),a}function Gk(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=Td(e),m=o||a?[...h?ea(h):[],...ea(t)]:[];m.forEach(I=>{o&&I.addEventListener("scroll",n,{passive:!0}),a&&I.addEventListener("resize",n)});const E=h&&c?Wk(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?Ki(e):null;f&&C();function C(){const I=Ki(e);S&&!R1(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 Kk=Tk,Qk=bk,Xk=gk,Jk=xk,Zk=Ek,eN=mk,tN=_k,nN=(e,t,n)=>{const r=new Map,o=U({platform:Yk},n),a=Te(U({},o.platform),{_c:r});return pk(e,t,Te(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 Te(U({},o),{toJSON:()=>o})}function rN(e){if(!e)return L1();const{x:t,y:n,width:r,height:o}=e;return L1(t,n,r,o)}function iN(e,t){return{contextElement:Vt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?rN(r):n.getBoundingClientRect()}}}var ta=e=>({variable:e,reference:`var(${e})`}),Qr={arrowSize:ta("--arrow-size"),arrowSizeHalf:ta("--arrow-size-half"),arrowBg:ta("--arrow-background"),transformOrigin:ta("--transform-origin"),arrowOffset:ta("--arrow-offset")},sN=e=>e==="top"||e==="bottom"?"y":"x";function oN(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=sN(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(Qr.transformOrigin.variable,be?te:B),{data:{transformOrigin:be?te:B}}}}}var aN={name:"rects",fn({rects:e}){return{data:e}}},uN=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${Qr.arrowOffset.reference})`}),{}}}};function lN(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var cN={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 _d(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function fN(e,t,n){const r=e||t.createElement("div");return eN({element:r,padding:n.arrowPadding})}function dN(e,t){var n;if(!LA((n=t.offset)!=null?n:t.gutter))return Kk(({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}=lN(r),f=c?void 0:t.shift,h=(T=(b=t.offset)==null?void 0:b.crossAxis)!=null?T:f;return Yf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function hN(e){if(!e.flip)return;const t=_d(e.boundary);return Xk(Te(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function pN(e){if(!e.slide&&!e.overlap)return;const t=_d(e.boundary);return Qk(Te(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:tN()}))}function mN(e){return Jk({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 gN(e){var t;if(e.hideWhenDetached)return Zk({strategy:"referenceHidden",boundary:(t=_d(e.boundary))!=null?t:"clippingAncestors"})}function EN(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function yN(e,t,n={}){const r=iN(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},cN,n),a=t.querySelector("[data-part=arrow]"),u=[dN(a,o),hN(o),pN(o),fN(a,t.ownerDocument,o),uN(a),oN({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),mN(o),gN(o),aN],{placement:c,strategy:f,onComplete:h,onPositioned:m}=o,E=()=>st(null,null,function*(){var G;if(!r||!t)return;const S=yield nN(r,t,{placement:c,middleware:u,strategy:f});h==null||h(S),m==null||m({placed:!0});const C=Is(t),I=D1(C,S.x),F=D1(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=Gu(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=EN(o.listeners),_=o.listeners?Gk(r,t,b,T):$A;return b(),()=>{_==null||_(),m==null||m({placed:!1})}}function M1(e,t,n={}){const c=n,{defer:r}=c,o=en(c,["defer"]),a=r?bn:f=>f(),u=[];return u.push(a(()=>{const f=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(yN(f,h,o))})),()=>{u.forEach(f=>f==null?void 0:f())}}var TN={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function bN(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Qr.arrowSize.reference,height:Qr.arrowSize.reference,[Qr.arrowSizeHalf.variable]:`calc(${Qr.arrowSize.reference} / 2)`,[Qr.arrowOffset.variable]:`calc(${Qr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?TN[t.split("-")[0]]:void 0,background:Qr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var zs=new WeakMap,ll=new WeakMap,cl={},xd=0,F1=e=>e&&(e.host||F1(e.parentNode)),_N=(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),xN=new Set(["script","output","status","next-route-announcer"]),SN=e=>xN.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),wN=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=_N(n,Array.isArray(e)?e:[e]);cl[r]||(cl[r]=new WeakMap);const c=cl[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&&Vt(T)&&Yg(T,_=>{E(_)})});const b=T=>{!T||m.has(T)||Array.prototype.forEach.call(T.children,_=>{if(h.has(_))b(_);else try{if(SN(_))return;const C=_.getAttribute(o)==="true",I=(zs.get(_)||0)+1,F=(c.get(_)||0)+1;zs.set(_,I),c.set(_,F),f.push(_),I===1&&C&&ll.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(),xd++,()=>{f.forEach(T=>{const _=zs.get(T)-1,S=c.get(T)-1;zs.set(T,_),c.set(T,S),_||(ll.has(T)||T.removeAttribute(o),ll.delete(T)),S||T.removeAttribute(r)}),xd--,xd||(zs=new WeakMap,zs=new WeakMap,ll=new WeakMap,cl={})}},CN=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,AN=(e,t=CN(e),n="data-aria-hidden",r=!0)=>{if(t)return wN(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},vN=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function B1(e,t={}){const{defer:n=!0}=t,r=n?vN:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(AN(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function kN(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 NN(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 ON(e){for(const t of e)if(Vt(t)&&Wr(t))return!0;return!1}var z1=e=>"clientY"in e;function IN(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 PN(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 PN(u,c)?r||a:!1}function RN(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const f=Cr(e),h=Is(e),m=kN(h),E=NN(h);function b(D,G){if(!Vt(G)||!G.isConnected||Wu(e,G)||IN(e,D)||c&&qg(e,G))return!1;const W=f.querySelector(`[aria-controls="${e.id}"]`);if(W){const te=td(W);if(j1(D,te))return!1}const B=td(e);return j1(D,B)?!1:!(n!=null&&n(G))}const T=new Set,_=Wi(e==null?void 0:e.getRootNode());function S(D){function G(W){var he,H;const B=u&&!Wg()?bn: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]:Yr(D);if(!(!e||!b(D,le))){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:_v(te),focusable:ON(be),target:le}})}})}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,I=setTimeout(()=>{C.add(ar(f,"pointerdown",S,!0)),C.add(E.addEventListener("pointerdown",S,!0)),C.add(m.addEventListener("pointerdown",S,!0))},0);function F(D){(u?bn: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]:Yr(D);if(!(!e||!b(D,B))){if(r||a){const he=qf(r,a);e.addEventListener(H1,he,{once:!0})}$1(e,H1,{bubbles:!1,cancelable:!0,detail:{originalEvent:D,contextmenu:!1,focusable:Wr(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(I),T.forEach(D=>D()),C.forEach(D=>D())}}function LN(e,t){const{defer:n}=t,r=n?bn:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(RN(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 DN(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return ar(Cr(e),"keydown",n,{capture:!0})}var V1="layer:request-dismiss",Vn={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=>Wu(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Wu(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=>Vn.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];FN(e,V1,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),MN(e,V1,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function MN(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 FN(e,t,n){e.addEventListener(t,n,{once:!0})}var q1;function Y1(){Vn.layers.forEach(({node:e})=>{e.style.pointerEvents=Vn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function BN(e){e.style.pointerEvents=""}function UN(e,t){const n=Cr(e),r=[];return Vn.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]=Fv(()=>{const c=o();return Vt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Qu(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Vn.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 HN(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Wf("[@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};Vn.add(h),Y1();function m(S){var I,F;const C=Yr(S.detail.originalEvent);Vn.isBelowPointerBlockingLayer(e)||Vn.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=Yr(S.detail.originalEvent);Vn.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;Vn.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(Vt);return F&&I.push(...F),I.some(G=>Wu(G,S))||Vn.isInNestedLayer(e,S)}const _=[a?UN(e,t.persistentElements):void 0,DN(e,b),LN(e,{exclude:T,onFocusOutside:E,onPointerDownOutside:m,defer:t.defer})];return()=>{Vn.remove(e),Y1(),BN(e),_.forEach(S=>S==null?void 0:S())}}function W1(e,t){const{defer:n}=t,r=n?bn:a=>a(),o=[];return o.push(r(()=>{const a=Os(e)?e():e;o.push(HN(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var zN=Object.defineProperty,jN=(e,t,n)=>t in e?zN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Et=(e,t,n)=>jN(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()}},$N=[],VN=class{constructor(e,t){Et(this,"trapStack"),Et(this,"config"),Et(this,"doc"),Et(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Et(this,"portalContainers",new Set),Et(this,"listenerCleanups",[]),Et(this,"handleFocus",r=>{const o=Yr(r),a=this.findContainerIndex(o,r)>=0;if(a||Yu(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Qo(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=>Qo(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}),Et(this,"handlePointerDown",r=>{const o=Yr(r);if(!(this.findContainerIndex(o,r)>=0)){if(ra(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ra(this.config.allowOutsideClick,r)||r.preventDefault()}}),Et(this,"handleClick",r=>{const o=Yr(r);this.findContainerIndex(o,r)>=0||ra(this.config.clickOutsideDeactivates,r)||ra(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Et(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;na(r)&&r.preventDefault(),this.tryFocus(a)}}),Et(this,"handleEscapeKey",r=>{qN(r)&&ra(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Et(this,"_mutationObserver"),Et(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 fv(h)?!0:h.id&&!this.state.containers.some(m=>m.contains(h))?dv(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Et(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)}))}),Et(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Wr(r)){const o=Ps(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Et(this,"tryFocus",r=>{if(r!==!1&&r!==Ps(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,YN(r)&&r.select()}}),Et(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}),Et(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}),Et(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}),Et(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Et(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Et(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),Et(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}),Et(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Yr(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const 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||Wr(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=Qo(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else na(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||Wr(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=Qo(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else na(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||$N;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return na(r)&&!r.shiftKey},isKeyBackward(r){return na(r)&&r.shiftKey}},t);this.doc=n.document||Cr(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=>{uv(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=Ko(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(Qo(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=Ps(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},na=e=>e.key==="Tab",ra=(e,...t)=>typeof e=="function"?e(...t):e,qN=e=>!e.isComposing&&e.key==="Escape",K1=e=>setTimeout(e,0),YN=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Q1(e,t={}){let n;const r=bn(()=>{const o=typeof e=="function"?e():e;if(o){n=new VN(o,Te(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Cr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Sd="data-scroll-lock";function WN(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function X1(e){const t=Gu(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(Sd))return;const u=X1(r)||X1(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Sd,"");const f=()=>Dv(r,"--scrollbar-width",`${c}px`),h=WN(r),m=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[h]=`${c}px`),Qu(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=Qu(o,D);return()=>{G==null||G(),n.scrollTo({left:_,top:S,behavior:"instant"})}},b=[f(),Gg()?E():m()];return()=>{b.forEach(_=>_==null?void 0:_()),o.removeAttribute(Sd)}}var GN=Ds("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Or=GN.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`},wd=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`},KN=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Cd=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Ad=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},QN=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)),js=e=>e.getById(eE(e)),$s=e=>e.getById(wd(e)),rE=e=>e.getById(tE(e)),XN=e=>e.getById(Cd(e)),JN=e=>e.getById(Ad(e));function ZN(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=bN(Te(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(Te(U({id:KN(c)},Or.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(Te(U({},Or.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(Te(U({},Or.anchor.attrs),{dir:u("dir"),id:Z1(c)}))},getTriggerProps(){return t.button(Te(U({},Or.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":wd(c),onPointerDown(T){bv(T)&&yv()&&T.currentTarget.focus()},onClick(T){T.defaultPrevented||o({type:"TOGGLE"})},onBlur(T){o({type:"TRIGGER_BLUR",target:T.relatedTarget})}}))},getIndicatorProps(){return t.element(Te(U({},Or.indicator.attrs),{dir:u("dir"),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(Te(U({id:tE(c)},Or.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(Te(U({},Or.content.attrs),{dir:u("dir"),id:wd(c),tabIndex:-1,role:"dialog","aria-modal":GA(u("modal")),hidden:!f,"data-state":f?"open":"closed","data-expanded":WA(f),"aria-labelledby":E.title?Cd(c):void 0,"aria-describedby":E.description?Ad(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(Te(U({},Or.title.attrs),{id:Cd(c),dir:u("dir")}))},getDescriptionProps(){return t.element(Te(U({},Or.description.attrs),{id:Ad(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(Te(U({},Or.closeTrigger.attrs),{dir:u("dir"),id:QN(c),type:"button","aria-label":"close",onClick(T){T.defaultPrevented||(T.stopPropagation(),o({type:"CLOSE"}))}}))}}}var e3={props({props:e}){return Te(U({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:U({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=nE(n))!=null?a:js(n);return M1(r,()=>rE(n),Te(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>$s(n);let o=!0;return W1(r,{type:"popover",pointerBlocking:t("modal"),exclude:js(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:Lv(()=>$s(t),{triggerElement:js(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?B1(()=>[$s(t),js(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(()=>$s(t),{initialFocus:()=>Zg({root:$s(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:js(n);M1(o,()=>rE(n),Te(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){bn(()=>{Object.assign(e.get("renderedElements"),{title:!!XN(t),description:!!JN(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||bn(()=>{const n=Zg({root:$s(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||bn(()=>{const a=js(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})}}}};od()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[QF,vd]=Ls({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[XF,iE]=Ls({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),t3=e=>{const t=q.useId(),{getRootNode:n}=vd(),{dir:r}=iE(),o=U({id:t,dir:r,getRootNode:n},e),a=ad(e3,o);return ZN(a,l1)},n3=e=>{const[t,u]=p1(e),c=u,{children:n}=c,r=en(c,["children"]),o=t3(r),a=cd(ur({present:o.open},t));return N.jsx(Xv,{value:o,children:N.jsx(c1,{value:a,children:n})})},sE=q.forwardRef((e,t)=>{const n=ld(),r=Xo(),o=ur(Te(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return N.jsx(fi.button,Te(U({},o),{ref:t}))});sE.displayName="PopoverTrigger";function r3(e){return fn({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 i3(e){return fn({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 s3(e){return fn({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 fn({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 o3=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=qr(),r=()=>{n(),e()};return N.jsxs("button",{className:oe(`${Z}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[N.jsx(oE,{}),"Clear chat"]})},a3=({className:e,componentType:t,children:n})=>{const[r,o]=q.useState(!1),{globalClassName:a}=Tn(),u=()=>{o(!1)},c=f=>{o(f.open)};return N.jsxs(n3,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[N.jsx(sE,{"aria-label":`Overflow menu for ${t}`,className:oe(`${Z}-overflow-menu-button-trigger`,a,e,t),children:N.jsx(s3,{})}),N.jsx(d1,{children:N.jsxs(f1,{className:oe(`${Z}-overflow-menu-list`,a,t),children:[n,N.jsx(o3,{componentType:t,onClearChat:u})]})})]})};function u3(e){return fn({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 fn({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:oe(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=en(o,["onClearChat","componentType"]);const{globalClassName:a}=Tn(),{resetConversation:u}=qr(),c=()=>{u(),e==null||e()};return N.jsx(Ns,U({icon:N.jsx(oE,{size:"0.875rem"}),ariaLabel:"Clear Chat",className:oe(a,`${Z}-clear-chat-icon-button`,t),onClick:c},n))},cE=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Tn(),r=()=>{jf("modal")};return t?N.jsx(Ns,{className:oe(n,`${Z}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:N.jsx(aE,{})}):N.jsxs("button",{className:oe(n,`${Z}-overflow-menu-button`,`${Z}-toggle-modal-button`,e),onClick:r,children:[N.jsx(aE,{}),"Show modal"]})},l3=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r}=Tn();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:oe(r,`${Z}-product-tile`,{embedded:!e,standalone:e}),children:[N.jsx("img",{className:oe(r,`${Z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${h}`,alt:`${o}`,loading:"lazy"}),N.jsxs("div",{className:oe(r,`${Z}-product-tile-details`,{embedded:!e,standalone:e}),children:[N.jsxs("div",{className:oe(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:oe(r,`${Z}-product-tile-pdp`),href:`${m}`,target:"_blank",rel:"noopener noreferrer",children:[o," ",N.jsx("span",{className:oe(r,`${Z}-product-tile-pdp-arrow`),children:"→"})]}):N.jsx("p",{className:oe(r,`${Z}-product-tile-name`),title:o,children:o})]}),N.jsx("div",{className:oe(r,`${Z}-product-tile-footer`),children:N.jsx("p",{className:oe(r,`${Z}-product-tile-price`),children:u})})]})]})},c3=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=Tn(),o=t;return n?N.jsxs("div",{className:oe(r,`${Z}-display-products widget-message`),children:[N.jsx("p",{children:o.message}),o.products&&o.products.length>0&&N.jsx("div",{className:oe(r,`${Z}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(a=>{const u=n.getPid(a);return N.jsx(l3,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},f3=({globalClassName:e,message:t,isWidgetStandalone:n})=>N.jsx("div",{className:oe(e,`${Z}-error-message`,{standalone:n,embedded:!n}),children:N.jsxs("p",{className:oe(e,`${Z}-error-message-text`,{standalone:n,embedded:!n}),children:[N.jsx(AA,{})," ",t.message||"An error occurred while processing your request."]})});function d3(e){return fn({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 h3=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:a})=>N.jsx("div",{className:oe(e,`${Z}-suggestion-container standalone`),children:o.map(u=>N.jsxs($f,{disabled:r,className:oe(e,`${Z}-suggestion-button standalone`),onClick:()=>a(u,n||t),children:[N.jsx(d3,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",u.displayText]},u.displayText))}),p3=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=qr();return N.jsxs("div",{className:oe(e,`${Z}-follow-up`),children:[N.jsx("p",{className:oe(e,`${Z}-text`),children:t.message}),n&&N.jsx(h3,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&N.jsx("div",{className:oe(e,`${Z}-suggestion-container embedded`),children:t.suggestions.map(a=>N.jsx("button",{disabled:o,className:oe(e,`${Z}-suggestion-button embedded`),onClick:()=>r(a,t.eventSourceId||t.id),children:a.displayText},a.displayText))})]})};function JF(){}function ZF(){}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 m3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,g3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E3={};function hE(e,t){return(E3.jsx?g3:m3).test(e)}const y3=/[ \t\n\f\r]/g;function T3(e){return typeof e=="object"?e.type==="text"?pE(e.value):!1:pE(e)}function pE(e){return e.replace(y3,"")===""}let ia=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};ia.prototype.normal={},ia.prototype.property={},ia.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 ia(n,r,t)}function sa(e){return e.toLowerCase()}let xn=class{constructor(t,n){this.attribute=n,this.property=t}};xn.prototype.attribute="",xn.prototype.booleanish=!1,xn.prototype.boolean=!1,xn.prototype.commaOrSpaceSeparated=!1,xn.prototype.commaSeparated=!1,xn.prototype.defined=!1,xn.prototype.mustUseProperty=!1,xn.prototype.number=!1,xn.prototype.overloadedBoolean=!1,xn.prototype.property="",xn.prototype.spaceSeparated=!1,xn.prototype.space=void 0;let b3=0;const $e=Qi(),Mt=Qi(),kd=Qi(),pe=Qi(),ct=Qi(),Vs=Qi(),Rn=Qi();function Qi(){return Kc(2,++b3)}const Nd=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Mt,commaOrSpaceSeparated:Rn,commaSeparated:Vs,number:pe,overloadedBoolean:kd,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),Od=Object.keys(Nd);let Id=class extends xn{constructor(t,n,r,o){let a=-1;if(super(t,n),gE(this,"space",o),typeof r=="number")for(;++a<Od.length;){const u=Od[a];gE(this,Od[a],(r&Nd[u])===Nd[u])}}};Id.prototype.defined=!0;function gE(e,t,n){n&&(e[t]=n)}function qs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Id(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[sa(r)]=r,n[sa(a.attribute)]=r}return new ia(t,n,e.space)}const EE=qs({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 yE(e,t){return t in e?e[t]:t}function TE(e,t){return yE(e,t.toLowerCase())}const _3=qs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vs,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|Vs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:kd,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:kd,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:TE}),x3=qs({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:Rn,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:Vs,g2:Vs,glyphName:Vs,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:Rn,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:Rn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rn,rev:Rn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rn,requiredFeatures:Rn,requiredFonts:Rn,requiredFormats:Rn,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:Rn,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:Rn,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:Rn,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:yE}),bE=qs({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=qs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:TE}),xE=qs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),S3={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"},w3=/[A-Z]/g,SE=/-[a-z]/g,C3=/^data[-\w.:]+$/i;function Pd(e,t){const n=sa(t);let r=t,o=xn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&C3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(SE,v3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!SE.test(a)){let u=a.replace(w3,A3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Id}return new o(r,t)}function A3(e){return"-"+e.toLowerCase()}function v3(e){return e.charAt(1).toUpperCase()}const fl=mE([EE,_3,bE,_E,xE],"html"),Ys=mE([EE,x3,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 Ws={},Rd,AE;function k3(){if(AE)return Rd;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";Rd=function(S,C){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];C=C||{};var I=1,F=1;function D(ce){var fe=ce.match(t);fe&&(I+=fe.length);var ye=ce.lastIndexOf(f);F=~ye?ce.length-ye: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 ye=fe[0];return D(ye),S=S.slice(ye.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 ye=S.slice(2,fe-2);return F+=2,D(ye),S=S.slice(fe),F+=2,ce({type:b,comment:ye})}}function le(){var ce=G(),fe=te(r);if(fe){if(H(),!te(o))return B("property missing ':'");var ye=te(a),Ae=ce({type:T,property:_(fe[0].replace(e,E)),value:ye?_(ye[0].replace(e,E)):E});return te(u),Ae}}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 Rd}var vE;function N3(){if(vE)return Ws;vE=1;var e=Ws&&Ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.default=n;var t=e(k3());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 Ws}var oa={},kE;function O3(){if(kE)return oa;kE=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.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 oa.camelCase=f,oa}var aa,NE;function I3(){if(NE)return aa;NE=1;var e=aa&&aa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(N3()),n=O3();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,aa=r,aa}var P3=I3();const R3=We(P3),dl=OE("end"),Ir=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 L3(e){const t=Ir(e),n=dl(e);if(t&&n)return{start:t,end:n}}function ua(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?Ld(e):""}function Ld(e){return PE(e&&e.line)+":"+PE(e&&e.column)}function IE(e){return Ld(e&&e.start)+"-"+Ld(e&&e.end)}function PE(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=ua(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 Dd={}.hasOwnProperty,D3=new Map,M3=/[A-Z]/g,F3=new Set(["table","tbody","thead","tfoot","tr"]),B3=new Set(["td","th"]),RE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function U3(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=W3(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=Y3(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"?Ys:fl,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 H3(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return z3(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return $3(e,t,n);if(t.type==="mdxjsEsm")return j3(e,t);if(t.type==="root")return V3(e,t,n);if(t.type==="text")return q3(e,t)}function H3(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ys,e.schema=o),e.ancestors.push(t);const a=ME(e,t.tagName,!1),u=G3(e,t);let c=Fd(e,t);return F3.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!T3(f):!0})),DE(e,u,a,t),Md(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function z3(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)}la(e,t.position)}function j3(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);la(e,t.position)}function $3(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Ys,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:ME(e,t.name,!0),u=K3(e,t),c=Fd(e,t);return DE(e,u,a,t),Md(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function V3(e,t,n){const r={};return Md(r,Fd(e,t)),e.create(t,e.Fragment,r,n)}function q3(e,t){return t.value}function DE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Md(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Y3(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 W3(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),f=Ir(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 G3(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Dd.call(t.properties,o)){const a=Q3(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&B3.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 K3(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 la(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 la(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Fd(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:D3;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 Q3(e,t,n){const r=Pd(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?dE(n):CE(n)),r.property==="style"){let o=typeof n=="object"?n:X3(e,String(n));return e.stylePropertyNameCase==="css"&&(o=J3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?S3[r.property]||r.property:r.attribute,n]}}function X3(e,t){try{return R3(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=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 Dd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);la(e)}function la(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=RE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function J3(e){const t={};let n;for(n in e)Dd.call(e,n)&&(t[Z3(n)]=e[n]);return t}function Z3(e){let t=e.replace(M3,eO);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function eO(e){return"-"+e.toLowerCase()}const Bd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},tO={};function Ud(e,t){const n=tO,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(nO(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 nO(e){return!!(e&&typeof e=="object")}const UE=document.createElement("i");function Hd(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 Ln(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function qn(e,t){return e.length>0?(Ln(e,e.length,0,t),e):t}const HE={}.hasOwnProperty;function zE(e){const t={};let n=-1;for(;++n<e.length;)rO(t,e[n]);return t}function rO(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];iO(o[u],Array.isArray(c)?c:c?[c]:[])}}}function iO(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ln(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 dn=pi(/[A-Za-z]/),rn=pi(/[\dA-Za-z]/),sO=pi(/[#-'*+\--9=?A-Z^-~]/);function hl(e){return e!==null&&(e<32||e===127)}const zd=pi(/\d/),oO=pi(/[\dA-Fa-f]/),aO=pi(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function lt(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const pl=pi(new RegExp("\\p{P}|\\p{S}","u")),Xi=pi(/\s/);function pi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Gs(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 Ge(f)?(e.enter(n),c(f)):t(f)}function c(f){return Ge(f)&&a++<o?(e.consume(f),c):(e.exit(n),t(f))}}const uO={tokenize:lO};function lO(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 Re(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const cO={tokenize:fO},$E={tokenize:dO};function fO(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 Ln(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(),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($E,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 Re(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++;Ln(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 dO(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 Ks(e){if(e===null||lt(e)||Xi(e))return 1;if(pl(e))return 2}function ml(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 jd={name:"attention",resolveAll:hO,tokenize:pO};function hO(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=qn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=qn(h,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=qn(h,ml(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=qn(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=qn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Ln(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 pO(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ks(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=Ks(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 mO={name:"autolink",tokenize:gO};function gO(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 dn(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||hl(T)?n(T):(e.consume(T),f)}function h(T){return T===64?(e.consume(T),m):sO(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 ca={partial:!0,tokenize:EO};function EO(e,t,n){return r;function r(a){return Ge(a)?Xe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Re(a)?t(a):n(a)}}const qE={continuation:{tokenize:TO},exit:bO,name:"blockQuote",tokenize:yO};function yO(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 Ge(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function TO(e,t,n){const r=this;return o;function o(u){return Ge(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 bO(e){e.exit("blockQuote")}const YE={name:"characterEscape",tokenize:_O};function _O(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 aO(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const WE={name:"characterReference",tokenize:xO};function xO(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=oO,m):(e.enter("characterReferenceValue"),a=7,u=zd,m(E))}function m(E){if(E===59&&o){const b=e.exit("characterReferenceValue");return u===rn&&!Hd(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:wO},KE={concrete:!0,name:"codeFenced",tokenize:SO};function SO(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"),Ge(B)?Xe(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Re(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(GE,S,G)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(B))}function b(B){return B===null||Re(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Ge(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||Re(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||Re(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&&Ge(B)?Xe(e,F,"linePrefix",a+1)(B):F(B)}function F(B){return B===null||Re(B)?e.check(GE,S,G)(B):(e.enter("codeFlowValue"),D(B))}function D(B){return B===null||Re(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(ye){return B.enter("lineEnding"),B.consume(ye),B.exit("lineEnding"),le}function le(ye){return B.enter("codeFencedFence"),Ge(ye)?Xe(B,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ye):de(ye)}function de(ye){return ye===c?(B.enter("codeFencedFenceSequence"),ce(ye)):be(ye)}function ce(ye){return ye===c?(he++,B.consume(ye),ce):he>=u?(B.exit("codeFencedFenceSequence"),Ge(ye)?Xe(B,fe,"whitespace")(ye):fe(ye)):be(ye)}function fe(ye){return ye===null||Re(ye)?(B.exit("codeFencedFence"),te(ye)):be(ye)}}}function wO(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 $d={name:"codeIndented",tokenize:AO},CO={partial:!0,tokenize:vO};function AO(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):Re(h)?e.attempt(CO,u,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Re(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function vO(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Re(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):Re(u)?o(u):n(u)}}const kO={name:"codeText",previous:OO,resolve:NO,tokenize:IO};function NO(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 OO(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function IO(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)):Re(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(E))}function h(E){return E===null||E===32||E===96||Re(E)?(e.exit("codeTextData"),f(E)):(e.consume(E),h)}function m(E){return E===96?(e.consume(E),o++,m):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(a.type="codeTextData",h(E))}}class PO{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&&fa(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),fa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),fa(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);fa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);fa(this.left,n.reverse())}}}function fa(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 PO(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,RO(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 Ln(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function RO(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 LO={resolve:MO,tokenize:FO},DO={partial:!0,tokenize:BO};function MO(e){return QE(e),e}function FO(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):Re(c)?e.check(DO,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 BO(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||Re(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(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||hl(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||Re(I)?n(I):(e.consume(I),I===92?_:T)}function _(I){return I===60||I===62||I===92?(e.consume(I),T):T(I)}function S(I){return!m&&(I===null||I===41||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||hl(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 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):Re(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),E(T))}function E(T){return T===null||T===91||T===93||Re(T)||c++>999?(e.exit("chunkString"),m(T)):(e.consume(T),f||(f=!Ge(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):Re(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Xe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===u||b===null||Re(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 da(e,t){let n;return r;function r(o){return Re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ge(o)?Xe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const UO={name:"definition",tokenize:zO},HO={partial:!0,tokenize:jO};function zO(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)?da(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(HO,E,E)(T)}function E(T){return Ge(T)?Xe(e,b,"whitespace")(T):b(T)}function b(T){return T===null||Re(T)?(e.exit("definition"),r.parser.defined.push(o),t(T)):n(T)}}function jO(e,t,n){return r;function r(c){return lt(c)?da(e,o)(c):n(c)}function o(c){return ZE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ge(c)?Xe(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Re(c)?t(c):n(c)}}const $O={name:"hardBreakEscape",tokenize:VO};function VO(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Re(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const qO={name:"headingAtx",resolve:YO,tokenize:WO};function YO(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"},Ln(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function WO(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||Re(m)?(e.exit("atxHeading"),t(m)):Ge(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 GO=["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"],KO={concrete:!0,name:"htmlFlow",resolveTo:JO,tokenize:ZO},QO={partial:!0,tokenize:tI},XO={partial:!0,tokenize:eI};function JO(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 ZO(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):dn(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,_):dn(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 dn(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,Fe=u.toLowerCase();return!xe&&!a&&ey.includes(Fe)?(o=1,r.interrupt?t(k):de(k)):GO.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 Ge(k)?(e.consume(k),F):H(k)}function D(k){return k===47?(e.consume(k),H):k===58||k===95||dn(k)?(e.consume(k),G):Ge(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):Ge(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):Ge(k)?(e.consume(k),B):be(k)}function te(k){return k===f?(e.consume(k),f=null,he):k===null||Re(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||Ge(k)?D(k):n(k)}function H(k){return k===62?(e.consume(k),le):n(k)}function le(k){return k===null||Re(k)?de(k):Ge(k)?(e.consume(k),le):n(k)}function de(k){return k===45&&o===2?(e.consume(k),Ae):k===60&&o===1?(e.consume(k),ie):k===62&&o===4?(e.consume(k),R):k===63&&o===3?(e.consume(k),w):k===93&&o===5?(e.consume(k),ee):Re(k)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(QO,Q,ce)(k)):k===null||Re(k)?(e.exit("htmlFlowData"),ce(k)):(e.consume(k),de)}function ce(k){return e.check(XO,fe,Q)(k)}function fe(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),ye}function ye(k){return k===null||Re(k)?ce(k):(e.enter("htmlFlowData"),de(k))}function Ae(k){return k===45?(e.consume(k),w):de(k)}function ie(k){return k===47?(e.consume(k),u="",$):de(k)}function $(k){if(k===62){const xe=u.toLowerCase();return ey.includes(xe)?(e.consume(k),R):de(k)}return dn(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||Re(k)?(e.exit("htmlFlowData"),Q(k)):(e.consume(k),R)}function Q(k){return e.exit("htmlFlow"),t(k)}}function eI(e,t,n){const r=this;return o;function o(u){return Re(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 tI(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ca,t,n)}}const nI={name:"htmlText",tokenize:rI};function rI(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):dn(w)?(e.consume(w),be):n(w)}function h(w){return w===45?(e.consume(w),m):w===91?(e.consume(w),a=0,_):dn(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):Re(w)?(u=E,ie(w)):(e.consume(w),E)}function b(w){return w===45?(e.consume(w),T):E(w)}function T(w){return w===62?Ae(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):Re(w)?(u=S,ie(w)):(e.consume(w),S)}function C(w){return w===93?(e.consume(w),I):S(w)}function I(w){return w===62?Ae(w):w===93?(e.consume(w),I):S(w)}function F(w){return w===null||w===62?Ae(w):Re(w)?(u=F,ie(w)):(e.consume(w),F)}function D(w){return w===null?n(w):w===63?(e.consume(w),G):Re(w)?(u=D,ie(w)):(e.consume(w),D)}function G(w){return w===62?Ae(w):D(w)}function W(w){return dn(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 Re(w)?(u=te,ie(w)):Ge(w)?(e.consume(w),te):Ae(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),Ae):w===58||w===95||dn(w)?(e.consume(w),H):Re(w)?(u=he,ie(w)):Ge(w)?(e.consume(w),he):Ae(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):Re(w)?(u=le,ie(w)):Ge(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):Re(w)?(u=de,ie(w)):Ge(w)?(e.consume(w),de):(e.consume(w),fe)}function ce(w){return w===o?(e.consume(w),o=void 0,ye):w===null?n(w):Re(w)?(u=ce,ie(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 ye(w){return w===47||w===62||lt(w)?he(w):n(w)}function Ae(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function ie(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),$}function $(w){return Ge(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 Vd={name:"labelEnd",resolveAll:aI,resolveTo:uI,tokenize:lI},iI={tokenize:cI},sI={tokenize:fI},oI={tokenize:dI};function aI(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&&Ln(e,0,e.length,n),e}function uI(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=qn(c,e.slice(a+1,a+r+3)),c=qn(c,[["enter",m,t]]),c=qn(c,ml(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=qn(c,[["exit",m,t],e[u-2],e[u-1],["exit",h,t]]),c=qn(c,e.slice(u+1)),c=qn(c,[["exit",f,t]]),Ln(e,a,e.length,c),e}function lI(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(iI,m,u?m:E)(b):b===91?e.attempt(sI,m,u?h:E)(b):u?m(b):E(b)}function h(b){return e.attempt(oI,m,E)(b)}function m(b){return t(b)}function E(b){return a._balanced=!0,n(b)}}function cI(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)?da(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)?da(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)?da(e,m)(E):m(E)}function m(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function fI(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 dI(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 hI={name:"labelStartImage",resolveAll:Vd.resolveAll,tokenize:pI};function pI(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 mI={name:"labelStartLink",resolveAll:Vd.resolveAll,tokenize:gI};function gI(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:EI};function EI(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const gl={name:"thematicBreak",tokenize:yI};function yI(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||Re(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===o?(e.consume(h),r++,f):(e.exit("thematicBreakSequence"),Ge(h)?Xe(e,c,"whitespace")(h):c(h))}}const Sn={continuation:{tokenize:xI},exit:wI,name:"list",tokenize:_I},TI={partial:!0,tokenize:CI},bI={partial:!0,tokenize:SI};function _I(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:zd(T)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(gl,n,h)(T):h(T);if(!r.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(T)}return n(T)}function f(T){return zd(T)&&++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(ca,r.interrupt?n:m,e.attempt(TI,b,E))}function m(T){return r.containerState.initialBlankLine=!0,a++,b(T)}function E(T){return Ge(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 xI(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ca,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ge(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(bI,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(Sn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function SI(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 wI(e){e.exit(this.containerState.type)}function CI(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!Ge(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ty={name:"setextUnderline",resolveTo:AI,tokenize:vI};function AI(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 vI(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"),Ge(h)?Xe(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Re(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const kI={tokenize:NI};function NI(e){const t=this,n=e.attempt(ca,r,e.attempt(this.parser.constructs.flowInitial,o,Xe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(LO,o)),"linePrefix")));return n;function r(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 OI={resolveAll:ry()},II=ny("string"),PI=ny("text");function ny(e){return{resolveAll:ry(e==="text"?RI: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 RI(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 LI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:UO},disable:{null:[]},document:{42:Sn,43:Sn,45:Sn,48:Sn,49:Sn,50:Sn,51:Sn,52:Sn,53:Sn,54:Sn,55:Sn,56:Sn,57:Sn,62:qE},flow:{35:qO,42:gl,45:[ty,gl],60:KO,61:ty,95:gl,96:KE,126:KE},flowInitial:{[-2]:$d,[-1]:$d,32:$d},insideSpan:{null:[jd,OI]},string:{38:WE,92:YE},text:{[-5]:qd,[-4]:qd,[-3]:qd,33:hI,38:WE,42:jd,60:[mO,nI],91:mI,92:[$O,YE],93:Vd,95:jd,96:kO}},Symbol.toStringTag,{value:"Module"}));function DI(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=qn(u,le),C(),u[u.length-1]!==null?[]:(be(t,0),h.events=ml(a,h.events,h),h.events)}function b(le,de){return FI(T(le),de)}function T(le){return MI(u,le)}function _(){const{_bufferIndex:le,_index:de,line:ce,column:fe,offset:ye}=r;return{_bufferIndex:le,_index:de,line:ce,column:fe,offset:ye}}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){Re(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,ye,Ae){let ie,$,ee,w;return Array.isArray(fe)?Q(fe):"tokenize"in fe?Q([fe]):R(fe);function R(Ie){return Ke;function Ke(Ve){const Je=Ve!==null&&Ie[Ve],xt=Ve!==null&&Ie.null,Gn=[...Array.isArray(Je)?Je:Je?[Je]:[],...Array.isArray(xt)?xt:xt?[xt]:[]];return Q(Gn)(Ve)}}function Q(Ie){return ie=Ie,$=0,Ie.length===0?Ae:k(Ie[$])}function k(Ie){return Ke;function Ke(Ve){return w=he(),ee=Ie,Ie.partial||(h.currentConstruct=Ie),Ie.name&&h.parser.constructs.disable.null.includes(Ie.name)?Fe():Ie.tokenize.call(de?Object.assign(Object.create(h),de):h,f,xe,Fe)(Ve)}}function xe(Ie){return le(ee,w),ye}function Fe(Ie){return w.restore(),++$<ie.length?k(ie[$]):Ae}}}function be(le,de){le.resolveAll&&!a.includes(le)&&a.push(le),le.resolve&&Ln(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,ye=Array.from(c);return{from:fe,restore:Ae};function Ae(){r=le,h.previous=de,h.currentConstruct=ce,h.events.length=fe,c=ye,H()}}function H(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function MI(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 FI(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 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"&>("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"&>("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"&>("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=`
|
|
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 BI(e){const r={constructs:zE([LI,...(e||{}).extensions||[]]),content:o(uO),defined:[],document:o(cO),flow:o(kI),lazy:{},string:o(II),text:o(PI)};return r;function o(a){return u;function u(c){return DI(r,a,c)}}}function UI(e){for(;!QE(e););return e}const iy=/[\0\t\n\r]/g;function HI(){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 zI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jI(e){return e.replace(zI,$I)}function $I(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 Hd(n)||e}const sy={}.hasOwnProperty;function VI(e,t,n){return typeof t!="string"&&(n=t,t=void 0),qI(n)(UI(BI(n).document().write(HI()(e,t,!0))))}function qI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(St),autolinkProtocol:he,autolinkEmail:he,atxHeading:a(_e),blockQuote:a(xt),characterEscape:he,characterReference:he,codeFenced:a(Gn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Gn,u),codeText:a(oo,u),codeTextData:he,data:he,codeFlowValue:he,definition:a(Zr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Ti),hardBreakEscape:a(He),hardBreakTrailing:a(He),htmlFlow:a(nt,u),htmlFlowData:he,htmlText:a(nt,u),htmlTextData:he,image:a(Tt),label:u,link:a(St),listItem:a(Ut),listItemValue:b,listOrdered:a(Pt,E),listUnordered:a(Pt),paragraph:a(Ze),reference:k,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(_e),strong:a(Mn),thematicBreak:a(hr)},exit:{atxHeading:f(),atxHeadingSequence:W,autolink:f(),autolinkEmail:Je,autolinkProtocol:Ve,blockQuote:f(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Fe,characterReferenceMarkerNumeric:Fe,characterReferenceValue:Ie,characterReference:Ke,codeFenced:f(C),codeFencedFence:S,codeFencedFenceInfo:T,codeFencedFenceMeta:_,codeFlowValue:H,codeIndented:f(I),codeText:f(ye),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(ie),label:ee,labelText:$,lineEnding:le,link:f(Ae),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()}};oy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let Ee={type:"root",children:[]};const Be={stack:[Ee],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:m,data:n},Ye=[];let et=-1;for(;++et<J.length;)if(J[et][1].type==="listOrdered"||J[et][1].type==="listUnordered")if(J[et][0]==="enter")Ye.push(et);else{const Qt=Ye.pop();et=o(J,Qt,et)}for(et=-1;++et<J.length;){const Qt=t[J[et][0]];sy.call(Qt,J[et][1].type)&&Qt[J[et][1].type].call(Object.assign({sliceSerialize:J[et][2].sliceSerialize},Be),J[et][1])}if(Be.tokenStack.length>0){const Qt=Be.tokenStack[Be.tokenStack.length-1];(Qt[1]||ay).call(Be,void 0,Qt[0])}for(Ee.position={start:mi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:mi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},et=-1;++et<t.transforms.length;)Ee=t.transforms[et](Ee)||Ee;return Ee}function o(J,Ee,Be){let Ye=Ee-1,et=-1,Qt=!1,ei,Kn,_i,is;for(;++Ye<=Be;){const Xt=J[Ye];switch(Xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xt[0]==="enter"?et++:et--,is=void 0;break}case"lineEndingBlank":{Xt[0]==="enter"&&(ei&&!is&&!et&&!_i&&(_i=Ye),is=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:is=void 0}if(!et&&Xt[0]==="enter"&&Xt[1].type==="listItemPrefix"||et===-1&&Xt[0]==="exit"&&(Xt[1].type==="listUnordered"||Xt[1].type==="listOrdered")){if(ei){let Dr=Ye;for(Kn=void 0;Dr--;){const Fn=J[Dr];if(Fn[1].type==="lineEnding"||Fn[1].type==="lineEndingBlank"){if(Fn[0]==="exit")continue;Kn&&(J[Kn][1].type="lineEndingBlank",Qt=!0),Fn[1].type="lineEnding",Kn=Dr}else if(!(Fn[1].type==="linePrefix"||Fn[1].type==="blockQuotePrefix"||Fn[1].type==="blockQuotePrefixWhitespace"||Fn[1].type==="blockQuoteMarker"||Fn[1].type==="listItemIndent"))break}_i&&(!Kn||_i<Kn)&&(ei._spread=!0),ei.end=Object.assign({},Kn?J[Kn][1].start:Xt[1].end),J.splice(Kn||Ye,0,["exit",ei,Xt[2]]),Ye++,Be++}if(Xt[1].type==="listItemPrefix"){const Dr={type:"listItem",_spread:!1,start:Object.assign({},Xt[1].start),end:void 0};ei=Dr,J.splice(Ye,0,["enter",Dr,Xt[2]]),Ye++,Be++,_i=void 0,is=!0}}}return J[Ee][1]._spread=Qt,Be}function a(J,Ee){return Be;function Be(Ye){c.call(this,J(Ye),Ye),Ee&&Ee.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,Ee,Be){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([Ee,Be||void 0]),J.position={start:mi(Ee.start),end:void 0}}function f(J){return Ee;function Ee(Be){J&&J.call(this,Be),h.call(this,Be)}}function h(J,Ee){const Be=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==J.type&&(Ee?Ee.call(this,J,Ye[0]):(Ye[1]||ay).call(this,J,Ye[0]));else throw new Error("Cannot close `"+J.type+"` ("+ua({start:J.start,end:J.end})+"): it’s not open");Be.position.end=mi(J.end)}function m(){return Ud(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const Ee=this.stack[this.stack.length-2];Ee.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function T(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.lang=J}function _(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function I(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J.replace(/(\r?\n|\r)$/g,"")}function F(J){const Ee=this.resume(),Be=this.stack[this.stack.length-1];Be.label=Ee,Be.identifier=fr(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 Be=this.sliceSerialize(J).length;Ee.depth=Be}}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 Be=this.stack[this.stack.length-1].children;let Ye=Be[Be.length-1];(!Ye||Ye.type!=="text")&&(Ye=bi(),Ye.position={start:mi(J.start),end:void 0},Be.push(Ye)),this.stack.push(Ye)}function H(J){const Ee=this.stack.pop();Ee.value+=this.sliceSerialize(J),Ee.position.end=mi(J.end)}function le(J){const Ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=Ee.children[Ee.children.length-1];Be.position.end=mi(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 ye(){const J=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=J}function Ae(){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 ie(){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),Be=this.stack[this.stack.length-2];Be.label=jI(Ee),Be.identifier=fr(Ee).toLowerCase()}function ee(){const J=this.stack[this.stack.length-1],Ee=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const Ye=J.children;Be.children=Ye}else Be.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(),Be=this.stack[this.stack.length-1];Be.label=Ee,Be.identifier=fr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Fe(J){this.data.characterReferenceType=J.type}function Ie(J){const Ee=this.sliceSerialize(J),Be=this.data.characterReferenceType;let Ye;Be?(Ye=jE(Ee,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=Hd(Ee);const et=this.stack[this.stack.length-1];et.value+=Ye}function Ke(J){const Ee=this.stack.pop();Ee.position.end=mi(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 xt(){return{type:"blockquote",children:[]}}function Gn(){return{type:"code",lang:null,meta:null,value:""}}function oo(){return{type:"inlineCode",value:""}}function Zr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ti(){return{type:"emphasis",children:[]}}function _e(){return{type:"heading",depth:0,children:[]}}function He(){return{type:"break"}}function nt(){return{type:"html",value:""}}function Tt(){return{type:"image",title:null,url:"",alt:null}}function St(){return{type:"link",title:null,url:"",children:[]}}function Pt(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Ut(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Ze(){return{type:"paragraph",children:[]}}function Mn(){return{type:"strong",children:[]}}function bi(){return{type:"text",value:""}}function hr(){return{type:"thematicBreak"}}}function mi(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):YI(e,r)}}function YI(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+"` ("+ua({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ua({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ua({start:t.start,end:t.end})+") is still open")}function WI(e){const t=this;t.parser=n;function n(r){return VI(r,Te(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function GI(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 KI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
18
|
-
`}]}function
|
|
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
|
|
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:`
|
|
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
|
|
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:`
|
|
22
22
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
23
|
-
`}]}}const
|
|
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:`
|
|
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
|
|
27
|
-
`},o),a}function zP(e,t){return e&&"run"in e?function(n,r){return st(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 Jd,wy;function jP(){if(wy)return Jd;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 Jd=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},Jd}var $P=jP();const Zd=We($P);function eh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function VP(){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?qP(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 qP(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 Pr={basename:YP,dirname:WP,extname:GP,join:KP,sep:"/"};function YP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ma(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 WP(e){if(ma(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 GP(e){ma(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 KP(...e){let t=-1,n;for(;++t<e.length;)ma(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":QP(n)}function QP(e){ma(e);const t=e.codePointAt(0)===47;let n=XP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function XP(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 ma(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const JP={cwd:ZP};function ZP(){return"/"}function th(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function eR(e){if(typeof e=="string")e=new URL(e);else if(!th(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return tR(e)}function tR(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const nh=["history","path","basename","stem","extname","dirname"];class Cy{constructor(t){let n;t?th(t)?n={path:t}:typeof t=="string"||nR(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":JP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<nh.length;){const a=nh[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)nh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Pr.basename(this.path):void 0}set basename(t){ih(t,"basename"),rh(t,"basename"),this.path=Pr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Pr.dirname(this.path):void 0}set dirname(t){Ay(this.basename,"dirname"),this.path=Pr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Pr.extname(this.path):void 0}set extname(t){if(rh(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=Pr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){th(t)&&(t=eR(t)),ih(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Pr.basename(this.path,this.extname):void 0}set stem(t){ih(t,"stem"),rh(t,"stem"),this.path=Pr.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 rh(e,t){if(e&&e.includes(Pr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Pr.sep+"`")}function ih(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 nR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rR=function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},iR={}.hasOwnProperty;class sh extends rR{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=VP()}copy(){const t=new sh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Zd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(uh("data",this.frozen),this.namespace[t]=n,this):iR.call(this.namespace,t)&&this.namespace[t]||void 0:t?(uh("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=wl(t),r=this.parser||this.Parser;return oh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),oh("process",this.parser||this.Parser),ah("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=wl(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);aR(_)?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(),oh("processSync",this.parser||this.Parser),ah("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=wl(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=wl(n),o=this.compiler||this.Compiler;return ah("stringify",o),vy(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(uh("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=Zd(!0,o.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const E=h[m];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];eh(S)&&eh(T)&&(T=Zd(!0,S,T)),r[b]=[h,T,..._]}}}}const sR=new sh().freeze();function oh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ah(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function uh(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(!eh(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 wl(e){return oR(e)?e:new Cy(e)}function oR(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function aR(e){return typeof e=="string"||uR(e)}function uR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lR="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ny=[],Oy={allowDangerousHtml:!0},cR=/^(https?|ircs?|mailto|xmpp)$/i,fR=[{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 dR(e){const t=hR(e),n=pR(e);return mR(t.runSync(t.parse(n),n),e)}function hR(e){const t=e.rehypePlugins||Ny,n=e.remarkPlugins||Ny,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),Oy):Oy;return sR().use(WI).use(n).use(zP,r).use(t)}function pR(e){const t=e.children||"",n=new Cy;return typeof t=="string"&&(n.value=t),n}function mR(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||gR;for(const m of fR)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+lR+m.id,void 0);return Sl(e,h),U3(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 Bd)if(Object.hasOwn(Bd,T)&&Object.hasOwn(m.properties,T)){const _=m.properties[T],S=Bd[T];(S===null||S.includes(m.tagName))&&(m.properties[T]=f(String(_||""),T,m))}}if(m.type==="element"){let T=n?!n.includes(m.tagName):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 gR(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||cR.test(e.slice(0,t))?e:""}const Iy=/[#.]/g;function ER(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?_R(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=ER(a,t);const h=f.tagName.toLowerCase(),m=r?r.get(h):void 0;if(f.tagName=m||h,yR(u))c.unshift(u);else for(const[E,b]of Object.entries(u))TR(e,f.properties,E,b)}for(const h of c)lh(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return o}function yR(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 TR(e,t,n,r){const o=Pd(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"?bR(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 lh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)lh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?lh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function 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===""||sa(n)===sa(t)))return!0}return n}function bR(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function _R(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const xR=["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"],SR=Py(fl,"div"),wR=Py(Ys,"g",xR);function CR(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,AR=Object.prototype;function vR(e,t){const n=t||{};return ch({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ys:fl,verbose:n.verbose||!1},e)}function ch(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Cl(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=CR(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"},Cl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Cl(e,r,n),n}default:return n=kR(e,t),n}}function My(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=ch(e,t[n]);r.push(o)}return r}function kR(e,t){const n=e.schema;e.schema=t.namespaceURI===Ji.svg?Ys:fl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],f=(c.prefix?c.prefix+":":"")+c.name;Dy.call(AR,f)||(o[f]=c.value)}const u=(e.schema.space==="svg"?wR:SR)(t.tagName,o,My(e,t.childNodes));if(Cl(e,t,u),u.tagName==="template"){const c=t,f=c.sourceCodeLocation,h=f&&f.startTag&&Js(f.startTag),m=f&&f.endTag&&Js(f.endTag),E=ch(e,c.content);h&&m&&e.file&&(E.position={start:h.end,end:m.start}),u.content=E}return e.schema=n,u}function Cl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=NR(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function NR(e,t,n){const r=Js(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[Pd(e.schema,u).property]=Js(n.attrs[u]));n.startTag;const c=Js(n.startTag),f=n.endTag?Js(n.endTag):void 0,h={opening:c};f&&(h.closing=f),h.properties=a,t.data={position:h}}}return r}function Js(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 ga{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ga.prototype.property={},ga.prototype.normal={},ga.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 ga(n,r,t)}function fh(e){return e.toLowerCase()}class Yn{constructor(t,n){this.property=t,this.attribute=n}}Yn.prototype.space=null,Yn.prototype.boolean=!1,Yn.prototype.booleanish=!1,Yn.prototype.overloadedBoolean=!1,Yn.prototype.number=!1,Yn.prototype.commaSeparated=!1,Yn.prototype.spaceSeparated=!1,Yn.prototype.commaOrSpaceSeparated=!1,Yn.prototype.mustUseProperty=!1,Yn.prototype.defined=!1;let OR=0;const je=Zi(),Ft=Zi(),Uy=Zi(),me=Zi(),ft=Zi(),Zs=Zi(),Dn=Zi();function Zi(){return Kc(2,++OR)}const dh=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Ft,commaOrSpaceSeparated:Dn,commaSeparated:Zs,number:me,overloadedBoolean:Uy,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),hh=Object.keys(dh);class ph extends Yn{constructor(t,n,r,o){let a=-1;if(super(t,n),Hy(this,"space",o),typeof r=="number")for(;++a<hh.length;){const u=hh[a];Hy(this,hh[a],(r&dh[u])===dh[u])}}}ph.prototype.defined=!0;function Hy(e,t,n){n&&(e[t]=n)}const IR={}.hasOwnProperty;function eo(e){const t={},n={};let r;for(r in e.properties)if(IR.call(e.properties,r)){const o=e.properties[r],a=new ph(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[fh(r)]=r,n[fh(a.attribute)]=r}return new ga(t,n,e.space)}const zy=eo({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=eo({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=eo({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Vy,properties:{xmlns:null,xmlnsXLink:null}}),Yy=eo({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}}),PR=eo({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Vy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zs,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|Zs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Uy,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}}),RR=eo({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:Dn,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:Zs,g2:Zs,glyphName:Zs,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:Dn,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:Dn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dn,rev:Dn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dn,requiredFeatures:Dn,requiredFonts:Dn,requiredFormats:Dn,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:Dn,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:Dn,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:Dn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),LR=/^data[-\w.:]+$/i,Wy=/-[a-z]/g,DR=/[A-Z]/g;function MR(e,t){const n=fh(t);let r=t,o=Yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&LR.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Wy,BR);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Wy.test(a)){let u=a.replace(DR,FR);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=ph}return new o(r,t)}function FR(e){return"-"+e.toLowerCase()}function BR(e){return e.charAt(1).toUpperCase()}const UR=By([jy,zy,qy,Yy,PR],"html"),Gy=By([jy,zy,qy,Yy,RR],"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 HR={},zR={}.hasOwnProperty,Xy=Qy("type",{handlers:{root:$R,element:GR,text:YR,comment:WR,doctype:qR}});function jR(e,t){const r=(t||HR).space;return Xy(e,r==="svg"?Gy:UR)}function $R(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=mh(e.children,n,t),to(e,n),n}function VR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=mh(e.children,n,t),to(e,n),n}function qR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return to(e,t),t}function YR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return to(e,t),t}function WR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return to(e,t),t}function GR(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"&&zR.call(e.properties,a)){const f=KR(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=mh(e.children,c,r),to(e,c),e.tagName==="template"&&e.content&&(c.content=VR(e.content,r)),c}function KR(e,t,n){const r=MR(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 mh(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 to(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 QR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],XR=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]),yt="�";var A;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(A||(A={}));const wn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Jy(e){return e>=55296&&e<=57343}function JR(e){return e>=56320&&e<=57343}function ZR(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||XR.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 eL=65536;class tL{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=eL,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(JR(n))return this.pos++,this._addGap(),ZR(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 nL=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),rL=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 iL(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=rL.get(e))!==null&&t!==void 0?t:e}var qt;(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"})(qt||(qt={}));const sL=32;var gi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(gi||(gi={}));function gh(e){return e>=qt.ZERO&&e<=qt.NINE}function oL(e){return e>=qt.UPPER_A&&e<=qt.UPPER_F||e>=qt.LOWER_A&&e<=qt.LOWER_F}function aL(e){return e>=qt.UPPER_A&&e<=qt.UPPER_Z||e>=qt.LOWER_A&&e<=qt.LOWER_Z||gh(e)}function uL(e){return e===qt.EQUALS||aL(e)}var Yt;(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"})(Yt||(Yt={}));var Xr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Xr||(Xr={}));class lL{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Yt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xr.Strict}startEntity(t){this.decodeMode=t,this.state=Yt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Yt.EntityStart:return t.charCodeAt(n)===qt.NUM?(this.state=Yt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Yt.NamedEntity,this.stateNamedEntity(t,n));case Yt.NumericStart:return this.stateNumericStart(t,n);case Yt.NumericDecimal:return this.stateNumericDecimal(t,n);case Yt.NumericHex:return this.stateNumericHex(t,n);case Yt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|sL)===qt.LOWER_X?(this.state=Yt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Yt.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(gh(o)||oL(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(gh(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===qt.SEMI)this.consumed+=1;else if(this.decodeMode===Xr.Strict)return 0;return this.emitCodePoint(iL(this.result),this.consumed),this.errors&&(t!==qt.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&gi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=cL(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Xr.Attribute&&(a===0||uL(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&gi.VALUE_LENGTH)>>14,a!==0){if(u===qt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Xr.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]&gi.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]&~gi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Yt.NamedEntity:return this.result!==0&&(this.decodeMode!==Xr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Yt.NumericDecimal:return this.emitNumericEntity(0,2);case Yt.NumericHex:return this.emitNumericEntity(0,3);case Yt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Yt.EntityStart:return 0}}}function cL(e,t,n,r){const o=(t&gi.BRANCH_LENGTH)>>7,a=t&gi.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 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 Wn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Wn||(Wn={}));var j;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(j||(j={}));var p;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(p||(p={}));const fL=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 no(e){var t;return(t=fL.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const ae=p,dL={[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},Eh=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 It={DATA:v.DATA,RCDATA:v.RCDATA,RAWTEXT:v.RAWTEXT,SCRIPT_DATA:v.SCRIPT_DATA,PLAINTEXT:v.PLAINTEXT,CDATA_SECTION:v.CDATA_SECTION};function hL(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function Ea(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function pL(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function Ei(e){return pL(e)||Ea(e)}function nT(e){return Ei(e)||hL(e)}function Al(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 mL(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 gL{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 tL(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new lL(nL,(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=mL(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=no(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()?Xr.Attribute:Xr.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(yt);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(yt);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(yt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(X.unexpectedNullCharacter),this._emitChars(yt);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ei(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(Ei(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+=yt;break}case A.EOF:{this._err(X.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ea(t)?Al(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){Ei(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){Ei(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){Ei(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(yt);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(yt);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(yt);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:Ei(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){Ei(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(wn.SCRIPT,!1)&&iT(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.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(yt);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(yt);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(yt);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(wn.SCRIPT,!1)&&iT(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.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+=yt;break}default:this.currentAttr.name+=String.fromCodePoint(Ea(t)?Al(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+=yt;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+=yt;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+=yt;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+=yt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(wn.DASH_DASH,!0)?(this._createCommentToken(wn.DASH_DASH.length+1),this.state=v.COMMENT_START):this._consumeSequenceIfMatch(wn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(wn.DOCTYPE.length+1),this.state=v.DOCTYPE):this._consumeSequenceIfMatch(wn.CDATA_START,!0)?this.inForeignNode?this.state=v.CDATA_SECTION:(this._err(X.cdataInHtmlContent),this._createCommentToken(wn.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+=yt;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(Ea(t))this._createDoctypeToken(String.fromCharCode(Al(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(yt),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+=yt;break}case A.EOF:{this._err(X.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ea(t)?Al(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(wn.PUBLIC,!1)?this.state=v.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(wn.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+=yt;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+=yt;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+=yt;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+=yt;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]),vl=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),EL=new Set([...vl,p.OL,p.UL]),yL=new Set([...vl,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]),TL=new Set([p.TR,p.TEMPLATE,p.HTML]),bL=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),_L=new Set([p.TABLE,p.TEMPLATE,p.HTML]),xL=new Set([p.TD,p.TH]);class SL{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===re.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==re.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Eh,re.HTML)}popUntilTableCellPopped(){this.popUntilPopped(xL,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(_L,re.HTML)}clearBackToTableBodyContext(){this.clearBackTo(bL,re.HTML)}clearBackToTableRowContext(){this.clearBackTo(TL,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(uT.has(o))return!1;break}case re.MATHML:{if(aT.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,vl)}hasInListItemScope(t){return this.hasInDynamicScope(t,EL)}hasInButtonScope(t){return this.hasInDynamicScope(t,yL)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case re.HTML:{if(Eh.has(n))return!0;if(vl.has(n))return!1;break}case re.SVG:{if(uT.has(n))return!1;break}case re.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])===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&&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 yh=3;var Rr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Rr||(Rr={}));const lT={type:Rr.Marker};class wL{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===Rr.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<yh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<yh)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>=yh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(lT)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Rr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Rr.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===Rr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Rr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Rr.Element&&n.element===t)}}const yi={createDocument(){return{nodeName:"#document",mode:Wn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};yi.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(yi.isTextNode(n)){n.value+=t;return}}yi.appendChild(e,yi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&yi.isTextNode(r)?r.value+=t:yi.insertBefore(e,yi.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",CL="about:legacy-compat",AL="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//"],vL=[...fT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],kL=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//"],NL=[...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 OL(e){return e.name===cT&&e.publicId===null&&(e.systemId===null||e.systemId===CL)}function IL(e){if(e.name!==cT)return Wn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===AL)return Wn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),kL.has(n))return Wn.QUIRKS;let r=t===null?vL:fT;if(hT(n,r))return Wn.QUIRKS;if(r=t===null?dT:NL,hT(n,r))return Wn.LIMITED_QUIRKS}return Wn.NO_QUIRKS}const pT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},PL="definitionurl",RL="definitionURL",LL=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),DL=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}]]),ML=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])),FL=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 BL(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:r})=>r===es.COLOR||r===es.SIZE||r===es.FACE)||FL.has(t)}function mT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===PL){e.attrs[t].name=RL;break}}function gT(e){for(let t=0;t<e.attrs.length;t++){const n=LL.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Th(e){for(let t=0;t<e.attrs.length;t++){const n=DL.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 UL(e){const t=ML.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=no(e.tagName))}function HL(e,t){return t===re.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function zL(e,t,n){if(t===re.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===re.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function jL(e,t,n,r){return(!r||r===re.HTML)&&zL(e,t,n)||(!r||r===re.MATHML)&&HL(e,t)}const $L="hidden",VL=8,qL=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 YL={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:yi,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 gL(this.options,this),this.activeFormattingElements=new wL(this.treeAdapter),this.fragmentContextID=r?no(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new SL(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,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:YL,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=It.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=It.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=It.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=It.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=It.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&Te(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 jL(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Rr.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)===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 dL[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){x4(this,t);return}switch(this.insertionMode){case P.INITIAL:{ya(this,t);break}case P.BEFORE_HTML:{Ta(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{_a(this,t);break}case P.IN_HEAD_NO_SCRIPT:{xa(this,t);break}case P.AFTER_HEAD:{Sa(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:{Sh(this,t);break}case P.IN_TABLE_TEXT:{NT(this,t);break}case P.IN_COLUMN_GROUP:{Ol(this,t);break}case P.AFTER_BODY:{Rl(this,t);break}case P.AFTER_AFTER_BODY:{Ll(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){_4(this,t);return}switch(this.insertionMode){case P.INITIAL:{ya(this,t);break}case P.BEFORE_HTML:{Ta(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{_a(this,t);break}case P.IN_HEAD_NO_SCRIPT:{xa(this,t);break}case P.AFTER_HEAD:{Sa(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Sh(this,t);break}case P.IN_COLUMN_GROUP:{Ol(this,t);break}case P.AFTER_BODY:{Rl(this,t);break}case P.AFTER_AFTER_BODY:{Ll(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){_h(this,t);return}switch(this.insertionMode){case P.INITIAL:case P.BEFORE_HTML:case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_TEMPLATE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{_h(this,t);break}case P.IN_TABLE_TEXT:{Aa(this,t);break}case P.AFTER_BODY:{ZL(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{e6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{t6(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:{Aa(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)?S4(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{ya(this,t);break}case P.BEFORE_HTML:{n6(this,t);break}case P.BEFORE_HEAD:{i6(this,t);break}case P.IN_HEAD:{dr(this,t);break}case P.IN_HEAD_NO_SCRIPT:{a6(this,t);break}case P.AFTER_HEAD:{l6(this,t);break}case P.IN_BODY:{sn(this,t);break}case P.IN_TABLE:{ro(this,t);break}case P.IN_TABLE_TEXT:{Aa(this,t);break}case P.IN_CAPTION:{s4(this,t);break}case P.IN_COLUMN_GROUP:{wh(this,t);break}case P.IN_TABLE_BODY:{Il(this,t);break}case P.IN_ROW:{Pl(this,t);break}case P.IN_CELL:{u4(this,t);break}case P.IN_SELECT:{PT(this,t);break}case P.IN_SELECT_IN_TABLE:{c4(this,t);break}case P.IN_TEMPLATE:{d4(this,t);break}case P.AFTER_BODY:{p4(this,t);break}case P.IN_FRAMESET:{m4(this,t);break}case P.AFTER_FRAMESET:{E4(this,t);break}case P.AFTER_AFTER_BODY:{T4(this,t);break}case P.AFTER_AFTER_FRAMESET:{b4(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?w4(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{ya(this,t);break}case P.BEFORE_HTML:{r6(this,t);break}case P.BEFORE_HEAD:{s6(this,t);break}case P.IN_HEAD:{o6(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:{Nl(this,t);break}case P.TEXT:{K6(this,t);break}case P.IN_TABLE:{wa(this,t);break}case P.IN_TABLE_TEXT:{Aa(this,t);break}case P.IN_CAPTION:{o4(this,t);break}case P.IN_COLUMN_GROUP:{a4(this,t);break}case P.IN_TABLE_BODY:{Ch(this,t);break}case P.IN_ROW:{IT(this,t);break}case P.IN_CELL:{l4(this,t);break}case P.IN_SELECT:{RT(this,t);break}case P.IN_SELECT_IN_TABLE:{f4(this,t);break}case P.IN_TEMPLATE:{h4(this,t);break}case P.AFTER_BODY:{DT(this,t);break}case P.IN_FRAMESET:{g4(this,t);break}case P.AFTER_FRAMESET:{y4(this,t);break}case P.AFTER_AFTER_BODY:{Ll(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{ya(this,t);break}case P.BEFORE_HTML:{Ta(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{_a(this,t);break}case P.IN_HEAD_NO_SCRIPT:{xa(this,t);break}case P.AFTER_HEAD:{Sa(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:{Q6(this,t);break}case P.IN_TABLE_TEXT:{Aa(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:{xh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.TEXT:case P.IN_COLUMN_GROUP:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{this._insertCharacters(t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:case P.AFTER_BODY:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{bT(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Sh(this,t);break}case P.IN_TABLE_TEXT:{kT(this,t);break}}}}function WL(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 GL(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 KL(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>=qL;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=QL(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function QL(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 XL(e,t,n){const r=e.treeAdapter.getTagName(t),o=no(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 JL(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 bh(e,t){for(let n=0;n<VL;n++){const r=WL(e,t);if(!r)break;const o=GL(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=KL(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&XL(e,u,a),JL(e,o,r)}}function _h(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function ZL(e,t){e._appendCommentNode(t,e.openElements.items[0])}function e6(e,t){e._appendCommentNode(t,e.document)}function xh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function t6(e,t){e._setDocumentType(t);const n=t.forceQuirks?Wn.QUIRKS:IL(t);OL(t)||e._err(t,X.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function ya(e,t){e._err(t,X.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Wn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function n6(e,t){t.tagID===p.HTML?(e._insertElement(t,re.HTML),e.insertionMode=P.BEFORE_HEAD):Ta(e,t)}function r6(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&Ta(e,t)}function Ta(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function i6(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:ba(e,t)}}function s6(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?ba(e,t):e._err(t,X.endTagWithoutMatchingOpenElement)}function ba(e,t){e._insertFakeElement(j.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function dr(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,It.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,It.RAWTEXT):(e._insertElement(t,re.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,It.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,It.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:_a(e,t)}}function o6(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:{_a(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 _a(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function a6(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:{dr(e,t);break}case p.NOSCRIPT:{e._err(t,X.nestedNoscriptInHead);break}default:xa(e,t)}}function u6(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case p.BR:{xa(e,t);break}default:e._err(t,X.endTagWithoutMatchingOpenElement)}}function xa(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 l6(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),dr(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,X.misplacedStartTagForHeadElement);break}default:Sa(e,t)}}function c6(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{Sa(e,t);break}case p.TEMPLATE:{ts(e,t);break}default:e._err(t,X.endTagWithoutMatchingOpenElement)}}function Sa(e,t){e._insertFakeElement(j.BODY,p.BODY),e.insertionMode=P.IN_BODY,kl(e,t)}function kl(e,t){switch(t.type){case qe.CHARACTER:{_T(e,t);break}case qe.WHITESPACE_CHARACTER:{bT(e,t);break}case qe.COMMENT:{_h(e,t);break}case qe.START_TAG:{sn(e,t);break}case qe.END_TAG:{Nl(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 f6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function d6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function h6(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 p6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML)}function m6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Eh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,re.HTML)}function g6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function E6(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 y6(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 T6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.tokenizer.state=It.PLAINTEXT}function b6(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 _6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(bh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function x6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function S6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(bh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,re.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function w6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function C6(e,t){e.treeAdapter.getDocumentMode(e.document)!==Wn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function xT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,re.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ST(e){const t=tT(e,es.TYPE);return t!=null&&t.toLowerCase()===$L}function A6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,re.HTML),ST(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function v6(e,t){e._appendElement(t,re.HTML),t.ackSelfClosing=!0}function k6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,re.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function N6(e,t){t.tagName=j.IMG,t.tagID=p.IMG,xT(e,t)}function O6(e,t){e._insertElement(t,re.HTML),e.skipNextNewLine=!0,e.tokenizer.state=It.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function I6(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,It.RAWTEXT)}function P6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,It.RAWTEXT)}function wT(e,t){e._switchToTextParsing(t,It.RAWTEXT)}function R6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===P.IN_TABLE||e.insertionMode===P.IN_CAPTION||e.insertionMode===P.IN_TABLE_BODY||e.insertionMode===P.IN_ROW||e.insertionMode===P.IN_CELL?P.IN_SELECT_IN_TABLE:P.IN_SELECT}function L6(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,re.HTML)}function D6(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,re.HTML)}function M6(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,re.HTML)}function F6(e,t){e._reconstructActiveFormattingElements(),mT(t),Th(t),t.selfClosing?e._appendElement(t,re.MATHML):e._insertElement(t,re.MATHML),t.ackSelfClosing=!0}function B6(e,t){e._reconstructActiveFormattingElements(),gT(t),Th(t),t.selfClosing?e._appendElement(t,re.SVG):e._insertElement(t,re.SVG),t.ackSelfClosing=!0}function CT(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:{x6(e,t);break}case p.A:{_6(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{m6(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:{p6(e,t);break}case p.LI:case p.DD:case p.DT:{y6(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:{k6(e,t);break}case p.RB:case p.RTC:{D6(e,t);break}case p.RT:case p.RP:{M6(e,t);break}case p.PRE:case p.LISTING:{g6(e,t);break}case p.XMP:{I6(e,t);break}case p.SVG:{B6(e,t);break}case p.HTML:{f6(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:{d6(e,t);break}case p.FORM:{E6(e,t);break}case p.NOBR:{S6(e,t);break}case p.MATH:{F6(e,t);break}case p.TABLE:{C6(e,t);break}case p.INPUT:{A6(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{v6(e,t);break}case p.IMAGE:{N6(e,t);break}case p.BUTTON:{b6(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{w6(e,t);break}case p.IFRAME:{P6(e,t);break}case p.SELECT:{R6(e,t);break}case p.OPTION:case p.OPTGROUP:{L6(e,t);break}case p.NOEMBED:case p.NOFRAMES:{wT(e,t);break}case p.FRAMESET:{h6(e,t);break}case p.TEXTAREA:{O6(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?wT(e,t):CT(e,t);break}case p.PLAINTEXT:{T6(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 U6(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 H6(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,DT(e,t))}function z6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function j6(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 $6(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(j.P,p.P),e._closePElement()}function V6(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function q6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Y6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function W6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function G6(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 Nl(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{bh(e,t);break}case p.P:{$6(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:{z6(e,t);break}case p.LI:{V6(e);break}case p.DD:case p.DT:{q6(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{Y6(e);break}case p.BR:{G6(e);break}case p.BODY:{U6(e,t);break}case p.HTML:{H6(e,t);break}case p.FORM:{j6(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{W6(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):xh(e,t)}function K6(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 Q6(e,t){e._err(t,X.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Sh(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 Ca(e,t)}function X6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_CAPTION}function J6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function Z6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,p.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,wh(e,t)}function e4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,re.HTML),e.insertionMode=P.IN_TABLE_BODY}function t4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,p.TBODY),e.insertionMode=P.IN_TABLE_BODY,Il(e,t)}function n4(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function r4(e,t){ST(t)?e._appendElement(t,re.HTML):Ca(e,t),t.ackSelfClosing=!0}function i4(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,re.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ro(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{t4(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{dr(e,t);break}case p.COL:{Z6(e,t);break}case p.FORM:{i4(e,t);break}case p.TABLE:{n4(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{e4(e,t);break}case p.INPUT:{r4(e,t);break}case p.CAPTION:{X6(e,t);break}case p.COLGROUP:{J6(e,t);break}default:Ca(e,t)}}function wa(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{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:Ca(e,t)}}function Ca(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,kl(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 Aa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ca(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 s4(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,ro(e,t)):sn(e,t)}function o4(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,n===p.TABLE&&wa(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Nl(e,t)}}function wh(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:{dr(e,t);break}default:Ol(e,t)}}function a4(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:Ol(e,t)}}function Ol(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function Il(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,Pl(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,ro(e,t));break}default:ro(e,t)}}function Ch(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,wa(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:wa(e,t)}}function Pl(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,Il(e,t));break}default:ro(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,Ch(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,Ch(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:wa(e,t)}}function u4(e,t){const n=t.tagID;OT.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),Pl(e,t)):sn(e,t)}function l4(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:Nl(e,t)}}function PT(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:{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 c4(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 f4(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 d4(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,ro(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,wh(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,Il(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,Pl(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,sn(e,t)}}function h4(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)):xh(e,t)}function p4(e,t){t.tagID===p.HTML?sn(e,t):Rl(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 Rl(e,t)}function Rl(e,t){e.insertionMode=P.IN_BODY,kl(e,t)}function m4(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:{dr(e,t);break}}}function g4(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 E4(e,t){switch(t.tagID){case p.HTML:{sn(e,t);break}case p.NOFRAMES:{dr(e,t);break}}}function y4(e,t){t.tagID===p.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function T4(e,t){t.tagID===p.HTML?sn(e,t):Ll(e,t)}function Ll(e,t){e.insertionMode=P.IN_BODY,kl(e,t)}function b4(e,t){switch(t.tagID){case p.HTML:{sn(e,t);break}case p.NOFRAMES:{dr(e,t);break}}}function _4(e,t){t.chars=yt,e._insertCharacters(t)}function x4(e,t){e._insertCharacters(t),e.framesetOk=!1}function MT(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 S4(e,t){if(BL(t))MT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===re.MATHML?mT(t):r===re.SVG&&(UL(t),gT(t)),Th(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function w4(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)===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 C4=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,A4=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),FT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function BT(e,t){const n=M4(e),r=Qy("type",{handlers:{root:v4,element:k4,text:N4,comment:HT,doctype:O4,raw:P4},unknown:R4}),o={parser:n?new TT(FT):TT.getFragmentParser(void 0,FT),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),io(o,Ir());const a=n?o.parser.document:o.parser.getFragment(),u=vR(a,{file:o.options.file});return o.stitches&&Sl(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 v4(e,t){UT(e.children,t)}function k4(e,t){L4(e,t),UT(e.children,t),D4(e,t)}function N4(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:va(e)};io(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function O4(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:va(e)};io(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function I4(e,t){t.stitches=!0;const n=F4(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:va(e)};io(t,Ir(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function P4(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,Ir(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(C4,"<$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 R4(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))I4(n,t);else{let r="";throw A4.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 io(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=It.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 L4(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===It.PLAINTEXT)return;io(t,Ir(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=jR(Te(U({},e),{children:[]}),{space:o===Ji.svg?"svg":"html"}),u={type:qe.START_TAG,tagName:n,tagID:no(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:va(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function D4(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&QR.includes(n)||t.parser.tokenizer.state===It.PLAINTEXT)return;io(t,dl(e));const r={type:qe.END_TAG,tagName:n,tagID:no(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:va(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===It.RCDATA||t.parser.tokenizer.state===It.RAWTEXT||t.parser.tokenizer.state===It.SCRIPT_DATA)&&(t.parser.tokenizer.state=It.DATA)}function M4(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function va(e){const t=Ir(e)||{line:void 0,column:void 0,offset:void 0},n=dl(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 F4(e){return"children"in e?Xs(Te(U({},e),{children:[]})):Xs(e)}function B4(e){return function(t,n){return BT(t,Te(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 U4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function H4(e,t,n){const o=_l((n||{}).ignore||[]),a=z4(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 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 z4(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([j4(o[0]),$4(o[1])])}return t}function j4(e){return typeof e=="string"?new RegExp(U4(e),"g"):e}function $4(e){return typeof e=="function"?e:function(){return e}}const Ah="phrasing",vh=["autolink","link","image","label"];function V4(){return{transforms:[X4],enter:{literalAutolink:Y4,literalAutolinkEmail:kh,literalAutolinkHttp:kh,literalAutolinkWww:kh},exit:{literalAutolink:Q4,literalAutolinkEmail:K4,literalAutolinkHttp:W4,literalAutolinkWww:G4}}}function q4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ah,notInConstruct:vh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ah,notInConstruct:vh},{character:":",before:"[ps]",after:"\\/",inConstruct:Ah,notInConstruct:vh}]}}function Y4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function kh(e){this.config.enter.autolinkProtocol.call(this,e)}function W4(e){this.config.exit.autolinkProtocol.call(this,e)}function G4(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 K4(e){this.config.exit.autolinkEmail.call(this,e)}function Q4(e){this.exit(e)}function X4(e){H4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,J4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Z4]],{ignore:["link","linkReference"]})}function J4(e,t,n,r,o){let a="";if(!$T(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!eD(n)))return!1;const u=tD(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 Z4(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 eD(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 tD(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)||pl(n))&&(!t||n!==47)}VT.peek=cD;function nD(){this.buffer()}function rD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function iD(){this.buffer()}function sD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function oD(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 aD(e){this.exit(e)}function uD(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 lD(e){this.exit(e)}function cD(){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 fD(){return{enter:{gfmFootnoteCallString:nD,gfmFootnoteCall:rD,gfmFootnoteDefinitionLabelString:iD,gfmFootnoteDefinition:sD},exit:{gfmFootnoteCallString:oD,gfmFootnoteCall:aD,gfmFootnoteDefinitionLabelString:uD,gfmFootnoteDefinition:lD}}}function dD(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?
|
|
30
|
-
`)}function
|
|
31
|
-
`&&
|
|
32
|
-
`}function
|
|
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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),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,"<$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:`
|
|
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
|
|
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
|
|
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:`
|
|
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=
|
|
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
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,Te(U({},C),{before:a,after:a}));return F(),I(),D}function h(T,_){return _D(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=ob.inlineCode(T,_,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function u5(){return{exit:{taskListCheckValueChecked:ub,taskListCheckValueUnchecked:ub,paragraph:c5}}}function l5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:f5}}}function ub(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function c5(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 f5(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 d5(){return[V4(),fD(),mD(),t5(),u5()]}function h5(e){return{extensions:[q4(),dD(e),gD(),a5(e),l5()]}}const p5={tokenize:b5,partial:!0},lb={tokenize:_5,partial:!0},cb={tokenize:x5,partial:!0},fb={tokenize:S5,partial:!0},m5={tokenize:w5,partial:!0},db={name:"wwwAutolink",tokenize:y5,previous:pb},hb={name:"protocolAutolink",tokenize:T5,previous:mb},Jr={name:"emailAutolink",tokenize:E5,previous:gb},Lr={};function g5(){return{text:Lr}}let ns=48;for(;ns<123;)Lr[ns]=Jr,ns++,ns===58?ns=65:ns===91&&(ns=97);Lr[43]=Jr,Lr[45]=Jr,Lr[46]=Jr,Lr[95]=Jr,Lr[72]=[Jr,hb],Lr[104]=[Jr,hb],Lr[87]=[Jr,db],Lr[119]=[Jr,db];function E5(e,t,n){const r=this;let o,a;return u;function u(E){return!Ph(E)||!gb.call(r,r.previous)||Rh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return Ph(E)?(e.consume(E),c):E===64?(e.consume(E),f):n(E)}function f(E){return E===46?e.check(m5,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&&dn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function y5(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!pb.call(r,r.previous)||Rh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(p5,e.attempt(lb,e.attempt(cb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function T5(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)&&!Rh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(dn(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||hl(E)||lt(E)||Xi(E)||pl(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 b5(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 _5(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&&pl(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 x5(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 S5(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 dn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):dn(c)?(e.consume(c),u):n(c)}}function w5(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return rn(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!dn(e)}function gb(e){return!(e===47||Ph(e))}function Ph(e){return e===43||e===45||e===46||e===95||rn(e)}function Rh(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const C5={tokenize:R5,partial:!0};function A5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:O5,continuation:{tokenize:I5},exit:P5}},text:{91:{name:"gfmFootnoteCall",tokenize:N5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:v5,resolveTo:k5}}}}function v5(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 k5(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 N5(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 O5(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=fr(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 I5(e,t,n){return e.check(ca,t,e.attempt(C5,t,n))}function P5(e){e.exit("gfmFootnoteDefinition")}function R5(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 L5(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&&Ln(b,b.length,0,ml(T,u.slice(h+1,f),c)),Ln(b,b.length,0,[["exit",E,c],["enter",u[f][1],c],["exit",u[f][1],c],["exit",m,c]]),Ln(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=Ks(h);if(_===126)return E>1?f(_):(u.consume(_),E++,T);if(E<2&&!n)return f(_);const C=u.exit("strikethroughSequenceTemporary"),I=Ks(_);return C._open=!I||I===2&&!!S,C._close=!S||S===2&&!!I,c(_)}}}class D5{constructor(){this.map=[]}add(t,n,r){M5(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 M5(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 F5(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 B5(){return{flow:{null:{name:"table",tokenize:U5,resolveAll:H5}}}}function U5(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):Re(H)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),T):n(H):Ge(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,Ge(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 Ge(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||Re(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 Ge(H)?Xe(e,G,"whitespace")(H):G(H)}function G(H){return H===124?_(H):H===null||Re(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||Re(H)?(e.exit("tableRow"),t(H)):Ge(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 H5(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 D5;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=Ml(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=Ml(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=Ml(b,t,a,o,n,E)):u[1]!==0&&(E=Ml(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=F5(t.events,n))}return e}function Ml(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},so(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const f=so(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=so(t.events,n[2]),m=so(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({},so(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function Eb(e,t,n,r,o){const a=[],u=so(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 so(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const z5={name:"tasklistCheck",tokenize:$5};function j5(){return{text:{91:z5}}}function $5(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 Re(f)?t(f):Ge(f)?e.check({tokenize:V5},t,n)(f):n(f)}}function V5(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function q5(e){return zE([g5(),A5(),L5(e),B5(),j5()])}const Y5={};function W5(e){const t=this,n=e||Y5,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(q5(n)),a.push(d5()),u.push(h5(n))}const Fl=()=>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"})})}),yb=({globalClassName:e,message:t})=>{const{isLoading:n,isResponseLoading:r}=qr(),o=n&&r((t==null?void 0:t.eventSourceId)||"")&&t.name==="partial_inquiry";return N.jsx(dR,{remarkPlugins:[W5],rehypePlugins:[B4],components:{h1:({children:a})=>N.jsx("h1",{className:oe(e,`${Z}-header h1`),children:a}),h2:({children:a})=>N.jsx("h2",{className:oe(e,`${Z}-header h2`),children:a}),h3:({children:a})=>N.jsx("h3",{className:oe(e,`${Z}-header h3`),children:a}),ul:({children:a})=>N.jsx("ul",{className:oe(e,`${Z}-ul`),children:a}),ol:({children:a})=>N.jsx("ol",{className:oe(e,`${Z}-ol`),children:a}),li:({children:a})=>N.jsx("li",{className:oe(e,`${Z}-li`),children:a}),a:({href:a,children:u})=>N.jsx("a",Te(U({className:oe(e,`${Z}-link`)},a?{href:a,target:"_blank"}:{}),{rel:"noopener noreferrer",children:u})),table:({children:a})=>N.jsx("table",{className:oe(e,`${Z}-table`),children:a}),thead:({children:a})=>N.jsx("thead",{className:oe(e,`${Z}-thead`),children:a}),tbody:({children:a})=>N.jsx("tbody",{className:oe(e,`${Z}-tbody`),children:a}),tr:({children:a})=>N.jsx("tr",{className:oe(e,`${Z}-tr`),children:a}),th:({children:a})=>N.jsx("th",{className:oe(e,`${Z}-th`),children:a}),td:({children:a})=>N.jsx("td",{className:oe(e,`${Z}-td`),children:a}),span:({className:a,children:u})=>a===`${Z}-blinking-cursor`?N.jsx(Fl,{}):N.jsx("span",{children:u})},children:t.message+(o?`<span className='${Z}-blinking-cursor'></span>`:"")})},G5=({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:oe(e,`${Z}-progress-message`,"standalone"),children:[N.jsx("span",{className:oe(e,`${Z}-message-icon`,"progress-icon","standalone"),children:N.jsx(Ug,{})}),N.jsx("p",{className:oe(e,`${Z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&N.jsxs(N.Fragment,{children:[N.jsx($f,{className:oe(e,`${Z}-thought-context-button`),onClick:c,children:n?N.jsxs(N.Fragment,{children:["Hide ",N.jsx(vA,{})]}):N.jsxs(N.Fragment,{children:["Context ",N.jsx(kA,{})]})}),n&&N.jsx("div",{className:oe(e,`${Z}-thought-container`),children:a&&N.jsx("p",{className:oe(e,`${Z}-progress-thought`),children:t.thought})})]})]})},K5=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?N.jsx(G5,{globalClassName:e,message:t}):N.jsxs("div",{className:oe(e,`${Z}-progress-message`,"embedded"),title:t.message,children:[N.jsx("span",{className:oe(e,`${Z}-message-icon`,"progress-icon","embedded"),children:N.jsx(Ug,{})}),N.jsx("i",{className:oe(e,`${Z}-progress-text`,"embedded"),children:t.message})]}),Q5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return N.jsxs("div",{className:oe(e,`${Z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&N.jsxs("div",{className:oe(e,`${Z}-refined-event-query`,{embedded:!n,standalone:n}),children:[N.jsx("span",{className:oe(e,`${Z}-message-icon`,`${Z}-refined-event-icon`,{embedded:!n,standalone:n}),children:N.jsx($u,{role:"img"})}),N.jsx("p",{className:oe(e,`${Z}-text`,"bold"),children:r})]}),N.jsx(yb,{message:t})]})},Tb=e=>{var f,h;const{configModule:t}=Tn(),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}},Bl=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>N.jsx("span",{className:oe(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:oe(e,`${Z}-facets`),children:[N.jsx("p",{className:oe(e,`${Z}-facet-category`),children:c}),N.jsx("p",{className:oe(e,`${Z}-facet-values`),children:f})]},c)})},X5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var a,u;const{facetFiltersList:r,filterCount:o}=Tb(t);return n?N.jsxs("div",{children:[N.jsxs("div",{className:oe(e,`${Z}-user-message standalone`),children:[N.jsx("span",{className:oe(e,`${Z}-message-icon user-message-icon standalone`),children:N.jsx(Hg,{})}),N.jsx("p",{className:oe(e,`${Z}-user-message-text`),children:(a=t.request)==null?void 0:a.userPrompt}),r.length>0&&N.jsx(Bl,{isWidgetStandalone:!0,globalClassName:e,filterCount:o})]}),N.jsx(bb,{globalClassName:e,facetFiltersList:r,message:t})]}):N.jsxs("div",{className:oe(e,`${Z}-user-message embedded`),children:[N.jsx("span",{className:oe(e,`${Z}-message-icon user-message-icon embedded`),children:N.jsx(Hg,{})}),N.jsx("p",{children:(u=t.request)==null?void 0:u.userPrompt}),r.length>0&&N.jsx(Bl,{isWidgetStandalone:!1,filterCount:o})]})},J5=({globalClassName:e,actionLabel:t,query:n,queryLabel:r,message:o,facetFiltersList:a,filterCount:u})=>N.jsxs("div",{className:oe(e,`${Z}-user-search standalone`),children:[N.jsxs("div",{className:oe(e,`${Z}-user-search-query`),children:[N.jsx("span",{className:oe(e,`${Z}-message-icon user-search-icon standalone`),children:N.jsx($u,{})}),N.jsx("p",{className:oe(e,`${Z}-text bold`),children:`${t}: ${r||n}`}),a.length>0&&N.jsx(Bl,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),N.jsx(bb,{globalClassName:e,facetFiltersList:a,message:o})]}),Z5=({globalClassName:e,message:t,isWidgetStandalone:n})=>{const{facetFiltersList:r,filterCount:o}=Tb(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(J5,{globalClassName:e,message:t,actionLabel:a,query:u,queryLabel:c,facetFiltersList:r,filterCount:o}):N.jsxs("div",{className:oe(e,`${Z}-user-search embedded`),children:[N.jsx("span",{className:oe(e,`${Z}-message-icon user-search-icon embedded`),children:N.jsx($u,{})}),N.jsx("p",{children:c||u}),r.length>0&&N.jsx(Bl,{isWidgetStandalone:!1,filterCount:o})]})},_b=["copilot_search","copilot_browse","product_view"],xb=({message:e,globalClassName:t,resetConversationMessage:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var u;if(!e)return null;let a=e.name;if(_b.includes(a)&&(e.isInitial||e.isUserAction)&&(a="faceted_navigation"),_b.includes(a)&&!((u=e.request)!=null&&u.userPrompt))return null;switch(a){case"copilot_search":case"copilot_browse":case"product_view":return N.jsx(X5,{globalClassName:t,isWidgetStandalone:r,message:e});case"faceted_navigation":return N.jsx(Z5,{globalClassName:t,message:e,isWidgetStandalone:r});case"refined_search":case"refined_browse":return N.jsx(Q5,{globalClassName:t,message:e,isWidgetStandalone:r});case"follow_up":return N.jsx(p3,{globalClassName:t,isWidgetStandalone:r,message:e,handleSuggestionClick:o});case"inquiry":case"partial_inquiry":return N.jsx(yb,{globalClassName:t,message:e});case"error":return N.jsx(f3,{message:e,isWidgetStandalone:r});case"display_products":return N.jsx(c3,{message:e,isWidgetStandalone:r});case"progress":return N.jsx(K5,{globalClassName:t,isWidgetStandalone:r,message:e});case"conversation_reset":return N.jsxs(N.Fragment,{children:[N.jsx("p",{className:oe(t,`${Z}-reset-message`),children:"This conversation has been reset."}),N.jsx("p",{className:oe(t,`${Z}-start-search-message`),children:n})]});default:return null}},Lh=({isWidgetStandalone:e,messages:t,handleSuggestionClick:n})=>{const{globalClassName:r,resetConversationMessage:o}=Tn();return t.map(a=>a.messages&&a.type==="group"?N.jsx("div",{className:oe(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(xb,{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:oe(r,`${Z}-message`,e?"standalone":"embedded",{error:a.message.name.includes("error")}),children:N.jsx(xb,{id:a.message.id,globalClassName:r,isWidgetStandalone:e,message:a.message,resetConversationMessage:o,handleSuggestionClick:n})},a.message.id):null)},Sb=()=>{const{globalClassName:e,themeVariables:t}=Tn(),{status:n}=Wo(),{copilot:r,messages:o,groupedMessages:a,isLoading:u,handleUserInput:c,handleSuggestion:f}=qr(),{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:oe(e,`${Z}-container`,`${Z}-embedded-chat`),style:t,children:[N.jsxs("div",{className:oe(e,`${Z}-message-container`,"embedded"),children:[N.jsx(Lh,{isWidgetStandalone:!1,messages:a,handleSuggestionClick:f}),u&&N.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:N.jsx(Fl,{})}),N.jsx("div",{ref:m})]}),N.jsx(Vf,{componentType:"chat",className:"embedded-chat",isLoading:u,onSubmit:c}),N.jsx("div",{className:oe(`${Z}-embedded-chat-menu`),children:N.jsx(a3,{componentType:"chat",children:N.jsx(cE,{componentType:"chat"})})})]}):N.jsx("div",{children:"Loading Copilot..."})},[e8,t8]=Ls({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),n8=e=>h1()(e,["lazyMount","unmountOnExit"]),[r8,Na]=Ls({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),wb=q.forwardRef((e,t)=>{const n=Na(),r=t8(),o=cd(Te(U({},r),{present:n.open})),a=ur(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:N.jsx(fi.div,Te(U({},a),{ref:Zu(o.ref,t)}))});wb.displayName="DialogBackdrop";const Dh=q.forwardRef((e,t)=>{const n=Na(),r=Xo(),o=ur(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:N.jsx(fi.div,Te(U({},o),{ref:Zu(r.ref,t)}))});Dh.displayName="DialogContent";const Mh=q.forwardRef((e,t)=>{const n=Na(),r=ur(n.getDescriptionProps(),e);return N.jsx(fi.div,Te(U({},r),{ref:t}))});Mh.displayName="DialogDescription";const Fh=q.forwardRef((e,t)=>{const n=Na(),r=ur(n.getPositionerProps(),e);return Xo().unmounted?null:N.jsx(fi.div,Te(U({},r),{ref:t}))});Fh.displayName="DialogPositioner";var i8=Ds("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),rs=i8.build(),Cb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Bh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},vb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Hh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},kb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Ul=e=>e.getById(Bh(e)),s8=e=>e.getById(Cb(e)),o8=e=>e.getById(Ab(e)),a8=e=>e.getById(vb(e)),u8=e=>e.getById(Uh(e)),l8=e=>e.getById(Hh(e)),c8=e=>e.getById(kb(e));function f8(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(Te(U({},rs.trigger.attrs),{dir:a("dir"),id:vb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":f,"data-state":f?"open":"closed","aria-controls":Bh(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(Te(U({},rs.backdrop.attrs),{dir:a("dir"),hidden:!f,id:Ab(u),"data-state":f?"open":"closed"}))},getPositionerProps(){return t.element(Te(U({},rs.positioner.attrs),{dir:a("dir"),id:Cb(u),style:{pointerEvents:f?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(Te(U({},rs.content.attrs),{dir:a("dir"),role:a("role"),hidden:!f,id:Bh(u),tabIndex:-1,"data-state":f?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:Uh(u),"aria-describedby":h.description?Hh(u):void 0}))},getTitleProps(){return t.element(Te(U({},rs.title.attrs),{dir:a("dir"),id:Uh(u)}))},getDescriptionProps(){return t.element(Te(U({},rs.description.attrs),{dir:a("dir"),id:Hh(u)}))},getCloseTriggerProps(){return t.button(Te(U({},rs.closeTrigger.attrs),{dir:a("dir"),id:kb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var d8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>c8(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(()=>Ul(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[a8(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(()=>Ul(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(()=>[Ul(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){bn(()=>{e.set("rendered",{title:!!u8(t),description:!!l8(t)})})},syncZIndex({scope:e}){bn(()=>{const t=Ul(e);if(!t)return;const n=Gu(t);[s8(e),o8(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})}}}};od()(["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 h8=e=>{const t=q.useId(),{getRootNode:n}=vd(),{dir:r}=iE(),o=U({id:t,getRootNode:n,dir:r},e),a=ad(d8,o);return f8(a,l1)},Nb=e=>{const[t,c]=p1(e),f=c,{children:n}=f,r=en(f,["children"]),[o]=n8(t),a=h8(r),u=cd(ur({present:a.open},t));return N.jsx(r8,{value:a,children:N.jsx(e8,{value:o,children:N.jsx(c1,{value:u,children:n})})})},zh=q.forwardRef((e,t)=>{const n=Na(),r=ur(n.getTitleProps(),e);return N.jsx(fi.h2,Te(U({},r),{ref:t}))});zh.displayName="DialogTitle";const Ob=e=>{var f;const{children:t,disabled:n}=e,[r,o]=q.useState((f=e.container)==null?void 0:f.current),a=q.useSyncExternalStore(m8,()=>!1,()=>!0),{getRootNode:u}=vd();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:p8(u);return N.jsx(N.Fragment,{children:q.Children.map(t,h=>Xu.createPortal(h,c))})},p8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Wi(n)?n:Cr(t).body},m8=()=>()=>{},g8=()=>{const{globalClassName:e}=Tn(),{dialogPosition:t}=Wo(),n=t==="bottom-left",r=()=>{ng(n?"bottom-right":"bottom-left")},o=n?i3:r3,a=n?"Move right":"Move left";return N.jsx(Ns,{className:oe(e,`${Z}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:N.jsx(o,{})})},Ib=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=Tn(),{mode:o,status:a,dialogPosition:u}=Wo(),{copilot:c,messages:f,groupedMessages:h,isLoading:m,handleUserInput:E,handleSuggestion:b}=qr(),T=q.useRef(null),{isOpen:_}=a||{},S=o==="standalone";q.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[f]);const C=()=>{Uu(!1)};return!_||h.length===0?null:c?N.jsx(Nb,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:N.jsx(Ob,{children:N.jsx(Fh,{className:oe(n,`${Z}-container`,`${Z}-dialog`,u),style:r,children:N.jsxs(Dh,{className:oe(n,`${Z}-dialog-content`,{standalone:S,embedded:!S}),children:[N.jsxs("div",{className:oe(n,`${Z}-dialog-header`,{standalone:S,embedded:!S}),children:[e&&N.jsx("img",{alt:"",role:"img",className:oe(n,`${Z}-dialog-logo`,{standalone:S,embedded:!S}),src:e}),N.jsx(zh,{className:oe(n,`${Z}-dialog-title`,{standalone:S,embedded:!S}),children:t}),N.jsxs("div",{className:oe(n,`${Z}-dialog-controls`),children:[N.jsx(cE,{componentType:"dialog",isIcon:!0}),N.jsx(g8,{}),N.jsx(lE,{componentType:"dialog"}),N.jsx(uE,{className:`dialog ${n}`,onClick:C})]})]}),N.jsxs(Mh,{className:oe(n,`${Z}-message-container`,{standalone:S,embedded:!S}),children:[N.jsx(Lh,{isWidgetStandalone:S,messages:h,handleSuggestionClick:b}),m&&N.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:N.jsx(Fl,{})}),N.jsx("div",{ref:T})]}),N.jsx(Vf,{componentType:"dialog",isLoading:m,onSubmit:E})]})})})}):N.jsx("div",{children:"Loading Copilot..."})},Pb=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=Tn(),{mode:o,status:a,isModalFullscreen:u,previousComponentType:c}=Wo(),{copilot:f,messages:h,groupedMessages:m,isLoading:E,handleUserInput:b,handleSuggestion:T}=qr(),_=q.useRef(null),{isOpen:S}=a||{},C=o==="standalone";q.useEffect(()=>{_.current&&_.current.scrollIntoView({behavior:"smooth",block:"end"})},[h]);const I=({open:W})=>{Uu(W)},F=()=>{tg(!u)},D=()=>{jf(c||"dialog")},G=()=>{Uu(!1)};return!S||m.length===0?null:f?N.jsx(Nb,{lazyMount:!0,open:S,onOpenChange:I,children:N.jsx(Ob,{children:N.jsxs("div",{className:oe(n,`${Z}-modal-container`),style:r,children:[N.jsx(wb,{className:oe(n,`${Z}-modal-backdrop`)}),N.jsx(Fh,{className:oe(n,`${Z}-container`,`${Z}-modal`,{fullscreen:u,standalone:C,embedded:!C}),children:N.jsxs(Dh,{className:oe(n,`${Z}-modal-content`,{standalone:C,embedded:!C}),children:[N.jsxs("div",{className:oe(n,`${Z}-modal-header`,{standalone:C,embedded:!C}),children:[e&&N.jsx("img",{alt:"",role:"img",className:oe(n,`${Z}-modal-logo`,{standalone:C,embedded:!C}),src:e}),N.jsx(zh,{className:oe(n,`${Z}-modal-title`,{standalone:C,embedded:!C}),children:t}),N.jsxs("div",{className:oe(n,`${Z}-modal-controls`),children:[N.jsx(Ns,{ariaLabel:"Toggle Fullscreen",className:oe(n,`${Z}-modal-fullscreen-button`),icon:u?N.jsx(NA,{}):N.jsx(OA,{}),onClick:F}),N.jsx(Ns,{ariaLabel:"Toggle Dialog",className:oe(n,`${Z}-modal-toggle-dialog-button`),onClick:D,icon:N.jsx(u3,{})}),N.jsx(lE,{componentType:"modal"}),N.jsx(uE,{className:`modal ${n}`,onClick:G})]})]}),N.jsxs(Mh,{className:oe(n,`${Z}-message-container`,{standalone:C,embedded:!C}),children:[N.jsx(Lh,{isWidgetStandalone:C,messages:m,handleSuggestionClick:T}),E&&N.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:N.jsx(Fl,{})}),N.jsx("div",{ref:_})]}),N.jsx(Vf,{componentType:"modal",isLoading:E,onSubmit:b})]})})]})})}):N.jsx("div",{children:"Loading Copilot..."})},E8=()=>{const e=Wo(),{status:{type:t}}=e||{status:{}};return t==="dialog"?N.jsx(Ib,{}):t==="modal"?N.jsx(Pb,{}):N.jsx(Sb,{})},jh=e=>N.jsx(Rg,Te(U({},e),{children:N.jsx(E8,{})}));var Hl={},Rb;function y8(){if(Rb)return Hl;Rb=1;var e=s1();return Hl.createRoot=e.createRoot,Hl.hydrateRoot=e.hydrateRoot,Hl}var Lb=y8();const T8=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=en(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&&(vs(!0,"log","Target element found, rendering Copilot Widget"),h.disconnect(),clearTimeout(a),(m=Lb.createRoot(b))==null||m.render(N.jsx(jh,U({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),vs(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},b8=r=>{var o=r,{timeout:e,elementId:t}=o,n=en(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){vs(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){vs(!0,"warn","Container element not found for id:",t),vs(!0,"warn","Beginning observation for element"),T8(U({elementId:t,timeout:e},n));return}Lb.createRoot(a).render(N.jsx(jh,U({},n)))},_8={search:rA,browse:WC,pdp:{setPdpContext:bg,updatePdpProductId:KC,updatePdpLink:QC},components:{toggleWidgetOpen:Uu,toggleModalFullscreen:tg,setWidgetType:jf,setWidgetDialogPosition:ng},session:XC},x8=()=>Object.freeze({search:Object.freeze(ht.state),browse:Object.freeze(ot.state),pdp:Object.freeze(or.state),isConnected:Ot.state.connected});Oe.CopilotDialog=Ib,Oe.CopilotEmbed=Sb,Oe.CopilotModal=Pb,Oe.CopilotWidget=jh,Oe.WidgetProvider=Rg,Oe.eventHandlers=_8,Oe.injectCopilotWidget=b8,Oe.state=x8,Oe.useCopilot=qr,Object.defineProperty(Oe,Symbol.toStringTag,{value:"Module"})});
|
|
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"})});
|