@cimulate/copilot-widget 0.17.0 → 0.17.1

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.
@@ -71,15 +71,6 @@ function ch(e) {
71
71
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
72
72
  }
73
73
  var Bf = { exports: {} }, ku = {}, Uf = { exports: {} }, $e = {};
74
- /**
75
- * @license React
76
- * react.production.min.js
77
- *
78
- * Copyright (c) Facebook, Inc. and its affiliates.
79
- *
80
- * This source code is licensed under the MIT license found in the
81
- * LICENSE file in the root directory of this source tree.
82
- */
83
74
  var Km;
84
75
  function rS() {
85
76
  if (Km) return $e;
@@ -279,15 +270,6 @@ var Qm;
279
270
  function fh() {
280
271
  return Qm || (Qm = 1, Uf.exports = rS()), Uf.exports;
281
272
  }
282
- /**
283
- * @license React
284
- * react-jsx-runtime.production.min.js
285
- *
286
- * Copyright (c) Facebook, Inc. and its affiliates.
287
- *
288
- * This source code is licensed under the MIT license found in the
289
- * LICENSE file in the root directory of this source tree.
290
- */
291
273
  var Xm;
292
274
  function iS() {
293
275
  if (Xm) return ku;
@@ -23970,15 +23952,6 @@ function c4(e) {
23970
23952
  });
23971
23953
  }
23972
23954
  var gd = { exports: {} }, sn = {}, Ed = { exports: {} }, yd = {};
23973
- /**
23974
- * @license React
23975
- * scheduler.production.min.js
23976
- *
23977
- * Copyright (c) Facebook, Inc. and its affiliates.
23978
- *
23979
- * This source code is licensed under the MIT license found in the
23980
- * LICENSE file in the root directory of this source tree.
23981
- */
23982
23955
  var W1;
23983
23956
  function f4() {
23984
23957
  return W1 || (W1 = 1, function(e) {
@@ -24183,15 +24156,6 @@ var G1;
24183
24156
  function d4() {
24184
24157
  return G1 || (G1 = 1, Ed.exports = f4()), Ed.exports;
24185
24158
  }
24186
- /**
24187
- * @license React
24188
- * react-dom.production.min.js
24189
- *
24190
- * Copyright (c) Facebook, Inc. and its affiliates.
24191
- *
24192
- * This source code is licensed under the MIT license found in the
24193
- * LICENSE file in the root directory of this source tree.
24194
- */
24195
24159
  var K1;
24196
24160
  function h4() {
24197
24161
  if (K1) return sn;
@@ -1,21 +1,5 @@
1
1
  (function(we,De){typeof exports=="object"&&typeof module!="undefined"?De(exports):typeof define=="function"&&define.amd?define(["exports"],De):(we=typeof globalThis!="undefined"?globalThis:we||self,De(we["cimulate-copilot-widget"]={}))})(this,function(we){"use strict";var G4=Object.defineProperty,K4=Object.defineProperties;var Q4=Object.getOwnPropertyDescriptors;var ic=Object.getOwnPropertySymbols;var l_=Object.prototype.hasOwnProperty,c_=Object.prototype.propertyIsEnumerable;var Ks=(we,De)=>(De=Symbol[we])?De:Symbol.for("Symbol."+we),X4=we=>{throw TypeError(we)},sc=Math.pow,gp=(we,De,We)=>De in we?G4(we,De,{enumerable:!0,configurable:!0,writable:!0,value:We}):we[De]=We,G=(we,De)=>{for(var We in De||(De={}))l_.call(De,We)&&gp(we,We,De[We]);if(ic)for(var We of ic(De))c_.call(De,We)&&gp(we,We,De[We]);return we},He=(we,De)=>K4(we,Q4(De));var nr=(we,De)=>{var We={};for(var rt in we)l_.call(we,rt)&&De.indexOf(rt)<0&&(We[rt]=we[rt]);if(we!=null&&ic)for(var rt of ic(we))De.indexOf(rt)<0&&c_.call(we,rt)&&(We[rt]=we[rt]);return We};var Me=(we,De,We)=>gp(we,typeof De!="symbol"?De+"":De,We);var jt=(we,De,We)=>new Promise((rt,Et)=>{var ct=Tt=>{try{Lt(We.next(Tt))}catch(un){Et(un)}},ve=Tt=>{try{Lt(We.throw(Tt))}catch(un){Et(un)}},Lt=Tt=>Tt.done?rt(Tt.value):Promise.resolve(Tt.value).then(ct,ve);Lt((We=We.apply(we,De)).next())}),Tr=function(we,De){this[0]=we,this[1]=De},oc=(we,De,We)=>{var rt=(ve,Lt,Tt,un)=>{try{var $i=We[ve](Lt),Qs=(Lt=$i.value)instanceof Tr,uc=$i.done;Promise.resolve(Qs?Lt[0]:Lt).then($n=>Qs?rt(ve==="return"?ve:"next",Lt[1]?{done:$n.done,value:$n.value}:$n,Tt,un):Tt({value:$n,done:uc})).catch($n=>rt("throw",$n,Tt,un))}catch($n){un($n)}},Et=ve=>ct[ve]=Lt=>new Promise((Tt,un)=>rt(ve,Lt,Tt,un)),ct={};return We=We.apply(we,De),ct[Ks("asyncIterator")]=()=>ct,Et("next"),Et("throw"),Et("return"),ct},Ep=we=>{var De=we[Ks("asyncIterator")],We=!1,rt,Et={};return De==null?(De=we[Ks("iterator")](),rt=ct=>Et[ct]=ve=>De[ct](ve)):(De=De.call(we),rt=ct=>Et[ct]=ve=>{if(We){if(We=!1,ct==="throw")throw ve;return ve}return We=!0,{done:!1,value:new Tr(new Promise(Lt=>{var Tt=De[ct](ve);Tt instanceof Object||X4("Object expected"),Lt(Tt)}),1)}}),Et[Ks("iterator")]=()=>Et,rt("next"),"throw"in De?rt("throw"):Et.throw=ct=>{throw ct},"return"in De&&rt("return"),Et},f_=(we,De,We)=>(De=we[Ks("asyncIterator")])?De.call(we):(we=we[Ks("iterator")](),De={},We=(rt,Et)=>(Et=we[rt])&&(De[rt]=ct=>new Promise((ve,Lt,Tt)=>(ct=Et.call(we,ct),Tt=ct.done,Promise.resolve(ct.value).then(un=>ve({value:un,done:Tt}),Lt)))),We("next"),We("return"),De);var De=document.createElement("style");De.textContent=`.cim-widget-button{padding:.5rem;background-color:var(--cim-widget-primary-color, #3182ce);border-radius:4px;border-color:var(--cim-widget-primary-color, #3182ce);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}}.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;background-color:transparent;border:1px solid transparent;border-radius:4px;padding:6px;cursor:pointer;color:#333;font-size:18px;&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-bar{display:flex;align-items:center;justify-content:space-between;padding:1px;border:1px solid var(--cim-widget-border-color);border-radius:4px;font-family:var(--cim-widget-font-family)}.cim-widget-search-input{width:100%;height:100%;margin-left:2px;background-color:transparent;border:none;outline:none}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media (max-width: 576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;border-radius:4px;border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media (max-width: 768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-search{display:flex;flex-direction:column}.cim-widget-refined-search-query{display:inline-flex;align-items:center;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.refined-search-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-user-message{display:flex;align-items:center}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;border-radius:8px;padding:.5rem 1rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:30%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-text{font-weight:700;margin-bottom:.5rem}.cim-widget-message-icon.user-message-icon{margin-right:.5rem}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex}.cim-widget-user-search.embedded{display:inline-flex;align-self:flex-end;border-radius:8px;padding:.5rem 1rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:30%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:1rem;margin-bottom:1rem;border-radius:8px;&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.cim-widget-embedded-chat{width:100%;height:100%;margin:0 auto;border-radius:8px;border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-left:1rem;padding-right:1rem}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;padding:1rem;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);font-size:.875rem;&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-right{bottom:.5rem;right:.5rem}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;width:100%;margin-bottom:.5rem;gap:8px}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0}@media (576px <= width <= 768px){.cim-widget-dialog{width:50%;border-radius:0}}@media (max-width: 576px){.cim-widget-dialog{height:100%;width:100%;border-radius:0;&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;padding:1rem;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;width:100%;margin-bottom:1rem;gap:8px}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0}@media (max-width: 576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:2rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1.5rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1.2rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;overflow-y:auto;padding:1rem 0}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}
2
- /*$vite$:1*/`,document.head.appendChild(De);function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},Et={},ct={exports:{}},ve={};/**
3
- * @license React
4
- * react.production.min.js
5
- *
6
- * Copyright (c) Facebook, Inc. and its affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var Lt;function Tt(){if(Lt)return ve;Lt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function b(O){return O===null||typeof O!="object"?null:(O=y&&O[y]||O["@@iterator"],typeof O=="function"?O:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function P(O,Y,x){this.props=O,this.context=Y,this.refs=k,this.updater=x||T}P.prototype.isReactComponent={},P.prototype.setState=function(O,Y){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,Y,"setState")},P.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function L(){}L.prototype=P.prototype;function H(O,Y,x){this.props=O,this.context=Y,this.refs=k,this.updater=x||T}var $=H.prototype=new L;$.constructor=H,S($,P.prototype),$.isPureReactComponent=!0;var Z=Array.isArray,he=Object.prototype.hasOwnProperty,M={current:null},Ee={key:!0,ref:!0,__self:!0,__source:!0};function ke(O,Y,x){var re,be={},ye=null,Ie=null;if(Y!=null)for(re in Y.ref!==void 0&&(Ie=Y.ref),Y.key!==void 0&&(ye=""+Y.key),Y)he.call(Y,re)&&!Ee.hasOwnProperty(re)&&(be[re]=Y[re]);var Fe=arguments.length-2;if(Fe===1)be.children=x;else if(1<Fe){for(var ze=Array(Fe),Ke=0;Ke<Fe;Ke++)ze[Ke]=arguments[Ke+2];be.children=ze}if(O&&O.defaultProps)for(re in Fe=O.defaultProps,Fe)be[re]===void 0&&(be[re]=Fe[re]);return{$$typeof:e,type:O,key:ye,ref:Ie,props:be,_owner:M.current}}function Ne(O,Y){return{$$typeof:e,type:O.type,key:Y,ref:O.ref,props:O.props,_owner:O._owner}}function U(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function ge(O){var Y={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(x){return Y[x]})}var me=/\/+/g;function pe(O,Y){return typeof O=="object"&&O!==null&&O.key!=null?ge(""+O.key):Y.toString(36)}function le(O,Y,x,re,be){var ye=typeof O;(ye==="undefined"||ye==="boolean")&&(O=null);var Ie=!1;if(O===null)Ie=!0;else switch(ye){case"string":case"number":Ie=!0;break;case"object":switch(O.$$typeof){case e:case t:Ie=!0}}if(Ie)return Ie=O,be=be(Ie),O=re===""?"."+pe(Ie,0):re,Z(be)?(x="",O!=null&&(x=O.replace(me,"$&/")+"/"),le(be,Y,x,"",function(Ke){return Ke})):be!=null&&(U(be)&&(be=Ne(be,x+(!be.key||Ie&&Ie.key===be.key?"":(""+be.key).replace(me,"$&/")+"/")+O)),Y.push(be)),1;if(Ie=0,re=re===""?".":re+":",Z(O))for(var Fe=0;Fe<O.length;Fe++){ye=O[Fe];var ze=re+pe(ye,Fe);Ie+=le(ye,Y,x,ze,be)}else if(ze=b(O),typeof ze=="function")for(O=ze.call(O),Fe=0;!(ye=O.next()).done;)ye=ye.value,ze=re+pe(ye,Fe++),Ie+=le(ye,Y,x,ze,be);else if(ye==="object")throw Y=String(O),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Ie}function _e(O,Y,x){if(O==null)return O;var re=[],be=0;return le(O,re,"","",function(ye){return Y.call(x,ye,be++)}),re}function Pe(O){if(O._status===-1){var Y=O._result;Y=Y(),Y.then(function(x){(O._status===0||O._status===-1)&&(O._status=1,O._result=x)},function(x){(O._status===0||O._status===-1)&&(O._status=2,O._result=x)}),O._status===-1&&(O._status=0,O._result=Y)}if(O._status===1)return O._result.default;throw O._result}var ce={current:null},V={transition:null},ne={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:V,ReactCurrentOwner:M};function C(){throw Error("act(...) is not supported in production builds of React.")}return ve.Children={map:_e,forEach:function(O,Y,x){_e(O,function(){Y.apply(this,arguments)},x)},count:function(O){var Y=0;return _e(O,function(){Y++}),Y},toArray:function(O){return _e(O,function(Y){return Y})||[]},only:function(O){if(!U(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},ve.Component=P,ve.Fragment=n,ve.Profiler=o,ve.PureComponent=H,ve.StrictMode=r,ve.Suspense=d,ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,ve.act=C,ve.cloneElement=function(O,Y,x){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var re=S({},O.props),be=O.key,ye=O.ref,Ie=O._owner;if(Y!=null){if(Y.ref!==void 0&&(ye=Y.ref,Ie=M.current),Y.key!==void 0&&(be=""+Y.key),O.type&&O.type.defaultProps)var Fe=O.type.defaultProps;for(ze in Y)he.call(Y,ze)&&!Ee.hasOwnProperty(ze)&&(re[ze]=Y[ze]===void 0&&Fe!==void 0?Fe[ze]:Y[ze])}var ze=arguments.length-2;if(ze===1)re.children=x;else if(1<ze){Fe=Array(ze);for(var Ke=0;Ke<ze;Ke++)Fe[Ke]=arguments[Ke+2];re.children=Fe}return{$$typeof:e,type:O.type,key:be,ref:ye,props:re,_owner:Ie}},ve.createContext=function(O){return O={$$typeof:l,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:u,_context:O},O.Consumer=O},ve.createElement=ke,ve.createFactory=function(O){var Y=ke.bind(null,O);return Y.type=O,Y},ve.createRef=function(){return{current:null}},ve.forwardRef=function(O){return{$$typeof:c,render:O}},ve.isValidElement=U,ve.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:Pe}},ve.memo=function(O,Y){return{$$typeof:h,type:O,compare:Y===void 0?null:Y}},ve.startTransition=function(O){var Y=V.transition;V.transition={};try{O()}finally{V.transition=Y}},ve.unstable_act=C,ve.useCallback=function(O,Y){return ce.current.useCallback(O,Y)},ve.useContext=function(O){return ce.current.useContext(O)},ve.useDebugValue=function(){},ve.useDeferredValue=function(O){return ce.current.useDeferredValue(O)},ve.useEffect=function(O,Y){return ce.current.useEffect(O,Y)},ve.useId=function(){return ce.current.useId()},ve.useImperativeHandle=function(O,Y,x){return ce.current.useImperativeHandle(O,Y,x)},ve.useInsertionEffect=function(O,Y){return ce.current.useInsertionEffect(O,Y)},ve.useLayoutEffect=function(O,Y){return ce.current.useLayoutEffect(O,Y)},ve.useMemo=function(O,Y){return ce.current.useMemo(O,Y)},ve.useReducer=function(O,Y,x){return ce.current.useReducer(O,Y,x)},ve.useRef=function(O){return ce.current.useRef(O)},ve.useState=function(O){return ce.current.useState(O)},ve.useSyncExternalStore=function(O,Y,x){return ce.current.useSyncExternalStore(O,Y,x)},ve.useTransition=function(){return ce.current.useTransition()},ve.version="18.3.1",ve}var un;function $i(){return un||(un=1,ct.exports=Tt()),ct.exports}/**
11
- * @license React
12
- * react-jsx-runtime.production.min.js
13
- *
14
- * Copyright (c) Facebook, Inc. and its affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var Qs;function uc(){if(Qs)return Et;Qs=1;var e=$i(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function l(c,d,h){var g,y={},b=null,T=null;h!==void 0&&(b=""+h),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(T=d.ref);for(g in d)r.call(d,g)&&!u.hasOwnProperty(g)&&(y[g]=d[g]);if(c&&c.defaultProps)for(g in d=c.defaultProps,d)y[g]===void 0&&(y[g]=d[g]);return{$$typeof:t,type:c,key:b,ref:T,props:y,_owner:o.current}}return Et.Fragment=n,Et.jsx=l,Et.jsxs=l,Et}var $n;function h_(){return $n||($n=1,rt.exports=uc()),rt.exports}var I=h_();const rr=Object.create(null);rr.open="0",rr.close="1",rr.ping="2",rr.pong="3",rr.message="4",rr.upgrade="5",rr.noop="6";const Ou=Object.create(null);Object.keys(rr).forEach(e=>{Ou[rr[e]]=e});const ac={type:"error",data:"parser error"},yp=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Tp=typeof ArrayBuffer=="function",bp=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,lc=({type:e,data:t},n,r)=>yp&&t instanceof Blob?n?r(t):_p(t,r):Tp&&(t instanceof ArrayBuffer||bp(t))?n?r(t):_p(new Blob([t]),r):r(rr[e]+(t||"")),_p=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Sp(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let cc;function p_(e,t){if(yp&&e.data instanceof Blob)return e.data.arrayBuffer().then(Sp).then(t);if(Tp&&(e.data instanceof ArrayBuffer||bp(e.data)))return t(Sp(e.data));lc(e,!1,n=>{cc||(cc=new TextEncoder),t(cc.encode(n))})}const xp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xs=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<xp.length;e++)Xs[xp.charCodeAt(e)]=e;const m_=e=>{let t=e.length*.75,n=e.length,r,o=0,u,l,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),g=new Uint8Array(h);for(r=0;r<n;r+=4)u=Xs[e.charCodeAt(r)],l=Xs[e.charCodeAt(r+1)],c=Xs[e.charCodeAt(r+2)],d=Xs[e.charCodeAt(r+3)],g[o++]=u<<2|l>>4,g[o++]=(l&15)<<4|c>>2,g[o++]=(c&3)<<6|d&63;return h},g_=typeof ArrayBuffer=="function",fc=(e,t)=>{if(typeof e!="string")return{type:"message",data:Cp(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:E_(e.substring(1),t)}:Ou[n]?e.length>1?{type:Ou[n],data:e.substring(1)}:{type:Ou[n]}:ac},E_=(e,t)=>{if(g_){const n=m_(e);return Cp(n,t)}else return{base64:!0,data:e}},Cp=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Ap="",y_=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((u,l)=>{lc(u,!1,c=>{r[l]=c,++o===n&&t(r.join(Ap))})})},T_=(e,t)=>{const n=e.split(Ap),r=[];for(let o=0;o<n.length;o++){const u=fc(n[o],t);if(r.push(u),u.type==="error")break}return r};function b_(){return new TransformStream({transform(e,t){p_(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const u=new DataView(o.buffer);u.setUint8(0,126),u.setUint16(1,r)}else{o=new Uint8Array(9);const u=new DataView(o.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let dc;function Pu(e){return e.reduce((t,n)=>t+n.length,0)}function Ru(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function __(e,t){dc||(dc=new TextDecoder);const n=[];let r=0,o=-1,u=!1;return new TransformStream({transform(l,c){for(n.push(l);;){if(r===0){if(Pu(n)<1)break;const d=Ru(n,1);u=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(Pu(n)<2)break;const d=Ru(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Pu(n)<8)break;const d=Ru(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),g=h.getUint32(0);if(g>Math.pow(2,21)-1){c.enqueue(ac);break}o=g*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Pu(n)<o)break;const d=Ru(n,o);c.enqueue(fc(u?d:dc.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(ac);break}}}})}const kp=4;function wt(e){if(e)return S_(e)}function S_(e){for(var t in wt.prototype)e[t]=wt.prototype[t];return e}wt.prototype.on=wt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},wt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},wt.prototype.off=wt.prototype.removeListener=wt.prototype.removeAllListeners=wt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},wt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},wt.prototype.emitReserved=wt.prototype.emit,wt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},wt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Lu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),On=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),x_="arraybuffer";function J4(){}function wp(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const C_=On.setTimeout,A_=On.clearTimeout;function Du(e,t){t.useNativeTimers?(e.setTimeoutFn=C_.bind(On),e.clearTimeoutFn=A_.bind(On)):(e.setTimeoutFn=On.setTimeout.bind(On),e.clearTimeoutFn=On.clearTimeout.bind(On))}const k_=1.33;function w_(e){return typeof e=="string"?v_(e):Math.ceil((e.byteLength||e.size)*k_)}function v_(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function vp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function N_(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function I_(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let u=n[r].split("=");t[decodeURIComponent(u[0])]=decodeURIComponent(u[1])}return t}class O_ extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class hc extends wt{constructor(t){super(),this.writable=!1,Du(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new O_(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fc(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=N_(t);return n.length?"?"+n:""}}class P_ extends hc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};T_(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,y_(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=vp()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Np=!1;try{Np=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const R_=Np;function L_(){}class D_ extends P_{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,u)=>{this.onError("xhr post error",o,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class ir extends wt{constructor(t,n,r){super(),this.createRequest=t,Du(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=wp(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=ir.requestsCount++,ir.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=L_,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete ir.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(ir.requestsCount=0,ir.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Ip);else if(typeof addEventListener=="function"){const e="onpagehide"in On?"pagehide":"unload";addEventListener(e,Ip,!1)}}function Ip(){for(let e in ir.requests)ir.requests.hasOwnProperty(e)&&ir.requests[e].abort()}const M_=function(){const e=Op({xdomain:!1});return e&&e.responseType!==null}();class F_ extends D_{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=M_&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ir(Op,this.uri(),t)}}function Op(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||R_))return new XMLHttpRequest}catch(n){}if(!t)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Pp=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class B_ extends hc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Pp?{}:wp(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;lc(r,this.supportsBinary,u=>{try{this.doWrite(r,u)}catch(l){}o&&Lu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=vp()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const pc=On.WebSocket||On.MozWebSocket;class U_ extends B_{createSocket(t,n,r){return Pp?new pc(t,n,r):n?new pc(t,n):new pc(t)}doWrite(t,n){this.ws.send(n)}}class H_ extends hc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=__(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=b_();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const u=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),u())}).catch(c=>{})};u();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Lu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const z_={websocket:U_,webtransport:H_,polling:F_},j_=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$_=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mc(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=j_.exec(e||""),u={},l=14;for(;l--;)u[$_[l]]=o[l]||"";return n!=-1&&r!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=V_(u,u.path),u.queryKey=q_(u,u.query),u}function V_(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function q_(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,u){o&&(n[o]=u)}),n}const gc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Mu=[];gc&&addEventListener("offline",()=>{Mu.forEach(e=>e())},!1);class Fr extends wt{constructor(t,n){if(super(),this.binaryType=x_,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=mc(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=mc(n.host).host);Du(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=I_(this.opts.query)),gc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Mu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=kp,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Fr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Fr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=w_(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Lu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const u={type:t,data:n,options:r};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Fr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),gc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Mu.indexOf(this._offlineEventListener);r!==-1&&Mu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Fr.protocol=kp;class Y_ extends Fr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Fr.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!r)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(g(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function u(){r||(r=!0,g(),n.close(),n=null)}const l=y=>{const b=new Error("probe error: "+y);b.transport=n.name,u(),this.emitReserved("upgradeError",b)};function c(){l("transport closed")}function d(){l("socket closed")}function h(y){n&&y.name!==n.name&&u()}const g=()=>{n.removeListener("open",o),n.removeListener("error",l),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",o),n.once("error",l),n.once("close",c),this.once("close",d),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let W_=class extends Y_{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>z_[o]).filter(o=>!!o)),super(t,r)}};function G_(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=mc(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const u=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+u+":"+r.port+t,r.href=r.protocol+"://"+u+(n&&n.port===r.port?"":":"+r.port),r}const K_=typeof ArrayBuffer=="function",Q_=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Rp=Object.prototype.toString,X_=typeof Blob=="function"||typeof Blob!="undefined"&&Rp.call(Blob)==="[object BlobConstructor]",J_=typeof File=="function"||typeof File!="undefined"&&Rp.call(File)==="[object FileConstructor]";function Ec(e){return K_&&(e instanceof ArrayBuffer||Q_(e))||X_&&e instanceof Blob||J_&&e instanceof File}function Fu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Fu(e[n]))return!0;return!1}if(Ec(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Fu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Fu(e[n]))return!0;return!1}function Z_(e){const t=[],n=e.data,r=e;return r.data=yc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function yc(e,t){if(!e)return e;if(Ec(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=yc(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=yc(e[r],t));return n}return e}function e2(e,t){return e.data=Tc(e.data,t),delete e.attachments,e}function Tc(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Tc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Tc(e[n],t));return e}const t2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],n2=5;var Qe;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Qe||(Qe={}));class r2{constructor(t){this.replacer=t}encode(t){return(t.type===Qe.EVENT||t.type===Qe.ACK)&&Fu(t)?this.encodeAsBinary({type:t.type===Qe.EVENT?Qe.BINARY_EVENT:Qe.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Qe.BINARY_EVENT||t.type===Qe.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Z_(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Lp(e){return Object.prototype.toString.call(e)==="[object Object]"}class bc extends wt{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Qe.BINARY_EVENT;r||n.type===Qe.BINARY_ACK?(n.type=r?Qe.EVENT:Qe.ACK,this.reconstructor=new i2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ec(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Qe[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Qe.BINARY_EVENT||r.type===Qe.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(u,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(l)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(bc.isPayloadValid(r.type,u))r.data=u;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Qe.CONNECT:return Lp(n);case Qe.DISCONNECT:return n===void 0;case Qe.CONNECT_ERROR:return typeof n=="string"||Lp(n);case Qe.EVENT:case Qe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&t2.indexOf(n[0])===-1);case Qe.ACK:case Qe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class i2{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=e2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const s2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:bc,Encoder:r2,get PacketType(){return Qe},protocol:n2},Symbol.toStringTag,{value:"Module"}));function Vn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const o2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Dp extends wt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Vn(t,"open",this.onopen.bind(this)),Vn(t,"packet",this.onpacket.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,u;if(o2.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const l={type:Qe.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,y=n.pop();this._registerAckCallback(g,y),l.id=g}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),l=(...c)=>{this.io.clearTimeoutFn(u),n.apply(this,c)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...n){return new Promise((r,o)=>{const u=(l,c)=>l?o(l):r(c);u.withError=!0,n.push(u),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...u)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...u)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Qe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Qe.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Qe.EVENT:case Qe.BINARY_EVENT:this.onevent(t);break;case Qe.ACK:case Qe.BINARY_ACK:this.onack(t);break;case Qe.DISCONNECT:this.ondisconnect();break;case Qe.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:Qe.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Qe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Vi(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Vi.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},Vi.prototype.reset=function(){this.attempts=0},Vi.prototype.setMin=function(e){this.ms=e},Vi.prototype.setMax=function(e){this.max=e},Vi.prototype.setJitter=function(e){this.jitter=e};class _c extends wt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Du(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Vi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||s2;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new W_(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Vn(n,"open",function(){r.onopen(),t&&t()}),u=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},l=Vn(n,"error",u);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),u(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Vn(t,"ping",this.onping.bind(this)),Vn(t,"data",this.ondata.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(t,"close",this.onclose.bind(this)),Vn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Lu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Dp(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Js={};function Bu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=G_(e,t.path||"/socket.io"),r=n.source,o=n.id,u=n.path,l=Js[o]&&u in Js[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let d;return c?d=new _c(r,t):(Js[o]||(Js[o]=new _c(r,t)),d=Js[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Bu,{Manager:_c,Socket:Dp,io:Bu,connect:Bu});var u2=function(e){return function(t){return!!t&&typeof t=="object"}(e)&&!function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||function(r){return r.$$typeof===a2}(t)}(e)},a2=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Zs(e,t){return t.clone!==!1&&t.isMergeableObject(e)?qi((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function l2(e,t,n){return e.concat(t).map(function(r){return Zs(r,n)})}function Mp(e){return Object.keys(e).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(n){return Object.propertyIsEnumerable.call(t,n)}):[]}(e))}function Fp(e,t){try{return t in e}catch(n){return!1}}function c2(e,t,n){var r={};return n.isMergeableObject(e)&&Mp(e).forEach(function(o){r[o]=Zs(e[o],n)}),Mp(t).forEach(function(o){(function(u,l){return Fp(u,l)&&!(Object.hasOwnProperty.call(u,l)&&Object.propertyIsEnumerable.call(u,l))})(e,o)||(Fp(e,o)&&n.isMergeableObject(t[o])?r[o]=function(u,l){if(!l.customMerge)return qi;var c=l.customMerge(u);return typeof c=="function"?c:qi}(o,n)(e[o],t[o],n):r[o]=Zs(t[o],n))}),r}function qi(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||l2,n.isMergeableObject=n.isMergeableObject||u2,n.cloneUnlessOtherwiseSpecified=Zs;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):c2(e,t,n):Zs(t,n)}qi.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,r){return qi(n,r,t)},{})};var f2=qi;class d2{constructor(t){Object.assign(this,t)}}function nn(e){if(e)return function(t){for(var n in nn.prototype)t[n]=nn.prototype[n];return t}(e)}nn.prototype.on=nn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},nn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},nn.prototype.off=nn.prototype.removeListener=nn.prototype.removeAllListeners=nn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},nn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},nn.prototype.emitReserved=nn.prototype.emit,nn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},nn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const h2=typeof ArrayBuffer=="function",Bp=Object.prototype.toString,p2=typeof Blob=="function"||typeof Blob!="undefined"&&Bp.call(Blob)==="[object BlobConstructor]",m2=typeof File=="function"||typeof File!="undefined"&&Bp.call(File)==="[object FileConstructor]";function Sc(e){return h2&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||p2&&e instanceof Blob||m2&&e instanceof File}function Uu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Uu(e[n]))return!0;return!1}if(Sc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Uu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Uu(e[n]))return!0;return!1}function g2(e){const t=[],n=e.data,r=e;return r.data=xc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function xc(e,t){if(!e)return e;if(Sc(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=xc(e[r],t);return n}if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=xc(e[r],t));return n}return e}function E2(e,t){return e.data=Cc(e.data,t),delete e.attachments,e}function Cc(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Cc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Cc(e[n],t));return e}const y2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ht;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ht||(ht={}));class T2{constructor(t){this.replacer=t}encode(t){return t.type!==ht.EVENT&&t.type!==ht.ACK||!Uu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===ht.EVENT?ht.BINARY_EVENT:ht.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==ht.BINARY_EVENT&&t.type!==ht.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=g2(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Up(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ac extends nn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===ht.BINARY_EVENT;r||n.type===ht.BINARY_ACK?(n.type=r?ht.EVENT:ht.ACK,this.reconstructor=new b2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Sc(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(ht[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ht.BINARY_EVENT||r.type===ht.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(u,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(l)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(!Ac.isPayloadValid(r.type,u))throw new Error("invalid payload");r.data=u}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case ht.CONNECT:return Up(n);case ht.DISCONNECT:return n===void 0;case ht.CONNECT_ERROR:return typeof n=="string"||Up(n);case ht.EVENT:case ht.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&y2.indexOf(n[0])===-1);case ht.ACK:case ht.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class b2{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=E2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Hp=["searchParams.facetFilters","hits","products"],zp=(e,t,n)=>function r(o,u=[]){const l=Object.entries(o).map(([c,d])=>{const h=[...u,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(h.join(".")))?r(d,h):d]});return Array.isArray(o)?l.map(c=>c[1]):Object.fromEntries(l)},jp=e=>e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),_2=zp(e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),e=>e,Hp),S2=zp(jp,jp,Hp),x2={Encoder:class extends T2{encode(e){var t,n;return super.encode(He(G({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],_2(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends Ac{constructor(){super((e,t)=>e==""&&Array.isArray(t)?t.map(n=>n instanceof Object?S2(n):n):t)}}},C2={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class A2{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:u={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=h=>{console.log("[Copilot SDK] Connect Ack:",h),this.socket.auth={[this.sessionIdKey]:h.sessionId}},this.handleDisconnect=h=>{console.warn(`[Copilot SDK] Disconnected: ${h}`),h!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${h}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=h=>{console.error(`[Copilot SDK] Connect error: ${h.message}`);const g=h.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=g==null?void 0:g[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const l=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const d=[C2,u,{parser:x2,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Bu(l,f2.all(d))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*sc(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout(()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())},t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return jt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return jt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return jt(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return jt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}requestSessionInformation(t){return jt(this,null,function*(){return new Promise(n=>{this.socket.emit("session_info",r=>{t&&t(r),n(r)})})})}getConversationEvents(t,n){return jt(this,null,function*(){return new Promise(r=>{this.socket.emit("conversation_events",t,o=>{n&&n(o),r(o)})})})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return jt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const u=function(l){return oc(this,null,function*(){const c=[];let d=!1,h=null;const g=yield new Tr(l({emit:y=>{c.push(y),h&&(h(),h=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Tr(new Promise(y=>{h=y}));for(;c.length>0;)yield c.shift()}finally{yield new Tr(g==null?void 0:g())}})}(({emit:l,cancel:c})=>{const d=(h,g)=>{["done","error"].includes(g.name)&&c(),g.eventSourceId==o&&l(g)};return this.socket.onAny(d),()=>jt(this,null,function*(){this.socket.offAny(d)})});return{result:yield new Promise((l,c)=>this.socket.emit(t,n,d=>{d.name==="error"?c(new d2(d)):(o=d==null?void 0:d.id,l(d))})),events:u}})}}var K=$i();const di=We(K);function $p(e,t){return function(){return e.apply(t,arguments)}}const{toString:k2}=Object.prototype,{getPrototypeOf:kc}=Object,{iterator:Hu,toStringTag:Vp}=Symbol,zu=(e=>t=>{const n=k2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),t=>zu(t)===e),ju=e=>t=>typeof t===e,{isArray:Yi}=Array,Wi=ju("undefined");function eo(e){return e!==null&&!Wi(e)&&e.constructor!==null&&!Wi(e.constructor)&&an(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qp=qn("ArrayBuffer");function w2(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qp(e.buffer),t}const v2=ju("string"),an=ju("function"),Yp=ju("number"),to=e=>e!==null&&typeof e=="object",N2=e=>e===!0||e===!1,$u=e=>{if(zu(e)!=="object")return!1;const t=kc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Vp in e)&&!(Hu in e)},I2=e=>{if(!to(e)||eo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},O2=qn("Date"),P2=qn("File"),R2=qn("Blob"),L2=qn("FileList"),D2=e=>to(e)&&an(e.pipe),M2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||an(e.append)&&((t=zu(e))==="formdata"||t==="object"&&an(e.toString)&&e.toString()==="[object FormData]"))},F2=qn("URLSearchParams"),[B2,U2,H2,z2]=["ReadableStream","Request","Response","Headers"].map(qn),j2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function no(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Yi(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(eo(e))return;const u=n?Object.getOwnPropertyNames(e):Object.keys(e),l=u.length;let c;for(r=0;r<l;r++)c=u[r],t.call(null,e[c],c,e)}}function Wp(e,t){if(eo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const hi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Gp=e=>!Wi(e)&&e!==hi;function wc(){const{caseless:e,skipUndefined:t}=Gp(this)&&this||{},n={},r=(o,u)=>{const l=e&&Wp(n,u)||u;$u(n[l])&&$u(o)?n[l]=wc(n[l],o):$u(o)?n[l]=wc({},o):Yi(o)?n[l]=o.slice():(!t||!Wi(o))&&(n[l]=o)};for(let o=0,u=arguments.length;o<u;o++)arguments[o]&&no(arguments[o],r);return n}const $2=(e,t,n,{allOwnKeys:r}={})=>(no(t,(o,u)=>{n&&an(o)?e[u]=$p(o,n):e[u]=o},{allOwnKeys:r}),e),V2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),q2=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Y2=(e,t,n,r)=>{let o,u,l;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),u=o.length;u-- >0;)l=o[u],(!r||r(l,e,t))&&!c[l]&&(t[l]=e[l],c[l]=!0);e=n!==!1&&kc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},W2=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},G2=e=>{if(!e)return null;if(Yi(e))return e;let t=e.length;if(!Yp(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},K2=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&kc(Uint8Array)),Q2=(e,t)=>{const r=(e&&e[Hu]).call(e);let o;for(;(o=r.next())&&!o.done;){const u=o.value;t.call(e,u[0],u[1])}},X2=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},J2=qn("HTMLFormElement"),Z2=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Kp=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),eS=qn("RegExp"),Qp=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};no(n,(o,u)=>{let l;(l=t(o,u,e))!==!1&&(r[u]=l||o)}),Object.defineProperties(e,r)},tS=e=>{Qp(e,(t,n)=>{if(an(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(an(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nS=(e,t)=>{const n={},r=o=>{o.forEach(u=>{n[u]=!0})};return Yi(e)?r(e):r(String(e).split(t)),n},rS=()=>{},iS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function sS(e){return!!(e&&an(e.append)&&e[Vp]==="FormData"&&e[Hu])}const oS=e=>{const t=new Array(10),n=(r,o)=>{if(to(r)){if(t.indexOf(r)>=0)return;if(eo(r))return r;if(!("toJSON"in r)){t[o]=r;const u=Yi(r)?[]:{};return no(r,(l,c)=>{const d=n(l,o+1);!Wi(d)&&(u[c]=d)}),t[o]=void 0,u}}return r};return n(e,0)},uS=qn("AsyncFunction"),aS=e=>e&&(to(e)||an(e))&&an(e.then)&&an(e.catch),Xp=((e,t)=>e?setImmediate:t?((n,r)=>(hi.addEventListener("message",({source:o,data:u})=>{o===hi&&u===n&&r.length&&r.shift()()},!1),o=>{r.push(o),hi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",an(hi.postMessage)),lS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(hi):typeof process!="undefined"&&process.nextTick||Xp,q={isArray:Yi,isArrayBuffer:qp,isBuffer:eo,isFormData:M2,isArrayBufferView:w2,isString:v2,isNumber:Yp,isBoolean:N2,isObject:to,isPlainObject:$u,isEmptyObject:I2,isReadableStream:B2,isRequest:U2,isResponse:H2,isHeaders:z2,isUndefined:Wi,isDate:O2,isFile:P2,isBlob:R2,isRegExp:eS,isFunction:an,isStream:D2,isURLSearchParams:F2,isTypedArray:K2,isFileList:L2,forEach:no,merge:wc,extend:$2,trim:j2,stripBOM:V2,inherits:q2,toFlatObject:Y2,kindOf:zu,kindOfTest:qn,endsWith:W2,toArray:G2,forEachEntry:Q2,matchAll:X2,isHTMLForm:J2,hasOwnProperty:Kp,hasOwnProp:Kp,reduceDescriptors:Qp,freezeMethods:tS,toObjectSet:nS,toCamelCase:Z2,noop:rS,toFiniteNumber:iS,findKey:Wp,global:hi,isContextDefined:Gp,isSpecCompliantForm:sS,toJSONObject:oS,isAsyncFn:uS,isThenable:aS,setImmediate:Xp,asap:lS,isIterable:e=>e!=null&&an(e[Hu])};function je(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}q.inherits(je,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const Jp=je.prototype,Zp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Zp[e]={value:e}}),Object.defineProperties(je,Zp),Object.defineProperty(Jp,"isAxiosError",{value:!0}),je.from=(e,t,n,r,o,u)=>{const l=Object.create(Jp);q.toFlatObject(e,l,function(g){return g!==Error.prototype},h=>h!=="isAxiosError");const c=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return je.call(l,c,d,n,r,o),e&&l.cause==null&&Object.defineProperty(l,"cause",{value:e,configurable:!0}),l.name=e&&e.name||"Error",u&&Object.assign(l,u),l};const cS=null;function vc(e){return q.isPlainObject(e)||q.isArray(e)}function em(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function tm(e,t,n){return e?e.concat(t).map(function(o,u){return o=em(o),!n&&u?"["+o+"]":o}).join(n?".":""):t}function fS(e){return q.isArray(e)&&!e.some(vc)}const dS=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Vu(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,P){return!q.isUndefined(P[k])});const r=n.metaTokens,o=n.visitor||g,u=n.dots,l=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function h(S){if(S===null)return"";if(q.isDate(S))return S.toISOString();if(q.isBoolean(S))return S.toString();if(!d&&q.isBlob(S))throw new je("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(S)||q.isTypedArray(S)?d&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,k,P){let L=S;if(S&&!P&&typeof S=="object"){if(q.endsWith(k,"{}"))k=r?k:k.slice(0,-2),S=JSON.stringify(S);else if(q.isArray(S)&&fS(S)||(q.isFileList(S)||q.endsWith(k,"[]"))&&(L=q.toArray(S)))return k=em(k),L.forEach(function($,Z){!(q.isUndefined($)||$===null)&&t.append(l===!0?tm([k],Z,u):l===null?k:k+"[]",h($))}),!1}return vc(S)?!0:(t.append(tm(P,k,u),h(S)),!1)}const y=[],b=Object.assign(dS,{defaultVisitor:g,convertValue:h,isVisitable:vc});function T(S,k){if(!q.isUndefined(S)){if(y.indexOf(S)!==-1)throw Error("Circular reference detected in "+k.join("."));y.push(S),q.forEach(S,function(L,H){(!(q.isUndefined(L)||L===null)&&o.call(t,L,q.isString(H)?H.trim():H,k,b))===!0&&T(L,k?k.concat(H):[H])}),y.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return T(e),t}function nm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Nc(e,t){this._pairs=[],e&&Vu(e,this,t)}const rm=Nc.prototype;rm.append=function(t,n){this._pairs.push([t,n])},rm.toString=function(t){const n=t?function(r){return t.call(this,r,nm)}:nm;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function hS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function im(e,t,n){if(!t)return e;const r=n&&n.encode||hS;q.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let u;if(o?u=o(t,n):u=q.isURLSearchParams(t)?t.toString():new Nc(t,n).toString(r),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class sm{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const om={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pS={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Nc,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ic=typeof window!="undefined"&&typeof document!="undefined",Oc=typeof navigator=="object"&&navigator||void 0,mS=Ic&&(!Oc||["ReactNative","NativeScript","NS"].indexOf(Oc.product)<0),gS=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ES=Ic&&window.location.href||"http://localhost",Gt=G(G({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ic,hasStandardBrowserEnv:mS,hasStandardBrowserWebWorkerEnv:gS,navigator:Oc,origin:ES},Symbol.toStringTag,{value:"Module"}))),pS);function yS(e,t){return Vu(e,new Gt.classes.URLSearchParams,G({visitor:function(n,r,o,u){return Gt.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},t))}function TS(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function bS(e){const t={},n=Object.keys(e);let r;const o=n.length;let u;for(r=0;r<o;r++)u=n[r],t[u]=e[u];return t}function um(e){function t(n,r,o,u){let l=n[u++];if(l==="__proto__")return!0;const c=Number.isFinite(+l),d=u>=n.length;return l=!l&&q.isArray(o)?o.length:l,d?(q.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!c):((!o[l]||!q.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],u)&&q.isArray(o[l])&&(o[l]=bS(o[l])),!c)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,o)=>{t(TS(r),o,n,0)}),n}return null}function _S(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ro={transitional:om,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,u=q.isObject(t);if(u&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return o?JSON.stringify(um(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(u){if(r.indexOf("application/x-www-form-urlencoded")>-1)return yS(t,this.formSerializer).toString();if((c=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Vu(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return u||o?(n.setContentType("application/json",!1),_S(t)):t}],transformResponse:[function(t){const n=this.transitional||ro.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(l)throw c.name==="SyntaxError"?je.from(c,je.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Gt.classes.FormData,Blob:Gt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{ro.headers[e]={}});const SS=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xS=e=>{const t={};let n,r,o;return e&&e.split(`
2
+ /*$vite$:1*/`,document.head.appendChild(De);function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},Et={},ct={exports:{}},ve={};var Lt;function Tt(){if(Lt)return ve;Lt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function b(O){return O===null||typeof O!="object"?null:(O=y&&O[y]||O["@@iterator"],typeof O=="function"?O:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function P(O,Y,x){this.props=O,this.context=Y,this.refs=k,this.updater=x||T}P.prototype.isReactComponent={},P.prototype.setState=function(O,Y){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,Y,"setState")},P.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function L(){}L.prototype=P.prototype;function H(O,Y,x){this.props=O,this.context=Y,this.refs=k,this.updater=x||T}var $=H.prototype=new L;$.constructor=H,S($,P.prototype),$.isPureReactComponent=!0;var Z=Array.isArray,he=Object.prototype.hasOwnProperty,M={current:null},Ee={key:!0,ref:!0,__self:!0,__source:!0};function ke(O,Y,x){var re,be={},ye=null,Ie=null;if(Y!=null)for(re in Y.ref!==void 0&&(Ie=Y.ref),Y.key!==void 0&&(ye=""+Y.key),Y)he.call(Y,re)&&!Ee.hasOwnProperty(re)&&(be[re]=Y[re]);var Fe=arguments.length-2;if(Fe===1)be.children=x;else if(1<Fe){for(var ze=Array(Fe),Ke=0;Ke<Fe;Ke++)ze[Ke]=arguments[Ke+2];be.children=ze}if(O&&O.defaultProps)for(re in Fe=O.defaultProps,Fe)be[re]===void 0&&(be[re]=Fe[re]);return{$$typeof:e,type:O,key:ye,ref:Ie,props:be,_owner:M.current}}function Ne(O,Y){return{$$typeof:e,type:O.type,key:Y,ref:O.ref,props:O.props,_owner:O._owner}}function U(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function ge(O){var Y={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(x){return Y[x]})}var me=/\/+/g;function pe(O,Y){return typeof O=="object"&&O!==null&&O.key!=null?ge(""+O.key):Y.toString(36)}function le(O,Y,x,re,be){var ye=typeof O;(ye==="undefined"||ye==="boolean")&&(O=null);var Ie=!1;if(O===null)Ie=!0;else switch(ye){case"string":case"number":Ie=!0;break;case"object":switch(O.$$typeof){case e:case t:Ie=!0}}if(Ie)return Ie=O,be=be(Ie),O=re===""?"."+pe(Ie,0):re,Z(be)?(x="",O!=null&&(x=O.replace(me,"$&/")+"/"),le(be,Y,x,"",function(Ke){return Ke})):be!=null&&(U(be)&&(be=Ne(be,x+(!be.key||Ie&&Ie.key===be.key?"":(""+be.key).replace(me,"$&/")+"/")+O)),Y.push(be)),1;if(Ie=0,re=re===""?".":re+":",Z(O))for(var Fe=0;Fe<O.length;Fe++){ye=O[Fe];var ze=re+pe(ye,Fe);Ie+=le(ye,Y,x,ze,be)}else if(ze=b(O),typeof ze=="function")for(O=ze.call(O),Fe=0;!(ye=O.next()).done;)ye=ye.value,ze=re+pe(ye,Fe++),Ie+=le(ye,Y,x,ze,be);else if(ye==="object")throw Y=String(O),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Ie}function _e(O,Y,x){if(O==null)return O;var re=[],be=0;return le(O,re,"","",function(ye){return Y.call(x,ye,be++)}),re}function Pe(O){if(O._status===-1){var Y=O._result;Y=Y(),Y.then(function(x){(O._status===0||O._status===-1)&&(O._status=1,O._result=x)},function(x){(O._status===0||O._status===-1)&&(O._status=2,O._result=x)}),O._status===-1&&(O._status=0,O._result=Y)}if(O._status===1)return O._result.default;throw O._result}var ce={current:null},V={transition:null},ne={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:V,ReactCurrentOwner:M};function C(){throw Error("act(...) is not supported in production builds of React.")}return ve.Children={map:_e,forEach:function(O,Y,x){_e(O,function(){Y.apply(this,arguments)},x)},count:function(O){var Y=0;return _e(O,function(){Y++}),Y},toArray:function(O){return _e(O,function(Y){return Y})||[]},only:function(O){if(!U(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},ve.Component=P,ve.Fragment=n,ve.Profiler=o,ve.PureComponent=H,ve.StrictMode=r,ve.Suspense=d,ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,ve.act=C,ve.cloneElement=function(O,Y,x){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var re=S({},O.props),be=O.key,ye=O.ref,Ie=O._owner;if(Y!=null){if(Y.ref!==void 0&&(ye=Y.ref,Ie=M.current),Y.key!==void 0&&(be=""+Y.key),O.type&&O.type.defaultProps)var Fe=O.type.defaultProps;for(ze in Y)he.call(Y,ze)&&!Ee.hasOwnProperty(ze)&&(re[ze]=Y[ze]===void 0&&Fe!==void 0?Fe[ze]:Y[ze])}var ze=arguments.length-2;if(ze===1)re.children=x;else if(1<ze){Fe=Array(ze);for(var Ke=0;Ke<ze;Ke++)Fe[Ke]=arguments[Ke+2];re.children=Fe}return{$$typeof:e,type:O.type,key:be,ref:ye,props:re,_owner:Ie}},ve.createContext=function(O){return O={$$typeof:l,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:u,_context:O},O.Consumer=O},ve.createElement=ke,ve.createFactory=function(O){var Y=ke.bind(null,O);return Y.type=O,Y},ve.createRef=function(){return{current:null}},ve.forwardRef=function(O){return{$$typeof:c,render:O}},ve.isValidElement=U,ve.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:Pe}},ve.memo=function(O,Y){return{$$typeof:h,type:O,compare:Y===void 0?null:Y}},ve.startTransition=function(O){var Y=V.transition;V.transition={};try{O()}finally{V.transition=Y}},ve.unstable_act=C,ve.useCallback=function(O,Y){return ce.current.useCallback(O,Y)},ve.useContext=function(O){return ce.current.useContext(O)},ve.useDebugValue=function(){},ve.useDeferredValue=function(O){return ce.current.useDeferredValue(O)},ve.useEffect=function(O,Y){return ce.current.useEffect(O,Y)},ve.useId=function(){return ce.current.useId()},ve.useImperativeHandle=function(O,Y,x){return ce.current.useImperativeHandle(O,Y,x)},ve.useInsertionEffect=function(O,Y){return ce.current.useInsertionEffect(O,Y)},ve.useLayoutEffect=function(O,Y){return ce.current.useLayoutEffect(O,Y)},ve.useMemo=function(O,Y){return ce.current.useMemo(O,Y)},ve.useReducer=function(O,Y,x){return ce.current.useReducer(O,Y,x)},ve.useRef=function(O){return ce.current.useRef(O)},ve.useState=function(O){return ce.current.useState(O)},ve.useSyncExternalStore=function(O,Y,x){return ce.current.useSyncExternalStore(O,Y,x)},ve.useTransition=function(){return ce.current.useTransition()},ve.version="18.3.1",ve}var un;function $i(){return un||(un=1,ct.exports=Tt()),ct.exports}var Qs;function uc(){if(Qs)return Et;Qs=1;var e=$i(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function l(c,d,h){var g,y={},b=null,T=null;h!==void 0&&(b=""+h),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(T=d.ref);for(g in d)r.call(d,g)&&!u.hasOwnProperty(g)&&(y[g]=d[g]);if(c&&c.defaultProps)for(g in d=c.defaultProps,d)y[g]===void 0&&(y[g]=d[g]);return{$$typeof:t,type:c,key:b,ref:T,props:y,_owner:o.current}}return Et.Fragment=n,Et.jsx=l,Et.jsxs=l,Et}var $n;function h_(){return $n||($n=1,rt.exports=uc()),rt.exports}var I=h_();const rr=Object.create(null);rr.open="0",rr.close="1",rr.ping="2",rr.pong="3",rr.message="4",rr.upgrade="5",rr.noop="6";const Ou=Object.create(null);Object.keys(rr).forEach(e=>{Ou[rr[e]]=e});const ac={type:"error",data:"parser error"},yp=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Tp=typeof ArrayBuffer=="function",bp=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,lc=({type:e,data:t},n,r)=>yp&&t instanceof Blob?n?r(t):_p(t,r):Tp&&(t instanceof ArrayBuffer||bp(t))?n?r(t):_p(new Blob([t]),r):r(rr[e]+(t||"")),_p=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Sp(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let cc;function p_(e,t){if(yp&&e.data instanceof Blob)return e.data.arrayBuffer().then(Sp).then(t);if(Tp&&(e.data instanceof ArrayBuffer||bp(e.data)))return t(Sp(e.data));lc(e,!1,n=>{cc||(cc=new TextEncoder),t(cc.encode(n))})}const xp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xs=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<xp.length;e++)Xs[xp.charCodeAt(e)]=e;const m_=e=>{let t=e.length*.75,n=e.length,r,o=0,u,l,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),g=new Uint8Array(h);for(r=0;r<n;r+=4)u=Xs[e.charCodeAt(r)],l=Xs[e.charCodeAt(r+1)],c=Xs[e.charCodeAt(r+2)],d=Xs[e.charCodeAt(r+3)],g[o++]=u<<2|l>>4,g[o++]=(l&15)<<4|c>>2,g[o++]=(c&3)<<6|d&63;return h},g_=typeof ArrayBuffer=="function",fc=(e,t)=>{if(typeof e!="string")return{type:"message",data:Cp(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:E_(e.substring(1),t)}:Ou[n]?e.length>1?{type:Ou[n],data:e.substring(1)}:{type:Ou[n]}:ac},E_=(e,t)=>{if(g_){const n=m_(e);return Cp(n,t)}else return{base64:!0,data:e}},Cp=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Ap="",y_=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((u,l)=>{lc(u,!1,c=>{r[l]=c,++o===n&&t(r.join(Ap))})})},T_=(e,t)=>{const n=e.split(Ap),r=[];for(let o=0;o<n.length;o++){const u=fc(n[o],t);if(r.push(u),u.type==="error")break}return r};function b_(){return new TransformStream({transform(e,t){p_(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const u=new DataView(o.buffer);u.setUint8(0,126),u.setUint16(1,r)}else{o=new Uint8Array(9);const u=new DataView(o.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let dc;function Pu(e){return e.reduce((t,n)=>t+n.length,0)}function Ru(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function __(e,t){dc||(dc=new TextDecoder);const n=[];let r=0,o=-1,u=!1;return new TransformStream({transform(l,c){for(n.push(l);;){if(r===0){if(Pu(n)<1)break;const d=Ru(n,1);u=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(Pu(n)<2)break;const d=Ru(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Pu(n)<8)break;const d=Ru(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),g=h.getUint32(0);if(g>Math.pow(2,21)-1){c.enqueue(ac);break}o=g*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Pu(n)<o)break;const d=Ru(n,o);c.enqueue(fc(u?d:dc.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(ac);break}}}})}const kp=4;function wt(e){if(e)return S_(e)}function S_(e){for(var t in wt.prototype)e[t]=wt.prototype[t];return e}wt.prototype.on=wt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},wt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},wt.prototype.off=wt.prototype.removeListener=wt.prototype.removeAllListeners=wt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},wt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},wt.prototype.emitReserved=wt.prototype.emit,wt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},wt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Lu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),On=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),x_="arraybuffer";function J4(){}function wp(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const C_=On.setTimeout,A_=On.clearTimeout;function Du(e,t){t.useNativeTimers?(e.setTimeoutFn=C_.bind(On),e.clearTimeoutFn=A_.bind(On)):(e.setTimeoutFn=On.setTimeout.bind(On),e.clearTimeoutFn=On.clearTimeout.bind(On))}const k_=1.33;function w_(e){return typeof e=="string"?v_(e):Math.ceil((e.byteLength||e.size)*k_)}function v_(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function vp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function N_(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function I_(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let u=n[r].split("=");t[decodeURIComponent(u[0])]=decodeURIComponent(u[1])}return t}class O_ extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class hc extends wt{constructor(t){super(),this.writable=!1,Du(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new O_(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fc(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=N_(t);return n.length?"?"+n:""}}class P_ extends hc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};T_(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,y_(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=vp()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Np=!1;try{Np=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const R_=Np;function L_(){}class D_ extends P_{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,u)=>{this.onError("xhr post error",o,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class ir extends wt{constructor(t,n,r){super(),this.createRequest=t,Du(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=wp(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=ir.requestsCount++,ir.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=L_,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete ir.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(ir.requestsCount=0,ir.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Ip);else if(typeof addEventListener=="function"){const e="onpagehide"in On?"pagehide":"unload";addEventListener(e,Ip,!1)}}function Ip(){for(let e in ir.requests)ir.requests.hasOwnProperty(e)&&ir.requests[e].abort()}const M_=function(){const e=Op({xdomain:!1});return e&&e.responseType!==null}();class F_ extends D_{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=M_&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ir(Op,this.uri(),t)}}function Op(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||R_))return new XMLHttpRequest}catch(n){}if(!t)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Pp=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class B_ extends hc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Pp?{}:wp(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;lc(r,this.supportsBinary,u=>{try{this.doWrite(r,u)}catch(l){}o&&Lu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=vp()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const pc=On.WebSocket||On.MozWebSocket;class U_ extends B_{createSocket(t,n,r){return Pp?new pc(t,n,r):n?new pc(t,n):new pc(t)}doWrite(t,n){this.ws.send(n)}}class H_ extends hc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=__(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=b_();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const u=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),u())}).catch(c=>{})};u();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Lu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const z_={websocket:U_,webtransport:H_,polling:F_},j_=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$_=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mc(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=j_.exec(e||""),u={},l=14;for(;l--;)u[$_[l]]=o[l]||"";return n!=-1&&r!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=V_(u,u.path),u.queryKey=q_(u,u.query),u}function V_(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function q_(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,u){o&&(n[o]=u)}),n}const gc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Mu=[];gc&&addEventListener("offline",()=>{Mu.forEach(e=>e())},!1);class Fr extends wt{constructor(t,n){if(super(),this.binaryType=x_,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=mc(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=mc(n.host).host);Du(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=I_(this.opts.query)),gc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Mu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=kp,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Fr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Fr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=w_(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Lu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const u={type:t,data:n,options:r};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Fr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),gc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Mu.indexOf(this._offlineEventListener);r!==-1&&Mu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Fr.protocol=kp;class Y_ extends Fr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Fr.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!r)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(g(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function u(){r||(r=!0,g(),n.close(),n=null)}const l=y=>{const b=new Error("probe error: "+y);b.transport=n.name,u(),this.emitReserved("upgradeError",b)};function c(){l("transport closed")}function d(){l("socket closed")}function h(y){n&&y.name!==n.name&&u()}const g=()=>{n.removeListener("open",o),n.removeListener("error",l),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",o),n.once("error",l),n.once("close",c),this.once("close",d),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let W_=class extends Y_{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>z_[o]).filter(o=>!!o)),super(t,r)}};function G_(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=mc(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const u=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+u+":"+r.port+t,r.href=r.protocol+"://"+u+(n&&n.port===r.port?"":":"+r.port),r}const K_=typeof ArrayBuffer=="function",Q_=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Rp=Object.prototype.toString,X_=typeof Blob=="function"||typeof Blob!="undefined"&&Rp.call(Blob)==="[object BlobConstructor]",J_=typeof File=="function"||typeof File!="undefined"&&Rp.call(File)==="[object FileConstructor]";function Ec(e){return K_&&(e instanceof ArrayBuffer||Q_(e))||X_&&e instanceof Blob||J_&&e instanceof File}function Fu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Fu(e[n]))return!0;return!1}if(Ec(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Fu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Fu(e[n]))return!0;return!1}function Z_(e){const t=[],n=e.data,r=e;return r.data=yc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function yc(e,t){if(!e)return e;if(Ec(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=yc(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=yc(e[r],t));return n}return e}function e2(e,t){return e.data=Tc(e.data,t),delete e.attachments,e}function Tc(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Tc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Tc(e[n],t));return e}const t2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],n2=5;var Qe;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Qe||(Qe={}));class r2{constructor(t){this.replacer=t}encode(t){return(t.type===Qe.EVENT||t.type===Qe.ACK)&&Fu(t)?this.encodeAsBinary({type:t.type===Qe.EVENT?Qe.BINARY_EVENT:Qe.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Qe.BINARY_EVENT||t.type===Qe.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Z_(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Lp(e){return Object.prototype.toString.call(e)==="[object Object]"}class bc extends wt{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Qe.BINARY_EVENT;r||n.type===Qe.BINARY_ACK?(n.type=r?Qe.EVENT:Qe.ACK,this.reconstructor=new i2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ec(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Qe[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Qe.BINARY_EVENT||r.type===Qe.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(u,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(l)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(bc.isPayloadValid(r.type,u))r.data=u;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Qe.CONNECT:return Lp(n);case Qe.DISCONNECT:return n===void 0;case Qe.CONNECT_ERROR:return typeof n=="string"||Lp(n);case Qe.EVENT:case Qe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&t2.indexOf(n[0])===-1);case Qe.ACK:case Qe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class i2{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=e2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const s2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:bc,Encoder:r2,get PacketType(){return Qe},protocol:n2},Symbol.toStringTag,{value:"Module"}));function Vn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const o2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Dp extends wt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Vn(t,"open",this.onopen.bind(this)),Vn(t,"packet",this.onpacket.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,u;if(o2.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const l={type:Qe.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,y=n.pop();this._registerAckCallback(g,y),l.id=g}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),l=(...c)=>{this.io.clearTimeoutFn(u),n.apply(this,c)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...n){return new Promise((r,o)=>{const u=(l,c)=>l?o(l):r(c);u.withError=!0,n.push(u),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...u)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...u)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Qe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Qe.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Qe.EVENT:case Qe.BINARY_EVENT:this.onevent(t);break;case Qe.ACK:case Qe.BINARY_ACK:this.onack(t);break;case Qe.DISCONNECT:this.ondisconnect();break;case Qe.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:Qe.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Qe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Vi(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Vi.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},Vi.prototype.reset=function(){this.attempts=0},Vi.prototype.setMin=function(e){this.ms=e},Vi.prototype.setMax=function(e){this.max=e},Vi.prototype.setJitter=function(e){this.jitter=e};class _c extends wt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Du(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Vi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||s2;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new W_(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Vn(n,"open",function(){r.onopen(),t&&t()}),u=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},l=Vn(n,"error",u);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),u(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Vn(t,"ping",this.onping.bind(this)),Vn(t,"data",this.ondata.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(t,"close",this.onclose.bind(this)),Vn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Lu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Dp(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Js={};function Bu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=G_(e,t.path||"/socket.io"),r=n.source,o=n.id,u=n.path,l=Js[o]&&u in Js[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let d;return c?d=new _c(r,t):(Js[o]||(Js[o]=new _c(r,t)),d=Js[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Bu,{Manager:_c,Socket:Dp,io:Bu,connect:Bu});var u2=function(e){return function(t){return!!t&&typeof t=="object"}(e)&&!function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||function(r){return r.$$typeof===a2}(t)}(e)},a2=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Zs(e,t){return t.clone!==!1&&t.isMergeableObject(e)?qi((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function l2(e,t,n){return e.concat(t).map(function(r){return Zs(r,n)})}function Mp(e){return Object.keys(e).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(n){return Object.propertyIsEnumerable.call(t,n)}):[]}(e))}function Fp(e,t){try{return t in e}catch(n){return!1}}function c2(e,t,n){var r={};return n.isMergeableObject(e)&&Mp(e).forEach(function(o){r[o]=Zs(e[o],n)}),Mp(t).forEach(function(o){(function(u,l){return Fp(u,l)&&!(Object.hasOwnProperty.call(u,l)&&Object.propertyIsEnumerable.call(u,l))})(e,o)||(Fp(e,o)&&n.isMergeableObject(t[o])?r[o]=function(u,l){if(!l.customMerge)return qi;var c=l.customMerge(u);return typeof c=="function"?c:qi}(o,n)(e[o],t[o],n):r[o]=Zs(t[o],n))}),r}function qi(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||l2,n.isMergeableObject=n.isMergeableObject||u2,n.cloneUnlessOtherwiseSpecified=Zs;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):c2(e,t,n):Zs(t,n)}qi.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,r){return qi(n,r,t)},{})};var f2=qi;class d2{constructor(t){Object.assign(this,t)}}function nn(e){if(e)return function(t){for(var n in nn.prototype)t[n]=nn.prototype[n];return t}(e)}nn.prototype.on=nn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},nn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},nn.prototype.off=nn.prototype.removeListener=nn.prototype.removeAllListeners=nn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},nn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},nn.prototype.emitReserved=nn.prototype.emit,nn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},nn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const h2=typeof ArrayBuffer=="function",Bp=Object.prototype.toString,p2=typeof Blob=="function"||typeof Blob!="undefined"&&Bp.call(Blob)==="[object BlobConstructor]",m2=typeof File=="function"||typeof File!="undefined"&&Bp.call(File)==="[object FileConstructor]";function Sc(e){return h2&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||p2&&e instanceof Blob||m2&&e instanceof File}function Uu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Uu(e[n]))return!0;return!1}if(Sc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Uu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Uu(e[n]))return!0;return!1}function g2(e){const t=[],n=e.data,r=e;return r.data=xc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function xc(e,t){if(!e)return e;if(Sc(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=xc(e[r],t);return n}if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=xc(e[r],t));return n}return e}function E2(e,t){return e.data=Cc(e.data,t),delete e.attachments,e}function Cc(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Cc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Cc(e[n],t));return e}const y2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ht;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ht||(ht={}));class T2{constructor(t){this.replacer=t}encode(t){return t.type!==ht.EVENT&&t.type!==ht.ACK||!Uu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===ht.EVENT?ht.BINARY_EVENT:ht.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==ht.BINARY_EVENT&&t.type!==ht.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=g2(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Up(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ac extends nn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===ht.BINARY_EVENT;r||n.type===ht.BINARY_ACK?(n.type=r?ht.EVENT:ht.ACK,this.reconstructor=new b2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Sc(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(ht[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ht.BINARY_EVENT||r.type===ht.BINARY_ACK){const u=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(u,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(l)}if(t.charAt(n+1)==="/"){const u=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(u,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const u=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}r.id=Number(t.substring(u,n+1))}if(t.charAt(++n)){const u=this.tryParse(t.substr(n));if(!Ac.isPayloadValid(r.type,u))throw new Error("invalid payload");r.data=u}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case ht.CONNECT:return Up(n);case ht.DISCONNECT:return n===void 0;case ht.CONNECT_ERROR:return typeof n=="string"||Up(n);case ht.EVENT:case ht.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&y2.indexOf(n[0])===-1);case ht.ACK:case ht.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class b2{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=E2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Hp=["searchParams.facetFilters","hits","products"],zp=(e,t,n)=>function r(o,u=[]){const l=Object.entries(o).map(([c,d])=>{const h=[...u,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(h.join(".")))?r(d,h):d]});return Array.isArray(o)?l.map(c=>c[1]):Object.fromEntries(l)},jp=e=>e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),_2=zp(e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),e=>e,Hp),S2=zp(jp,jp,Hp),x2={Encoder:class extends T2{encode(e){var t,n;return super.encode(He(G({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],_2(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends Ac{constructor(){super((e,t)=>e==""&&Array.isArray(t)?t.map(n=>n instanceof Object?S2(n):n):t)}}},C2={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class A2{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:u={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=h=>{console.log("[Copilot SDK] Connect Ack:",h),this.socket.auth={[this.sessionIdKey]:h.sessionId}},this.handleDisconnect=h=>{console.warn(`[Copilot SDK] Disconnected: ${h}`),h!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${h}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=h=>{console.error(`[Copilot SDK] Connect error: ${h.message}`);const g=h.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=g==null?void 0:g[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const l=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const d=[C2,u,{parser:x2,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Bu(l,f2.all(d))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*sc(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout(()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())},t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return jt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return jt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return jt(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return jt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}requestSessionInformation(t){return jt(this,null,function*(){return new Promise(n=>{this.socket.emit("session_info",r=>{t&&t(r),n(r)})})})}getConversationEvents(t,n){return jt(this,null,function*(){return new Promise(r=>{this.socket.emit("conversation_events",t,o=>{n&&n(o),r(o)})})})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return jt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const u=function(l){return oc(this,null,function*(){const c=[];let d=!1,h=null;const g=yield new Tr(l({emit:y=>{c.push(y),h&&(h(),h=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Tr(new Promise(y=>{h=y}));for(;c.length>0;)yield c.shift()}finally{yield new Tr(g==null?void 0:g())}})}(({emit:l,cancel:c})=>{const d=(h,g)=>{["done","error"].includes(g.name)&&c(),g.eventSourceId==o&&l(g)};return this.socket.onAny(d),()=>jt(this,null,function*(){this.socket.offAny(d)})});return{result:yield new Promise((l,c)=>this.socket.emit(t,n,d=>{d.name==="error"?c(new d2(d)):(o=d==null?void 0:d.id,l(d))})),events:u}})}}var K=$i();const di=We(K);function $p(e,t){return function(){return e.apply(t,arguments)}}const{toString:k2}=Object.prototype,{getPrototypeOf:kc}=Object,{iterator:Hu,toStringTag:Vp}=Symbol,zu=(e=>t=>{const n=k2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),t=>zu(t)===e),ju=e=>t=>typeof t===e,{isArray:Yi}=Array,Wi=ju("undefined");function eo(e){return e!==null&&!Wi(e)&&e.constructor!==null&&!Wi(e.constructor)&&an(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qp=qn("ArrayBuffer");function w2(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qp(e.buffer),t}const v2=ju("string"),an=ju("function"),Yp=ju("number"),to=e=>e!==null&&typeof e=="object",N2=e=>e===!0||e===!1,$u=e=>{if(zu(e)!=="object")return!1;const t=kc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Vp in e)&&!(Hu in e)},I2=e=>{if(!to(e)||eo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},O2=qn("Date"),P2=qn("File"),R2=qn("Blob"),L2=qn("FileList"),D2=e=>to(e)&&an(e.pipe),M2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||an(e.append)&&((t=zu(e))==="formdata"||t==="object"&&an(e.toString)&&e.toString()==="[object FormData]"))},F2=qn("URLSearchParams"),[B2,U2,H2,z2]=["ReadableStream","Request","Response","Headers"].map(qn),j2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function no(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Yi(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(eo(e))return;const u=n?Object.getOwnPropertyNames(e):Object.keys(e),l=u.length;let c;for(r=0;r<l;r++)c=u[r],t.call(null,e[c],c,e)}}function Wp(e,t){if(eo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const hi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Gp=e=>!Wi(e)&&e!==hi;function wc(){const{caseless:e,skipUndefined:t}=Gp(this)&&this||{},n={},r=(o,u)=>{const l=e&&Wp(n,u)||u;$u(n[l])&&$u(o)?n[l]=wc(n[l],o):$u(o)?n[l]=wc({},o):Yi(o)?n[l]=o.slice():(!t||!Wi(o))&&(n[l]=o)};for(let o=0,u=arguments.length;o<u;o++)arguments[o]&&no(arguments[o],r);return n}const $2=(e,t,n,{allOwnKeys:r}={})=>(no(t,(o,u)=>{n&&an(o)?e[u]=$p(o,n):e[u]=o},{allOwnKeys:r}),e),V2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),q2=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Y2=(e,t,n,r)=>{let o,u,l;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),u=o.length;u-- >0;)l=o[u],(!r||r(l,e,t))&&!c[l]&&(t[l]=e[l],c[l]=!0);e=n!==!1&&kc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},W2=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},G2=e=>{if(!e)return null;if(Yi(e))return e;let t=e.length;if(!Yp(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},K2=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&kc(Uint8Array)),Q2=(e,t)=>{const r=(e&&e[Hu]).call(e);let o;for(;(o=r.next())&&!o.done;){const u=o.value;t.call(e,u[0],u[1])}},X2=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},J2=qn("HTMLFormElement"),Z2=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Kp=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),eS=qn("RegExp"),Qp=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};no(n,(o,u)=>{let l;(l=t(o,u,e))!==!1&&(r[u]=l||o)}),Object.defineProperties(e,r)},tS=e=>{Qp(e,(t,n)=>{if(an(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(an(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nS=(e,t)=>{const n={},r=o=>{o.forEach(u=>{n[u]=!0})};return Yi(e)?r(e):r(String(e).split(t)),n},rS=()=>{},iS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function sS(e){return!!(e&&an(e.append)&&e[Vp]==="FormData"&&e[Hu])}const oS=e=>{const t=new Array(10),n=(r,o)=>{if(to(r)){if(t.indexOf(r)>=0)return;if(eo(r))return r;if(!("toJSON"in r)){t[o]=r;const u=Yi(r)?[]:{};return no(r,(l,c)=>{const d=n(l,o+1);!Wi(d)&&(u[c]=d)}),t[o]=void 0,u}}return r};return n(e,0)},uS=qn("AsyncFunction"),aS=e=>e&&(to(e)||an(e))&&an(e.then)&&an(e.catch),Xp=((e,t)=>e?setImmediate:t?((n,r)=>(hi.addEventListener("message",({source:o,data:u})=>{o===hi&&u===n&&r.length&&r.shift()()},!1),o=>{r.push(o),hi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",an(hi.postMessage)),lS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(hi):typeof process!="undefined"&&process.nextTick||Xp,q={isArray:Yi,isArrayBuffer:qp,isBuffer:eo,isFormData:M2,isArrayBufferView:w2,isString:v2,isNumber:Yp,isBoolean:N2,isObject:to,isPlainObject:$u,isEmptyObject:I2,isReadableStream:B2,isRequest:U2,isResponse:H2,isHeaders:z2,isUndefined:Wi,isDate:O2,isFile:P2,isBlob:R2,isRegExp:eS,isFunction:an,isStream:D2,isURLSearchParams:F2,isTypedArray:K2,isFileList:L2,forEach:no,merge:wc,extend:$2,trim:j2,stripBOM:V2,inherits:q2,toFlatObject:Y2,kindOf:zu,kindOfTest:qn,endsWith:W2,toArray:G2,forEachEntry:Q2,matchAll:X2,isHTMLForm:J2,hasOwnProperty:Kp,hasOwnProp:Kp,reduceDescriptors:Qp,freezeMethods:tS,toObjectSet:nS,toCamelCase:Z2,noop:rS,toFiniteNumber:iS,findKey:Wp,global:hi,isContextDefined:Gp,isSpecCompliantForm:sS,toJSONObject:oS,isAsyncFn:uS,isThenable:aS,setImmediate:Xp,asap:lS,isIterable:e=>e!=null&&an(e[Hu])};function je(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}q.inherits(je,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const Jp=je.prototype,Zp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Zp[e]={value:e}}),Object.defineProperties(je,Zp),Object.defineProperty(Jp,"isAxiosError",{value:!0}),je.from=(e,t,n,r,o,u)=>{const l=Object.create(Jp);q.toFlatObject(e,l,function(g){return g!==Error.prototype},h=>h!=="isAxiosError");const c=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return je.call(l,c,d,n,r,o),e&&l.cause==null&&Object.defineProperty(l,"cause",{value:e,configurable:!0}),l.name=e&&e.name||"Error",u&&Object.assign(l,u),l};const cS=null;function vc(e){return q.isPlainObject(e)||q.isArray(e)}function em(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function tm(e,t,n){return e?e.concat(t).map(function(o,u){return o=em(o),!n&&u?"["+o+"]":o}).join(n?".":""):t}function fS(e){return q.isArray(e)&&!e.some(vc)}const dS=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Vu(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,P){return!q.isUndefined(P[k])});const r=n.metaTokens,o=n.visitor||g,u=n.dots,l=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function h(S){if(S===null)return"";if(q.isDate(S))return S.toISOString();if(q.isBoolean(S))return S.toString();if(!d&&q.isBlob(S))throw new je("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(S)||q.isTypedArray(S)?d&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,k,P){let L=S;if(S&&!P&&typeof S=="object"){if(q.endsWith(k,"{}"))k=r?k:k.slice(0,-2),S=JSON.stringify(S);else if(q.isArray(S)&&fS(S)||(q.isFileList(S)||q.endsWith(k,"[]"))&&(L=q.toArray(S)))return k=em(k),L.forEach(function($,Z){!(q.isUndefined($)||$===null)&&t.append(l===!0?tm([k],Z,u):l===null?k:k+"[]",h($))}),!1}return vc(S)?!0:(t.append(tm(P,k,u),h(S)),!1)}const y=[],b=Object.assign(dS,{defaultVisitor:g,convertValue:h,isVisitable:vc});function T(S,k){if(!q.isUndefined(S)){if(y.indexOf(S)!==-1)throw Error("Circular reference detected in "+k.join("."));y.push(S),q.forEach(S,function(L,H){(!(q.isUndefined(L)||L===null)&&o.call(t,L,q.isString(H)?H.trim():H,k,b))===!0&&T(L,k?k.concat(H):[H])}),y.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return T(e),t}function nm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Nc(e,t){this._pairs=[],e&&Vu(e,this,t)}const rm=Nc.prototype;rm.append=function(t,n){this._pairs.push([t,n])},rm.toString=function(t){const n=t?function(r){return t.call(this,r,nm)}:nm;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function hS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function im(e,t,n){if(!t)return e;const r=n&&n.encode||hS;q.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let u;if(o?u=o(t,n):u=q.isURLSearchParams(t)?t.toString():new Nc(t,n).toString(r),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class sm{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const om={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pS={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Nc,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ic=typeof window!="undefined"&&typeof document!="undefined",Oc=typeof navigator=="object"&&navigator||void 0,mS=Ic&&(!Oc||["ReactNative","NativeScript","NS"].indexOf(Oc.product)<0),gS=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ES=Ic&&window.location.href||"http://localhost",Gt=G(G({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ic,hasStandardBrowserEnv:mS,hasStandardBrowserWebWorkerEnv:gS,navigator:Oc,origin:ES},Symbol.toStringTag,{value:"Module"}))),pS);function yS(e,t){return Vu(e,new Gt.classes.URLSearchParams,G({visitor:function(n,r,o,u){return Gt.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},t))}function TS(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function bS(e){const t={},n=Object.keys(e);let r;const o=n.length;let u;for(r=0;r<o;r++)u=n[r],t[u]=e[u];return t}function um(e){function t(n,r,o,u){let l=n[u++];if(l==="__proto__")return!0;const c=Number.isFinite(+l),d=u>=n.length;return l=!l&&q.isArray(o)?o.length:l,d?(q.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!c):((!o[l]||!q.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],u)&&q.isArray(o[l])&&(o[l]=bS(o[l])),!c)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,o)=>{t(TS(r),o,n,0)}),n}return null}function _S(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ro={transitional:om,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,u=q.isObject(t);if(u&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return o?JSON.stringify(um(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(u){if(r.indexOf("application/x-www-form-urlencoded")>-1)return yS(t,this.formSerializer).toString();if((c=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Vu(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return u||o?(n.setContentType("application/json",!1),_S(t)):t}],transformResponse:[function(t){const n=this.transitional||ro.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(l)throw c.name==="SyntaxError"?je.from(c,je.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Gt.classes.FormData,Blob:Gt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{ro.headers[e]={}});const SS=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xS=e=>{const t={};let n,r,o;return e&&e.split(`
19
3
  `).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!n||t[n]&&SS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},am=Symbol("internals");function io(e){return e&&String(e).trim().toLowerCase()}function qu(e){return e===!1||e==null?e:q.isArray(e)?e.map(qu):String(e)}function CS(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const AS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Pc(e,t,n,r,o){if(q.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function kS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function wS(e,t){const n=q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,u,l){return this[r].call(this,t,o,u,l)},configurable:!0})})}let ln=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function u(c,d,h){const g=io(d);if(!g)throw new Error("header name must be a non-empty string");const y=q.findKey(o,g);(!y||o[y]===void 0||h===!0||h===void 0&&o[y]!==!1)&&(o[y||d]=qu(c))}const l=(c,d)=>q.forEach(c,(h,g)=>u(h,g,d));if(q.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(q.isString(t)&&(t=t.trim())&&!AS(t))l(xS(t),n);else if(q.isObject(t)&&q.isIterable(t)){let c={},d,h;for(const g of t){if(!q.isArray(g))throw TypeError("Object iterator must return a key-value pair");c[h=g[0]]=(d=c[h])?q.isArray(d)?[...d,g[1]]:[d,g[1]]:g[1]}l(c,n)}else t!=null&&u(n,t,r);return this}get(t,n){if(t=io(t),t){const r=q.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return CS(o);if(q.isFunction(n))return n.call(this,o,r);if(q.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=io(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Pc(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function u(l){if(l=io(l),l){const c=q.findKey(r,l);c&&(!n||Pc(r,r[c],c,n))&&(delete r[c],o=!0)}}return q.isArray(t)?t.forEach(u):u(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const u=n[r];(!t||Pc(this,this[u],u,t,!0))&&(delete this[u],o=!0)}return o}normalize(t){const n=this,r={};return q.forEach(this,(o,u)=>{const l=q.findKey(r,u);if(l){n[l]=qu(o),delete n[u];return}const c=t?kS(u):String(u).trim();c!==u&&delete n[u],n[c]=qu(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return q.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
20
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[am]=this[am]={accessors:{}}).accessors,o=this.prototype;function u(l){const c=io(l);r[c]||(wS(o,l),r[c]=!0)}return q.isArray(t)?t.forEach(u):u(t),this}};ln.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(ln.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),q.freezeMethods(ln);function Rc(e,t){const n=this||ro,r=t||n,o=ln.from(r.headers);let u=r.data;return q.forEach(e,function(c){u=c.call(n,u,o.normalize(),t?t.status:void 0)}),o.normalize(),u}function lm(e){return!!(e&&e.__CANCEL__)}function Gi(e,t,n){je.call(this,e==null?"canceled":e,je.ERR_CANCELED,t,n),this.name="CanceledError"}q.inherits(Gi,je,{__CANCEL__:!0});function cm(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new je("Request failed with status code "+n.status,[je.ERR_BAD_REQUEST,je.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function vS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function NS(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,u=0,l;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),g=r[u];l||(l=h),n[o]=d,r[o]=h;let y=u,b=0;for(;y!==o;)b+=n[y++],y=y%e;if(o=(o+1)%e,o===u&&(u=(u+1)%e),h-l<t)return;const T=g&&h-g;return T?Math.round(b*1e3/T):void 0}}function IS(e,t){let n=0,r=1e3/t,o,u;const l=(h,g=Date.now())=>{n=g,o=null,u&&(clearTimeout(u),u=null),e(...h)};return[(...h)=>{const g=Date.now(),y=g-n;y>=r?l(h,g):(o=h,u||(u=setTimeout(()=>{u=null,l(o)},r-y)))},()=>o&&l(o)]}const Yu=(e,t,n=3)=>{let r=0;const o=NS(50,250);return IS(u=>{const l=u.loaded,c=u.lengthComputable?u.total:void 0,d=l-r,h=o(d),g=l<=c;r=l;const y={loaded:l,total:c,progress:c?l/c:void 0,bytes:d,rate:h||void 0,estimated:h&&c&&g?(c-l)/h:void 0,event:u,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(y)},n)},fm=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},dm=e=>(...t)=>q.asap(()=>e(...t)),OS=Gt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Gt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Gt.origin),Gt.navigator&&/(msie|trident)/i.test(Gt.navigator.userAgent)):()=>!0,PS=Gt.hasStandardBrowserEnv?{write(e,t,n,r,o,u){const l=[e+"="+encodeURIComponent(t)];q.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),q.isString(r)&&l.push("path="+r),q.isString(o)&&l.push("domain="+o),u===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function RS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function LS(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function hm(e,t,n){let r=!RS(t);return e&&(r||n==!1)?LS(e,t):t}const pm=e=>e instanceof ln?G({},e):e;function pi(e,t){t=t||{};const n={};function r(h,g,y,b){return q.isPlainObject(h)&&q.isPlainObject(g)?q.merge.call({caseless:b},h,g):q.isPlainObject(g)?q.merge({},g):q.isArray(g)?g.slice():g}function o(h,g,y,b){if(q.isUndefined(g)){if(!q.isUndefined(h))return r(void 0,h,y,b)}else return r(h,g,y,b)}function u(h,g){if(!q.isUndefined(g))return r(void 0,g)}function l(h,g){if(q.isUndefined(g)){if(!q.isUndefined(h))return r(void 0,h)}else return r(void 0,g)}function c(h,g,y){if(y in t)return r(h,g);if(y in e)return r(void 0,h)}const d={url:u,method:u,data:u,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(h,g,y)=>o(pm(h),pm(g),y,!0)};return q.forEach(Object.keys(G(G({},e),t)),function(g){const y=d[g]||o,b=y(e[g],t[g],g);q.isUndefined(b)&&y!==c||(n[g]=b)}),n}const mm=e=>{const t=pi({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:u,headers:l,auth:c}=t;if(t.headers=l=ln.from(l),t.url=im(hm(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),q.isFormData(n)){if(Gt.hasStandardBrowserEnv||Gt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(q.isFunction(n.getHeaders)){const d=n.getHeaders(),h=["content-type","content-length"];Object.entries(d).forEach(([g,y])=>{h.includes(g.toLowerCase())&&l.set(g,y)})}}if(Gt.hasStandardBrowserEnv&&(r&&q.isFunction(r)&&(r=r(t)),r||r!==!1&&OS(t.url))){const d=o&&u&&PS.read(u);d&&l.set(o,d)}return t},DS=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=mm(e);let u=o.data;const l=ln.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=o,g,y,b,T,S;function k(){T&&T(),S&&S(),o.cancelToken&&o.cancelToken.unsubscribe(g),o.signal&&o.signal.removeEventListener("abort",g)}let P=new XMLHttpRequest;P.open(o.method.toUpperCase(),o.url,!0),P.timeout=o.timeout;function L(){if(!P)return;const $=ln.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),he={data:!c||c==="text"||c==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:$,config:e,request:P};cm(function(Ee){n(Ee),k()},function(Ee){r(Ee),k()},he),P=null}"onloadend"in P?P.onloadend=L:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(L)},P.onabort=function(){P&&(r(new je("Request aborted",je.ECONNABORTED,e,P)),P=null)},P.onerror=function(Z){const he=Z&&Z.message?Z.message:"Network Error",M=new je(he,je.ERR_NETWORK,e,P);M.event=Z||null,r(M),P=null},P.ontimeout=function(){let Z=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const he=o.transitional||om;o.timeoutErrorMessage&&(Z=o.timeoutErrorMessage),r(new je(Z,he.clarifyTimeoutError?je.ETIMEDOUT:je.ECONNABORTED,e,P)),P=null},u===void 0&&l.setContentType(null),"setRequestHeader"in P&&q.forEach(l.toJSON(),function(Z,he){P.setRequestHeader(he,Z)}),q.isUndefined(o.withCredentials)||(P.withCredentials=!!o.withCredentials),c&&c!=="json"&&(P.responseType=o.responseType),h&&([b,S]=Yu(h,!0),P.addEventListener("progress",b)),d&&P.upload&&([y,T]=Yu(d),P.upload.addEventListener("progress",y),P.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(g=$=>{P&&(r(!$||$.type?new Gi(null,e,P):$),P.abort(),P=null)},o.cancelToken&&o.cancelToken.subscribe(g),o.signal&&(o.signal.aborted?g():o.signal.addEventListener("abort",g)));const H=vS(o.url);if(H&&Gt.protocols.indexOf(H)===-1){r(new je("Unsupported protocol "+H+":",je.ERR_BAD_REQUEST,e));return}P.send(u||null)})},MS=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const u=function(h){if(!o){o=!0,c();const g=h instanceof Error?h:this.reason;r.abort(g instanceof je?g:new Gi(g instanceof Error?g.message:g))}};let l=t&&setTimeout(()=>{l=null,u(new je(`timeout ${t} of ms exceeded`,je.ETIMEDOUT))},t);const c=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(u):h.removeEventListener("abort",u)}),e=null)};e.forEach(h=>h.addEventListener("abort",u));const{signal:d}=r;return d.unsubscribe=()=>q.asap(c),d}},FS=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},BS=function(e,t){return oc(this,null,function*(){try{for(var n=f_(US(e)),r,o,u;r=!(o=yield new Tr(n.next())).done;r=!1){const l=o.value;yield*Ep(FS(l,t))}}catch(o){u=[o]}finally{try{r&&(o=n.return)&&(yield new Tr(o.call(n)))}finally{if(u)throw u[0]}}})},US=function(e){return oc(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Ep(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Tr(t.read());if(n)break;yield r}}finally{yield new Tr(t.cancel())}})},gm=(e,t,n,r)=>{const o=BS(e,t);let u=0,l,c=h=>{l||(l=!0,r&&r(h))};return new ReadableStream({pull(h){return jt(this,null,function*(){try{const{done:g,value:y}=yield o.next();if(g){c(),h.close();return}let b=y.byteLength;if(n){let T=u+=b;n(T)}h.enqueue(new Uint8Array(y))}catch(g){throw c(g),g}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})},Em=64*1024,{isFunction:Wu}=q,HS=(({Request:e,Response:t})=>({Request:e,Response:t}))(q.global),{ReadableStream:ym,TextEncoder:Tm}=q.global,bm=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},zS=e=>{e=q.merge.call({skipUndefined:!0},HS,e);const{fetch:t,Request:n,Response:r}=e,o=t?Wu(t):typeof fetch=="function",u=Wu(n),l=Wu(r);if(!o)return!1;const c=o&&Wu(ym),d=o&&(typeof Tm=="function"?(S=>k=>S.encode(k))(new Tm):S=>jt(null,null,function*(){return new Uint8Array(yield new n(S).arrayBuffer())})),h=u&&c&&bm(()=>{let S=!1;const k=new n(Gt.origin,{body:new ym,method:"POST",get duplex(){return S=!0,"half"}}).headers.has("Content-Type");return S&&!k}),g=l&&c&&bm(()=>q.isReadableStream(new r("").body)),y={stream:g&&(S=>S.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!y[S]&&(y[S]=(k,P)=>{let L=k&&k[S];if(L)return L.call(k);throw new je(`Response type '${S}' is not supported`,je.ERR_NOT_SUPPORT,P)})});const b=S=>jt(null,null,function*(){if(S==null)return 0;if(q.isBlob(S))return S.size;if(q.isSpecCompliantForm(S))return(yield new n(Gt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(q.isArrayBufferView(S)||q.isArrayBuffer(S))return S.byteLength;if(q.isURLSearchParams(S)&&(S=S+""),q.isString(S))return(yield d(S)).byteLength}),T=(S,k)=>jt(null,null,function*(){const P=q.toFiniteNumber(S.getContentLength());return P==null?b(k):P});return S=>jt(null,null,function*(){let{url:k,method:P,data:L,signal:H,cancelToken:$,timeout:Z,onDownloadProgress:he,onUploadProgress:M,responseType:Ee,headers:ke,withCredentials:Ne="same-origin",fetchOptions:U}=mm(S),ge=t||fetch;Ee=Ee?(Ee+"").toLowerCase():"text";let me=MS([H,$&&$.toAbortSignal()],Z),pe=null;const le=me&&me.unsubscribe&&(()=>{me.unsubscribe()});let _e;try{if(M&&h&&P!=="get"&&P!=="head"&&(_e=yield T(ke,L))!==0){let O=new n(k,{method:"POST",body:L,duplex:"half"}),Y;if(q.isFormData(L)&&(Y=O.headers.get("content-type"))&&ke.setContentType(Y),O.body){const[x,re]=fm(_e,Yu(dm(M)));L=gm(O.body,Em,x,re)}}q.isString(Ne)||(Ne=Ne?"include":"omit");const Pe=u&&"credentials"in n.prototype,ce=He(G({},U),{signal:me,method:P.toUpperCase(),headers:ke.normalize().toJSON(),body:L,duplex:"half",credentials:Pe?Ne:void 0});pe=u&&new n(k,ce);let V=yield u?ge(pe,U):ge(k,ce);const ne=g&&(Ee==="stream"||Ee==="response");if(g&&(he||ne&&le)){const O={};["status","statusText","headers"].forEach(be=>{O[be]=V[be]});const Y=q.toFiniteNumber(V.headers.get("content-length")),[x,re]=he&&fm(Y,Yu(dm(he),!0))||[];V=new r(gm(V.body,Em,x,()=>{re&&re(),le&&le()}),O)}Ee=Ee||"text";let C=yield y[q.findKey(y,Ee)||"text"](V,S);return!ne&&le&&le(),yield new Promise((O,Y)=>{cm(O,Y,{data:C,headers:ln.from(V.headers),status:V.status,statusText:V.statusText,config:S,request:pe})})}catch(Pe){throw le&&le(),Pe&&Pe.name==="TypeError"&&/Load failed|fetch/i.test(Pe.message)?Object.assign(new je("Network Error",je.ERR_NETWORK,S,pe),{cause:Pe.cause||Pe}):je.from(Pe,Pe&&Pe.code,S,pe)}})},jS=new Map,_m=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,u=[r,o,n];let l=u.length,c=l,d,h,g=jS;for(;c--;)d=u[c],h=g.get(d),h===void 0&&g.set(d,h=c?new Map:zS(t)),g=h;return h};_m();const Lc={http:cS,xhr:DS,fetch:{get:_m}};q.forEach(Lc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const Sm=e=>`- ${e}`,$S=e=>q.isFunction(e)||e===null||e===!1,xm={getAdapter:(e,t)=>{e=q.isArray(e)?e:[e];const{length:n}=e;let r,o;const u={};for(let l=0;l<n;l++){r=e[l];let c;if(o=r,!$S(r)&&(o=Lc[(c=String(r)).toLowerCase()],o===void 0))throw new je(`Unknown adapter '${c}'`);if(o&&(q.isFunction(o)||(o=o.get(t))))break;u[c||"#"+l]=o}if(!o){const l=Object.entries(u).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?l.length>1?`since :
21
5
  `+l.map(Sm).join(`
@@ -49,23 +33,7 @@
49
33
  `))+1))}const l="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");u.move(l+" ");let h=n.containerPhrasing(e,G({before:"# ",after:`
50
34
  `},u.current()));return/^[\t ]/.test(h)&&(h=Mo(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),d(),c(),h}sE.peek=IO;function sE(e){return e.value||""}function IO(){return"<"}oE.peek=OO;function oE(e,t,n,r){const o=nd(n),u=o==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,G({before:h,after:"]"},d.current()))),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,G({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,G({before:h,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${u}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,G({before:h,after:o},d.current()))),h+=d.move(o),c()),h+=d.move(")"),l(),h}function OO(){return"!"}uE.peek=PO;function uE(e,t,n,r){const o=e.referenceType,u=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const h=n.safe(e.alt,G({before:d,after:"]"},c.current()));d+=c.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const y=n.safe(n.associationId(e),G({before:d,after:"]"},c.current()));return l(),n.stack=g,u(),o==="full"||!h||h!==y?d+=c.move(y+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function PO(){return"!"}aE.peek=RO;function aE(e,t,n){let r=e.value||"",o="`",u=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u<n.unsafe.length;){const l=n.unsafe[u],c=n.compilePattern(l);let d;if(l.atBreak)for(;d=c.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return o+r+o}function RO(){return"`"}function lE(e,t){const n=df(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}cE.peek=LO;function cE(e,t,n,r){const o=nd(n),u=o==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(lE(e,n)){const g=n.stack;n.stack=[],c=n.enter("autolink");let y=l.move("<");return y+=l.move(n.containerPhrasing(e,G({before:y,after:">"},l.current()))),y+=l.move(">"),c(),n.stack=g,y}c=n.enter("link"),d=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,G({before:h,after:"]("},l.current()))),h+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,G({before:h,after:">"},l.current()))),h+=l.move(">")):(d=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,G({before:h,after:e.title?" ":")"},l.current())))),d(),e.title&&(d=n.enter(`title${u}`),h+=l.move(" "+o),h+=l.move(n.safe(e.title,G({before:h,after:o},l.current()))),h+=l.move(o),d()),h+=l.move(")"),c(),h}function LO(e,t,n){return lE(e,n)?"<":"["}fE.peek=DO;function fE(e,t,n,r){const o=e.referenceType,u=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const h=n.containerPhrasing(e,G({before:d,after:"]"},c.current()));d+=c.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const y=n.safe(n.associationId(e),G({before:d,after:"]"},c.current()));return l(),n.stack=g,u(),o==="full"||!h||h!==y?d+=c.move(y+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function DO(){return"["}function rd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function MO(e){const t=rd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function FO(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function dE(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function BO(e,t,n,r){const o=n.enter("list"),u=n.bulletCurrent;let l=e.ordered?FO(n):rd(n);const c=e.ordered?l==="."?")":".":MO(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),dE(n)===l&&g){let y=-1;for(;++y<e.children.length;){const b=e.children[y];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const h=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=u,o(),h}function UO(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function HO(e,t,n,r){const o=UO(n);let u=n.bulletCurrent||rd(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let l=u.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(u+" ".repeat(l-u.length)),c.shift(l);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),g);return d(),h;function g(y,b,T){return b?(T?"":" ".repeat(l))+y:(T?u:u+" ".repeat(l-u.length))+y}}function zO(e,t,n,r){const o=n.enter("paragraph"),u=n.enter("phrasing"),l=n.containerPhrasing(e,r);return u(),o(),l}const jO=ya(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $O(e,t,n,r){return(e.children.some(function(l){return jO(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function VO(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}hE.peek=qO;function hE(e,t,n,r){const o=VO(n),u=n.enter("strong"),l=n.createTracker(r),c=l.move(o+o);let d=l.move(n.containerPhrasing(e,G({after:o,before:c},l.current())));const h=d.charCodeAt(0),g=Pa(r.before.charCodeAt(r.before.length-1),h,o);g.inside&&(d=Mo(h)+d.slice(1));const y=d.charCodeAt(d.length-1),b=Pa(r.after.charCodeAt(0),y,o);b.inside&&(d=d.slice(0,-1)+Mo(y));const T=l.move(o+o);return u(),n.attentionEncodeSurroundingInfo={after:b.outside,before:g.outside},c+d+T}function qO(e,t,n){return n.options.strong||"*"}function YO(e,t,n,r){return n.safe(e.value,r)}function WO(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function GO(e,t,n){const r=(dE(n)+(n.options.ruleSpaces?" ":"")).repeat(WO(n));return n.options.ruleSpaces?r.slice(0,-1):r}const pE={blockquote:EO,break:rE,code:xO,definition:AO,emphasis:iE,hardBreak:rE,heading:NO,html:sE,image:oE,imageReference:uE,inlineCode:aE,link:cE,linkReference:fE,list:BO,listItem:HO,paragraph:zO,root:$O,strong:hE,text:YO,thematicBreak:GO};function KO(){return{enter:{table:QO,tableData:mE,tableHeader:mE,tableRow:JO},exit:{codeText:ZO,table:XO,tableData:id,tableHeader:id,tableRow:id}}}function QO(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function XO(e){this.exit(e),this.data.inTable=void 0}function JO(e){this.enter({type:"tableRow",children:[]},e)}function id(e){this.exit(e)}function mE(e){this.enter({type:"tableCell",children:[]},e)}function ZO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,eP));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function eP(e,t){return t==="|"?t:e}function tP(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
35
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:d,tableRow:c}};function l(T,S,k,P){return h(g(T,k,P),T.align)}function c(T,S,k,P){const L=y(T,k,P),H=h([L]);return H.slice(0,H.indexOf(`
52
- `))}function d(T,S,k,P){const L=k.enter("tableCell"),H=k.enter("phrasing"),$=k.containerPhrasing(T,He(G({},P),{before:u,after:u}));return H(),L(),$}function h(T,S){return mO(T,{align:S,alignDelimiters:r,padding:n,stringLength:o})}function g(T,S,k){const P=T.children;let L=-1;const H=[],$=S.enter("table");for(;++L<P.length;)H[L]=y(P[L],S,k);return $(),H}function y(T,S,k){const P=T.children;let L=-1;const H=[],$=S.enter("tableRow");for(;++L<P.length;)H[L]=d(P[L],T,S,k);return $(),H}function b(T,S,k){let P=pE.inlineCode(T,S,k);return k.stack.includes("tableCell")&&(P=P.replace(/\|/g,"\\$&")),P}}function nP(){return{exit:{taskListCheckValueChecked:gE,taskListCheckValueUnchecked:gE,paragraph:iP}}}function rP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sP}}}function gE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function iP(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let u=-1,l;for(;++u<o.length;){const c=o[u];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function sP(e,t,n,r){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);u&&c.move(l);let d=pE.listItem(e,t,n,G(G({},r),c.current()));return u&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(g){return g+l}}function oP(){return[BI(),sO(),lO(),KO(),nP()]}function uP(e){return{extensions:[UI(),oO(e),cO(),tP(e),rP()]}}const aP={tokenize:pP,partial:!0},EE={tokenize:mP,partial:!0},yE={tokenize:gP,partial:!0},TE={tokenize:EP,partial:!0},lP={tokenize:yP,partial:!0},bE={name:"wwwAutolink",tokenize:dP,previous:SE},_E={name:"protocolAutolink",tokenize:hP,previous:xE},Ar={name:"emailAutolink",tokenize:fP,previous:CE},cr={};function cP(){return{text:cr}}let Ai=48;for(;Ai<123;)cr[Ai]=Ar,Ai++,Ai===58?Ai=65:Ai===91&&(Ai=97);cr[43]=Ar,cr[45]=Ar,cr[46]=Ar,cr[95]=Ar,cr[72]=[Ar,_E],cr[104]=[Ar,_E],cr[87]=[Ar,bE],cr[119]=[Ar,bE];function fP(e,t,n){const r=this;let o,u;return l;function l(y){return!sd(y)||!CE.call(r,r.previous)||od(r.events)?n(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(y))}function c(y){return sd(y)?(e.consume(y),c):y===64?(e.consume(y),d):n(y)}function d(y){return y===46?e.check(lP,g,h)(y):y===45||y===95||Qt(y)?(u=!0,e.consume(y),d):g(y)}function h(y){return e.consume(y),o=!0,d}function g(y){return u&&o&&rn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(y)):n(y)}}function dP(e,t,n){const r=this;return o;function o(l){return l!==87&&l!==119||!SE.call(r,r.previous)||od(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(aP,e.attempt(EE,e.attempt(yE,u),n),n)(l))}function u(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function hP(e,t,n){const r=this;let o="",u=!1;return l;function l(y){return(y===72||y===104)&&xE.call(r,r.previous)&&!od(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(y),e.consume(y),c):n(y)}function c(y){if(rn(y)&&o.length<5)return o+=String.fromCodePoint(y),e.consume(y),c;if(y===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(y),d}return n(y)}function d(y){return y===47?(e.consume(y),u?h:(u=!0,d)):n(y)}function h(y){return y===null||ca(y)||it(y)||bi(y)||fa(y)?n(y):e.attempt(EE,e.attempt(yE,g),n)(y)}function g(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(y)}}function pP(e,t,n){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),u):n(l)}function u(l){return l===null?n(l):t(l)}}function mP(e,t,n){let r,o,u;return l;function l(h){return h===46||h===95?e.check(TE,d,c)(h):h===null||it(h)||bi(h)||h!==45&&fa(h)?d(h):(u=!0,e.consume(h),l)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),l}function d(h){return o||r||!u?n(h):t(h)}}function gP(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r<n?u(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(TE,t,u)(l):l===null||it(l)||bi(l)?t(l):(e.consume(l),o)}function u(l){return l===41&&r++,e.consume(l),o}}function EP(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),u):c===93?(e.consume(c),o):c===60||c===null||it(c)||bi(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||it(c)||bi(c)?t(c):r(c)}function u(c){return rn(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):rn(c)?(e.consume(c),l):n(c)}}function yP(e,t,n){return r;function r(u){return e.consume(u),o}function o(u){return Qt(u)?n(u):t(u)}}function SE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||it(e)}function xE(e){return!rn(e)}function CE(e){return!(e===47||sd(e))}function sd(e){return e===43||e===45||e===46||e===95||Qt(e)}function od(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const TP={tokenize:wP,partial:!0};function bP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:CP,continuation:{tokenize:AP},exit:kP}},text:{91:{name:"gfmFootnoteCall",tokenize:xP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_P,resolveTo:SP}}}}function _P(e,t,n){const r=this;let o=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const h=Yn(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function SP(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",u,t],["enter",l,t],["exit",l,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function xP(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,l;return c;function c(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),d}function d(y){return y!==94?n(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(y){if(u>999||y===93&&!l||y===null||y===91||it(y))return n(y);if(y===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(Yn(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(y)}return it(y)||(l=!0),u++,e.consume(y),y===92?g:h}function g(y){return y===91||y===92||y===93?(e.consume(y),u++,h):h(y)}}function CP(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,l=0,c;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(S)}function g(S){if(l>999||S===93&&!c||S===null||S===91||it(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return u=Yn(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return it(S)||(c=!0),l++,e.consume(S),S===92?y:g}function y(S){return S===91||S===92||S===93?(e.consume(S),l++,g):g(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),o.includes(u)||o.push(u),Xe(e,T,"gfmFootnoteDefinitionWhitespace")):n(S)}function T(S){return t(S)}}function AP(e,t,n){return e.check(yo,t,e.attempt(TP,t,n))}function kP(e){e.exit("gfmFootnoteDefinition")}function wP(e,t,n){const r=this;return Xe(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(u):n(u)}}function vP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(l,c){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let h=d;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[d][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[d][1].end)},y={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[d][1].start)},b=[["enter",g,c],["enter",l[h][1],c],["exit",l[h][1],c],["enter",y,c]],T=c.parser.constructs.insideSpan.null;T&&Cn(b,b.length,0,da(T,l.slice(h+1,d),c)),Cn(b,b.length,0,[["exit",y,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",g,c]]),Cn(l,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function u(l,c,d){const h=this.previous,g=this.events;let y=0;return b;function b(S){return h===126&&g[g.length-1][1].type!=="characterEscape"?d(S):(l.enter("strikethroughSequenceTemporary"),T(S))}function T(S){const k=us(h);if(S===126)return y>1?d(S):(l.consume(S),y++,T);if(y<2&&!n)return d(S);const P=l.exit("strikethroughSequenceTemporary"),L=us(S);return P._open=!L||L===2&&!!k,P._close=!k||k===2&&!!L,c(S)}}}class NP{constructor(){this.map=[]}add(t,n,r){IP(this,t,n,r)}consume(t){if(this.map.sort(function(u,l){return u[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const u of o)t.push(u);o=r.pop()}this.map.length=0}}function IP(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function OP(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function PP(){return{flow:{null:{name:"table",tokenize:RP,resolveAll:LP}}}}function RP(e,t,n){const r=this;let o=0,u=0,l;return c;function c(U){let ge=r.events.length-1;for(;ge>-1;){const le=r.events[ge][1].type;if(le==="lineEnding"||le==="linePrefix")ge--;else break}const me=ge>-1?r.events[ge][1].type:null,pe=me==="tableHead"||me==="tableRow"?M:d;return pe===M&&r.parser.lazy[r.now().line]?n(U):pe(U)}function d(U){return e.enter("tableHead"),e.enter("tableRow"),h(U)}function h(U){return U===124||(l=!0,u+=1),g(U)}function g(U){return U===null?n(U):Oe(U)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),T):n(U):Ge(U)?Xe(e,g,"whitespace")(U):(u+=1,l&&(l=!1,o+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),l=!0,g):(e.enter("data"),y(U)))}function y(U){return U===null||U===124||it(U)?(e.exit("data"),g(U)):(e.consume(U),U===92?b:y)}function b(U){return U===92||U===124?(e.consume(U),y):y(U)}function T(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(U):(e.enter("tableDelimiterRow"),l=!1,Ge(U)?Xe(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):S(U))}function S(U){return U===45||U===58?P(U):U===124?(l=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),k):he(U)}function k(U){return Ge(U)?Xe(e,P,"whitespace")(U):P(U)}function P(U){return U===58?(u+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),L):U===45?(u+=1,L(U)):U===null||Oe(U)?Z(U):he(U)}function L(U){return U===45?(e.enter("tableDelimiterFiller"),H(U)):he(U)}function H(U){return U===45?(e.consume(U),H):U===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),$):(e.exit("tableDelimiterFiller"),$(U))}function $(U){return Ge(U)?Xe(e,Z,"whitespace")(U):Z(U)}function Z(U){return U===124?S(U):U===null||Oe(U)?!l||o!==u?he(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):he(U)}function he(U){return n(U)}function M(U){return e.enter("tableRow"),Ee(U)}function Ee(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),Ee):U===null||Oe(U)?(e.exit("tableRow"),t(U)):Ge(U)?Xe(e,Ee,"whitespace")(U):(e.enter("data"),ke(U))}function ke(U){return U===null||U===124||it(U)?(e.exit("data"),Ee(U)):(e.consume(U),U===92?Ne:ke)}function Ne(U){return U===92||U===124?(e.consume(U),ke):ke(U)}}function LP(e,t){let n=-1,r=!0,o=0,u=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,h,g,y;const b=new NP;for(;++n<e.length;){const T=e[n],S=T[1];T[0]==="enter"?S.type==="tableHead"?(c=!1,d!==0&&(AE(b,t,d,h,g),g=void 0,d=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,y=void 0,u=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,g={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",g,t]])),o=S.type==="tableDelimiterRow"?2:g?3:1):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(u[1]!==0&&(l[0]=l[1],y=Ra(b,t,u,o,void 0,y),u=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(l[0]=l[1],y=Ra(b,t,u,o,void 0,y)),u=l,l=[u[1],n,0,0])):S.type==="tableHead"?(c=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,u[1]!==0?(l[0]=l[1],y=Ra(b,t,u,o,n,y)):l[1]!==0&&(y=Ra(b,t,l,o,n,y)),o=0):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&AE(b,t,d,h,g),b.consume(t.events),n=-1;++n<t.events.length;){const T=t.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=OP(t.events,n))}return e}function Ra(e,t,n,r,o,u){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(u.end=Object.assign({},Es(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const d=Es(t.events,n[1]);if(u={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const h=Es(t.events,n[2]),g=Es(t.events,n[3]),y={type:c,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",y,t]]),r!==2){const b=t.events[n[2]],T=t.events[n[3]];if(b[1].end=Object.assign({},T[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,k=n[3]-n[2]-1;e.add(S,k,[])}}e.add(n[3]+1,0,[["exit",y,t]])}return o!==void 0&&(u.end=Object.assign({},Es(t.events,o)),e.add(o,0,[["exit",u,t]]),u=void 0),u}function AE(e,t,n,r,o){const u=[],l=Es(t.events,n);o&&(o.end=Object.assign({},l),u.push(["exit",o,t])),r.end=Object.assign({},l),u.push(["exit",r,t]),e.add(n+1,0,u)}function Es(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const DP={name:"tasklistCheck",tokenize:FP};function MP(){return{text:{91:DP}}}function FP(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),u)}function u(d){return it(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Oe(d)?t(d):Ge(d)?e.check({tokenize:BP},t,n)(d):n(d)}}function BP(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function UP(e){return K0([cP(),bP(),vP(e),PP(),MP()])}const HP={};function zP(e){const t=this,n=e||HP,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(UP(n)),u.push(oP()),l.push(uP(n))}const La=()=>I.jsx("span",{className:`${te}-blinking-cursor`,children:I.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:I.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),kE=({globalClassName:e,message:t})=>{const{isLoading:n,isResponseLoading:r}=yi(),o=n&&r(t.eventSourceId||"")&&t.name==="partial_inquiry";return I.jsx(ov,{remarkPlugins:[zP],rehypePlugins:[PI],components:{h1:({children:u})=>I.jsx("h1",{className:ae(e,`${te}-header h1`),children:u}),h2:({children:u})=>I.jsx("h2",{className:ae(e,`${te}-header h2`),children:u}),h3:({children:u})=>I.jsx("h3",{className:ae(e,`${te}-header h3`),children:u}),ul:({children:u})=>I.jsx("ul",{className:ae(e,`${te}-ul`),children:u}),ol:({children:u})=>I.jsx("ol",{className:ae(e,`${te}-ol`),children:u}),li:({children:u})=>I.jsx("li",{className:ae(e,`${te}-li`),children:u}),a:({href:u,children:l})=>I.jsx("a",He(G({className:ae(e,`${te}-link`)},u?{href:u,target:"_blank"}:{}),{rel:"noopener noreferrer",children:l})),table:({children:u})=>I.jsx("table",{className:ae(e,`${te}-table`),children:u}),thead:({children:u})=>I.jsx("thead",{className:ae(e,`${te}-thead`),children:u}),tbody:({children:u})=>I.jsx("tbody",{className:ae(e,`${te}-tbody`),children:u}),tr:({children:u})=>I.jsx("tr",{className:ae(e,`${te}-tr`),children:u}),th:({children:u})=>I.jsx("th",{className:ae(e,`${te}-th`),children:u}),td:({children:u})=>I.jsx("td",{className:ae(e,`${te}-td`),children:u}),span:({className:u,children:l})=>u===`${te}-blinking-cursor`?I.jsx(La,{}):I.jsx("span",{children:l})},children:t.message+(o?`<span className='${te}-blinking-cursor'></span>`:"")})},jP=({globalClassName:e,message:t})=>{const[n,r]=K.useState(!1),o=t.tool_name||t.toolName,u=!!t.thought,l=!!o,c=()=>{r(d=>!d)};return I.jsxs("div",{children:[I.jsxs("div",{className:ae(e,`${te}-progress-message`,"standalone"),children:[I.jsx("span",{className:ae(e,`${te}-message-icon`,"progress-icon","standalone"),children:I.jsx(g0,{})}),I.jsx("p",{className:ae(e,`${te}-progress-text`,"standalone"),children:t.message})]}),(u||l)&&I.jsxs(I.Fragment,{children:[I.jsx(Jc,{className:ae(e,`${te}-thought-context-button`),onClick:c,children:n?I.jsxs(I.Fragment,{children:["Hide ",I.jsx(Jx,{})]}):I.jsxs(I.Fragment,{children:["Context ",I.jsx(Zx,{})]})}),n&&I.jsx("div",{className:ae(e,`${te}-thought-container`),children:u&&I.jsx("p",{className:ae(e,`${te}-progress-thought`),children:t.thought})})]})]})},$P=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?I.jsx(jP,{globalClassName:e,message:t}):I.jsxs("div",{className:ae(e,`${te}-progress-message`,"embedded"),title:t.message,children:[I.jsx("span",{className:ae(e,`${te}-message-icon`,"progress-icon","embedded"),children:I.jsx(g0,{})}),I.jsx("i",{className:ae(e,`${te}-progress-text`,"embedded"),children:t.message})]}),VP=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var r;return I.jsxs("div",{className:ae(e,`${te}-refined-search`,{embedded:!n,standalone:n}),children:[I.jsxs("div",{className:ae(e,`${te}-refined-search-query`,{embedded:!n,standalone:n}),children:[I.jsx("span",{className:ae(e,`${te}-message-icon`,`${te}-refined-search-icon`,{embedded:!n,standalone:n}),children:I.jsx(ua,{})}),I.jsx("p",{className:ae(e,`${te}-text`,"bold"),children:(r=t.searchParams)==null?void 0:r.query})]}),I.jsx(kE,{message:t})]})},wE=e=>{var c;const{configModule:t}=or(),n=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:r={}}=((c=e.request)==null?void 0:c.searchParams)||{facetFilters:{}},o=Object.fromEntries(Object.entries(r).filter(([d])=>!n.includes(d))),u=Object.keys(o),l=Object.values(o).reduce((d,h)=>d+h.length,0);return{facetFiltersList:u,filterCount:l}},Da=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>I.jsx("span",{className:ae(t,`${te}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filters`}),vE=({globalClassName:e,message:t,facetFiltersList:n})=>{var o,u;if(!n.length)return null;const r=((u=(o=t.request)==null?void 0:o.searchParams)==null?void 0:u.facetFilters)||{};return n.map(l=>{var d;const c=((d=r[l])==null?void 0:d.join(", "))||"";return I.jsxs("div",{className:ae(e,`${te}-facets`),children:[I.jsx("p",{className:ae(e,`${te}-facet-category`),children:l}),I.jsx("p",{className:ae(e,`${te}-facet-values`),children:c})]},l)})},qP=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var u,l;const{facetFiltersList:r,filterCount:o}=wE(t);return n?I.jsxs("div",{children:[I.jsxs("div",{className:ae(e,`${te}-user-message standalone`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-message-icon standalone`),children:I.jsx(E0,{})}),I.jsx("p",{className:ae(e,`${te}-user-message-text`),children:(u=t.request)==null?void 0:u.userPrompt}),r.length>0&&I.jsx(Da,{isWidgetStandalone:!0,globalClassName:e,filterCount:o})]}),I.jsx(vE,{globalClassName:e,facetFiltersList:r,message:t})]}):I.jsxs("div",{className:ae(e,`${te}-user-message embedded`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-message-icon embedded`),children:I.jsx(E0,{})}),I.jsx("p",{children:(l=t.request)==null?void 0:l.userPrompt}),r.length>0&&I.jsx(Da,{isWidgetStandalone:!1,filterCount:o})]})},YP=({globalClassName:e,actionLabel:t,query:n,message:r,facetFiltersList:o,filterCount:u})=>I.jsxs("div",{className:ae(e,`${te}-user-search standalone`),children:[I.jsxs("div",{className:ae(e,`${te}-user-search-query`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-search-icon standalone`),children:I.jsx(ua,{})}),I.jsx("p",{className:ae(e,`${te}-text bold`),children:`${t}: ${n}`}),o.length>0&&I.jsx(Da,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),I.jsx(vE,{globalClassName:e,facetFiltersList:o,message:r})]}),WP=({globalClassName:e,message:t,isWidgetStandalone:n})=>{const{facetFiltersList:r,filterCount:o}=wE(t),{actionLabel:u,query:l}=K.useMemo(()=>{var d,h,g,y;switch(t.name){case"copilot_search":return{actionLabel:"Your search",query:(d=t.request)==null?void 0:d.searchParams.query};case"copilot_browse":return{actionLabel:"Browsing category",query:(g=(h=t.request)==null?void 0:h.browseParams)==null?void 0:g.categoryId};case"product_view":return{actionLabel:"Viewing product",query:(y=t.request)==null?void 0:y.productId};default:return{actionLabel:"",query:""}}},[t]);return!t.isUserAction||!l?null:n?I.jsx(YP,{globalClassName:e,message:t,actionLabel:u,query:l,facetFiltersList:r,filterCount:o}):I.jsxs("div",{className:ae(e,`${te}-user-search embedded`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-search-icon embedded`),children:I.jsx(ua,{})}),I.jsx("p",{children:l}),r.length>0&&I.jsx(Da,{isWidgetStandalone:!1,filterCount:o})]})},NE=["copilot_search","copilot_browse","product_view"],IE=({message:e,globalClassName:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{var u;if(!e)return null;let o=e.name;if(NE.includes(o)&&(e.isInitial||e.isUserAction)&&(o="faceted_navigation"),NE.includes(o)&&!((u=e.request)!=null&&u.userPrompt))return null;switch(o){case"copilot_search":case"copilot_browse":case"product_view":return I.jsx(qP,{globalClassName:t,isWidgetStandalone:n,message:e});case"faceted_navigation":return I.jsx(WP,{globalClassName:t,message:e,isWidgetStandalone:n});case"refined_search":return I.jsx(VP,{globalClassName:t,message:e,isWidgetStandalone:n});case"follow_up":return I.jsx(aC,{globalClassName:t,isWidgetStandalone:n,message:e,handleSuggestionClick:r});case"inquiry":case"partial_inquiry":return I.jsx(kE,{globalClassName:t,message:e});case"error":return I.jsx(sC,{message:e,isWidgetStandalone:n});case"display_products":return I.jsx(iC,{message:e,isWidgetStandalone:n});case"progress":return I.jsx($P,{globalClassName:t,isWidgetStandalone:n,message:e});default:return null}},ud=({isWidgetStandalone:e,messages:t,handleSuggestionClick:n})=>{const{globalClassName:r}=or();return t.map(o=>o.messages&&o.type==="group"?I.jsx("div",{className:ae(r,`${te}-message-group`,e?"standalone":"embedded"),children:o.messages.length>0&&o.messages.map(u=>I.jsx("div",{className:`${te}-message-group-child`,children:I.jsx(IE,{id:u.id,globalClassName:r,isWidgetStandalone:e,message:u,handleSuggestionClick:n})},u.id))},`group-${o.eventSourceId}`):o.type==="individual"&&o.message?I.jsx("div",{className:ae(r,`${te}-message`,e?"standalone":"embedded",{error:o.message.name.includes("error")}),children:I.jsx(IE,{id:o.message.id,globalClassName:r,isWidgetStandalone:e,message:o.message,handleSuggestionClick:n})},o.message.id):null)},OE=()=>{const{globalClassName:e,themeVariables:t}=or(),{status:n}=ia(),{copilot:r,messages:o,groupedMessages:u,isLoading:l,handleUserInput:c,handleSuggestion:d}=yi(),{isOpen:h}=n||{},g=K.useRef(null);return K.useEffect(()=>{g.current&&g.current.scrollIntoView({behavior:"smooth",block:"end"})},[o]),r?!h||u.length===0?null:I.jsxs("div",{className:ae(e,`${te}-container`,`${te}-embedded-chat`),style:t,children:[I.jsxs("div",{className:ae(e,`${te}-message-container`,"embedded"),children:[I.jsx(ud,{isWidgetStandalone:!1,messages:u,handleSuggestionClick:d}),l&&I.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:I.jsx(La,{})}),I.jsx("div",{ref:g})]}),I.jsx(Zc,{componentType:"chat",className:"embedded-chat",isLoading:l,onSubmit:c})]}):I.jsx("div",{children:"Loading Copilot..."})};function GP(e){return Sn({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function KP(e){return Sn({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function QP(e){return Sn({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function XP(e){return Sn({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}function JP(e){return e==null?[]:Array.isArray(e)?e:[e]}var ZP=e=>e!=null&&typeof e=="object",Ma=e=>typeof e=="string",ys=e=>typeof e=="function",eR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),tR=e=>Object.prototype.toString.call(e),PE=Function.prototype.toString,nR=PE.call(Object),rR=e=>{if(!ZP(e)||tR(e)!="[object Object]"||oR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=eR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&PE.call(n)==nR},iR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,sR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,oR=e=>iR(e)||sR(e),uR=e=>e(),ad=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function RE(e){if(!rR(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=RE(o))}return n}function ld(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function aR(e,t){if(e==null)throw new Error(t())}var LE=()=>{},Fa=e=>typeof e=="object"&&e!==null,lR=1,cR=9,fR=11,pn=e=>Fa(e)&&e.nodeType===lR&&typeof e.nodeName=="string",cd=e=>Fa(e)&&e.nodeType===cR,dR=e=>Fa(e)&&e===e.window,DE=e=>pn(e)?e.localName||"":"#document";function hR(e){return["html","body","#document"].includes(DE(e))}var pR=e=>Fa(e)&&e.nodeType!==void 0,Ts=e=>pR(e)&&e.nodeType===fR&&"host"in e,mR=e=>pn(e)&&e.localName==="input",gR=e=>pn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1,ER=/(textarea|select)/;function yR(e){if(e==null||!pn(e))return!1;try{return mR(e)&&e.selectionStart!=null||ER.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Ba(e,t){var r;if(!e||!t||!pn(e)||!pn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Ts(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function fr(e){var t;return cd(e)?e:dR(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function TR(e){return fr(e).documentElement}function Fo(e){var t,n,r;return Ts(e)?Fo(e.host):cd(e)?(t=e.defaultView)!=null?t:window:pn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ME(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}function bR(e){if(DE(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ts(e)&&e.host||TR(e);return Ts(t)?t.host:t}var fd=new WeakMap;function FE(e){return fd.has(e)||fd.set(e,Fo(e).getComputedStyle(e)),fd.get(e)}var BE=()=>typeof document!="undefined";function _R(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var dd=e=>BE()&&e.test(_R()),UE=()=>BE()&&!!navigator.maxTouchPoints,SR=()=>dd(/^iPhone/i),xR=()=>dd(/^iPad/i)||HE()&&navigator.maxTouchPoints>1,CR=()=>SR()||xR(),HE=()=>dd(/^Mac/i);function AR(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function kr(e){var n;const t=AR(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var kR=e=>e.button===2||HE()&&e.ctrlKey&&e.button===0,dr=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},zE=e=>pn(e)&&e.tagName==="IFRAME",wR=e=>!Number.isNaN(parseInt(e.getAttribute("tabindex")||"0",10)),vR=e=>parseInt(e.getAttribute("tabindex")||"0",10)<0,hd="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",jE=(e,t=!1)=>{if(!e)return[];const n=Array.from(e.querySelectorAll(hd));(t==!0||t=="if-empty"&&n.length===0)&&pn(e)&&$r(e)&&n.unshift(e);const o=n.filter($r);return o.forEach((u,l)=>{if(zE(u)&&u.contentDocument){const c=u.contentDocument.body;o.splice(l,1,...jE(c))}}),o};function $r(e){return!e||e.closest("[inert]")?!1:e.matches(hd)&&gR(e)}function $E(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll(hd)).filter(ki);return r.forEach((o,u)=>{if(zE(o)&&o.contentDocument){const l=o.contentDocument.body,c=$E(l);r.splice(u,1,...c)}}),r.length,r}function ki(e){return e!=null&&e.tabIndex>0?!0:$r(e)&&!vR(e)}function Bo(e){return e.tabIndex<0&&(/^(audio|video|details)$/.test(e.localName)||yR(e))&&!wR(e)?0:e.tabIndex}function NR(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function wr(e){let t;const n=globalThis.requestAnimationFrame(()=>{t=e()});return()=>{globalThis.cancelAnimationFrame(n),t==null||t()}}function pd(e){const t=bR(e);return hR(t)?fr(t).body:pn(t)&&PR(t)?t:pd(t)}var IR=/auto|scroll|overlay|hidden|clip/,OR=new Set(["inline","contents"]);function PR(e){const t=Fo(e),{overflow:n,overflowX:r,overflowY:o,display:u}=t.getComputedStyle(e);return IR.test(n+o+r)&&!OR.has(u)}function Ua(e,t){if(!e)return LE;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function RR(e,t,n){if(!e)return LE;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function LR(e,t,n){const{signal:r}=t;return[new Promise((l,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(d),l(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function DR(e,t){const{timeout:n,rootNode:r}=t,o=Fo(r),u=fr(r),l=new o.AbortController;return LR(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const g=e();g&&g.isConnected&&(h.disconnect(),c(g))});h.observe(u.body,{childList:!0,subtree:!0})}),l,n)}var MR=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),FR=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,VE=e=>{const t={};let n;for(;n=FR.exec(e);)t[n[1]]=n[2];return t},BR=(e,t)=>{if(Ma(e)){if(Ma(t))return`${e};${t}`;e=VE(e)}else Ma(t)&&(t=VE(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function wi(...e){let t={};for(let n of e){for(let r in t){if(r.startsWith("on")&&typeof t[r]=="function"&&typeof n[r]=="function"){t[r]=ad(n[r],t[r]);continue}if(r==="className"||r==="class"){t[r]=MR(t[r],n[r]);continue}if(r==="style"){t[r]=BR(t[r],n[r]);continue}t[r]=n[r]!==void 0?n[r]:t[r]}for(let r in n)t[r]===void 0&&(t[r]=n[r])}return t}function KD(e){return e}var bs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(bs||{}),md="__init__";function UR(e){const t=()=>{var c,d;return(d=(c=e.getRootNode)==null?void 0:c.call(e))!=null?d:document},n=()=>fr(t()),r=()=>{var c;return(c=n().defaultView)!=null?c:window},o=()=>ME(t()),u=c=>c===o(),l=c=>t().getElementById(c);return He(G({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:u,getById:l})}var gd={exports:{}},mn={},Ed={exports:{}},yd={};/**
53
- * @license React
54
- * scheduler.production.min.js
55
- *
56
- * Copyright (c) Facebook, Inc. and its affiliates.
57
- *
58
- * This source code is licensed under the MIT license found in the
59
- * LICENSE file in the root directory of this source tree.
60
- */var qE;function HR(){return qE||(qE=1,function(e){function t(V,ne){var C=V.length;V.push(ne);e:for(;0<C;){var O=C-1>>>1,Y=V[O];if(0<o(Y,ne))V[O]=ne,V[C]=Y,C=O;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var ne=V[0],C=V.pop();if(C!==ne){V[0]=C;e:for(var O=0,Y=V.length,x=Y>>>1;O<x;){var re=2*(O+1)-1,be=V[re],ye=re+1,Ie=V[ye];if(0>o(be,C))ye<Y&&0>o(Ie,be)?(V[O]=Ie,V[ye]=C,O=ye):(V[O]=be,V[re]=C,O=re);else if(ye<Y&&0>o(Ie,C))V[O]=Ie,V[ye]=C,O=ye;else break e}}return ne}function o(V,ne){var C=V.sortIndex-ne.sortIndex;return C!==0?C:V.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],h=[],g=1,y=null,b=3,T=!1,S=!1,k=!1,P=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(V){for(var ne=n(h);ne!==null;){if(ne.callback===null)r(h);else if(ne.startTime<=V)r(h),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(h)}}function Z(V){if(k=!1,$(V),!S)if(n(d)!==null)S=!0,Pe(he);else{var ne=n(h);ne!==null&&ce(Z,ne.startTime-V)}}function he(V,ne){S=!1,k&&(k=!1,L(ke),ke=-1),T=!0;var C=b;try{for($(ne),y=n(d);y!==null&&(!(y.expirationTime>ne)||V&&!ge());){var O=y.callback;if(typeof O=="function"){y.callback=null,b=y.priorityLevel;var Y=O(y.expirationTime<=ne);ne=e.unstable_now(),typeof Y=="function"?y.callback=Y:y===n(d)&&r(d),$(ne)}else r(d);y=n(d)}if(y!==null)var x=!0;else{var re=n(h);re!==null&&ce(Z,re.startTime-ne),x=!1}return x}finally{y=null,b=C,T=!1}}var M=!1,Ee=null,ke=-1,Ne=5,U=-1;function ge(){return!(e.unstable_now()-U<Ne)}function me(){if(Ee!==null){var V=e.unstable_now();U=V;var ne=!0;try{ne=Ee(!0,V)}finally{ne?pe():(M=!1,Ee=null)}}else M=!1}var pe;if(typeof H=="function")pe=function(){H(me)};else if(typeof MessageChannel!="undefined"){var le=new MessageChannel,_e=le.port2;le.port1.onmessage=me,pe=function(){_e.postMessage(null)}}else pe=function(){P(me,0)};function Pe(V){Ee=V,M||(M=!0,pe())}function ce(V,ne){ke=P(function(){V(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_continueExecution=function(){S||T||(S=!0,Pe(he))},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ne=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(V){switch(b){case 1:case 2:case 3:var ne=3;break;default:ne=b}var C=b;b=ne;try{return V()}finally{b=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(V,ne){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var C=b;b=V;try{return ne()}finally{b=C}},e.unstable_scheduleCallback=function(V,ne,C){var O=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?O+C:O):C=O,V){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=C+Y,V={id:g++,callback:ne,priorityLevel:V,startTime:C,expirationTime:Y,sortIndex:-1},C>O?(V.sortIndex=C,t(h,V),n(d)===null&&V===n(h)&&(k?(L(ke),ke=-1):k=!0,ce(Z,C-O))):(V.sortIndex=Y,t(d,V),S||T||(S=!0,Pe(he))),V},e.unstable_shouldYield=ge,e.unstable_wrapCallback=function(V){var ne=b;return function(){var C=b;b=ne;try{return V.apply(this,arguments)}finally{b=C}}}}(yd)),yd}var YE;function zR(){return YE||(YE=1,Ed.exports=HR()),Ed.exports}/**
61
- * @license React
62
- * react-dom.production.min.js
63
- *
64
- * Copyright (c) Facebook, Inc. and its affiliates.
65
- *
66
- * This source code is licensed under the MIT license found in the
67
- * LICENSE file in the root directory of this source tree.
68
- */var WE;function jR(){if(WE)return mn;WE=1;var e=$i(),t=zR();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,a=1;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function u(i,s){l(i,s),l(i+"Capture",s)}function l(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function b(i){return d.call(y,i)?!0:d.call(g,i)?!1:h.test(i)?y[i]=!0:(g[i]=!0,!1)}function T(i,s,a,f){if(a!==null&&a.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:a!==null?!a.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function S(i,s,a,f){if(s===null||typeof s=="undefined"||T(i,s,a,f))return!0;if(f)return!1;if(a!==null)switch(a.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(i,s,a,f,m,E,_){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=m,this.mustUseProperty=a,this.propertyName=i,this.type=s,this.sanitizeURL=E,this.removeEmptyString=_}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){P[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];P[s]=new k(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){P[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){P[i]=new k(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){P[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){P[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){P[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){P[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){P[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function H(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(L,H);P[s]=new k(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(L,H);P[s]=new k(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(L,H);P[s]=new k(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){P[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),P.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){P[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function $(i,s,a,f){var m=P.hasOwnProperty(s)?P[s]:null;(m!==null?m.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(S(s,a,m,f)&&(a=null),f||m===null?b(s)&&(a===null?i.removeAttribute(s):i.setAttribute(s,""+a)):m.mustUseProperty?i[m.propertyName]=a===null?m.type===3?!1:"":a:(s=m.attributeName,f=m.attributeNamespace,a===null?i.removeAttribute(s):(m=m.type,a=m===3||m===4&&a===!0?"":""+a,f?i.setAttributeNS(f,s,a):i.setAttribute(s,a))))}var Z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,he=Symbol.for("react.element"),M=Symbol.for("react.portal"),Ee=Symbol.for("react.fragment"),ke=Symbol.for("react.strict_mode"),Ne=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),ge=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),_e=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),ce=Symbol.for("react.offscreen"),V=Symbol.iterator;function ne(i){return i===null||typeof i!="object"?null:(i=V&&i[V]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,O;function Y(i){if(O===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);O=s&&s[1]||""}return`
36
+ `))}function d(T,S,k,P){const L=k.enter("tableCell"),H=k.enter("phrasing"),$=k.containerPhrasing(T,He(G({},P),{before:u,after:u}));return H(),L(),$}function h(T,S){return mO(T,{align:S,alignDelimiters:r,padding:n,stringLength:o})}function g(T,S,k){const P=T.children;let L=-1;const H=[],$=S.enter("table");for(;++L<P.length;)H[L]=y(P[L],S,k);return $(),H}function y(T,S,k){const P=T.children;let L=-1;const H=[],$=S.enter("tableRow");for(;++L<P.length;)H[L]=d(P[L],T,S,k);return $(),H}function b(T,S,k){let P=pE.inlineCode(T,S,k);return k.stack.includes("tableCell")&&(P=P.replace(/\|/g,"\\$&")),P}}function nP(){return{exit:{taskListCheckValueChecked:gE,taskListCheckValueUnchecked:gE,paragraph:iP}}}function rP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sP}}}function gE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function iP(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let u=-1,l;for(;++u<o.length;){const c=o[u];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function sP(e,t,n,r){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);u&&c.move(l);let d=pE.listItem(e,t,n,G(G({},r),c.current()));return u&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(g){return g+l}}function oP(){return[BI(),sO(),lO(),KO(),nP()]}function uP(e){return{extensions:[UI(),oO(e),cO(),tP(e),rP()]}}const aP={tokenize:pP,partial:!0},EE={tokenize:mP,partial:!0},yE={tokenize:gP,partial:!0},TE={tokenize:EP,partial:!0},lP={tokenize:yP,partial:!0},bE={name:"wwwAutolink",tokenize:dP,previous:SE},_E={name:"protocolAutolink",tokenize:hP,previous:xE},Ar={name:"emailAutolink",tokenize:fP,previous:CE},cr={};function cP(){return{text:cr}}let Ai=48;for(;Ai<123;)cr[Ai]=Ar,Ai++,Ai===58?Ai=65:Ai===91&&(Ai=97);cr[43]=Ar,cr[45]=Ar,cr[46]=Ar,cr[95]=Ar,cr[72]=[Ar,_E],cr[104]=[Ar,_E],cr[87]=[Ar,bE],cr[119]=[Ar,bE];function fP(e,t,n){const r=this;let o,u;return l;function l(y){return!sd(y)||!CE.call(r,r.previous)||od(r.events)?n(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(y))}function c(y){return sd(y)?(e.consume(y),c):y===64?(e.consume(y),d):n(y)}function d(y){return y===46?e.check(lP,g,h)(y):y===45||y===95||Qt(y)?(u=!0,e.consume(y),d):g(y)}function h(y){return e.consume(y),o=!0,d}function g(y){return u&&o&&rn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(y)):n(y)}}function dP(e,t,n){const r=this;return o;function o(l){return l!==87&&l!==119||!SE.call(r,r.previous)||od(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(aP,e.attempt(EE,e.attempt(yE,u),n),n)(l))}function u(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function hP(e,t,n){const r=this;let o="",u=!1;return l;function l(y){return(y===72||y===104)&&xE.call(r,r.previous)&&!od(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(y),e.consume(y),c):n(y)}function c(y){if(rn(y)&&o.length<5)return o+=String.fromCodePoint(y),e.consume(y),c;if(y===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(y),d}return n(y)}function d(y){return y===47?(e.consume(y),u?h:(u=!0,d)):n(y)}function h(y){return y===null||ca(y)||it(y)||bi(y)||fa(y)?n(y):e.attempt(EE,e.attempt(yE,g),n)(y)}function g(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(y)}}function pP(e,t,n){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),u):n(l)}function u(l){return l===null?n(l):t(l)}}function mP(e,t,n){let r,o,u;return l;function l(h){return h===46||h===95?e.check(TE,d,c)(h):h===null||it(h)||bi(h)||h!==45&&fa(h)?d(h):(u=!0,e.consume(h),l)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),l}function d(h){return o||r||!u?n(h):t(h)}}function gP(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r<n?u(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(TE,t,u)(l):l===null||it(l)||bi(l)?t(l):(e.consume(l),o)}function u(l){return l===41&&r++,e.consume(l),o}}function EP(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),u):c===93?(e.consume(c),o):c===60||c===null||it(c)||bi(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||it(c)||bi(c)?t(c):r(c)}function u(c){return rn(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):rn(c)?(e.consume(c),l):n(c)}}function yP(e,t,n){return r;function r(u){return e.consume(u),o}function o(u){return Qt(u)?n(u):t(u)}}function SE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||it(e)}function xE(e){return!rn(e)}function CE(e){return!(e===47||sd(e))}function sd(e){return e===43||e===45||e===46||e===95||Qt(e)}function od(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const TP={tokenize:wP,partial:!0};function bP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:CP,continuation:{tokenize:AP},exit:kP}},text:{91:{name:"gfmFootnoteCall",tokenize:xP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_P,resolveTo:SP}}}}function _P(e,t,n){const r=this;let o=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const h=Yn(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function SP(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",u,t],["enter",l,t],["exit",l,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function xP(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,l;return c;function c(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),d}function d(y){return y!==94?n(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(y){if(u>999||y===93&&!l||y===null||y===91||it(y))return n(y);if(y===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(Yn(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(y)}return it(y)||(l=!0),u++,e.consume(y),y===92?g:h}function g(y){return y===91||y===92||y===93?(e.consume(y),u++,h):h(y)}}function CP(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,l=0,c;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(S)}function g(S){if(l>999||S===93&&!c||S===null||S===91||it(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return u=Yn(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return it(S)||(c=!0),l++,e.consume(S),S===92?y:g}function y(S){return S===91||S===92||S===93?(e.consume(S),l++,g):g(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),o.includes(u)||o.push(u),Xe(e,T,"gfmFootnoteDefinitionWhitespace")):n(S)}function T(S){return t(S)}}function AP(e,t,n){return e.check(yo,t,e.attempt(TP,t,n))}function kP(e){e.exit("gfmFootnoteDefinition")}function wP(e,t,n){const r=this;return Xe(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(u):n(u)}}function vP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(l,c){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let h=d;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[d][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[d][1].end)},y={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[d][1].start)},b=[["enter",g,c],["enter",l[h][1],c],["exit",l[h][1],c],["enter",y,c]],T=c.parser.constructs.insideSpan.null;T&&Cn(b,b.length,0,da(T,l.slice(h+1,d),c)),Cn(b,b.length,0,[["exit",y,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",g,c]]),Cn(l,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function u(l,c,d){const h=this.previous,g=this.events;let y=0;return b;function b(S){return h===126&&g[g.length-1][1].type!=="characterEscape"?d(S):(l.enter("strikethroughSequenceTemporary"),T(S))}function T(S){const k=us(h);if(S===126)return y>1?d(S):(l.consume(S),y++,T);if(y<2&&!n)return d(S);const P=l.exit("strikethroughSequenceTemporary"),L=us(S);return P._open=!L||L===2&&!!k,P._close=!k||k===2&&!!L,c(S)}}}class NP{constructor(){this.map=[]}add(t,n,r){IP(this,t,n,r)}consume(t){if(this.map.sort(function(u,l){return u[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const u of o)t.push(u);o=r.pop()}this.map.length=0}}function IP(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function OP(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function PP(){return{flow:{null:{name:"table",tokenize:RP,resolveAll:LP}}}}function RP(e,t,n){const r=this;let o=0,u=0,l;return c;function c(U){let ge=r.events.length-1;for(;ge>-1;){const le=r.events[ge][1].type;if(le==="lineEnding"||le==="linePrefix")ge--;else break}const me=ge>-1?r.events[ge][1].type:null,pe=me==="tableHead"||me==="tableRow"?M:d;return pe===M&&r.parser.lazy[r.now().line]?n(U):pe(U)}function d(U){return e.enter("tableHead"),e.enter("tableRow"),h(U)}function h(U){return U===124||(l=!0,u+=1),g(U)}function g(U){return U===null?n(U):Oe(U)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),T):n(U):Ge(U)?Xe(e,g,"whitespace")(U):(u+=1,l&&(l=!1,o+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),l=!0,g):(e.enter("data"),y(U)))}function y(U){return U===null||U===124||it(U)?(e.exit("data"),g(U)):(e.consume(U),U===92?b:y)}function b(U){return U===92||U===124?(e.consume(U),y):y(U)}function T(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(U):(e.enter("tableDelimiterRow"),l=!1,Ge(U)?Xe(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):S(U))}function S(U){return U===45||U===58?P(U):U===124?(l=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),k):he(U)}function k(U){return Ge(U)?Xe(e,P,"whitespace")(U):P(U)}function P(U){return U===58?(u+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),L):U===45?(u+=1,L(U)):U===null||Oe(U)?Z(U):he(U)}function L(U){return U===45?(e.enter("tableDelimiterFiller"),H(U)):he(U)}function H(U){return U===45?(e.consume(U),H):U===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),$):(e.exit("tableDelimiterFiller"),$(U))}function $(U){return Ge(U)?Xe(e,Z,"whitespace")(U):Z(U)}function Z(U){return U===124?S(U):U===null||Oe(U)?!l||o!==u?he(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):he(U)}function he(U){return n(U)}function M(U){return e.enter("tableRow"),Ee(U)}function Ee(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),Ee):U===null||Oe(U)?(e.exit("tableRow"),t(U)):Ge(U)?Xe(e,Ee,"whitespace")(U):(e.enter("data"),ke(U))}function ke(U){return U===null||U===124||it(U)?(e.exit("data"),Ee(U)):(e.consume(U),U===92?Ne:ke)}function Ne(U){return U===92||U===124?(e.consume(U),ke):ke(U)}}function LP(e,t){let n=-1,r=!0,o=0,u=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,h,g,y;const b=new NP;for(;++n<e.length;){const T=e[n],S=T[1];T[0]==="enter"?S.type==="tableHead"?(c=!1,d!==0&&(AE(b,t,d,h,g),g=void 0,d=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,y=void 0,u=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,g={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",g,t]])),o=S.type==="tableDelimiterRow"?2:g?3:1):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(u[1]!==0&&(l[0]=l[1],y=Ra(b,t,u,o,void 0,y),u=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(l[0]=l[1],y=Ra(b,t,u,o,void 0,y)),u=l,l=[u[1],n,0,0])):S.type==="tableHead"?(c=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,u[1]!==0?(l[0]=l[1],y=Ra(b,t,u,o,n,y)):l[1]!==0&&(y=Ra(b,t,l,o,n,y)),o=0):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&AE(b,t,d,h,g),b.consume(t.events),n=-1;++n<t.events.length;){const T=t.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=OP(t.events,n))}return e}function Ra(e,t,n,r,o,u){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(u.end=Object.assign({},Es(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const d=Es(t.events,n[1]);if(u={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const h=Es(t.events,n[2]),g=Es(t.events,n[3]),y={type:c,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",y,t]]),r!==2){const b=t.events[n[2]],T=t.events[n[3]];if(b[1].end=Object.assign({},T[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,k=n[3]-n[2]-1;e.add(S,k,[])}}e.add(n[3]+1,0,[["exit",y,t]])}return o!==void 0&&(u.end=Object.assign({},Es(t.events,o)),e.add(o,0,[["exit",u,t]]),u=void 0),u}function AE(e,t,n,r,o){const u=[],l=Es(t.events,n);o&&(o.end=Object.assign({},l),u.push(["exit",o,t])),r.end=Object.assign({},l),u.push(["exit",r,t]),e.add(n+1,0,u)}function Es(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const DP={name:"tasklistCheck",tokenize:FP};function MP(){return{text:{91:DP}}}function FP(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),u)}function u(d){return it(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Oe(d)?t(d):Ge(d)?e.check({tokenize:BP},t,n)(d):n(d)}}function BP(e,t,n){return Xe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function UP(e){return K0([cP(),bP(),vP(e),PP(),MP()])}const HP={};function zP(e){const t=this,n=e||HP,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(UP(n)),u.push(oP()),l.push(uP(n))}const La=()=>I.jsx("span",{className:`${te}-blinking-cursor`,children:I.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:I.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),kE=({globalClassName:e,message:t})=>{const{isLoading:n,isResponseLoading:r}=yi(),o=n&&r(t.eventSourceId||"")&&t.name==="partial_inquiry";return I.jsx(ov,{remarkPlugins:[zP],rehypePlugins:[PI],components:{h1:({children:u})=>I.jsx("h1",{className:ae(e,`${te}-header h1`),children:u}),h2:({children:u})=>I.jsx("h2",{className:ae(e,`${te}-header h2`),children:u}),h3:({children:u})=>I.jsx("h3",{className:ae(e,`${te}-header h3`),children:u}),ul:({children:u})=>I.jsx("ul",{className:ae(e,`${te}-ul`),children:u}),ol:({children:u})=>I.jsx("ol",{className:ae(e,`${te}-ol`),children:u}),li:({children:u})=>I.jsx("li",{className:ae(e,`${te}-li`),children:u}),a:({href:u,children:l})=>I.jsx("a",He(G({className:ae(e,`${te}-link`)},u?{href:u,target:"_blank"}:{}),{rel:"noopener noreferrer",children:l})),table:({children:u})=>I.jsx("table",{className:ae(e,`${te}-table`),children:u}),thead:({children:u})=>I.jsx("thead",{className:ae(e,`${te}-thead`),children:u}),tbody:({children:u})=>I.jsx("tbody",{className:ae(e,`${te}-tbody`),children:u}),tr:({children:u})=>I.jsx("tr",{className:ae(e,`${te}-tr`),children:u}),th:({children:u})=>I.jsx("th",{className:ae(e,`${te}-th`),children:u}),td:({children:u})=>I.jsx("td",{className:ae(e,`${te}-td`),children:u}),span:({className:u,children:l})=>u===`${te}-blinking-cursor`?I.jsx(La,{}):I.jsx("span",{children:l})},children:t.message+(o?`<span className='${te}-blinking-cursor'></span>`:"")})},jP=({globalClassName:e,message:t})=>{const[n,r]=K.useState(!1),o=t.tool_name||t.toolName,u=!!t.thought,l=!!o,c=()=>{r(d=>!d)};return I.jsxs("div",{children:[I.jsxs("div",{className:ae(e,`${te}-progress-message`,"standalone"),children:[I.jsx("span",{className:ae(e,`${te}-message-icon`,"progress-icon","standalone"),children:I.jsx(g0,{})}),I.jsx("p",{className:ae(e,`${te}-progress-text`,"standalone"),children:t.message})]}),(u||l)&&I.jsxs(I.Fragment,{children:[I.jsx(Jc,{className:ae(e,`${te}-thought-context-button`),onClick:c,children:n?I.jsxs(I.Fragment,{children:["Hide ",I.jsx(Jx,{})]}):I.jsxs(I.Fragment,{children:["Context ",I.jsx(Zx,{})]})}),n&&I.jsx("div",{className:ae(e,`${te}-thought-container`),children:u&&I.jsx("p",{className:ae(e,`${te}-progress-thought`),children:t.thought})})]})]})},$P=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?I.jsx(jP,{globalClassName:e,message:t}):I.jsxs("div",{className:ae(e,`${te}-progress-message`,"embedded"),title:t.message,children:[I.jsx("span",{className:ae(e,`${te}-message-icon`,"progress-icon","embedded"),children:I.jsx(g0,{})}),I.jsx("i",{className:ae(e,`${te}-progress-text`,"embedded"),children:t.message})]}),VP=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var r;return I.jsxs("div",{className:ae(e,`${te}-refined-search`,{embedded:!n,standalone:n}),children:[I.jsxs("div",{className:ae(e,`${te}-refined-search-query`,{embedded:!n,standalone:n}),children:[I.jsx("span",{className:ae(e,`${te}-message-icon`,`${te}-refined-search-icon`,{embedded:!n,standalone:n}),children:I.jsx(ua,{})}),I.jsx("p",{className:ae(e,`${te}-text`,"bold"),children:(r=t.searchParams)==null?void 0:r.query})]}),I.jsx(kE,{message:t})]})},wE=e=>{var c;const{configModule:t}=or(),n=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:r={}}=((c=e.request)==null?void 0:c.searchParams)||{facetFilters:{}},o=Object.fromEntries(Object.entries(r).filter(([d])=>!n.includes(d))),u=Object.keys(o),l=Object.values(o).reduce((d,h)=>d+h.length,0);return{facetFiltersList:u,filterCount:l}},Da=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>I.jsx("span",{className:ae(t,`${te}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filters`}),vE=({globalClassName:e,message:t,facetFiltersList:n})=>{var o,u;if(!n.length)return null;const r=((u=(o=t.request)==null?void 0:o.searchParams)==null?void 0:u.facetFilters)||{};return n.map(l=>{var d;const c=((d=r[l])==null?void 0:d.join(", "))||"";return I.jsxs("div",{className:ae(e,`${te}-facets`),children:[I.jsx("p",{className:ae(e,`${te}-facet-category`),children:l}),I.jsx("p",{className:ae(e,`${te}-facet-values`),children:c})]},l)})},qP=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var u,l;const{facetFiltersList:r,filterCount:o}=wE(t);return n?I.jsxs("div",{children:[I.jsxs("div",{className:ae(e,`${te}-user-message standalone`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-message-icon standalone`),children:I.jsx(E0,{})}),I.jsx("p",{className:ae(e,`${te}-user-message-text`),children:(u=t.request)==null?void 0:u.userPrompt}),r.length>0&&I.jsx(Da,{isWidgetStandalone:!0,globalClassName:e,filterCount:o})]}),I.jsx(vE,{globalClassName:e,facetFiltersList:r,message:t})]}):I.jsxs("div",{className:ae(e,`${te}-user-message embedded`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-message-icon embedded`),children:I.jsx(E0,{})}),I.jsx("p",{children:(l=t.request)==null?void 0:l.userPrompt}),r.length>0&&I.jsx(Da,{isWidgetStandalone:!1,filterCount:o})]})},YP=({globalClassName:e,actionLabel:t,query:n,message:r,facetFiltersList:o,filterCount:u})=>I.jsxs("div",{className:ae(e,`${te}-user-search standalone`),children:[I.jsxs("div",{className:ae(e,`${te}-user-search-query`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-search-icon standalone`),children:I.jsx(ua,{})}),I.jsx("p",{className:ae(e,`${te}-text bold`),children:`${t}: ${n}`}),o.length>0&&I.jsx(Da,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),I.jsx(vE,{globalClassName:e,facetFiltersList:o,message:r})]}),WP=({globalClassName:e,message:t,isWidgetStandalone:n})=>{const{facetFiltersList:r,filterCount:o}=wE(t),{actionLabel:u,query:l}=K.useMemo(()=>{var d,h,g,y;switch(t.name){case"copilot_search":return{actionLabel:"Your search",query:(d=t.request)==null?void 0:d.searchParams.query};case"copilot_browse":return{actionLabel:"Browsing category",query:(g=(h=t.request)==null?void 0:h.browseParams)==null?void 0:g.categoryId};case"product_view":return{actionLabel:"Viewing product",query:(y=t.request)==null?void 0:y.productId};default:return{actionLabel:"",query:""}}},[t]);return!t.isUserAction||!l?null:n?I.jsx(YP,{globalClassName:e,message:t,actionLabel:u,query:l,facetFiltersList:r,filterCount:o}):I.jsxs("div",{className:ae(e,`${te}-user-search embedded`),children:[I.jsx("span",{className:ae(e,`${te}-message-icon user-search-icon embedded`),children:I.jsx(ua,{})}),I.jsx("p",{children:l}),r.length>0&&I.jsx(Da,{isWidgetStandalone:!1,filterCount:o})]})},NE=["copilot_search","copilot_browse","product_view"],IE=({message:e,globalClassName:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{var u;if(!e)return null;let o=e.name;if(NE.includes(o)&&(e.isInitial||e.isUserAction)&&(o="faceted_navigation"),NE.includes(o)&&!((u=e.request)!=null&&u.userPrompt))return null;switch(o){case"copilot_search":case"copilot_browse":case"product_view":return I.jsx(qP,{globalClassName:t,isWidgetStandalone:n,message:e});case"faceted_navigation":return I.jsx(WP,{globalClassName:t,message:e,isWidgetStandalone:n});case"refined_search":return I.jsx(VP,{globalClassName:t,message:e,isWidgetStandalone:n});case"follow_up":return I.jsx(aC,{globalClassName:t,isWidgetStandalone:n,message:e,handleSuggestionClick:r});case"inquiry":case"partial_inquiry":return I.jsx(kE,{globalClassName:t,message:e});case"error":return I.jsx(sC,{message:e,isWidgetStandalone:n});case"display_products":return I.jsx(iC,{message:e,isWidgetStandalone:n});case"progress":return I.jsx($P,{globalClassName:t,isWidgetStandalone:n,message:e});default:return null}},ud=({isWidgetStandalone:e,messages:t,handleSuggestionClick:n})=>{const{globalClassName:r}=or();return t.map(o=>o.messages&&o.type==="group"?I.jsx("div",{className:ae(r,`${te}-message-group`,e?"standalone":"embedded"),children:o.messages.length>0&&o.messages.map(u=>I.jsx("div",{className:`${te}-message-group-child`,children:I.jsx(IE,{id:u.id,globalClassName:r,isWidgetStandalone:e,message:u,handleSuggestionClick:n})},u.id))},`group-${o.eventSourceId}`):o.type==="individual"&&o.message?I.jsx("div",{className:ae(r,`${te}-message`,e?"standalone":"embedded",{error:o.message.name.includes("error")}),children:I.jsx(IE,{id:o.message.id,globalClassName:r,isWidgetStandalone:e,message:o.message,handleSuggestionClick:n})},o.message.id):null)},OE=()=>{const{globalClassName:e,themeVariables:t}=or(),{status:n}=ia(),{copilot:r,messages:o,groupedMessages:u,isLoading:l,handleUserInput:c,handleSuggestion:d}=yi(),{isOpen:h}=n||{},g=K.useRef(null);return K.useEffect(()=>{g.current&&g.current.scrollIntoView({behavior:"smooth",block:"end"})},[o]),r?!h||u.length===0?null:I.jsxs("div",{className:ae(e,`${te}-container`,`${te}-embedded-chat`),style:t,children:[I.jsxs("div",{className:ae(e,`${te}-message-container`,"embedded"),children:[I.jsx(ud,{isWidgetStandalone:!1,messages:u,handleSuggestionClick:d}),l&&I.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:I.jsx(La,{})}),I.jsx("div",{ref:g})]}),I.jsx(Zc,{componentType:"chat",className:"embedded-chat",isLoading:l,onSubmit:c})]}):I.jsx("div",{children:"Loading Copilot..."})};function GP(e){return Sn({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function KP(e){return Sn({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function QP(e){return Sn({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function XP(e){return Sn({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}function JP(e){return e==null?[]:Array.isArray(e)?e:[e]}var ZP=e=>e!=null&&typeof e=="object",Ma=e=>typeof e=="string",ys=e=>typeof e=="function",eR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),tR=e=>Object.prototype.toString.call(e),PE=Function.prototype.toString,nR=PE.call(Object),rR=e=>{if(!ZP(e)||tR(e)!="[object Object]"||oR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=eR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&PE.call(n)==nR},iR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,sR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,oR=e=>iR(e)||sR(e),uR=e=>e(),ad=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function RE(e){if(!rR(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=RE(o))}return n}function ld(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function aR(e,t){if(e==null)throw new Error(t())}var LE=()=>{},Fa=e=>typeof e=="object"&&e!==null,lR=1,cR=9,fR=11,pn=e=>Fa(e)&&e.nodeType===lR&&typeof e.nodeName=="string",cd=e=>Fa(e)&&e.nodeType===cR,dR=e=>Fa(e)&&e===e.window,DE=e=>pn(e)?e.localName||"":"#document";function hR(e){return["html","body","#document"].includes(DE(e))}var pR=e=>Fa(e)&&e.nodeType!==void 0,Ts=e=>pR(e)&&e.nodeType===fR&&"host"in e,mR=e=>pn(e)&&e.localName==="input",gR=e=>pn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1,ER=/(textarea|select)/;function yR(e){if(e==null||!pn(e))return!1;try{return mR(e)&&e.selectionStart!=null||ER.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Ba(e,t){var r;if(!e||!t||!pn(e)||!pn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Ts(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function fr(e){var t;return cd(e)?e:dR(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function TR(e){return fr(e).documentElement}function Fo(e){var t,n,r;return Ts(e)?Fo(e.host):cd(e)?(t=e.defaultView)!=null?t:window:pn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ME(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}function bR(e){if(DE(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ts(e)&&e.host||TR(e);return Ts(t)?t.host:t}var fd=new WeakMap;function FE(e){return fd.has(e)||fd.set(e,Fo(e).getComputedStyle(e)),fd.get(e)}var BE=()=>typeof document!="undefined";function _R(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var dd=e=>BE()&&e.test(_R()),UE=()=>BE()&&!!navigator.maxTouchPoints,SR=()=>dd(/^iPhone/i),xR=()=>dd(/^iPad/i)||HE()&&navigator.maxTouchPoints>1,CR=()=>SR()||xR(),HE=()=>dd(/^Mac/i);function AR(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function kr(e){var n;const t=AR(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var kR=e=>e.button===2||HE()&&e.ctrlKey&&e.button===0,dr=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},zE=e=>pn(e)&&e.tagName==="IFRAME",wR=e=>!Number.isNaN(parseInt(e.getAttribute("tabindex")||"0",10)),vR=e=>parseInt(e.getAttribute("tabindex")||"0",10)<0,hd="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",jE=(e,t=!1)=>{if(!e)return[];const n=Array.from(e.querySelectorAll(hd));(t==!0||t=="if-empty"&&n.length===0)&&pn(e)&&$r(e)&&n.unshift(e);const o=n.filter($r);return o.forEach((u,l)=>{if(zE(u)&&u.contentDocument){const c=u.contentDocument.body;o.splice(l,1,...jE(c))}}),o};function $r(e){return!e||e.closest("[inert]")?!1:e.matches(hd)&&gR(e)}function $E(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll(hd)).filter(ki);return r.forEach((o,u)=>{if(zE(o)&&o.contentDocument){const l=o.contentDocument.body,c=$E(l);r.splice(u,1,...c)}}),r.length,r}function ki(e){return e!=null&&e.tabIndex>0?!0:$r(e)&&!vR(e)}function Bo(e){return e.tabIndex<0&&(/^(audio|video|details)$/.test(e.localName)||yR(e))&&!wR(e)?0:e.tabIndex}function NR(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function wr(e){let t;const n=globalThis.requestAnimationFrame(()=>{t=e()});return()=>{globalThis.cancelAnimationFrame(n),t==null||t()}}function pd(e){const t=bR(e);return hR(t)?fr(t).body:pn(t)&&PR(t)?t:pd(t)}var IR=/auto|scroll|overlay|hidden|clip/,OR=new Set(["inline","contents"]);function PR(e){const t=Fo(e),{overflow:n,overflowX:r,overflowY:o,display:u}=t.getComputedStyle(e);return IR.test(n+o+r)&&!OR.has(u)}function Ua(e,t){if(!e)return LE;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function RR(e,t,n){if(!e)return LE;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function LR(e,t,n){const{signal:r}=t;return[new Promise((l,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(d),l(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function DR(e,t){const{timeout:n,rootNode:r}=t,o=Fo(r),u=fr(r),l=new o.AbortController;return LR(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const g=e();g&&g.isConnected&&(h.disconnect(),c(g))});h.observe(u.body,{childList:!0,subtree:!0})}),l,n)}var MR=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),FR=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,VE=e=>{const t={};let n;for(;n=FR.exec(e);)t[n[1]]=n[2];return t},BR=(e,t)=>{if(Ma(e)){if(Ma(t))return`${e};${t}`;e=VE(e)}else Ma(t)&&(t=VE(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function wi(...e){let t={};for(let n of e){for(let r in t){if(r.startsWith("on")&&typeof t[r]=="function"&&typeof n[r]=="function"){t[r]=ad(n[r],t[r]);continue}if(r==="className"||r==="class"){t[r]=MR(t[r],n[r]);continue}if(r==="style"){t[r]=BR(t[r],n[r]);continue}t[r]=n[r]!==void 0?n[r]:t[r]}for(let r in n)t[r]===void 0&&(t[r]=n[r])}return t}function KD(e){return e}var bs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(bs||{}),md="__init__";function UR(e){const t=()=>{var c,d;return(d=(c=e.getRootNode)==null?void 0:c.call(e))!=null?d:document},n=()=>fr(t()),r=()=>{var c;return(c=n().defaultView)!=null?c:window},o=()=>ME(t()),u=c=>c===o(),l=c=>t().getElementById(c);return He(G({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:u,getById:l})}var gd={exports:{}},mn={},Ed={exports:{}},yd={};var qE;function HR(){return qE||(qE=1,function(e){function t(V,ne){var C=V.length;V.push(ne);e:for(;0<C;){var O=C-1>>>1,Y=V[O];if(0<o(Y,ne))V[O]=ne,V[C]=Y,C=O;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var ne=V[0],C=V.pop();if(C!==ne){V[0]=C;e:for(var O=0,Y=V.length,x=Y>>>1;O<x;){var re=2*(O+1)-1,be=V[re],ye=re+1,Ie=V[ye];if(0>o(be,C))ye<Y&&0>o(Ie,be)?(V[O]=Ie,V[ye]=C,O=ye):(V[O]=be,V[re]=C,O=re);else if(ye<Y&&0>o(Ie,C))V[O]=Ie,V[ye]=C,O=ye;else break e}}return ne}function o(V,ne){var C=V.sortIndex-ne.sortIndex;return C!==0?C:V.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],h=[],g=1,y=null,b=3,T=!1,S=!1,k=!1,P=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(V){for(var ne=n(h);ne!==null;){if(ne.callback===null)r(h);else if(ne.startTime<=V)r(h),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(h)}}function Z(V){if(k=!1,$(V),!S)if(n(d)!==null)S=!0,Pe(he);else{var ne=n(h);ne!==null&&ce(Z,ne.startTime-V)}}function he(V,ne){S=!1,k&&(k=!1,L(ke),ke=-1),T=!0;var C=b;try{for($(ne),y=n(d);y!==null&&(!(y.expirationTime>ne)||V&&!ge());){var O=y.callback;if(typeof O=="function"){y.callback=null,b=y.priorityLevel;var Y=O(y.expirationTime<=ne);ne=e.unstable_now(),typeof Y=="function"?y.callback=Y:y===n(d)&&r(d),$(ne)}else r(d);y=n(d)}if(y!==null)var x=!0;else{var re=n(h);re!==null&&ce(Z,re.startTime-ne),x=!1}return x}finally{y=null,b=C,T=!1}}var M=!1,Ee=null,ke=-1,Ne=5,U=-1;function ge(){return!(e.unstable_now()-U<Ne)}function me(){if(Ee!==null){var V=e.unstable_now();U=V;var ne=!0;try{ne=Ee(!0,V)}finally{ne?pe():(M=!1,Ee=null)}}else M=!1}var pe;if(typeof H=="function")pe=function(){H(me)};else if(typeof MessageChannel!="undefined"){var le=new MessageChannel,_e=le.port2;le.port1.onmessage=me,pe=function(){_e.postMessage(null)}}else pe=function(){P(me,0)};function Pe(V){Ee=V,M||(M=!0,pe())}function ce(V,ne){ke=P(function(){V(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_continueExecution=function(){S||T||(S=!0,Pe(he))},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ne=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(V){switch(b){case 1:case 2:case 3:var ne=3;break;default:ne=b}var C=b;b=ne;try{return V()}finally{b=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(V,ne){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var C=b;b=V;try{return ne()}finally{b=C}},e.unstable_scheduleCallback=function(V,ne,C){var O=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?O+C:O):C=O,V){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=C+Y,V={id:g++,callback:ne,priorityLevel:V,startTime:C,expirationTime:Y,sortIndex:-1},C>O?(V.sortIndex=C,t(h,V),n(d)===null&&V===n(h)&&(k?(L(ke),ke=-1):k=!0,ce(Z,C-O))):(V.sortIndex=Y,t(d,V),S||T||(S=!0,Pe(he))),V},e.unstable_shouldYield=ge,e.unstable_wrapCallback=function(V){var ne=b;return function(){var C=b;b=ne;try{return V.apply(this,arguments)}finally{b=C}}}}(yd)),yd}var YE;function zR(){return YE||(YE=1,Ed.exports=HR()),Ed.exports}var WE;function jR(){if(WE)return mn;WE=1;var e=$i(),t=zR();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,a=1;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function u(i,s){l(i,s),l(i+"Capture",s)}function l(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function b(i){return d.call(y,i)?!0:d.call(g,i)?!1:h.test(i)?y[i]=!0:(g[i]=!0,!1)}function T(i,s,a,f){if(a!==null&&a.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:a!==null?!a.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function S(i,s,a,f){if(s===null||typeof s=="undefined"||T(i,s,a,f))return!0;if(f)return!1;if(a!==null)switch(a.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(i,s,a,f,m,E,_){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=m,this.mustUseProperty=a,this.propertyName=i,this.type=s,this.sanitizeURL=E,this.removeEmptyString=_}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){P[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];P[s]=new k(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){P[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){P[i]=new k(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){P[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){P[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){P[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){P[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){P[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function H(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(L,H);P[s]=new k(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(L,H);P[s]=new k(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(L,H);P[s]=new k(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){P[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),P.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){P[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function $(i,s,a,f){var m=P.hasOwnProperty(s)?P[s]:null;(m!==null?m.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(S(s,a,m,f)&&(a=null),f||m===null?b(s)&&(a===null?i.removeAttribute(s):i.setAttribute(s,""+a)):m.mustUseProperty?i[m.propertyName]=a===null?m.type===3?!1:"":a:(s=m.attributeName,f=m.attributeNamespace,a===null?i.removeAttribute(s):(m=m.type,a=m===3||m===4&&a===!0?"":""+a,f?i.setAttributeNS(f,s,a):i.setAttribute(s,a))))}var Z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,he=Symbol.for("react.element"),M=Symbol.for("react.portal"),Ee=Symbol.for("react.fragment"),ke=Symbol.for("react.strict_mode"),Ne=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),ge=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),_e=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),ce=Symbol.for("react.offscreen"),V=Symbol.iterator;function ne(i){return i===null||typeof i!="object"?null:(i=V&&i[V]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,O;function Y(i){if(O===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);O=s&&s[1]||""}return`
69
37
  `+O+i}var x=!1;function re(i,s){if(!i||x)return"";x=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(j){var f=j}Reflect.construct(i,[],s)}else{try{s.call()}catch(j){f=j}i.call(s.prototype)}else{try{throw Error()}catch(j){f=j}i()}}catch(j){if(j&&f&&typeof j.stack=="string"){for(var m=j.stack.split(`
70
38
  `),E=f.stack.split(`
71
39
  `),_=m.length-1,v=E.length-1;1<=_&&0<=v&&m[_]!==E[v];)v--;for(;1<=_&&0<=v;_--,v--)if(m[_]!==E[v]){if(_!==1||v!==1)do if(_--,v--,0>v||m[_]!==E[v]){var R=`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cimulate/copilot-widget",
3
3
  "description": "A frontend SDK for Cimulate Copilot",
4
- "version": "0.17.0",
4
+ "version": "0.17.1",
5
5
  "keywords": [
6
6
  "cimulate",
7
7
  "copilot",
@@ -78,9 +78,9 @@
78
78
  "@types/react-dom": "~18.3.1",
79
79
  "@typescript-eslint/parser": "~8.35.1",
80
80
  "@vitejs/plugin-react": "~4.5.2",
81
- "@vitest/coverage-v8": "~3.0.9",
82
- "@vitest/ui": "~3.0.9",
83
- "eslint": "~9.30.1",
81
+ "@vitest/coverage-v8": "~3.2.4",
82
+ "@vitest/ui": "~3.2.4",
83
+ "eslint": "~9.39.1",
84
84
  "eslint-config-prettier": "~10.1.5",
85
85
  "eslint-plugin-import": "~2.32.0",
86
86
  "eslint-plugin-jsx-a11y": "~6.10.2",
@@ -95,8 +95,11 @@
95
95
  "typescript": "~5.8.3",
96
96
  "typescript-eslint": "~8.35.1",
97
97
  "use-immer": "~0.11.0",
98
- "vite": "~7.0.3",
98
+ "vite": "~7.2.2",
99
99
  "vite-plugin-dts": "~4.5.4",
100
- "vitest": "~3.0.9"
100
+ "vitest": "~3.2.4"
101
+ },
102
+ "overrides": {
103
+ "glob": "~11.1.0"
101
104
  }
102
105
  }