@botpress/webchat 2.2.7 → 2.2.8

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.
@@ -100,7 +100,7 @@ Check the render method of \``+M+"`."}return""}}function sn(M){{if(M!==void 0){v
100
100
 
101
101
  Check your code at `+ge+":"+ke+"."}return""}}var vt={};function bt(M){{var ge=ar();if(!ge){var ke=typeof M=="string"?M:M.displayName||M.name;ke&&(ge=`
102
102
 
103
- Check the top-level render call using <`+ke+">.")}return ge}}function Yt(M,ge){{if(!M._store||M._store.validated||M.key!=null)return;M._store.validated=!0;var ke=bt(ge);if(vt[ke])return;vt[ke]=!0;var Ze="";M&&M._owner&&M._owner!==gt.current&&(Ze=" It was passed a child from "+z(M._owner.type)+"."),ir(M),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ke,Ze),ir(null)}}function Gt(M,ge){{if(typeof M!="object")return;if(Ue(M))for(var ke=0;ke<M.length;ke++){var Ze=M[ke];Kt(Ze)&&Yt(Ze,ge)}else if(Kt(M))M._store&&(M._store.validated=!0);else if(M){var kt=m(M);if(typeof kt=="function"&&kt!==M.entries)for(var Ot=kt.call(M),ht;!(ht=Ot.next()).done;)Kt(ht.value)&&Yt(ht.value,ge)}}}function sr(M){{var ge=M.type;if(ge==null||typeof ge=="string")return;var ke;if(typeof ge=="function")ke=ge.propTypes;else if(typeof ge=="object"&&(ge.$$typeof===c||ge.$$typeof===d))ke=ge.propTypes;else return;if(ke){var Ze=z(ge);je(ke,M.props,"prop",Ze,M)}else if(ge.PropTypes!==void 0&&!kr){kr=!0;var kt=z(ge);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",kt||"Unknown")}typeof ge.getDefaultProps=="function"&&!ge.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ut(M){{for(var ge=Object.keys(M.props),ke=0;ke<ge.length;ke++){var Ze=ge[ke];if(Ze!=="children"&&Ze!=="key"){ir(M),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ze),ir(null);break}}M.ref!==null&&(ir(M),v("Invalid attribute `ref` supplied to `React.Fragment`."),ir(null))}}function Ir(M,ge,ke,Ze,kt,Ot){{var ht=A(M);if(!ht){var at="";(M===void 0||typeof M=="object"&&M!==null&&Object.keys(M).length===0)&&(at+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var cr=sn(kt);cr?at+=cr:at+=ar();var Xt;M===null?Xt="null":Ue(M)?Xt="array":M!==void 0&&M.$$typeof===t?(Xt="<"+(z(M.type)||"Unknown")+" />",at=" Did you accidentally export a JSX literal instead of a component?"):Xt=typeof M,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Xt,at)}var Qt=Ge(M,ge,ke,kt,Ot);if(Qt==null)return Qt;if(ht){var yn=ge.children;if(yn!==void 0)if(Ze)if(Ue(yn)){for(var Ao=0;Ao<yn.length;Ao++)Gt(yn[Ao],M);Object.freeze&&Object.freeze(yn)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Gt(yn,M)}return M===n?Ut(Qt):sr(Qt),Qt}}function Rr(M,ge,ke){return Ir(M,ge,ke,!0)}function tn(M,ge,ke){return Ir(M,ge,ke,!1)}var wa=tn,xa=Rr;mc.Fragment=n,mc.jsx=wa,mc.jsxs=xa}()),mc}process.env.NODE_ENV==="production"?Zm.exports=GB():Zm.exports=JB();var J=Zm.exports;function vr(){return vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vr.apply(this,arguments)}function Vm(e,t=[]){let r=[];function n(i,a){const s=$.createContext(a),c=r.length;r=[...r,a];function l(d){const{scope:p,children:f,...h}=d,y=(p==null?void 0:p[e][c])||s,m=$.useMemo(()=>h,Object.values(h));return $.createElement(y.Provider,{value:m},f)}function u(d,p){const f=(p==null?void 0:p[e][c])||s,h=$.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=r.map(a=>$.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return $.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[n,YB(o,...t)]}function YB(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...s,...d}},{});return $.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function ai(e){const t=$.useRef(e);return $.useEffect(()=>{t.current=e}),$.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const yc=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{};function zi(){return zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zi.apply(null,arguments)}function XB(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function SE(...e){return t=>e.forEach(r=>XB(r,t))}function Zi(...e){return $.useCallback(SE(...e),e)}const Hm=$.forwardRef((e,t)=>{const{children:r,...n}=e,o=$.Children.toArray(r),i=o.find(e5);if(i){const a=i.props.children,s=o.map(c=>c===i?$.Children.count(a)>1?$.Children.only(null):$.isValidElement(a)?a.props.children:null:c);return $.createElement(Wm,zi({},n,{ref:t}),$.isValidElement(a)?$.cloneElement(a,void 0,s):null)}return $.createElement(Wm,zi({},n,{ref:t}),r)});Hm.displayName="Slot";const Wm=$.forwardRef((e,t)=>{const{children:r,...n}=e;return $.isValidElement(r)?$.cloneElement(r,{...t5(n,r.props),ref:t?SE(t,r.ref):r.ref}):$.Children.count(r)>1?$.Children.only(null):null});Wm.displayName="SlotClone";const QB=({children:e})=>$.createElement($.Fragment,null,e);function e5(e){return $.isValidElement(e)&&e.type===QB}function t5(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const In=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=$.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?Hm:t;return $.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),$.createElement(s,zi({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function r5(e,t){e&&no.flushSync(()=>e.dispatchEvent(t))}const _E="Avatar",[n5,Nxe]=Vm(_E),[o5,EE]=n5(_E),kE=$.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,i]=$.useState("idle");return $.createElement(o5,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i},$.createElement(In.span,vr({},n,{ref:t})))}),i5="AvatarImage",TE=$.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...i}=e,a=EE(i5,r),s=s5(n),c=ai(l=>{o(l),a.onImageLoadingStatusChange(l)});return yc(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?$.createElement(In.img,vr({},i,{ref:t,src:n})):null}),a5="AvatarFallback",$E=$.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,i=EE(a5,r),[a,s]=$.useState(n===void 0);return $.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(c)}},[n]),a&&i.imageLoadingStatus!=="loaded"?$.createElement(In.span,vr({},o,{ref:t})):null});function s5(e){const[t,r]=$.useState("idle");return $.useEffect(()=>{if(!e){r("error");return}let n=!0;const o=new window.Image,i=a=>()=>{n&&r(a)};return r("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{n=!1}},[e]),t}function Km(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const r=e.replace(/^#/,"");let n=r;r.length===3&&(n=r.split("").map(c=>c+c).join(""));const o=parseInt(n,16),i=o>>16&255,a=o>>8&255,s=o&255;return{r:i,g:a,b:s}}function c5(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const l5=(e,t=30)=>{const r=Math.min(e.r,e.g,e.b),n=Math.max(e.r,e.g,e.b,r+1);return{r:Math.floor((e.r-r)/(n-r)*t*(1-.299)+120-t/2),g:Math.floor((e.g-r)/(n-r)*t*(1-.587)+120-t/2),b:Math.floor((e.b-r)/(n-r)*t*(1-.114)+120-t/2)}};function OE(e){return Object.entries(e).reduce((t,[r,n])=>{const o=r.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:n}},{})}const u5=2.4,d5=.2126729,f5=.7151522,p5=.072175,h5=.56,m5=.57,y5=.62,g5=.65,Cd=.022,CE=1.414,v5=1.14,b5=1.14,w5=.035991,x5=.035991,S5=27.7847239587675,_5=27.7847239587675,AE=.027,IE=.027,RE=.001,E5=5e-4;function PE(e){const{r:t,g:r,b:n}=e,o=i=>(i/255)**u5;return d5*o(t)+f5*o(r)+p5*o(n)}function NE(e,t){if(!e||!t)return 0;let r=PE(Km(e)),n=PE(Km(t)),o=0,i=0;return r=r>Cd?r:r+(Cd-r)**CE,n=n>Cd?n:n+(Cd-n)**CE,Math.abs(n-r)<E5?0:(n>r?(o=(n**h5-r**m5)*v5,i=o<RE?0:o<w5?o-o*S5*AE:o-AE):(o=(n**g5-r**y5)*b5,i=o>-RE?0:o>-x5?o-o*_5*IE:o+IE),Math.abs(i*100))}let Gm=class{constructor(){k(this,"eventMap");this.eventMap={}}on(t,r){var n;return this.eventMap[t]||(this.eventMap[t]=new Set),(n=this.eventMap[t])==null||n.add(r),()=>{var o;(o=this.eventMap[t])==null||o.delete(r)}}emit(t,r){var n,o;(n=this.eventMap[t])==null||n.forEach(i=>{i(r)}),(o=this.eventMap["*"])==null||o.forEach(i=>{i({type:t,payload:r})})}};const k5=new Gm;function ME(e,t){let r=`${e} {`;for(const[n,o]of Object.entries(t))r+=`${n}: ${o}; `;return r+="}",r}function jE(e,t){let r=0;if(e.length==0)return r;for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);r=(r<<5)-r+o,r=r&r}return Math.abs(r)%t}var DE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){var r=1e3,n=6e4,o=36e5,i="millisecond",a="second",s="minute",c="hour",l="day",u="week",d="month",p="quarter",f="year",h="date",y="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var F=["th","st","nd","rd"],j=B%100;return"["+B+(F[(j-20)%10]||F[j]||F[0])+"]"}},b=function(B,F,j){var Z=String(B);return!Z||Z.length>=F?B:""+Array(F+1-Z.length).join(j)+B},x={s:b,z:function(B){var F=-B.utcOffset(),j=Math.abs(F),Z=Math.floor(j/60),W=j%60;return(F<=0?"+":"-")+b(Z,2,"0")+":"+b(W,2,"0")},m:function B(F,j){if(F.date()<j.date())return-B(j,F);var Z=12*(j.year()-F.year())+(j.month()-F.month()),W=F.clone().add(Z,d),D=j-W<0,E=F.clone().add(Z+(D?-1:1),d);return+(-(Z+(j-W)/(D?W-E:E-W))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:d,y:f,w:u,d:l,D:h,h:c,m:s,s:a,ms:i,Q:p}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},w="en",S={};S[w]=v;var C="$isDayjsObject",I=function(B){return B instanceof K||!(!B||!B[C])},P=function B(F,j,Z){var W;if(!F)return w;if(typeof F=="string"){var D=F.toLowerCase();S[D]&&(W=D),j&&(S[D]=j,W=D);var E=F.split("-");if(!W&&E.length>1)return B(E[0])}else{var H=F.name;S[H]=F,W=H}return!Z&&W&&(w=W),W||!Z&&w},A=function(B,F){if(I(B))return B.clone();var j=typeof F=="object"?F:{};return j.date=B,j.args=arguments,new K(j)},L=x;L.l=P,L.i=I,L.w=function(B,F){return A(B,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var K=function(){function B(j){this.$L=P(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[C]=!0}var F=B.prototype;return F.parse=function(j){this.$d=function(Z){var W=Z.date,D=Z.utc;if(W===null)return new Date(NaN);if(L.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var E=W.match(m);if(E){var H=E[2]-1||0,Q=(E[7]||"0").substring(0,3);return D?new Date(Date.UTC(E[1],H,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)):new Date(E[1],H,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)}}return new Date(W)}(j),this.init()},F.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},F.$utils=function(){return L},F.isValid=function(){return this.$d.toString()!==y},F.isSame=function(j,Z){var W=A(j);return this.startOf(Z)<=W&&W<=this.endOf(Z)},F.isAfter=function(j,Z){return A(j)<this.startOf(Z)},F.isBefore=function(j,Z){return this.endOf(Z)<A(j)},F.$g=function(j,Z,W){return L.u(j)?this[Z]:this.set(W,j)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(j,Z){var W=this,D=!!L.u(Z)||Z,E=L.p(j),H=function(Ce,be){var de=L.w(W.$u?Date.UTC(W.$y,be,Ce):new Date(W.$y,be,Ce),W);return D?de:de.endOf(l)},Q=function(Ce,be){return L.w(W.toDate()[Ce].apply(W.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(be)),W)},T=this.$W,ce=this.$M,pe=this.$D,fe="set"+(this.$u?"UTC":"");switch(E){case f:return D?H(1,0):H(31,11);case d:return D?H(1,ce):H(0,ce+1);case u:var ve=this.$locale().weekStart||0,_e=(T<ve?T+7:T)-ve;return H(D?pe-_e:pe+(6-_e),ce);case l:case h:return Q(fe+"Hours",0);case c:return Q(fe+"Minutes",1);case s:return Q(fe+"Seconds",2);case a:return Q(fe+"Milliseconds",3);default:return this.clone()}},F.endOf=function(j){return this.startOf(j,!1)},F.$set=function(j,Z){var W,D=L.p(j),E="set"+(this.$u?"UTC":""),H=(W={},W[l]=E+"Date",W[h]=E+"Date",W[d]=E+"Month",W[f]=E+"FullYear",W[c]=E+"Hours",W[s]=E+"Minutes",W[a]=E+"Seconds",W[i]=E+"Milliseconds",W)[D],Q=D===l?this.$D+(Z-this.$W):Z;if(D===d||D===f){var T=this.clone().set(h,1);T.$d[H](Q),T.init(),this.$d=T.set(h,Math.min(this.$D,T.daysInMonth())).$d}else H&&this.$d[H](Q);return this.init(),this},F.set=function(j,Z){return this.clone().$set(j,Z)},F.get=function(j){return this[L.p(j)]()},F.add=function(j,Z){var W,D=this;j=Number(j);var E=L.p(Z),H=function(ce){var pe=A(D);return L.w(pe.date(pe.date()+Math.round(ce*j)),D)};if(E===d)return this.set(d,this.$M+j);if(E===f)return this.set(f,this.$y+j);if(E===l)return H(1);if(E===u)return H(7);var Q=(W={},W[s]=n,W[c]=o,W[a]=r,W)[E]||1,T=this.$d.getTime()+j*Q;return L.w(T,this)},F.subtract=function(j,Z){return this.add(-1*j,Z)},F.format=function(j){var Z=this,W=this.$locale();if(!this.isValid())return W.invalidDate||y;var D=j||"YYYY-MM-DDTHH:mm:ssZ",E=L.z(this),H=this.$H,Q=this.$m,T=this.$M,ce=W.weekdays,pe=W.months,fe=W.meridiem,ve=function(be,de,te,we){return be&&(be[de]||be(Z,D))||te[de].slice(0,we)},_e=function(be){return L.s(H%12||12,be,"0")},Ce=fe||function(be,de,te){var we=be<12?"AM":"PM";return te?we.toLowerCase():we};return D.replace(g,function(be,de){return de||function(te){switch(te){case"YY":return String(Z.$y).slice(-2);case"YYYY":return L.s(Z.$y,4,"0");case"M":return T+1;case"MM":return L.s(T+1,2,"0");case"MMM":return ve(W.monthsShort,T,pe,3);case"MMMM":return ve(pe,T);case"D":return Z.$D;case"DD":return L.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return ve(W.weekdaysMin,Z.$W,ce,2);case"ddd":return ve(W.weekdaysShort,Z.$W,ce,3);case"dddd":return ce[Z.$W];case"H":return String(H);case"HH":return L.s(H,2,"0");case"h":return _e(1);case"hh":return _e(2);case"a":return Ce(H,Q,!0);case"A":return Ce(H,Q,!1);case"m":return String(Q);case"mm":return L.s(Q,2,"0");case"s":return String(Z.$s);case"ss":return L.s(Z.$s,2,"0");case"SSS":return L.s(Z.$ms,3,"0");case"Z":return E}return null}(be)||E.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(j,Z,W){var D,E=this,H=L.p(Z),Q=A(j),T=(Q.utcOffset()-this.utcOffset())*n,ce=this-Q,pe=function(){return L.m(E,Q)};switch(H){case f:D=pe()/12;break;case d:D=pe();break;case p:D=pe()/3;break;case u:D=(ce-T)/6048e5;break;case l:D=(ce-T)/864e5;break;case c:D=ce/o;break;case s:D=ce/n;break;case a:D=ce/r;break;default:D=ce}return W?D:L.a(D)},F.daysInMonth=function(){return this.endOf(d).$D},F.$locale=function(){return S[this.$L]},F.locale=function(j,Z){if(!j)return this.$L;var W=this.clone(),D=P(j,Z,!0);return D&&(W.$L=D),W},F.clone=function(){return L.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},B}(),z=K.prototype;return A.prototype=z,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",l],["$M",d],["$y",f],["$D",h]].forEach(function(B){z[B[1]]=function(F){return this.$g(F,B[0],B[1])}}),A.extend=function(B,F){return B.$i||(B(F,K,A),B.$i=!0),A},A.locale=P,A.isDayjs=I,A.unix=function(B){return A(1e3*B)},A.en=S[w],A.Ls=S,A.p={},A})})(DE);var T5=DE.exports;const Ad=St(T5);var LE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){return function(r,n,o){n.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(LE);var $5=LE.exports;const O5=St($5);var FE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){return function(r,n,o){n.prototype.isYesterday=function(){var i="YYYY-MM-DD",a=o().subtract(1,"day");return this.format(i)===a.format(i)}}})})(FE);var C5=FE.exports;const A5=St(C5);Ad.extend(O5),Ad.extend(A5);function I5(e,t="day"){if(!e||e.length===0)return[];const r=[];r.push(qE(e[0].timestamp));for(let n=0;n<e.length;n++)if(r.push(e[n]),n+1<e.length){const o=e[n].timestamp,i=e[n+1].timestamp;Ad(o).isSame(i,t)||r.push(qE(i))}return r}function qE(e){return{id:Td(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:R5(e)}}}function R5(e,t=!1){const r=Ad(e),n="h:mma";return r.isToday()?t?`Today • ${r.format(n)}`:"Today":r.isYesterday()?t?`Yesterday • ${r.format(n)}`:"Yesterday":t?r.format(`YYYY-MM-DD • ${n}`):r.format("YYYY-MM-DD")}function P5(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(n=>Number.parseInt(n,16));const r=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(r)return r.splice(1).map(n=>Number.parseInt(n+n,16));if(e.includes(","))return e.split(",").map(n=>Number.parseInt(n));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function N5(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function M5(e,t){return e.map(r=>Math.round(r+(255-r)*t))}function j5(e,t){return e.map(r=>Math.round(r*t))}const gc=e=>t=>M5(t,e),vc=e=>t=>j5(t,e),D5={50:gc(.95),100:gc(.9),200:gc(.75),300:gc(.6),400:gc(.3),500:e=>e,600:vc(.9),700:vc(.6),800:vc(.45),900:vc(.3),950:vc(.2)};function BE(e,t=D5){const r={},n=P5(e);for(const[o,i]of Object.entries(t))r[o]=N5(i(n));return r}var Nt;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Nt||(Nt={}));var Jm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Jm||(Jm={}));const Ne=Nt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),si=e=>{switch(typeof e){case"undefined":return Ne.undefined;case"string":return Ne.string;case"number":return isNaN(e)?Ne.nan:Ne.number;case"boolean":return Ne.boolean;case"function":return Ne.function;case"bigint":return Ne.bigint;case"symbol":return Ne.symbol;case"object":return Array.isArray(e)?Ne.array:e===null?Ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ne.promise:typeof Map<"u"&&e instanceof Map?Ne.map:typeof Set<"u"&&e instanceof Set?Ne.set:typeof Date<"u"&&e instanceof Date?Ne.date:Ne.object;default:return Ne.unknown}},Ee=Nt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),L5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Vn extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,Nt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Vn.create=e=>new Vn(e);const bc=(e,t)=>{let r;switch(e.code){case Ee.invalid_type:e.received===Ne.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ee.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Nt.jsonStringifyReplacer)}`;break;case Ee.unrecognized_keys:r=`Unrecognized key(s) in object: ${Nt.joinValues(e.keys,", ")}`;break;case Ee.invalid_union:r="Invalid input";break;case Ee.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Nt.joinValues(e.options)}`;break;case Ee.invalid_enum_value:r=`Invalid enum value. Expected ${Nt.joinValues(e.options)}, received '${e.received}'`;break;case Ee.invalid_arguments:r="Invalid function arguments";break;case Ee.invalid_return_type:r="Invalid function return type";break;case Ee.invalid_date:r="Invalid date";break;case Ee.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Nt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ee.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Ee.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Ee.custom:r="Invalid input";break;case Ee.invalid_intersection_types:r="Intersection results could not be merged";break;case Ee.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ee.not_finite:r="Number must be finite";break;default:r=t.defaultError,Nt.assertNever(e)}return{message:r}};let UE=bc;function F5(e){UE=e}function Id(){return UE}const Rd=e=>{const{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],a={...o,path:i};let s="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)s=l(a,{data:t,defaultError:s}).message;return{...o,path:i,message:o.message||s}},q5=[];function Me(e,t){const r=Rd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Id(),bc].filter(n=>!!n)});e.common.issues.push(r)}class Hr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const o of r){if(o.status==="aborted")return st;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const o of r)n.push({key:await o.key,value:await o.value});return Hr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const o of r){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return st;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(n[i.value]=a.value)}return{status:t.value,value:n}}}const st=Object.freeze({status:"aborted"}),zE=e=>({status:"dirty",value:e}),nn=e=>({status:"valid",value:e}),Ym=e=>e.status==="aborted",Xm=e=>e.status==="dirty",wc=e=>e.status==="valid",Pd=e=>typeof Promise<"u"&&e instanceof Promise;var Ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ye||(Ye={}));class so{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ZE=(e,t)=>{if(wc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Vn(e.common.issues);return this._error=r,this._error}}};function dt(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:n??s.defaultError}:{message:r??s.defaultError},description:o}}class mt{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return si(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Hr,ctx:{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Pd(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const o={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},i=this._parseSync({data:t,path:o.path,parent:o});return ZE(o,i)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(Pd(o)?o:Promise.resolve(o));return ZE(n,i)}refine(t,r){const n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:Ee.custom,...n(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new Kn({schema:this,typeName:nt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Lo.create(this,this._def)}nullable(){return Ki.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wn.create(this,this._def)}promise(){return za.create(this,this._def)}or(t){return Ec.create([this,t],this._def)}and(t){return kc.create(this,t,this._def)}transform(t){return new Kn({...dt(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Ac({...dt(this._def),innerType:this,defaultValue:r,typeName:nt.ZodDefault})}brand(){return new HE({typeName:nt.ZodBranded,type:this,...dt(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Fd({...dt(this._def),innerType:this,catchValue:r,typeName:nt.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ic.create(this,t)}readonly(){return Bd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const B5=/^c[^\s-]{8,}$/i,U5=/^[a-z][a-z0-9]*$/,z5=/^[0-9A-HJKMNP-TV-Z]{26}$/,Z5=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,V5=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,H5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Qm;const W5=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,K5=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,G5=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function J5(e,t){return!!((t==="v4"||!t)&&W5.test(e)||(t==="v6"||!t)&&K5.test(e))}class Hn extends mt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ne.string){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.string,received:i.parsedType}),st}const n=new Hr;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?Me(o,{code:Ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&Me(o,{code:Ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")V5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"email",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Qm||(Qm=new RegExp(H5,"u")),Qm.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"emoji",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Z5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"uuid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")B5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")U5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid2",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")z5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"ulid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),Me(o,{validation:"url",code:Ee.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"regex",code:Ee.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?G5(i).test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="ip"?J5(t.data,i.version)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"ip",code:Ee.invalid_string,message:i.message}),n.dirty()):Nt.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:Ee.invalid_string,...Ye.errToObj(n)})}_addCheck(t){return new Hn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ye.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,...Ye.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ye.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ye.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ye.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ye.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ye.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ye.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ye.errToObj(r)})}nonempty(t){return this.min(1,Ye.errToObj(t))}trim(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Hn.create=e=>{var t;return new Hn({checks:[],typeName:nt.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...dt(e)})};function Y5(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class ci extends mt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ne.number){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.number,received:i.parsedType}),st}let n;const o=new Hr;for(const i of this._def.checks)i.kind==="int"?Nt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Y5(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_finite,message:i.message}),o.dirty()):Nt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ye.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ye.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ye.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ye.toString(r))}setLimit(t,r,n,o){return new ci({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ye.toString(o)}]})}_addCheck(t){return new ci({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ye.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ye.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ye.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Nt.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}ci.create=e=>new ci({checks:[],typeName:nt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...dt(e)});class li extends mt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Ne.bigint){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.bigint,received:i.parsedType}),st}let n;const o=new Hr;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Nt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ye.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ye.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ye.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ye.toString(r))}setLimit(t,r,n,o){return new li({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ye.toString(o)}]})}_addCheck(t){return new li({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ye.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ye.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}li.create=e=>{var t;return new li({checks:[],typeName:nt.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...dt(e)})};class xc extends mt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ne.boolean){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.boolean,received:n.parsedType}),st}return nn(t.data)}}xc.create=e=>new xc({typeName:nt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...dt(e)});class Vi extends mt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ne.date){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.date,received:i.parsedType}),st}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_date}),st}const n=new Hr;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Nt.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Vi({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ye.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ye.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}Vi.create=e=>new Vi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:nt.ZodDate,...dt(e)});class Nd extends mt{_parse(t){if(this._getType(t)!==Ne.symbol){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.symbol,received:n.parsedType}),st}return nn(t.data)}}Nd.create=e=>new Nd({typeName:nt.ZodSymbol,...dt(e)});class Sc extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.undefined,received:n.parsedType}),st}return nn(t.data)}}Sc.create=e=>new Sc({typeName:nt.ZodUndefined,...dt(e)});class _c extends mt{_parse(t){if(this._getType(t)!==Ne.null){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.null,received:n.parsedType}),st}return nn(t.data)}}_c.create=e=>new _c({typeName:nt.ZodNull,...dt(e)});class qa extends mt{constructor(){super(...arguments),this._any=!0}_parse(t){return nn(t.data)}}qa.create=e=>new qa({typeName:nt.ZodAny,...dt(e)});class Hi extends mt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return nn(t.data)}}Hi.create=e=>new Hi({typeName:nt.ZodUnknown,...dt(e)});class Do extends mt{_parse(t){const r=this._getOrReturnCtx(t);return Me(r,{code:Ee.invalid_type,expected:Ne.never,received:r.parsedType}),st}}Do.create=e=>new Do({typeName:nt.ZodNever,...dt(e)});class Md extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.void,received:n.parsedType}),st}return nn(t.data)}}Md.create=e=>new Md({typeName:nt.ZodVoid,...dt(e)});class Wn extends mt{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==Ne.array)return Me(r,{code:Ee.invalid_type,expected:Ne.array,received:r.parsedType}),st;if(o.exactLength!==null){const a=r.data.length>o.exactLength.value,s=r.data.length<o.exactLength.value;(a||s)&&(Me(r,{code:a?Ee.too_big:Ee.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(Me(r,{code:Ee.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(Me(r,{code:Ee.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>o.type._parseAsync(new so(r,a,r.path,s)))).then(a=>Hr.mergeArray(n,a));const i=[...r.data].map((a,s)=>o.type._parseSync(new so(r,a,r.path,s)));return Hr.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new Wn({...this._def,minLength:{value:t,message:Ye.toString(r)}})}max(t,r){return new Wn({...this._def,maxLength:{value:t,message:Ye.toString(r)}})}length(t,r){return new Wn({...this._def,exactLength:{value:t,message:Ye.toString(r)}})}nonempty(t){return this.min(1,t)}}Wn.create=(e,t)=>new Wn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...dt(t)});function Ba(e){if(e instanceof er){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Lo.create(Ba(n))}return new er({...e._def,shape:()=>t})}else return e instanceof Wn?new Wn({...e._def,type:Ba(e.element)}):e instanceof Lo?Lo.create(Ba(e.unwrap())):e instanceof Ki?Ki.create(Ba(e.unwrap())):e instanceof co?co.create(e.items.map(t=>Ba(t))):e}class er extends mt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Nt.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==Ne.object){const l=this._getOrReturnCtx(t);return Me(l,{code:Ee.invalid_type,expected:Ne.object,received:l.parsedType}),st}const{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Do&&this._def.unknownKeys==="strip"))for(const l in o.data)a.includes(l)||s.push(l);const c=[];for(const l of a){const u=i[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new so(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Do){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")s.length>0&&(Me(o,{code:Ee.unrecognized_keys,keys:s}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new so(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key;l.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>Hr.mergeObjectSync(n,l)):Hr.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Ye.errToObj,new er({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,i,a,s;const c=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=Ye.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new er({...this._def,unknownKeys:"strip"})}passthrough(){return new er({...this._def,unknownKeys:"passthrough"})}extend(t){return new er({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new er({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:nt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new er({...this._def,catchall:t})}pick(t){const r={};return Nt.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new er({...this._def,shape:()=>r})}omit(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new er({...this._def,shape:()=>r})}deepPartial(){return Ba(this)}partial(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{const o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}),new er({...this._def,shape:()=>r})}required(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Lo;)i=i._def.innerType;r[n]=i}}),new er({...this._def,shape:()=>r})}keyof(){return VE(Nt.objectKeys(this.shape))}}er.create=(e,t)=>new er({shape:()=>e,unknownKeys:"strip",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)}),er.strictCreate=(e,t)=>new er({shape:()=>e,unknownKeys:"strict",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)}),er.lazycreate=(e,t)=>new er({shape:e,unknownKeys:"strip",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)});class Ec extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new Vn(s.ctx.common.issues));return Me(r,{code:Ee.invalid_union,unionErrors:a}),st}if(r.common.async)return Promise.all(n.map(async i=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(c=>new Vn(c));return Me(r,{code:Ee.invalid_union,unionErrors:s}),st}}get options(){return this._def.options}}Ec.create=(e,t)=>new Ec({options:e,typeName:nt.ZodUnion,...dt(t)});const jd=e=>e instanceof $c?jd(e.schema):e instanceof Kn?jd(e.innerType()):e instanceof Oc?[e.value]:e instanceof ui?e.options:e instanceof Cc?Object.keys(e.enum):e instanceof Ac?jd(e._def.innerType):e instanceof Sc?[void 0]:e instanceof _c?[null]:null;class Dd extends mt{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.object)return Me(r,{code:Ee.invalid_type,expected:Ne.object,received:r.parsedType}),st;const n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(Me(r,{code:Ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),st)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const o=new Map;for(const i of r){const a=jd(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Dd({typeName:nt.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...dt(n)})}}function ey(e,t){const r=si(e),n=si(t);if(e===t)return{valid:!0,data:e};if(r===Ne.object&&n===Ne.object){const o=Nt.objectKeys(t),i=Nt.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=ey(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===Ne.array&&n===Ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],c=ey(a,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===Ne.date&&n===Ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class kc extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),o=(i,a)=>{if(Ym(i)||Ym(a))return st;const s=ey(i.value,a.value);return s.valid?((Xm(i)||Xm(a))&&r.dirty(),{status:r.value,value:s.data}):(Me(n,{code:Ee.invalid_intersection_types}),st)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}kc.create=(e,t,r)=>new kc({left:e,right:t,typeName:nt.ZodIntersection,...dt(r)});class co extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.array)return Me(n,{code:Ee.invalid_type,expected:Ne.array,received:n.parsedType}),st;if(n.data.length<this._def.items.length)return Me(n,{code:Ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),st;!this._def.rest&&n.data.length>this._def.items.length&&(Me(n,{code:Ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((a,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new so(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>Hr.mergeArray(r,a)):Hr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new co({...this._def,rest:t})}}co.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new co({items:e,typeName:nt.ZodTuple,rest:null,...dt(t)})};class Tc extends mt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.object)return Me(n,{code:Ee.invalid_type,expected:Ne.object,received:n.parsedType}),st;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in n.data)o.push({key:i._parse(new so(n,s,n.path,s)),value:a._parse(new so(n,n.data[s],n.path,s))});return n.common.async?Hr.mergeObjectAsync(r,o):Hr.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof mt?new Tc({keyType:t,valueType:r,typeName:nt.ZodRecord,...dt(n)}):new Tc({keyType:Hn.create(),valueType:t,typeName:nt.ZodRecord,...dt(r)})}}class Ld extends mt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.map)return Me(n,{code:Ee.invalid_type,expected:Ne.map,received:n.parsedType}),st;const o=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([s,c],l)=>({key:o._parse(new so(n,s,n.path,[l,"key"])),value:i._parse(new so(n,c,n.path,[l,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return st;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return st;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}}Ld.create=(e,t,r)=>new Ld({valueType:t,keyType:e,typeName:nt.ZodMap,...dt(r)});class Wi extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.set)return Me(n,{code:Ee.invalid_type,expected:Ne.set,received:n.parsedType}),st;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(Me(n,{code:Ee.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(Me(n,{code:Ee.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const i=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return st;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const s=[...n.data.values()].map((c,l)=>i._parse(new so(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,r){return new Wi({...this._def,minSize:{value:t,message:Ye.toString(r)}})}max(t,r){return new Wi({...this._def,maxSize:{value:t,message:Ye.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Wi.create=(e,t)=>new Wi({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...dt(t)});class Ua extends mt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.function)return Me(r,{code:Ee.invalid_type,expected:Ne.function,received:r.parsedType}),st;function n(s,c){return Rd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Id(),bc].filter(l=>!!l),issueData:{code:Ee.invalid_arguments,argumentsError:c}})}function o(s,c){return Rd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Id(),bc].filter(l=>!!l),issueData:{code:Ee.invalid_return_type,returnTypeError:c}})}const i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof za){const s=this;return nn(async function(...c){const l=new Vn([]),u=await s._def.args.parseAsync(c,i).catch(f=>{throw l.addIssue(n(c,f)),l}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw l.addIssue(o(d,f)),l})})}else{const s=this;return nn(function(...c){const l=s._def.args.safeParse(c,i);if(!l.success)throw new Vn([n(c,l.error)]);const u=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new Vn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ua({...this._def,args:co.create(t).rest(Hi.create())})}returns(t){return new Ua({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Ua({args:t||co.create([]).rest(Hi.create()),returns:r||Hi.create(),typeName:nt.ZodFunction,...dt(n)})}}class $c extends mt{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}$c.create=(e,t)=>new $c({getter:e,typeName:nt.ZodLazy,...dt(t)});class Oc extends mt{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Me(r,{received:r.data,code:Ee.invalid_literal,expected:this._def.value}),st}return{status:"valid",value:t.data}}get value(){return this._def.value}}Oc.create=(e,t)=>new Oc({value:e,typeName:nt.ZodLiteral,...dt(t)});function VE(e,t){return new ui({values:e,typeName:nt.ZodEnum,...dt(t)})}class ui extends mt{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{expected:Nt.joinValues(n),received:r.parsedType,code:Ee.invalid_type}),st}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{received:r.data,code:Ee.invalid_enum_value,options:n}),st}return nn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t){return ui.create(t)}exclude(t){return ui.create(this.options.filter(r=>!t.includes(r)))}}ui.create=VE;class Cc extends mt{_parse(t){const r=Nt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Ne.string&&n.parsedType!==Ne.number){const o=Nt.objectValues(r);return Me(n,{expected:Nt.joinValues(o),received:n.parsedType,code:Ee.invalid_type}),st}if(r.indexOf(t.data)===-1){const o=Nt.objectValues(r);return Me(n,{received:n.data,code:Ee.invalid_enum_value,options:o}),st}return nn(t.data)}get enum(){return this._def.values}}Cc.create=(e,t)=>new Cc({values:e,typeName:nt.ZodNativeEnum,...dt(t)});class za extends mt{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.promise&&r.common.async===!1)return Me(r,{code:Ee.invalid_type,expected:Ne.promise,received:r.parsedType}),st;const n=r.parsedType===Ne.promise?r.data:Promise.resolve(r.data);return nn(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}za.create=(e,t)=>new za({type:e,typeName:nt.ZodPromise,...dt(t)});class Kn extends mt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{Me(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(n.data,i);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:n.path,parent:n})):this._def.schema._parseSync({data:a,path:n.path,parent:n})}if(o.type==="refinement"){const a=s=>{const c=o.refinement(s,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?st:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?st:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(o.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!wc(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>wc(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:r.value,value:s})):a);Nt.assertNever(o)}}Kn.create=(e,t,r)=>new Kn({schema:e,typeName:nt.ZodEffects,effect:t,...dt(r)}),Kn.createWithPreprocess=(e,t,r)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...dt(r)});class Lo extends mt{_parse(t){return this._getType(t)===Ne.undefined?nn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Lo.create=(e,t)=>new Lo({innerType:e,typeName:nt.ZodOptional,...dt(t)});class Ki extends mt{_parse(t){return this._getType(t)===Ne.null?nn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ki.create=(e,t)=>new Ki({innerType:e,typeName:nt.ZodNullable,...dt(t)});class Ac extends mt{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===Ne.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Ac.create=(e,t)=>new Ac({innerType:e,typeName:nt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...dt(t)});class Fd extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Pd(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Vn(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Vn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Fd.create=(e,t)=>new Fd({innerType:e,typeName:nt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...dt(t)});class qd extends mt{_parse(t){if(this._getType(t)!==Ne.nan){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.nan,received:n.parsedType}),st}return{status:"valid",value:t.data}}}qd.create=e=>new qd({typeName:nt.ZodNaN,...dt(e)});const X5=Symbol("zod_brand");class HE extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ic extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?st:i.status==="dirty"?(r.dirty(),zE(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?st:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new Ic({in:t,out:r,typeName:nt.ZodPipeline})}}class Bd extends mt{_parse(t){const r=this._def.innerType._parse(t);return wc(r)&&(r.value=Object.freeze(r.value)),r}}Bd.create=(e,t)=>new Bd({innerType:e,typeName:nt.ZodReadonly,...dt(t)});const WE=(e,t={},r)=>e?qa.create().superRefine((n,o)=>{var i,a;if(!e(n)){const s=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,c=(a=(i=s.fatal)!==null&&i!==void 0?i:r)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...l,fatal:c})}}):qa.create(),Q5={object:er.lazycreate};var nt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(nt||(nt={}));const eU=(e,t={message:`Input not instance of ${e.name}`})=>WE(r=>r instanceof e,t),KE=Hn.create,GE=ci.create,tU=qd.create,rU=li.create,JE=xc.create,nU=Vi.create,oU=Nd.create,iU=Sc.create,aU=_c.create,sU=qa.create,cU=Hi.create,lU=Do.create,uU=Md.create,dU=Wn.create,fU=er.create,pU=er.strictCreate,hU=Ec.create,mU=Dd.create,yU=kc.create,gU=co.create,vU=Tc.create,bU=Ld.create,wU=Wi.create,xU=Ua.create,SU=$c.create,_U=Oc.create,EU=ui.create,kU=Cc.create,TU=za.create,YE=Kn.create,$U=Lo.create,OU=Ki.create,CU=Kn.createWithPreprocess,AU=Ic.create;var V=Object.freeze({__proto__:null,defaultErrorMap:bc,setErrorMap:F5,getErrorMap:Id,makeIssue:Rd,EMPTY_PATH:q5,addIssueToContext:Me,ParseStatus:Hr,INVALID:st,DIRTY:zE,OK:nn,isAborted:Ym,isDirty:Xm,isValid:wc,isAsync:Pd,get util(){return Nt},get objectUtil(){return Jm},ZodParsedType:Ne,getParsedType:si,ZodType:mt,ZodString:Hn,ZodNumber:ci,ZodBigInt:li,ZodBoolean:xc,ZodDate:Vi,ZodSymbol:Nd,ZodUndefined:Sc,ZodNull:_c,ZodAny:qa,ZodUnknown:Hi,ZodNever:Do,ZodVoid:Md,ZodArray:Wn,ZodObject:er,ZodUnion:Ec,ZodDiscriminatedUnion:Dd,ZodIntersection:kc,ZodTuple:co,ZodRecord:Tc,ZodMap:Ld,ZodSet:Wi,ZodFunction:Ua,ZodLazy:$c,ZodLiteral:Oc,ZodEnum:ui,ZodNativeEnum:Cc,ZodPromise:za,ZodEffects:Kn,ZodTransformer:Kn,ZodOptional:Lo,ZodNullable:Ki,ZodDefault:Ac,ZodCatch:Fd,ZodNaN:qd,BRAND:X5,ZodBranded:HE,ZodPipeline:Ic,ZodReadonly:Bd,custom:WE,Schema:mt,ZodSchema:mt,late:Q5,get ZodFirstPartyTypeKind(){return nt},coerce:{string:e=>Hn.create({...e,coerce:!0}),number:e=>ci.create({...e,coerce:!0}),boolean:e=>xc.create({...e,coerce:!0}),bigint:e=>li.create({...e,coerce:!0}),date:e=>Vi.create({...e,coerce:!0})},any:sU,array:dU,bigint:rU,boolean:JE,date:nU,discriminatedUnion:mU,effect:YE,enum:EU,function:xU,instanceof:eU,intersection:yU,lazy:SU,literal:_U,map:bU,nan:tU,nativeEnum:kU,never:lU,null:aU,nullable:OU,number:GE,object:fU,oboolean:()=>JE().optional(),onumber:()=>GE().optional(),optional:$U,ostring:()=>KE().optional(),pipeline:AU,preprocess:CU,promise:TU,record:vU,set:wU,strictObject:pU,string:KE,symbol:oU,transformer:YE,tuple:gU,undefined:iU,union:hU,unknown:cU,void:uU,NEVER:st,ZodIssueCode:Ee,quotelessJson:L5,ZodError:Vn});const Za=V.object({title:V.string().optional(),link:V.string().optional()}),ty=V.object({color:V.string().optional(),variant:V.enum(["soft","solid"]).optional(),themeMode:V.enum(["light","dark"]).optional(),fontFamily:V.enum(["rubik","inter","ibm","fira"]).optional(),radius:V.number().min(.5).max(4).optional()}),XE=V.object({composerPlaceholder:V.string().optional(),botName:V.string().optional(),botAvatar:V.string().optional(),botDescription:V.string().optional(),website:Za.optional(),email:Za.optional(),phone:Za.optional(),privacyPolicy:Za.optional(),termsOfService:Za.optional(),showPoweredBy:V.boolean().optional()}).merge(ty),QE=V.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),ek=V.object({}).passthrough().transform(e=>e),Oe=V.object({className:V.string().optional(),style:ek.optional()}),Ud=V.object({container:Oe.optional(),image:Oe.optional(),fallback:Oe.optional()}),tk=V.object({button:Oe.optional(),text:V.record(QE,Oe.optional()),image:V.object({image:Oe.optional(),placeholder:Oe.optional()}).optional(),audio:Oe.optional(),video:Oe.optional(),file:V.object({container:Oe.optional(),title:Oe.optional(),icon:Oe.optional()}).optional(),location:V.object({container:Oe.optional(),title:Oe.optional(),icon:Oe.optional()}).optional(),column:Oe.optional(),row:Oe.optional(),bubble:Oe.optional(),carousel:V.object({container:Oe.optional(),slidesContainer:Oe.optional(),backButton:Oe.optional(),nextButton:Oe.optional()}).optional(),dropdown:V.object({button:V.object({container:Oe.optional(),icon:Oe.optional(),text:Oe.optional()}).optional(),content:V.object({container:Oe.optional(),item:Oe.optional()}).optional()}).optional()}),rk=V.object({container:Oe.optional(),modal:V.object({overlay:Oe.optional(),container:Oe.optional(),dialog:V.object({container:Oe.optional(),title:V.object({container:Oe.optional(),text:Oe.optional(),closeIcon:Oe.optional()}).optional(),content:Oe.optional(),newConversation:V.object({text:Oe.optional(),button:Oe.optional()}).optional()}).optional()}).optional(),notification:V.object({container:Oe.optional(),title:Oe.optional(),description:Oe.optional(),icon:Oe.optional(),closeIcon:Oe.optional()}).optional(),header:V.object({container:Oe.optional(),content:V.object({container:Oe.optional(),title:Oe.optional(),description:Oe.optional(),avatar:Ud.optional(),actions:V.object({container:Oe.optional(),icons:Oe.optional()}).optional()}),expandedContent:V.object({container:Oe.optional(),group:Oe.optional(),descriptionItems:V.object({container:Oe.optional(),icon:Oe.optional(),text:Oe.optional(),link:Oe.optional(),poweredBy:Oe.optional()}).optional()}).optional(),description:V.object({container:Oe.optional(),title:Oe.optional(),subtitle:Oe.optional()}).optional(),newConversationIcon:Oe.optional()}).optional(),composer:V.object({container:Oe.optional(),input:Oe.optional(),uploadButton:V.object({container:Oe.optional(),icon:Oe.optional()}).optional(),button:V.object({container:Oe.optional(),icon:Oe.optional()}).optional()}).optional(),fab:V.object({icon:Oe.optional(),container:Oe.optional()}).optional(),messageList:V.object({scrollbar:V.object({container:Oe.optional(),viewport:Oe.optional(),thumb:Oe.optional(),corner:Oe.optional(),background:Oe.optional()}).optional(),container:Oe.optional(),marquee:V.object({content:Oe.optional(),title:Oe.optional(),description:Oe.optional(),avatar:Ud.optional(),container:Oe.optional()}).optional(),scrollDownButton:V.object({container:Oe.optional(),button:Oe.optional(),icon:Oe.optional()}).optional()}).optional(),message:V.object({container:Oe.optional(),avatar:Ud.optional(),blocks:tk.optional()}).optional(),loadingIndicator:V.object({container:Oe.optional(),loader:Oe.optional()}).optional()}),nk=V.enum(["opened","closed","initial"]),ok=V.object({name:V.string().optional(),pictureUrl:V.string().optional(),data:V.record(V.unknown()).optional()}),ik=V.enum(["messaging","pushpin"]),ak=V.object({configuration:XE.optional().catch(void 0),theme:rk.optional().catch(void 0),style:V.string().optional().catch(void 0),user:ok.optional().catch(void 0)}),IU=ak.extend({clientId:V.string(),botId:V.string(),selector:V.string().optional().catch(void 0),webchatScriptUrl:V.string().optional().catch(void 0),fabScriptUrl:V.string().optional().catch(void 0),messagingUrl:V.string().optional().catch(void 0),pushpinUrl:V.string().optional().catch(void 0),clientMode:ik.optional().catch(void 0),defaultState:nk.optional().catch(void 0)});function sk(e){const{fontFamily:t,radius:r,themeMode:n,variant:o,color:i}=ty.parse(e);let a={},s;if(i){const u=BE(i),d=n==="dark"?OE(u):u,p=BE(c5(l5(Km(i)))),f=n==="dark"?OE(p):p,h=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...d,1:h}).reduce((m,[g,v])=>({...m,[`--bpPrimary-${g}`]:v}),{});const y=Object.entries({...f,1:h}).reduce((m,[g,v])=>({...m,[`--bpGray-${g}`]:v}),{});a={...s,...y}}r&&(a={...a,"--bpRadius-scale":r.toString()});const c=s?NE(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=o==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?NE(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return a={...a,...l},ME(":root",a)+(t?ME(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const ry=$.forwardRef(({userId:e,src:t,container:r,image:n,fallback:o,...i},a)=>{const s=jE(e??"",15);return J.jsxs(kE,{ref:a,"data-color":s,...r,...i,children:[J.jsx(TE,{src:t,...n}),J.jsx($E,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});function qxe(){}function Bxe(){}function RU(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const PU=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NU=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,MU={};function ck(e,t){return((t||MU).jsx?NU:PU).test(e)}const jU=/[ \t\n\f\r]/g;function DU(e){return typeof e=="object"?e.type==="text"?lk(e.value):!1:lk(e)}function lk(e){return e.replace(jU,"")===""}class Rc{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}Rc.prototype.property={},Rc.prototype.normal={},Rc.prototype.space=null;function uk(e,t){const r={},n={};let o=-1;for(;++o<e.length;)Object.assign(r,e[o].property),Object.assign(n,e[o].normal);return new Rc(r,n,t)}function ny(e){return e.toLowerCase()}class Rn{constructor(t,r){this.property=t,this.attribute=r}}Rn.prototype.space=null,Rn.prototype.boolean=!1,Rn.prototype.booleanish=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.number=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.spaceSeparated=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.defined=!1;let LU=0;const yt=Gi(),pr=Gi(),dk=Gi(),Se=Gi(),Jt=Gi(),Va=Gi(),gn=Gi();function Gi(){return 2**++LU}const oy=Object.freeze(Object.defineProperty({__proto__:null,boolean:yt,booleanish:pr,commaOrSpaceSeparated:gn,commaSeparated:Va,number:Se,overloadedBoolean:dk,spaceSeparated:Jt},Symbol.toStringTag,{value:"Module"})),iy=Object.keys(oy);class ay extends Rn{constructor(t,r,n,o){let i=-1;if(super(t,r),fk(this,"space",o),typeof n=="number")for(;++i<iy.length;){const a=iy[i];fk(this,iy[i],(n&oy[a])===oy[a])}}}ay.prototype.defined=!0;function fk(e,t,r){r&&(e[t]=r)}const FU={}.hasOwnProperty;function Ha(e){const t={},r={};let n;for(n in e.properties)if(FU.call(e.properties,n)){const o=e.properties[n],i=new ay(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[ny(n)]=n,r[ny(i.attribute)]=n}return new Rc(t,r,e.space)}const pk=Ha({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),hk=Ha({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function mk(e,t){return t in e?e[t]:t}function yk(e,t){return mk(e,t.toLowerCase())}const gk=Ha({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:yk,properties:{xmlns:null,xmlnsXLink:null}}),vk=Ha({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:pr,ariaAutoComplete:null,ariaBusy:pr,ariaChecked:pr,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:Jt,ariaCurrent:null,ariaDescribedBy:Jt,ariaDetails:null,ariaDisabled:pr,ariaDropEffect:Jt,ariaErrorMessage:null,ariaExpanded:pr,ariaFlowTo:Jt,ariaGrabbed:pr,ariaHasPopup:null,ariaHidden:pr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Jt,ariaLevel:Se,ariaLive:null,ariaModal:pr,ariaMultiLine:pr,ariaMultiSelectable:pr,ariaOrientation:null,ariaOwns:Jt,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:pr,ariaReadOnly:pr,ariaRelevant:null,ariaRequired:pr,ariaRoleDescription:Jt,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:pr,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null}}),qU=Ha({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:yk,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Va,acceptCharset:Jt,accessKey:Jt,action:null,allow:null,allowFullScreen:yt,allowPaymentRequest:yt,allowUserMedia:yt,alt:null,as:null,async:yt,autoCapitalize:null,autoComplete:Jt,autoFocus:yt,autoPlay:yt,capture:yt,charSet:null,checked:yt,cite:null,className:Jt,cols:Se,colSpan:null,content:null,contentEditable:pr,controls:yt,controlsList:Jt,coords:Se|Va,crossOrigin:null,data:null,dateTime:null,decoding:null,default:yt,defer:yt,dir:null,dirName:null,disabled:yt,download:dk,draggable:pr,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:yt,formTarget:null,headers:Jt,height:Se,hidden:yt,high:Se,href:null,hrefLang:null,htmlFor:Jt,httpEquiv:Jt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:yt,itemId:null,itemProp:Jt,itemRef:Jt,itemScope:yt,itemType:Jt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:yt,low:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,multiple:yt,muted:yt,name:null,nonce:null,noModule:yt,noValidate:yt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:yt,optimum:Se,pattern:null,ping:Jt,placeholder:null,playsInline:yt,poster:null,preload:null,readOnly:yt,referrerPolicy:null,rel:Jt,required:yt,reversed:yt,rows:Se,rowSpan:Se,sandbox:Jt,scope:null,scoped:yt,seamless:yt,selected:yt,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:pr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:yt,useMap:null,value:pr,width:Se,wrap:null,align:null,aLink:null,archive:Jt,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:yt,declare:yt,event:null,face:null,frame:null,frameBorder:null,hSpace:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:yt,noHref:yt,noShade:yt,noWrap:yt,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:pr,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:yt,disableRemotePlayback:yt,prefix:null,property:null,results:Se,security:null,unselectable:null}}),BU=Ha({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:mk,properties:{about:gn,accentHeight:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,className:Jt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:yt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Va,g2:Va,glyphName:Va,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Se,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Jt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,u1:null,u2:null,underlinePosition:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),UU=/^data[-\w.:]+$/i,bk=/-[a-z]/g,zU=/[A-Z]/g;function ZU(e,t){const r=ny(t);let n=t,o=Rn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&UU.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(bk,HU);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!bk.test(i)){let a=i.replace(zU,VU);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=ay}return new o(n,t)}function VU(e){return"-"+e.toLowerCase()}function HU(e){return e.charAt(1).toUpperCase()}const WU={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},KU=uk([hk,pk,gk,vk,qU],"html"),sy=uk([hk,pk,gk,vk,BU],"svg");function GU(e){return e.join(" ").trim()}var wk={},xk=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,JU=/\n/g,YU=/^\s*/,XU=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,QU=/^:\s*/,e4=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,t4=/^[;\s]*/,r4=/^\s+|\s+$/g,n4=`
103
+ Check the top-level render call using <`+ke+">.")}return ge}}function Yt(M,ge){{if(!M._store||M._store.validated||M.key!=null)return;M._store.validated=!0;var ke=bt(ge);if(vt[ke])return;vt[ke]=!0;var Ze="";M&&M._owner&&M._owner!==gt.current&&(Ze=" It was passed a child from "+z(M._owner.type)+"."),ir(M),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ke,Ze),ir(null)}}function Gt(M,ge){{if(typeof M!="object")return;if(Ue(M))for(var ke=0;ke<M.length;ke++){var Ze=M[ke];Kt(Ze)&&Yt(Ze,ge)}else if(Kt(M))M._store&&(M._store.validated=!0);else if(M){var kt=m(M);if(typeof kt=="function"&&kt!==M.entries)for(var Ot=kt.call(M),ht;!(ht=Ot.next()).done;)Kt(ht.value)&&Yt(ht.value,ge)}}}function sr(M){{var ge=M.type;if(ge==null||typeof ge=="string")return;var ke;if(typeof ge=="function")ke=ge.propTypes;else if(typeof ge=="object"&&(ge.$$typeof===c||ge.$$typeof===d))ke=ge.propTypes;else return;if(ke){var Ze=z(ge);je(ke,M.props,"prop",Ze,M)}else if(ge.PropTypes!==void 0&&!kr){kr=!0;var kt=z(ge);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",kt||"Unknown")}typeof ge.getDefaultProps=="function"&&!ge.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ut(M){{for(var ge=Object.keys(M.props),ke=0;ke<ge.length;ke++){var Ze=ge[ke];if(Ze!=="children"&&Ze!=="key"){ir(M),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ze),ir(null);break}}M.ref!==null&&(ir(M),v("Invalid attribute `ref` supplied to `React.Fragment`."),ir(null))}}function Ir(M,ge,ke,Ze,kt,Ot){{var ht=A(M);if(!ht){var at="";(M===void 0||typeof M=="object"&&M!==null&&Object.keys(M).length===0)&&(at+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var cr=sn(kt);cr?at+=cr:at+=ar();var Xt;M===null?Xt="null":Ue(M)?Xt="array":M!==void 0&&M.$$typeof===t?(Xt="<"+(z(M.type)||"Unknown")+" />",at=" Did you accidentally export a JSX literal instead of a component?"):Xt=typeof M,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Xt,at)}var Qt=Ge(M,ge,ke,kt,Ot);if(Qt==null)return Qt;if(ht){var yn=ge.children;if(yn!==void 0)if(Ze)if(Ue(yn)){for(var Ao=0;Ao<yn.length;Ao++)Gt(yn[Ao],M);Object.freeze&&Object.freeze(yn)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Gt(yn,M)}return M===n?Ut(Qt):sr(Qt),Qt}}function Rr(M,ge,ke){return Ir(M,ge,ke,!0)}function tn(M,ge,ke){return Ir(M,ge,ke,!1)}var wa=tn,xa=Rr;mc.Fragment=n,mc.jsx=wa,mc.jsxs=xa}()),mc}process.env.NODE_ENV==="production"?Zm.exports=GB():Zm.exports=JB();var J=Zm.exports;function vr(){return vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vr.apply(this,arguments)}function Vm(e,t=[]){let r=[];function n(i,a){const s=$.createContext(a),c=r.length;r=[...r,a];function l(d){const{scope:p,children:f,...h}=d,y=(p==null?void 0:p[e][c])||s,m=$.useMemo(()=>h,Object.values(h));return $.createElement(y.Provider,{value:m},f)}function u(d,p){const f=(p==null?void 0:p[e][c])||s,h=$.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=r.map(a=>$.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return $.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[n,YB(o,...t)]}function YB(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...s,...d}},{});return $.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function ai(e){const t=$.useRef(e);return $.useEffect(()=>{t.current=e}),$.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const yc=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{};function zi(){return zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zi.apply(null,arguments)}function XB(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function SE(...e){return t=>e.forEach(r=>XB(r,t))}function Zi(...e){return $.useCallback(SE(...e),e)}const Hm=$.forwardRef((e,t)=>{const{children:r,...n}=e,o=$.Children.toArray(r),i=o.find(e5);if(i){const a=i.props.children,s=o.map(c=>c===i?$.Children.count(a)>1?$.Children.only(null):$.isValidElement(a)?a.props.children:null:c);return $.createElement(Wm,zi({},n,{ref:t}),$.isValidElement(a)?$.cloneElement(a,void 0,s):null)}return $.createElement(Wm,zi({},n,{ref:t}),r)});Hm.displayName="Slot";const Wm=$.forwardRef((e,t)=>{const{children:r,...n}=e;return $.isValidElement(r)?$.cloneElement(r,{...t5(n,r.props),ref:t?SE(t,r.ref):r.ref}):$.Children.count(r)>1?$.Children.only(null):null});Wm.displayName="SlotClone";const QB=({children:e})=>$.createElement($.Fragment,null,e);function e5(e){return $.isValidElement(e)&&e.type===QB}function t5(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const In=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=$.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?Hm:t;return $.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),$.createElement(s,zi({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function r5(e,t){e&&no.flushSync(()=>e.dispatchEvent(t))}const _E="Avatar",[n5,Nxe]=Vm(_E),[o5,EE]=n5(_E),kE=$.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,i]=$.useState("idle");return $.createElement(o5,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i},$.createElement(In.span,vr({},n,{ref:t})))}),i5="AvatarImage",TE=$.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...i}=e,a=EE(i5,r),s=s5(n),c=ai(l=>{o(l),a.onImageLoadingStatusChange(l)});return yc(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?$.createElement(In.img,vr({},i,{ref:t,src:n})):null}),a5="AvatarFallback",$E=$.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,i=EE(a5,r),[a,s]=$.useState(n===void 0);return $.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(c)}},[n]),a&&i.imageLoadingStatus!=="loaded"?$.createElement(In.span,vr({},o,{ref:t})):null});function s5(e){const[t,r]=$.useState("idle");return $.useEffect(()=>{if(!e){r("error");return}let n=!0;const o=new window.Image,i=a=>()=>{n&&r(a)};return r("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{n=!1}},[e]),t}function Km(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const r=e.replace(/^#/,"");let n=r;r.length===3&&(n=r.split("").map(c=>c+c).join(""));const o=parseInt(n,16),i=o>>16&255,a=o>>8&255,s=o&255;return{r:i,g:a,b:s}}function c5(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const l5=(e,t=30)=>{const r=Math.min(e.r,e.g,e.b),n=Math.max(e.r,e.g,e.b,r+1);return{r:Math.floor((e.r-r)/(n-r)*t*(1-.299)+120-t/2),g:Math.floor((e.g-r)/(n-r)*t*(1-.587)+120-t/2),b:Math.floor((e.b-r)/(n-r)*t*(1-.114)+120-t/2)}};function OE(e){return Object.entries(e).reduce((t,[r,n])=>{const o=r.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:n}},{})}const u5=2.4,d5=.2126729,f5=.7151522,p5=.072175,h5=.56,m5=.57,y5=.62,g5=.65,Cd=.022,CE=1.414,v5=1.14,b5=1.14,w5=.035991,x5=.035991,S5=27.7847239587675,_5=27.7847239587675,AE=.027,IE=.027,RE=.001,E5=5e-4;function PE(e){const{r:t,g:r,b:n}=e,o=i=>(i/255)**u5;return d5*o(t)+f5*o(r)+p5*o(n)}function NE(e,t){if(!e||!t)return 0;let r=PE(Km(e)),n=PE(Km(t)),o=0,i=0;return r=r>Cd?r:r+(Cd-r)**CE,n=n>Cd?n:n+(Cd-n)**CE,Math.abs(n-r)<E5?0:(n>r?(o=(n**h5-r**m5)*v5,i=o<RE?0:o<w5?o-o*S5*AE:o-AE):(o=(n**g5-r**y5)*b5,i=o>-RE?0:o>-x5?o-o*_5*IE:o+IE),Math.abs(i*100))}let Gm=class{constructor(){k(this,"eventMap");this.eventMap={}}on(t,r){var n;return this.eventMap[t]||(this.eventMap[t]=new Set),(n=this.eventMap[t])==null||n.add(r),()=>{var o;(o=this.eventMap[t])==null||o.delete(r)}}emit(t,r){var n,o;(n=this.eventMap[t])==null||n.forEach(i=>{i(r)}),(o=this.eventMap["*"])==null||o.forEach(i=>{i({type:t,payload:r})})}};const k5=new Gm;function ME(e,t){let r=`${e} {`;for(const[n,o]of Object.entries(t))r+=`${n}: ${o}; `;return r+="}",r}function jE(e,t){let r=0;if(e.length==0)return r;for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);r=(r<<5)-r+o,r=r&r}return Math.abs(r)%t}var DE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){var r=1e3,n=6e4,o=36e5,i="millisecond",a="second",s="minute",c="hour",l="day",u="week",d="month",p="quarter",f="year",h="date",y="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var F=["th","st","nd","rd"],j=B%100;return"["+B+(F[(j-20)%10]||F[j]||F[0])+"]"}},b=function(B,F,j){var Z=String(B);return!Z||Z.length>=F?B:""+Array(F+1-Z.length).join(j)+B},x={s:b,z:function(B){var F=-B.utcOffset(),j=Math.abs(F),Z=Math.floor(j/60),W=j%60;return(F<=0?"+":"-")+b(Z,2,"0")+":"+b(W,2,"0")},m:function B(F,j){if(F.date()<j.date())return-B(j,F);var Z=12*(j.year()-F.year())+(j.month()-F.month()),W=F.clone().add(Z,d),D=j-W<0,E=F.clone().add(Z+(D?-1:1),d);return+(-(Z+(j-W)/(D?W-E:E-W))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:d,y:f,w:u,d:l,D:h,h:c,m:s,s:a,ms:i,Q:p}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},w="en",S={};S[w]=v;var C="$isDayjsObject",I=function(B){return B instanceof K||!(!B||!B[C])},P=function B(F,j,Z){var W;if(!F)return w;if(typeof F=="string"){var D=F.toLowerCase();S[D]&&(W=D),j&&(S[D]=j,W=D);var E=F.split("-");if(!W&&E.length>1)return B(E[0])}else{var H=F.name;S[H]=F,W=H}return!Z&&W&&(w=W),W||!Z&&w},A=function(B,F){if(I(B))return B.clone();var j=typeof F=="object"?F:{};return j.date=B,j.args=arguments,new K(j)},L=x;L.l=P,L.i=I,L.w=function(B,F){return A(B,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var K=function(){function B(j){this.$L=P(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[C]=!0}var F=B.prototype;return F.parse=function(j){this.$d=function(Z){var W=Z.date,D=Z.utc;if(W===null)return new Date(NaN);if(L.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var E=W.match(m);if(E){var H=E[2]-1||0,Q=(E[7]||"0").substring(0,3);return D?new Date(Date.UTC(E[1],H,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)):new Date(E[1],H,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)}}return new Date(W)}(j),this.init()},F.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},F.$utils=function(){return L},F.isValid=function(){return this.$d.toString()!==y},F.isSame=function(j,Z){var W=A(j);return this.startOf(Z)<=W&&W<=this.endOf(Z)},F.isAfter=function(j,Z){return A(j)<this.startOf(Z)},F.isBefore=function(j,Z){return this.endOf(Z)<A(j)},F.$g=function(j,Z,W){return L.u(j)?this[Z]:this.set(W,j)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(j,Z){var W=this,D=!!L.u(Z)||Z,E=L.p(j),H=function(Ce,be){var de=L.w(W.$u?Date.UTC(W.$y,be,Ce):new Date(W.$y,be,Ce),W);return D?de:de.endOf(l)},Q=function(Ce,be){return L.w(W.toDate()[Ce].apply(W.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(be)),W)},T=this.$W,ce=this.$M,pe=this.$D,fe="set"+(this.$u?"UTC":"");switch(E){case f:return D?H(1,0):H(31,11);case d:return D?H(1,ce):H(0,ce+1);case u:var ve=this.$locale().weekStart||0,_e=(T<ve?T+7:T)-ve;return H(D?pe-_e:pe+(6-_e),ce);case l:case h:return Q(fe+"Hours",0);case c:return Q(fe+"Minutes",1);case s:return Q(fe+"Seconds",2);case a:return Q(fe+"Milliseconds",3);default:return this.clone()}},F.endOf=function(j){return this.startOf(j,!1)},F.$set=function(j,Z){var W,D=L.p(j),E="set"+(this.$u?"UTC":""),H=(W={},W[l]=E+"Date",W[h]=E+"Date",W[d]=E+"Month",W[f]=E+"FullYear",W[c]=E+"Hours",W[s]=E+"Minutes",W[a]=E+"Seconds",W[i]=E+"Milliseconds",W)[D],Q=D===l?this.$D+(Z-this.$W):Z;if(D===d||D===f){var T=this.clone().set(h,1);T.$d[H](Q),T.init(),this.$d=T.set(h,Math.min(this.$D,T.daysInMonth())).$d}else H&&this.$d[H](Q);return this.init(),this},F.set=function(j,Z){return this.clone().$set(j,Z)},F.get=function(j){return this[L.p(j)]()},F.add=function(j,Z){var W,D=this;j=Number(j);var E=L.p(Z),H=function(ce){var pe=A(D);return L.w(pe.date(pe.date()+Math.round(ce*j)),D)};if(E===d)return this.set(d,this.$M+j);if(E===f)return this.set(f,this.$y+j);if(E===l)return H(1);if(E===u)return H(7);var Q=(W={},W[s]=n,W[c]=o,W[a]=r,W)[E]||1,T=this.$d.getTime()+j*Q;return L.w(T,this)},F.subtract=function(j,Z){return this.add(-1*j,Z)},F.format=function(j){var Z=this,W=this.$locale();if(!this.isValid())return W.invalidDate||y;var D=j||"YYYY-MM-DDTHH:mm:ssZ",E=L.z(this),H=this.$H,Q=this.$m,T=this.$M,ce=W.weekdays,pe=W.months,fe=W.meridiem,ve=function(be,de,te,we){return be&&(be[de]||be(Z,D))||te[de].slice(0,we)},_e=function(be){return L.s(H%12||12,be,"0")},Ce=fe||function(be,de,te){var we=be<12?"AM":"PM";return te?we.toLowerCase():we};return D.replace(g,function(be,de){return de||function(te){switch(te){case"YY":return String(Z.$y).slice(-2);case"YYYY":return L.s(Z.$y,4,"0");case"M":return T+1;case"MM":return L.s(T+1,2,"0");case"MMM":return ve(W.monthsShort,T,pe,3);case"MMMM":return ve(pe,T);case"D":return Z.$D;case"DD":return L.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return ve(W.weekdaysMin,Z.$W,ce,2);case"ddd":return ve(W.weekdaysShort,Z.$W,ce,3);case"dddd":return ce[Z.$W];case"H":return String(H);case"HH":return L.s(H,2,"0");case"h":return _e(1);case"hh":return _e(2);case"a":return Ce(H,Q,!0);case"A":return Ce(H,Q,!1);case"m":return String(Q);case"mm":return L.s(Q,2,"0");case"s":return String(Z.$s);case"ss":return L.s(Z.$s,2,"0");case"SSS":return L.s(Z.$ms,3,"0");case"Z":return E}return null}(be)||E.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(j,Z,W){var D,E=this,H=L.p(Z),Q=A(j),T=(Q.utcOffset()-this.utcOffset())*n,ce=this-Q,pe=function(){return L.m(E,Q)};switch(H){case f:D=pe()/12;break;case d:D=pe();break;case p:D=pe()/3;break;case u:D=(ce-T)/6048e5;break;case l:D=(ce-T)/864e5;break;case c:D=ce/o;break;case s:D=ce/n;break;case a:D=ce/r;break;default:D=ce}return W?D:L.a(D)},F.daysInMonth=function(){return this.endOf(d).$D},F.$locale=function(){return S[this.$L]},F.locale=function(j,Z){if(!j)return this.$L;var W=this.clone(),D=P(j,Z,!0);return D&&(W.$L=D),W},F.clone=function(){return L.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},B}(),z=K.prototype;return A.prototype=z,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",l],["$M",d],["$y",f],["$D",h]].forEach(function(B){z[B[1]]=function(F){return this.$g(F,B[0],B[1])}}),A.extend=function(B,F){return B.$i||(B(F,K,A),B.$i=!0),A},A.locale=P,A.isDayjs=I,A.unix=function(B){return A(1e3*B)},A.en=S[w],A.Ls=S,A.p={},A})})(DE);var T5=DE.exports;const Ad=St(T5);var LE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){return function(r,n,o){n.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(LE);var $5=LE.exports;const O5=St($5);var FE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){return function(r,n,o){n.prototype.isYesterday=function(){var i="YYYY-MM-DD",a=o().subtract(1,"day");return this.format(i)===a.format(i)}}})})(FE);var C5=FE.exports;const A5=St(C5);Ad.extend(O5),Ad.extend(A5);function I5(e,t="day"){if(!e||e.length===0)return[];const r=[];r.push(qE(e[0].timestamp));for(let n=0;n<e.length;n++)if(r.push(e[n]),n+1<e.length){const o=e[n].timestamp,i=e[n+1].timestamp;Ad(o).isSame(i,t)||r.push(qE(i))}return r}function qE(e){return{id:Td(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:R5(e)}}}function R5(e,t=!1){const r=Ad(e),n="h:mma";return r.isToday()?t?`Today • ${r.format(n)}`:"Today":r.isYesterday()?t?`Yesterday • ${r.format(n)}`:"Yesterday":t?r.format(`YYYY-MM-DD • ${n}`):r.format("YYYY-MM-DD")}function P5(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(n=>Number.parseInt(n,16));const r=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(r)return r.splice(1).map(n=>Number.parseInt(n+n,16));if(e.includes(","))return e.split(",").map(n=>Number.parseInt(n));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function N5(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function M5(e,t){return e.map(r=>Math.round(r+(255-r)*t))}function j5(e,t){return e.map(r=>Math.round(r*t))}const gc=e=>t=>M5(t,e),vc=e=>t=>j5(t,e),D5={50:gc(.95),100:gc(.9),200:gc(.75),300:gc(.6),400:gc(.3),500:e=>e,600:vc(.9),700:vc(.6),800:vc(.45),900:vc(.3),950:vc(.2)};function BE(e,t=D5){const r={},n=P5(e);for(const[o,i]of Object.entries(t))r[o]=N5(i(n));return r}var Nt;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Nt||(Nt={}));var Jm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Jm||(Jm={}));const Ne=Nt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),si=e=>{switch(typeof e){case"undefined":return Ne.undefined;case"string":return Ne.string;case"number":return isNaN(e)?Ne.nan:Ne.number;case"boolean":return Ne.boolean;case"function":return Ne.function;case"bigint":return Ne.bigint;case"symbol":return Ne.symbol;case"object":return Array.isArray(e)?Ne.array:e===null?Ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ne.promise:typeof Map<"u"&&e instanceof Map?Ne.map:typeof Set<"u"&&e instanceof Set?Ne.set:typeof Date<"u"&&e instanceof Date?Ne.date:Ne.object;default:return Ne.unknown}},Ee=Nt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),L5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Vn extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,Nt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Vn.create=e=>new Vn(e);const bc=(e,t)=>{let r;switch(e.code){case Ee.invalid_type:e.received===Ne.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ee.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Nt.jsonStringifyReplacer)}`;break;case Ee.unrecognized_keys:r=`Unrecognized key(s) in object: ${Nt.joinValues(e.keys,", ")}`;break;case Ee.invalid_union:r="Invalid input";break;case Ee.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Nt.joinValues(e.options)}`;break;case Ee.invalid_enum_value:r=`Invalid enum value. Expected ${Nt.joinValues(e.options)}, received '${e.received}'`;break;case Ee.invalid_arguments:r="Invalid function arguments";break;case Ee.invalid_return_type:r="Invalid function return type";break;case Ee.invalid_date:r="Invalid date";break;case Ee.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Nt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ee.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Ee.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Ee.custom:r="Invalid input";break;case Ee.invalid_intersection_types:r="Intersection results could not be merged";break;case Ee.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ee.not_finite:r="Number must be finite";break;default:r=t.defaultError,Nt.assertNever(e)}return{message:r}};let UE=bc;function F5(e){UE=e}function Id(){return UE}const Rd=e=>{const{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],a={...o,path:i};let s="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)s=l(a,{data:t,defaultError:s}).message;return{...o,path:i,message:o.message||s}},q5=[];function Me(e,t){const r=Rd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Id(),bc].filter(n=>!!n)});e.common.issues.push(r)}class Hr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const o of r){if(o.status==="aborted")return st;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const o of r)n.push({key:await o.key,value:await o.value});return Hr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const o of r){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return st;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(n[i.value]=a.value)}return{status:t.value,value:n}}}const st=Object.freeze({status:"aborted"}),zE=e=>({status:"dirty",value:e}),nn=e=>({status:"valid",value:e}),Ym=e=>e.status==="aborted",Xm=e=>e.status==="dirty",wc=e=>e.status==="valid",Pd=e=>typeof Promise<"u"&&e instanceof Promise;var Ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ye||(Ye={}));class so{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ZE=(e,t)=>{if(wc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Vn(e.common.issues);return this._error=r,this._error}}};function dt(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:n??s.defaultError}:{message:r??s.defaultError},description:o}}class mt{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return si(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Hr,ctx:{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Pd(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const o={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},i=this._parseSync({data:t,path:o.path,parent:o});return ZE(o,i)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(Pd(o)?o:Promise.resolve(o));return ZE(n,i)}refine(t,r){const n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:Ee.custom,...n(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new Kn({schema:this,typeName:nt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Lo.create(this,this._def)}nullable(){return Ki.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wn.create(this,this._def)}promise(){return za.create(this,this._def)}or(t){return Ec.create([this,t],this._def)}and(t){return kc.create(this,t,this._def)}transform(t){return new Kn({...dt(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Ac({...dt(this._def),innerType:this,defaultValue:r,typeName:nt.ZodDefault})}brand(){return new HE({typeName:nt.ZodBranded,type:this,...dt(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Fd({...dt(this._def),innerType:this,catchValue:r,typeName:nt.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ic.create(this,t)}readonly(){return Bd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const B5=/^c[^\s-]{8,}$/i,U5=/^[a-z][a-z0-9]*$/,z5=/^[0-9A-HJKMNP-TV-Z]{26}$/,Z5=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,V5=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,H5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Qm;const W5=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,K5=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,G5=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function J5(e,t){return!!((t==="v4"||!t)&&W5.test(e)||(t==="v6"||!t)&&K5.test(e))}class Hn extends mt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ne.string){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.string,received:i.parsedType}),st}const n=new Hr;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?Me(o,{code:Ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&Me(o,{code:Ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")V5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"email",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Qm||(Qm=new RegExp(H5,"u")),Qm.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"emoji",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Z5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"uuid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")B5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")U5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid2",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")z5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"ulid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),Me(o,{validation:"url",code:Ee.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"regex",code:Ee.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?G5(i).test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="ip"?J5(t.data,i.version)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"ip",code:Ee.invalid_string,message:i.message}),n.dirty()):Nt.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:Ee.invalid_string,...Ye.errToObj(n)})}_addCheck(t){return new Hn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ye.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,...Ye.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ye.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ye.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ye.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ye.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ye.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ye.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ye.errToObj(r)})}nonempty(t){return this.min(1,Ye.errToObj(t))}trim(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Hn.create=e=>{var t;return new Hn({checks:[],typeName:nt.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...dt(e)})};function Y5(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class ci extends mt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ne.number){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.number,received:i.parsedType}),st}let n;const o=new Hr;for(const i of this._def.checks)i.kind==="int"?Nt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Y5(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_finite,message:i.message}),o.dirty()):Nt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ye.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ye.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ye.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ye.toString(r))}setLimit(t,r,n,o){return new ci({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ye.toString(o)}]})}_addCheck(t){return new ci({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ye.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ye.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ye.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Nt.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}ci.create=e=>new ci({checks:[],typeName:nt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...dt(e)});class li extends mt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Ne.bigint){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.bigint,received:i.parsedType}),st}let n;const o=new Hr;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Nt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ye.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ye.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ye.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ye.toString(r))}setLimit(t,r,n,o){return new li({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ye.toString(o)}]})}_addCheck(t){return new li({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ye.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ye.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}li.create=e=>{var t;return new li({checks:[],typeName:nt.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...dt(e)})};class xc extends mt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ne.boolean){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.boolean,received:n.parsedType}),st}return nn(t.data)}}xc.create=e=>new xc({typeName:nt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...dt(e)});class Vi extends mt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ne.date){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.date,received:i.parsedType}),st}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_date}),st}const n=new Hr;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Nt.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Vi({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ye.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ye.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}Vi.create=e=>new Vi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:nt.ZodDate,...dt(e)});class Nd extends mt{_parse(t){if(this._getType(t)!==Ne.symbol){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.symbol,received:n.parsedType}),st}return nn(t.data)}}Nd.create=e=>new Nd({typeName:nt.ZodSymbol,...dt(e)});class Sc extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.undefined,received:n.parsedType}),st}return nn(t.data)}}Sc.create=e=>new Sc({typeName:nt.ZodUndefined,...dt(e)});class _c extends mt{_parse(t){if(this._getType(t)!==Ne.null){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.null,received:n.parsedType}),st}return nn(t.data)}}_c.create=e=>new _c({typeName:nt.ZodNull,...dt(e)});class qa extends mt{constructor(){super(...arguments),this._any=!0}_parse(t){return nn(t.data)}}qa.create=e=>new qa({typeName:nt.ZodAny,...dt(e)});class Hi extends mt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return nn(t.data)}}Hi.create=e=>new Hi({typeName:nt.ZodUnknown,...dt(e)});class Do extends mt{_parse(t){const r=this._getOrReturnCtx(t);return Me(r,{code:Ee.invalid_type,expected:Ne.never,received:r.parsedType}),st}}Do.create=e=>new Do({typeName:nt.ZodNever,...dt(e)});class Md extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.void,received:n.parsedType}),st}return nn(t.data)}}Md.create=e=>new Md({typeName:nt.ZodVoid,...dt(e)});class Wn extends mt{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==Ne.array)return Me(r,{code:Ee.invalid_type,expected:Ne.array,received:r.parsedType}),st;if(o.exactLength!==null){const a=r.data.length>o.exactLength.value,s=r.data.length<o.exactLength.value;(a||s)&&(Me(r,{code:a?Ee.too_big:Ee.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(Me(r,{code:Ee.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(Me(r,{code:Ee.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>o.type._parseAsync(new so(r,a,r.path,s)))).then(a=>Hr.mergeArray(n,a));const i=[...r.data].map((a,s)=>o.type._parseSync(new so(r,a,r.path,s)));return Hr.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new Wn({...this._def,minLength:{value:t,message:Ye.toString(r)}})}max(t,r){return new Wn({...this._def,maxLength:{value:t,message:Ye.toString(r)}})}length(t,r){return new Wn({...this._def,exactLength:{value:t,message:Ye.toString(r)}})}nonempty(t){return this.min(1,t)}}Wn.create=(e,t)=>new Wn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...dt(t)});function Ba(e){if(e instanceof er){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Lo.create(Ba(n))}return new er({...e._def,shape:()=>t})}else return e instanceof Wn?new Wn({...e._def,type:Ba(e.element)}):e instanceof Lo?Lo.create(Ba(e.unwrap())):e instanceof Ki?Ki.create(Ba(e.unwrap())):e instanceof co?co.create(e.items.map(t=>Ba(t))):e}class er extends mt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Nt.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==Ne.object){const l=this._getOrReturnCtx(t);return Me(l,{code:Ee.invalid_type,expected:Ne.object,received:l.parsedType}),st}const{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Do&&this._def.unknownKeys==="strip"))for(const l in o.data)a.includes(l)||s.push(l);const c=[];for(const l of a){const u=i[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new so(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Do){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")s.length>0&&(Me(o,{code:Ee.unrecognized_keys,keys:s}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new so(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key;l.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>Hr.mergeObjectSync(n,l)):Hr.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Ye.errToObj,new er({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,i,a,s;const c=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=Ye.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new er({...this._def,unknownKeys:"strip"})}passthrough(){return new er({...this._def,unknownKeys:"passthrough"})}extend(t){return new er({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new er({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:nt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new er({...this._def,catchall:t})}pick(t){const r={};return Nt.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new er({...this._def,shape:()=>r})}omit(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new er({...this._def,shape:()=>r})}deepPartial(){return Ba(this)}partial(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{const o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}),new er({...this._def,shape:()=>r})}required(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Lo;)i=i._def.innerType;r[n]=i}}),new er({...this._def,shape:()=>r})}keyof(){return VE(Nt.objectKeys(this.shape))}}er.create=(e,t)=>new er({shape:()=>e,unknownKeys:"strip",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)}),er.strictCreate=(e,t)=>new er({shape:()=>e,unknownKeys:"strict",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)}),er.lazycreate=(e,t)=>new er({shape:e,unknownKeys:"strip",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)});class Ec extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new Vn(s.ctx.common.issues));return Me(r,{code:Ee.invalid_union,unionErrors:a}),st}if(r.common.async)return Promise.all(n.map(async i=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(c=>new Vn(c));return Me(r,{code:Ee.invalid_union,unionErrors:s}),st}}get options(){return this._def.options}}Ec.create=(e,t)=>new Ec({options:e,typeName:nt.ZodUnion,...dt(t)});const jd=e=>e instanceof $c?jd(e.schema):e instanceof Kn?jd(e.innerType()):e instanceof Oc?[e.value]:e instanceof ui?e.options:e instanceof Cc?Object.keys(e.enum):e instanceof Ac?jd(e._def.innerType):e instanceof Sc?[void 0]:e instanceof _c?[null]:null;class Dd extends mt{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.object)return Me(r,{code:Ee.invalid_type,expected:Ne.object,received:r.parsedType}),st;const n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(Me(r,{code:Ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),st)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const o=new Map;for(const i of r){const a=jd(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Dd({typeName:nt.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...dt(n)})}}function ey(e,t){const r=si(e),n=si(t);if(e===t)return{valid:!0,data:e};if(r===Ne.object&&n===Ne.object){const o=Nt.objectKeys(t),i=Nt.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=ey(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===Ne.array&&n===Ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],c=ey(a,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===Ne.date&&n===Ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class kc extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),o=(i,a)=>{if(Ym(i)||Ym(a))return st;const s=ey(i.value,a.value);return s.valid?((Xm(i)||Xm(a))&&r.dirty(),{status:r.value,value:s.data}):(Me(n,{code:Ee.invalid_intersection_types}),st)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}kc.create=(e,t,r)=>new kc({left:e,right:t,typeName:nt.ZodIntersection,...dt(r)});class co extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.array)return Me(n,{code:Ee.invalid_type,expected:Ne.array,received:n.parsedType}),st;if(n.data.length<this._def.items.length)return Me(n,{code:Ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),st;!this._def.rest&&n.data.length>this._def.items.length&&(Me(n,{code:Ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((a,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new so(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>Hr.mergeArray(r,a)):Hr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new co({...this._def,rest:t})}}co.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new co({items:e,typeName:nt.ZodTuple,rest:null,...dt(t)})};class Tc extends mt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.object)return Me(n,{code:Ee.invalid_type,expected:Ne.object,received:n.parsedType}),st;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in n.data)o.push({key:i._parse(new so(n,s,n.path,s)),value:a._parse(new so(n,n.data[s],n.path,s))});return n.common.async?Hr.mergeObjectAsync(r,o):Hr.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof mt?new Tc({keyType:t,valueType:r,typeName:nt.ZodRecord,...dt(n)}):new Tc({keyType:Hn.create(),valueType:t,typeName:nt.ZodRecord,...dt(r)})}}class Ld extends mt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.map)return Me(n,{code:Ee.invalid_type,expected:Ne.map,received:n.parsedType}),st;const o=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([s,c],l)=>({key:o._parse(new so(n,s,n.path,[l,"key"])),value:i._parse(new so(n,c,n.path,[l,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return st;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return st;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}}Ld.create=(e,t,r)=>new Ld({valueType:t,keyType:e,typeName:nt.ZodMap,...dt(r)});class Wi extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.set)return Me(n,{code:Ee.invalid_type,expected:Ne.set,received:n.parsedType}),st;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(Me(n,{code:Ee.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(Me(n,{code:Ee.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const i=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return st;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const s=[...n.data.values()].map((c,l)=>i._parse(new so(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,r){return new Wi({...this._def,minSize:{value:t,message:Ye.toString(r)}})}max(t,r){return new Wi({...this._def,maxSize:{value:t,message:Ye.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Wi.create=(e,t)=>new Wi({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...dt(t)});class Ua extends mt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.function)return Me(r,{code:Ee.invalid_type,expected:Ne.function,received:r.parsedType}),st;function n(s,c){return Rd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Id(),bc].filter(l=>!!l),issueData:{code:Ee.invalid_arguments,argumentsError:c}})}function o(s,c){return Rd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Id(),bc].filter(l=>!!l),issueData:{code:Ee.invalid_return_type,returnTypeError:c}})}const i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof za){const s=this;return nn(async function(...c){const l=new Vn([]),u=await s._def.args.parseAsync(c,i).catch(f=>{throw l.addIssue(n(c,f)),l}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw l.addIssue(o(d,f)),l})})}else{const s=this;return nn(function(...c){const l=s._def.args.safeParse(c,i);if(!l.success)throw new Vn([n(c,l.error)]);const u=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new Vn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ua({...this._def,args:co.create(t).rest(Hi.create())})}returns(t){return new Ua({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Ua({args:t||co.create([]).rest(Hi.create()),returns:r||Hi.create(),typeName:nt.ZodFunction,...dt(n)})}}class $c extends mt{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}$c.create=(e,t)=>new $c({getter:e,typeName:nt.ZodLazy,...dt(t)});class Oc extends mt{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Me(r,{received:r.data,code:Ee.invalid_literal,expected:this._def.value}),st}return{status:"valid",value:t.data}}get value(){return this._def.value}}Oc.create=(e,t)=>new Oc({value:e,typeName:nt.ZodLiteral,...dt(t)});function VE(e,t){return new ui({values:e,typeName:nt.ZodEnum,...dt(t)})}class ui extends mt{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{expected:Nt.joinValues(n),received:r.parsedType,code:Ee.invalid_type}),st}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{received:r.data,code:Ee.invalid_enum_value,options:n}),st}return nn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t){return ui.create(t)}exclude(t){return ui.create(this.options.filter(r=>!t.includes(r)))}}ui.create=VE;class Cc extends mt{_parse(t){const r=Nt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Ne.string&&n.parsedType!==Ne.number){const o=Nt.objectValues(r);return Me(n,{expected:Nt.joinValues(o),received:n.parsedType,code:Ee.invalid_type}),st}if(r.indexOf(t.data)===-1){const o=Nt.objectValues(r);return Me(n,{received:n.data,code:Ee.invalid_enum_value,options:o}),st}return nn(t.data)}get enum(){return this._def.values}}Cc.create=(e,t)=>new Cc({values:e,typeName:nt.ZodNativeEnum,...dt(t)});class za extends mt{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.promise&&r.common.async===!1)return Me(r,{code:Ee.invalid_type,expected:Ne.promise,received:r.parsedType}),st;const n=r.parsedType===Ne.promise?r.data:Promise.resolve(r.data);return nn(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}za.create=(e,t)=>new za({type:e,typeName:nt.ZodPromise,...dt(t)});class Kn extends mt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{Me(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(n.data,i);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:n.path,parent:n})):this._def.schema._parseSync({data:a,path:n.path,parent:n})}if(o.type==="refinement"){const a=s=>{const c=o.refinement(s,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?st:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?st:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(o.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!wc(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>wc(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:r.value,value:s})):a);Nt.assertNever(o)}}Kn.create=(e,t,r)=>new Kn({schema:e,typeName:nt.ZodEffects,effect:t,...dt(r)}),Kn.createWithPreprocess=(e,t,r)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...dt(r)});class Lo extends mt{_parse(t){return this._getType(t)===Ne.undefined?nn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Lo.create=(e,t)=>new Lo({innerType:e,typeName:nt.ZodOptional,...dt(t)});class Ki extends mt{_parse(t){return this._getType(t)===Ne.null?nn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ki.create=(e,t)=>new Ki({innerType:e,typeName:nt.ZodNullable,...dt(t)});class Ac extends mt{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===Ne.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Ac.create=(e,t)=>new Ac({innerType:e,typeName:nt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...dt(t)});class Fd extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Pd(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Vn(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Vn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Fd.create=(e,t)=>new Fd({innerType:e,typeName:nt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...dt(t)});class qd extends mt{_parse(t){if(this._getType(t)!==Ne.nan){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.nan,received:n.parsedType}),st}return{status:"valid",value:t.data}}}qd.create=e=>new qd({typeName:nt.ZodNaN,...dt(e)});const X5=Symbol("zod_brand");class HE extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ic extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?st:i.status==="dirty"?(r.dirty(),zE(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?st:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new Ic({in:t,out:r,typeName:nt.ZodPipeline})}}class Bd extends mt{_parse(t){const r=this._def.innerType._parse(t);return wc(r)&&(r.value=Object.freeze(r.value)),r}}Bd.create=(e,t)=>new Bd({innerType:e,typeName:nt.ZodReadonly,...dt(t)});const WE=(e,t={},r)=>e?qa.create().superRefine((n,o)=>{var i,a;if(!e(n)){const s=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,c=(a=(i=s.fatal)!==null&&i!==void 0?i:r)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...l,fatal:c})}}):qa.create(),Q5={object:er.lazycreate};var nt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(nt||(nt={}));const eU=(e,t={message:`Input not instance of ${e.name}`})=>WE(r=>r instanceof e,t),KE=Hn.create,GE=ci.create,tU=qd.create,rU=li.create,JE=xc.create,nU=Vi.create,oU=Nd.create,iU=Sc.create,aU=_c.create,sU=qa.create,cU=Hi.create,lU=Do.create,uU=Md.create,dU=Wn.create,fU=er.create,pU=er.strictCreate,hU=Ec.create,mU=Dd.create,yU=kc.create,gU=co.create,vU=Tc.create,bU=Ld.create,wU=Wi.create,xU=Ua.create,SU=$c.create,_U=Oc.create,EU=ui.create,kU=Cc.create,TU=za.create,YE=Kn.create,$U=Lo.create,OU=Ki.create,CU=Kn.createWithPreprocess,AU=Ic.create;var V=Object.freeze({__proto__:null,defaultErrorMap:bc,setErrorMap:F5,getErrorMap:Id,makeIssue:Rd,EMPTY_PATH:q5,addIssueToContext:Me,ParseStatus:Hr,INVALID:st,DIRTY:zE,OK:nn,isAborted:Ym,isDirty:Xm,isValid:wc,isAsync:Pd,get util(){return Nt},get objectUtil(){return Jm},ZodParsedType:Ne,getParsedType:si,ZodType:mt,ZodString:Hn,ZodNumber:ci,ZodBigInt:li,ZodBoolean:xc,ZodDate:Vi,ZodSymbol:Nd,ZodUndefined:Sc,ZodNull:_c,ZodAny:qa,ZodUnknown:Hi,ZodNever:Do,ZodVoid:Md,ZodArray:Wn,ZodObject:er,ZodUnion:Ec,ZodDiscriminatedUnion:Dd,ZodIntersection:kc,ZodTuple:co,ZodRecord:Tc,ZodMap:Ld,ZodSet:Wi,ZodFunction:Ua,ZodLazy:$c,ZodLiteral:Oc,ZodEnum:ui,ZodNativeEnum:Cc,ZodPromise:za,ZodEffects:Kn,ZodTransformer:Kn,ZodOptional:Lo,ZodNullable:Ki,ZodDefault:Ac,ZodCatch:Fd,ZodNaN:qd,BRAND:X5,ZodBranded:HE,ZodPipeline:Ic,ZodReadonly:Bd,custom:WE,Schema:mt,ZodSchema:mt,late:Q5,get ZodFirstPartyTypeKind(){return nt},coerce:{string:e=>Hn.create({...e,coerce:!0}),number:e=>ci.create({...e,coerce:!0}),boolean:e=>xc.create({...e,coerce:!0}),bigint:e=>li.create({...e,coerce:!0}),date:e=>Vi.create({...e,coerce:!0})},any:sU,array:dU,bigint:rU,boolean:JE,date:nU,discriminatedUnion:mU,effect:YE,enum:EU,function:xU,instanceof:eU,intersection:yU,lazy:SU,literal:_U,map:bU,nan:tU,nativeEnum:kU,never:lU,null:aU,nullable:OU,number:GE,object:fU,oboolean:()=>JE().optional(),onumber:()=>GE().optional(),optional:$U,ostring:()=>KE().optional(),pipeline:AU,preprocess:CU,promise:TU,record:vU,set:wU,strictObject:pU,string:KE,symbol:oU,transformer:YE,tuple:gU,undefined:iU,union:hU,unknown:cU,void:uU,NEVER:st,ZodIssueCode:Ee,quotelessJson:L5,ZodError:Vn});const Za=V.object({title:V.string().optional(),link:V.string().optional()}),ty=V.object({color:V.string().optional(),variant:V.enum(["soft","solid"]).optional(),themeMode:V.enum(["light","dark"]).optional(),fontFamily:V.enum(["rubik","inter","ibm","fira"]).optional(),radius:V.number().min(.5).max(4).optional()}),XE=V.object({composerPlaceholder:V.string().optional(),botName:V.string().optional(),botAvatar:V.string().optional(),botDescription:V.string().optional(),website:Za.optional(),email:Za.optional(),phone:Za.optional(),privacyPolicy:Za.optional(),termsOfService:Za.optional(),showPoweredBy:V.boolean().optional()}).merge(ty),QE=V.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),ek=V.object({}).passthrough().transform(e=>e),Oe=V.object({className:V.string().optional(),style:ek.optional()}),Ud=V.object({container:Oe.optional(),image:Oe.optional(),fallback:Oe.optional()}),tk=V.object({button:Oe.optional(),text:V.record(QE,Oe.optional()),image:V.object({image:Oe.optional(),placeholder:Oe.optional()}).optional(),audio:Oe.optional(),video:Oe.optional(),file:V.object({container:Oe.optional(),title:Oe.optional(),icon:Oe.optional()}).optional(),location:V.object({container:Oe.optional(),title:Oe.optional(),icon:Oe.optional()}).optional(),column:Oe.optional(),row:Oe.optional(),bubble:Oe.optional(),carousel:V.object({container:Oe.optional(),slidesContainer:Oe.optional(),backButton:Oe.optional(),nextButton:Oe.optional()}).optional(),dropdown:V.object({button:V.object({container:Oe.optional(),icon:Oe.optional(),text:Oe.optional()}).optional(),content:V.object({container:Oe.optional(),item:Oe.optional()}).optional()}).optional()}),rk=V.object({container:Oe.optional(),modal:V.object({overlay:Oe.optional(),container:Oe.optional(),dialog:V.object({container:Oe.optional(),title:V.object({container:Oe.optional(),text:Oe.optional(),closeIcon:Oe.optional()}).optional(),content:Oe.optional(),newConversation:V.object({text:Oe.optional(),button:Oe.optional()}).optional()}).optional()}).optional(),notification:V.object({container:Oe.optional(),title:Oe.optional(),description:Oe.optional(),icon:Oe.optional(),closeIcon:Oe.optional()}).optional(),header:V.object({container:Oe.optional(),content:V.object({container:Oe.optional(),title:Oe.optional(),description:Oe.optional(),avatar:Ud.optional(),actions:V.object({container:Oe.optional(),icons:Oe.optional()}).optional()}),expandedContent:V.object({container:Oe.optional(),group:Oe.optional(),descriptionItems:V.object({container:Oe.optional(),icon:Oe.optional(),text:Oe.optional(),link:Oe.optional(),poweredBy:Oe.optional()}).optional()}).optional(),description:V.object({container:Oe.optional(),title:Oe.optional(),subtitle:Oe.optional()}).optional(),newConversationIcon:Oe.optional()}).optional(),composer:V.object({container:Oe.optional(),input:Oe.optional(),uploadButton:V.object({container:Oe.optional(),icon:Oe.optional()}).optional(),button:V.object({container:Oe.optional(),icon:Oe.optional()}).optional()}).optional(),fab:V.object({icon:Oe.optional(),container:Oe.optional()}).optional(),messageList:V.object({scrollbar:V.object({container:Oe.optional(),viewport:Oe.optional(),thumb:Oe.optional(),corner:Oe.optional(),background:Oe.optional()}).optional(),container:Oe.optional(),marquee:V.object({content:Oe.optional(),title:Oe.optional(),description:Oe.optional(),avatar:Ud.optional(),container:Oe.optional()}).optional(),scrollDownButton:V.object({container:Oe.optional(),button:Oe.optional(),icon:Oe.optional()}).optional()}).optional(),message:V.object({container:Oe.optional(),avatar:Ud.optional(),blocks:tk.optional()}).optional(),loadingIndicator:V.object({container:Oe.optional(),loader:Oe.optional()}).optional()}),nk=V.enum(["opened","closed","initial"]),ok=V.object({name:V.string().optional(),pictureUrl:V.string().optional(),data:V.record(V.unknown()).optional()}),ik=V.enum(["messaging","pushpin"]),ak=V.object({configuration:XE.optional().catch(void 0),theme:rk.optional().catch(void 0),style:V.string().optional().catch(void 0),user:ok.optional().catch(void 0)}),IU=ak.extend({clientId:V.string(),botId:V.string(),selector:V.string().optional().catch(void 0),webchatScriptUrl:V.string().optional().catch(void 0),fabScriptUrl:V.string().optional().catch(void 0),messagingUrl:V.string().optional().catch(void 0),pushpinUrl:V.string().optional().catch(void 0),clientMode:ik.optional().catch(void 0),defaultState:nk.optional().catch(void 0)});function sk(e){const{fontFamily:t,radius:r,themeMode:n,variant:o,color:i}=ty.parse(e);let a={},s={};if(i){const u=BE(i),d=n==="dark"?OE(u):u,p=BE(c5(l5(Km(i)))),f=n==="dark"?OE(p):p,h=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...d,1:h}).reduce((m,[g,v])=>({...m,[`--bpPrimary-${g}`]:v}),{});const y=Object.entries({...f,1:h}).reduce((m,[g,v])=>({...m,[`--bpGray-${g}`]:v}),{});a={...s,...y}}r&&(a={...a,"--bpRadius-scale":r.toString()});const c=s?NE(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=o==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?NE(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return a={...a,...l},ME(":root",a)+(t?ME(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const ry=$.forwardRef(({userId:e,src:t,container:r,image:n,fallback:o,...i},a)=>{const s=jE(e??"",15);return J.jsxs(kE,{ref:a,"data-color":s,...r,...i,children:[J.jsx(TE,{src:t,...n}),J.jsx($E,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});function qxe(){}function Bxe(){}function RU(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const PU=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NU=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,MU={};function ck(e,t){return((t||MU).jsx?NU:PU).test(e)}const jU=/[ \t\n\f\r]/g;function DU(e){return typeof e=="object"?e.type==="text"?lk(e.value):!1:lk(e)}function lk(e){return e.replace(jU,"")===""}class Rc{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}Rc.prototype.property={},Rc.prototype.normal={},Rc.prototype.space=null;function uk(e,t){const r={},n={};let o=-1;for(;++o<e.length;)Object.assign(r,e[o].property),Object.assign(n,e[o].normal);return new Rc(r,n,t)}function ny(e){return e.toLowerCase()}class Rn{constructor(t,r){this.property=t,this.attribute=r}}Rn.prototype.space=null,Rn.prototype.boolean=!1,Rn.prototype.booleanish=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.number=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.spaceSeparated=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.defined=!1;let LU=0;const yt=Gi(),pr=Gi(),dk=Gi(),Se=Gi(),Jt=Gi(),Va=Gi(),gn=Gi();function Gi(){return 2**++LU}const oy=Object.freeze(Object.defineProperty({__proto__:null,boolean:yt,booleanish:pr,commaOrSpaceSeparated:gn,commaSeparated:Va,number:Se,overloadedBoolean:dk,spaceSeparated:Jt},Symbol.toStringTag,{value:"Module"})),iy=Object.keys(oy);class ay extends Rn{constructor(t,r,n,o){let i=-1;if(super(t,r),fk(this,"space",o),typeof n=="number")for(;++i<iy.length;){const a=iy[i];fk(this,iy[i],(n&oy[a])===oy[a])}}}ay.prototype.defined=!0;function fk(e,t,r){r&&(e[t]=r)}const FU={}.hasOwnProperty;function Ha(e){const t={},r={};let n;for(n in e.properties)if(FU.call(e.properties,n)){const o=e.properties[n],i=new ay(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[ny(n)]=n,r[ny(i.attribute)]=n}return new Rc(t,r,e.space)}const pk=Ha({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),hk=Ha({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function mk(e,t){return t in e?e[t]:t}function yk(e,t){return mk(e,t.toLowerCase())}const gk=Ha({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:yk,properties:{xmlns:null,xmlnsXLink:null}}),vk=Ha({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:pr,ariaAutoComplete:null,ariaBusy:pr,ariaChecked:pr,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:Jt,ariaCurrent:null,ariaDescribedBy:Jt,ariaDetails:null,ariaDisabled:pr,ariaDropEffect:Jt,ariaErrorMessage:null,ariaExpanded:pr,ariaFlowTo:Jt,ariaGrabbed:pr,ariaHasPopup:null,ariaHidden:pr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Jt,ariaLevel:Se,ariaLive:null,ariaModal:pr,ariaMultiLine:pr,ariaMultiSelectable:pr,ariaOrientation:null,ariaOwns:Jt,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:pr,ariaReadOnly:pr,ariaRelevant:null,ariaRequired:pr,ariaRoleDescription:Jt,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:pr,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null}}),qU=Ha({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:yk,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Va,acceptCharset:Jt,accessKey:Jt,action:null,allow:null,allowFullScreen:yt,allowPaymentRequest:yt,allowUserMedia:yt,alt:null,as:null,async:yt,autoCapitalize:null,autoComplete:Jt,autoFocus:yt,autoPlay:yt,capture:yt,charSet:null,checked:yt,cite:null,className:Jt,cols:Se,colSpan:null,content:null,contentEditable:pr,controls:yt,controlsList:Jt,coords:Se|Va,crossOrigin:null,data:null,dateTime:null,decoding:null,default:yt,defer:yt,dir:null,dirName:null,disabled:yt,download:dk,draggable:pr,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:yt,formTarget:null,headers:Jt,height:Se,hidden:yt,high:Se,href:null,hrefLang:null,htmlFor:Jt,httpEquiv:Jt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:yt,itemId:null,itemProp:Jt,itemRef:Jt,itemScope:yt,itemType:Jt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:yt,low:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,multiple:yt,muted:yt,name:null,nonce:null,noModule:yt,noValidate:yt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:yt,optimum:Se,pattern:null,ping:Jt,placeholder:null,playsInline:yt,poster:null,preload:null,readOnly:yt,referrerPolicy:null,rel:Jt,required:yt,reversed:yt,rows:Se,rowSpan:Se,sandbox:Jt,scope:null,scoped:yt,seamless:yt,selected:yt,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:pr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:yt,useMap:null,value:pr,width:Se,wrap:null,align:null,aLink:null,archive:Jt,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:yt,declare:yt,event:null,face:null,frame:null,frameBorder:null,hSpace:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:yt,noHref:yt,noShade:yt,noWrap:yt,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:pr,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:yt,disableRemotePlayback:yt,prefix:null,property:null,results:Se,security:null,unselectable:null}}),BU=Ha({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:mk,properties:{about:gn,accentHeight:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,className:Jt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:yt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Va,g2:Va,glyphName:Va,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Se,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Jt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,u1:null,u2:null,underlinePosition:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),UU=/^data[-\w.:]+$/i,bk=/-[a-z]/g,zU=/[A-Z]/g;function ZU(e,t){const r=ny(t);let n=t,o=Rn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&UU.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(bk,HU);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!bk.test(i)){let a=i.replace(zU,VU);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=ay}return new o(n,t)}function VU(e){return"-"+e.toLowerCase()}function HU(e){return e.charAt(1).toUpperCase()}const WU={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},KU=uk([hk,pk,gk,vk,qU],"html"),sy=uk([hk,pk,gk,vk,BU],"svg");function GU(e){return e.join(" ").trim()}var wk={},xk=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,JU=/\n/g,YU=/^\s*/,XU=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,QU=/^:\s*/,e4=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,t4=/^[;\s]*/,r4=/^\s+|\s+$/g,n4=`
104
104
  `,Sk="/",_k="*",Ji="",o4="comment",i4="declaration",a4=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function o(h){var y=h.match(JU);y&&(r+=y.length);var m=h.lastIndexOf(n4);n=~m?h.length-m:n+h.length}function i(){var h={line:r,column:n};return function(y){return y.position=new a(h),l(),y}}function a(h){this.start=h,this.end={line:r,column:n},this.source=t.source}a.prototype.content=e;function s(h){var y=new Error(t.source+":"+r+":"+n+": "+h);if(y.reason=h,y.filename=t.source,y.line=r,y.column=n,y.source=e,!t.silent)throw y}function c(h){var y=h.exec(e);if(y){var m=y[0];return o(m),e=e.slice(m.length),y}}function l(){c(YU)}function u(h){var y;for(h=h||[];y=d();)y!==!1&&h.push(y);return h}function d(){var h=i();if(!(Sk!=e.charAt(0)||_k!=e.charAt(1))){for(var y=2;Ji!=e.charAt(y)&&(_k!=e.charAt(y)||Sk!=e.charAt(y+1));)++y;if(y+=2,Ji===e.charAt(y-1))return s("End of comment missing");var m=e.slice(2,y-2);return n+=2,o(m),e=e.slice(y),n+=2,h({type:o4,comment:m})}}function p(){var h=i(),y=c(XU);if(y){if(d(),!c(QU))return s("property missing ':'");var m=c(e4),g=h({type:i4,property:Ek(y[0].replace(xk,Ji)),value:m?Ek(m[0].replace(xk,Ji)):Ji});return c(t4),g}}function f(){var h=[];u(h);for(var y;y=p();)y!==!1&&(h.push(y),u(h));return h}return l(),f()};function Ek(e){return e?e.replace(r4,Ji):Ji}var s4=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wk,"__esModule",{value:!0});var c4=s4(a4);function l4(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,c4.default)(e),o=typeof t=="function";return n.forEach(function(i){if(i.type==="declaration"){var a=i.property,s=i.value;o?t(a,s,i):s&&(r=r||{},r[a]=s)}}),r}var kk=wk.default=l4;const u4=kk.default||kk,Tk=$k("end"),cy=$k("start");function $k(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function d4(e){const t=cy(e),r=Tk(e);if(t&&r)return{start:t,end:r}}function Pc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ok(e.position):"start"in e||"end"in e?Ok(e):"line"in e||"column"in e?ly(e):""}function ly(e){return Ck(e&&e.line)+":"+Ck(e&&e.column)}function Ok(e){return ly(e&&e.start)+"-"+ly(e&&e.end)}function Ck(e){return e&&typeof e=="number"?e:1}class Wr extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let o="",i={},a=!1;if(r&&("line"in r&&"column"in r?i={place:r}:"start"in r&&"end"in r?i={place:r}:"type"in r?i={ancestors:[r],place:r.position}:i={...r}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof n=="string"){const c=n.indexOf(":");c===-1?i.ruleId=n:(i.source=n.slice(0,c),i.ruleId=n.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=Pc(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}Wr.prototype.file="",Wr.prototype.name="",Wr.prototype.reason="",Wr.prototype.message="",Wr.prototype.stack="",Wr.prototype.column=void 0,Wr.prototype.line=void 0,Wr.prototype.ancestors=void 0,Wr.prototype.cause=void 0,Wr.prototype.fatal=void 0,Wr.prototype.place=void 0,Wr.prototype.ruleId=void 0,Wr.prototype.source=void 0;const uy={}.hasOwnProperty,f4=new Map,p4=/[A-Z]/g,h4=/-([a-z])/g,m4=new Set(["table","tbody","thead","tfoot","tr"]),y4=new Set(["td","th"]),Ak="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function g4(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=k4(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=E4(r,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?sy:KU,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Ik(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Ik(e,t,r){if(t.type==="element")return v4(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return b4(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return x4(e,t,r);if(t.type==="mdxjsEsm")return w4(e,t);if(t.type==="root")return S4(e,t,r);if(t.type==="text")return _4(e,t)}function v4(e,t,r){const n=e.schema;let o=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(o=sy,e.schema=o),e.ancestors.push(t);const i=Pk(e,t.tagName,!1),a=T4(e,t);let s=fy(e,t);return m4.has(t.tagName)&&(s=s.filter(function(c){return typeof c=="string"?!DU(c):!0})),Rk(e,a,i,t),dy(a,s),e.ancestors.pop(),e.schema=n,e.create(t,i,a,r)}function b4(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Nc(e,t.position)}function w4(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Nc(e,t.position)}function x4(e,t,r){const n=e.schema;let o=n;t.name==="svg"&&n.space==="html"&&(o=sy,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:Pk(e,t.name,!0),a=$4(e,t),s=fy(e,t);return Rk(e,a,i,t),dy(a,s),e.ancestors.pop(),e.schema=n,e.create(t,i,a,r)}function S4(e,t,r){const n={};return dy(n,fy(e,t)),e.create(t,e.Fragment,n,r)}function _4(e,t){return t.value}function Rk(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function dy(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function E4(e,t,r){return n;function n(o,i,a,s){const l=Array.isArray(a.children)?r:t;return s?l(i,a,s):l(i,a)}}function k4(e,t){return r;function r(n,o,i,a){const s=Array.isArray(i.children),c=cy(n);return t(o,i,a,s,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function T4(e,t){const r={};let n,o;for(o in t.properties)if(o!=="children"&&uy.call(t.properties,o)){const i=O4(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&y4.has(t.tagName)?n=s:r[a]=s}}if(n){const i=r.style||(r.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function $4(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else Nc(e,t.position);else{const o=n.name;let i;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else Nc(e,t.position);else i=n.value===null?!0:n.value;r[o]=i}return r}function fy(e,t){const r=[];let n=-1;const o=e.passKeys?new Map:f4;for(;++n<t.children.length;){const i=t.children[n];let a;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const l=o.get(c)||0;a=c+"-"+l,o.set(c,l+1)}}const s=Ik(e,i,a);s!==void 0&&r.push(s)}return r}function O4(e,t,r){const n=ZU(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?RU(r):GU(r)),n.property==="style"){let o=typeof r=="object"?r:C4(e,String(r));return e.stylePropertyNameCase==="css"&&(o=A4(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&n.space?WU[n.property]||n.property:n.attribute,r]}}function C4(e,t){const r={};try{u4(t,n)}catch(o){if(!e.ignoreInvalidStyle){const i=o,a=new Wr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Ak+"#cannot-parse-style-attribute",a}}return r;function n(o,i){let a=o;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(h4,R4)),r[a]=i}}function Pk(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=ck(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}n=a}else n=ck(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const o=n.value;return uy.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(n);Nc(e)}function Nc(e,t){const r=new Wr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Ak+"#cannot-handle-mdx-estrees-without-createevaluater",r}function A4(e){const t={};let r;for(r in e)uy.call(e,r)&&(t[I4(r)]=e[r]);return t}function I4(e){let t=e.replace(p4,P4);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function R4(e,t){return t.toUpperCase()}function P4(e){return"-"+e.toLowerCase()}const py={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},N4={};function hy(e,t){const r=t||N4,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Nk(e,n,o)}function Nk(e,t,r){if(M4(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Mk(e.children,t,r)}return Array.isArray(e)?Mk(e,t,r):""}function Mk(e,t,r){const n=[];let o=-1;for(;++o<e.length;)n[o]=Nk(e[o],t,r);return n.join("")}function M4(e){return!!(e&&typeof e=="object")}const jk=document.createElement("i");function my(e){const t="&"+e+";";jk.innerHTML=t;const r=jk.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function vn(e,t,r,n){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);i<n.length;)a=n.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Pn(e,t){return e.length>0?(vn(e,e.length,0,t),e):t}const Dk={}.hasOwnProperty;function Lk(e){const t={};let r=-1;for(;++r<e.length;)j4(t,e[r]);return t}function j4(e,t){let r;for(r in t){const o=(Dk.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let a;if(i)for(a in i){Dk.call(o,a)||(o[a]=[]);const s=i[a];D4(o[a],Array.isArray(s)?s:s?[s]:[])}}}function D4(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);vn(e,0,0,n)}function Fk(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Gn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const on=di(/[A-Za-z]/),Kr=di(/[\dA-Za-z]/),L4=di(/[#-'*+\--9=?A-Z^-~]/);function zd(e){return e!==null&&(e<32||e===127)}const yy=di(/\d/),F4=di(/[\dA-Fa-f]/),q4=di(/[!-/:-@[-`{-~]/);function et(e){return e!==null&&e<-2}function zt(e){return e!==null&&(e<0||e===32)}function xt(e){return e===-2||e===-1||e===32}const Zd=di(/\p{P}|\p{S}/u),Yi=di(/\s/);function di(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Wa(e){const t=[];let r=-1,n=0,o=0;for(;++r<e.length;){const i=e.charCodeAt(r);let a="";if(i===37&&Kr(e.charCodeAt(r+1))&&Kr(e.charCodeAt(r+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(r+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(n,r),encodeURIComponent(a)),n=r+o+1,a=""),o&&(r+=o,o=0)}return t.join("")+e.slice(n)}function Ct(e,t,r,n){const o=n?n-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return xt(c)?(e.enter(r),s(c)):t(c)}function s(c){return xt(c)&&i++<o?(e.consume(c),s):(e.exit(r),t(c))}}const B4={tokenize:U4};function U4(e){const t=e.attempt(this.parser.constructs.contentInitial,n,o);let r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ct(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const c=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=c),r=c,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return et(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const z4={tokenize:Z4},qk={tokenize:V4};function Z4(e){const t=this,r=[];let n=0,o,i,a;return s;function s(b){if(n<r.length){const x=r[n];return t.containerState=x[1],e.attempt(x[0].continuation,c,l)(b)}return l(b)}function c(b){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&v();const x=t.events.length;let w=x,S;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){S=t.events[w][1].end;break}g(n);let C=x;for(;C<t.events.length;)t.events[C][1].end=Object.assign({},S),C++;return vn(t.events,w+1,0,t.events.slice(x)),t.events.length=C,l(b)}return s(b)}function l(b){if(n===r.length){if(!o)return p(b);if(o.currentConstruct&&o.currentConstruct.concrete)return h(b);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qk,u,d)(b)}function u(b){return o&&v(),g(n),p(b)}function d(b){return t.parser.lazy[t.now().line]=n!==r.length,a=t.now().offset,h(b)}function p(b){return t.containerState={},e.attempt(qk,f,h)(b)}function f(b){return n++,r.push([t.currentConstruct,t.containerState]),p(b)}function h(b){if(b===null){o&&v(),g(0),e.consume(b);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),y(b)}function y(b){if(b===null){m(e.exit("chunkFlow"),!0),g(0),e.consume(b);return}return et(b)?(e.consume(b),m(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(b),y)}function m(b,x){const w=t.sliceStream(b);if(x&&w.push(null),b.previous=i,i&&(i.next=b),i=b,o.defineSkip(b.start),o.write(w),t.parser.lazy[b.start.line]){let S=o.events.length;for(;S--;)if(o.events[S][1].start.offset<a&&(!o.events[S][1].end||o.events[S][1].end.offset>a))return;const C=t.events.length;let I=C,P,A;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(P){A=t.events[I][1].end;break}P=!0}for(g(n),S=C;S<t.events.length;)t.events[S][1].end=Object.assign({},A),S++;vn(t.events,I+1,0,t.events.slice(C)),t.events.length=S}}function g(b){let x=r.length;for(;x-- >b;){const w=r[x];t.containerState=w[1],w[0].exit.call(t,e)}r.length=b}function v(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function V4(e,t,r){return Ct(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Vd(e){if(e===null||zt(e)||Yi(e))return 1;if(Zd(e))return 2}function Hd(e,t,r){const n=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!n.includes(i)&&(t=i(t,r),n.push(i))}return t}const gy={name:"attention",tokenize:W4,resolveAll:H4};function H4(e,t){let r=-1,n,o,i,a,s,c,l,u;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;c=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const d=Object.assign({},e[n][1].end),p=Object.assign({},e[r][1].start);Bk(d,-c),Bk(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[n][1].end)},s={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:p},i={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},o={type:c>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},a.start),e[r][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Pn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Pn(l,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),l=Pn(l,Hd(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=Pn(l,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[r][1].end.offset-e[r][1].start.offset?(u=2,l=Pn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):u=0,vn(e,n-1,r-n+3,l),r=n+l.length-u-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function W4(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=Vd(n);let i;return a;function a(c){return i=c,e.enter("attentionSequence"),s(c)}function s(c){if(c===i)return e.consume(c),s;const l=e.exit("attentionSequence"),u=Vd(c),d=!u||u===2&&o||r.includes(c),p=!o||o===2&&u||r.includes(n);return l._open=!!(i===42?d:d&&(o||!p)),l._close=!!(i===42?p:p&&(u||!d)),t(c)}}function Bk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const K4={name:"autolink",tokenize:G4};function G4(e,t,r){let n=0;return o;function o(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(f){return on(f)?(e.consume(f),a):l(f)}function a(f){return f===43||f===45||f===46||Kr(f)?(n=1,s(f)):l(f)}function s(f){return f===58?(e.consume(f),n=0,c):(f===43||f===45||f===46||Kr(f))&&n++<32?(e.consume(f),s):(n=0,l(f))}function c(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||zd(f)?r(f):(e.consume(f),c)}function l(f){return f===64?(e.consume(f),u):L4(f)?(e.consume(f),l):r(f)}function u(f){return Kr(f)?d(f):r(f)}function d(f){return f===46?(e.consume(f),n=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||Kr(f))&&n++<63){const h=f===45?p:d;return e.consume(f),h}return r(f)}}const Mc={tokenize:J4,partial:!0};function J4(e,t,r){return n;function n(i){return xt(i)?Ct(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||et(i)?t(i):r(i)}}const Uk={name:"blockQuote",tokenize:Y4,continuation:{tokenize:X4},exit:Q4};function Y4(e,t,r){const n=this;return o;function o(a){if(a===62){const s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return r(a)}function i(a){return xt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function X4(e,t,r){const n=this;return o;function o(a){return xt(a)?Ct(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(Uk,t,r)(a)}}function Q4(e){e.exit("blockQuote")}const zk={name:"characterEscape",tokenize:ez};function ez(e,t,r){return n;function n(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return q4(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(i)}}const Zk={name:"characterReference",tokenize:tz};function tz(e,t,r){const n=this;let o=0,i,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,a=Kr,u(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=F4,u):(e.enter("characterReferenceValue"),i=7,a=yy,u(d))}function u(d){if(d===59&&o){const p=e.exit("characterReferenceValue");return a===Kr&&!my(n.sliceSerialize(p))?r(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&o++<i?(e.consume(d),u):r(d)}}const Vk={tokenize:nz,partial:!0},Hk={name:"codeFenced",tokenize:rz,concrete:!0};function rz(e,t,r){const n=this,o={tokenize:w,partial:!0};let i=0,a=0,s;return c;function c(S){return l(S)}function l(S){const C=n.events[n.events.length-1];return i=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===s?(a++,e.consume(S),u):a<3?r(S):(e.exit("codeFencedFenceSequence"),xt(S)?Ct(e,d,"whitespace")(S):d(S))}function d(S){return S===null||et(S)?(e.exit("codeFencedFence"),n.interrupt?t(S):e.check(Vk,y,x)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||et(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):xt(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ct(e,f,"whitespace")(S)):S===96&&S===s?r(S):(e.consume(S),p)}function f(S){return S===null||et(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||et(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===s?r(S):(e.consume(S),h)}function y(S){return e.attempt(o,x,m)(S)}function m(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),g}function g(S){return i>0&&xt(S)?Ct(e,v,"linePrefix",i+1)(S):v(S)}function v(S){return S===null||et(S)?e.check(Vk,y,x)(S):(e.enter("codeFlowValue"),b(S))}function b(S){return S===null||et(S)?(e.exit("codeFlowValue"),v(S)):(e.consume(S),b)}function x(S){return e.exit("codeFenced"),t(S)}function w(S,C,I){let P=0;return A;function A(F){return S.enter("lineEnding"),S.consume(F),S.exit("lineEnding"),L}function L(F){return S.enter("codeFencedFence"),xt(F)?Ct(S,K,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):K(F)}function K(F){return F===s?(S.enter("codeFencedFenceSequence"),z(F)):I(F)}function z(F){return F===s?(P++,S.consume(F),z):P>=a?(S.exit("codeFencedFenceSequence"),xt(F)?Ct(S,B,"whitespace")(F):B(F)):I(F)}function B(F){return F===null||et(F)?(S.exit("codeFencedFence"),C(F)):I(F)}}}function nz(e,t,r){const n=this;return o;function o(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}const vy={name:"codeIndented",tokenize:iz},oz={tokenize:az,partial:!0};function iz(e,t,r){const n=this;return o;function o(l){return e.enter("codeIndented"),Ct(e,i,"linePrefix",4+1)(l)}function i(l){const u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(l):r(l)}function a(l){return l===null?c(l):et(l)?e.attempt(oz,a,c)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||et(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function c(l){return e.exit("codeIndented"),t(l)}}function az(e,t,r){const n=this;return o;function o(a){return n.parser.lazy[n.now().line]?r(a):et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Ct(e,i,"linePrefix",4+1)(a)}function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):et(a)?o(a):r(a)}}const sz={name:"codeText",tokenize:uz,resolve:cz,previous:lz};function cz(e){let t=e.length-4,r=3,n,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)o===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(o=n):(n===t||e[n][1].type==="lineEnding")&&(e[o][1].type="codeTextData",n!==o+2&&(e[o][1].end=e[n-1][1].end,e.splice(o+2,n-o-2),t-=n-o-2,n=o+2),o=void 0);return e}function lz(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uz(e,t,r){let n=0,o,i;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),n++,s):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?r(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(i=e.enter("codeTextSequence"),o=0,u(d)):et(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||et(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),l)}function u(d){return d===96?(e.consume(d),o++,u):o===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",l(d))}}function Wk(e){const t={};let r=-1,n,o,i,a,s,c,l;for(;++r<e.length;){for(;r in t;)r=t[r];if(n=e[r],r&&n[1].type==="chunkFlow"&&e[r-1][1].type==="listItemPrefix"&&(c=n[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,dz(e,r)),r=t[r],l=!0);else if(n[1]._container){for(i=r,o=void 0;i--&&(a=e[i],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);o&&(n[1].end=Object.assign({},e[o][1].start),s=e.slice(o,r),s.unshift(n),vn(e,o,r-o+1,s))}}return!l}function dz(e,t){const r=e[t][1],n=e[t][2];let o=t-1;const i=[],a=r._tokenizer||n.parser[r.contentType](r.start),s=a.events,c=[],l={};let u,d,p=-1,f=r,h=0,y=0;const m=[y];for(;f;){for(;e[++o][1]!==f;);i.push(o),f._tokenizer||(u=n.sliceStream(f),f.next||u.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=r;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(y=p+1,m.push(y),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):m.pop(),p=m.length;p--;){const g=s.slice(m[p],m[p+1]),v=i.pop();c.unshift([v,v+g.length-1]),vn(e,v,2,g)}for(p=-1;++p<c.length;)l[h+c[p][0]]=h+c[p][1],h+=c[p][1]-c[p][0]-1;return l}const fz={tokenize:mz,resolve:hz},pz={tokenize:yz,partial:!0};function hz(e){return Wk(e),e}function mz(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):et(s)?e.check(pz,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function yz(e,t,r){const n=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ct(e,i,"linePrefix")}function i(a){if(a===null||et(a))return r(a);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}function Kk(e,t,r,n,o,i,a,s,c){const l=c||Number.POSITIVE_INFINITY;let u=0;return d;function d(g){return g===60?(e.enter(n),e.enter(o),e.enter(i),e.consume(g),e.exit(i),p):g===null||g===32||g===41||zd(g)?r(g):(e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(g))}function p(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(o),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(s),p(g)):g===null||g===60||et(g)?r(g):(e.consume(g),g===92?h:f)}function h(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function y(g){return!u&&(g===null||g===41||zt(g))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(g)):u<l&&g===40?(e.consume(g),u++,y):g===41?(e.consume(g),u--,y):g===null||g===32||g===40||zd(g)?r(g):(e.consume(g),g===92?m:y)}function m(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function Gk(e,t,r,n,o,i){const a=this;let s=0,c;return l;function l(f){return e.enter(n),e.enter(o),e.consume(f),e.exit(o),e.enter(i),u}function u(f){return s>999||f===null||f===91||f===93&&!c||f===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):f===93?(e.exit(i),e.enter(o),e.consume(f),e.exit(o),e.exit(n),t):et(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||et(f)||s++>999?(e.exit("chunkString"),u(f)):(e.consume(f),c||(c=!xt(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),s++,d):d(f)}}function Jk(e,t,r,n,o,i){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(n),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,c):r(p)}function c(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(n),t):(e.enter(i),l(p))}function l(p){return p===a?(e.exit(i),c(a)):p===null?r(p):et(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ct(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||et(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?d:u)}function d(p){return p===a||p===92?(e.consume(p),u):u(p)}}function jc(e,t){let r;return n;function n(o){return et(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,n):xt(o)?Ct(e,n,r?"linePrefix":"lineSuffix")(o):t(o)}}const gz={name:"definition",tokenize:bz},vz={tokenize:wz,partial:!0};function bz(e,t,r){const n=this;let o;return i;function i(f){return e.enter("definition"),a(f)}function a(f){return Gk.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return o=Gn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),c):r(f)}function c(f){return zt(f)?jc(e,l)(f):l(f)}function l(f){return Kk(e,u,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(vz,d,d)(f)}function d(f){return xt(f)?Ct(e,p,"whitespace")(f):p(f)}function p(f){return f===null||et(f)?(e.exit("definition"),n.parser.defined.push(o),t(f)):r(f)}}function wz(e,t,r){return n;function n(s){return zt(s)?jc(e,o)(s):r(s)}function o(s){return Jk(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return xt(s)?Ct(e,a,"whitespace")(s):a(s)}function a(s){return s===null||et(s)?t(s):r(s)}}const xz={name:"hardBreakEscape",tokenize:Sz};function Sz(e,t,r){return n;function n(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return et(i)?(e.exit("hardBreakEscape"),t(i)):r(i)}}const _z={name:"headingAtx",tokenize:kz,resolve:Ez};function Ez(e,t){let r=e.length-2,n=3,o,i;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(o={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},i={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},vn(e,n,r-n+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function kz(e,t,r){let n=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&n++<6?(e.consume(u),a):u===null||zt(u)?(e.exit("atxHeadingSequence"),s(u)):r(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||et(u)?(e.exit("atxHeading"),t(u)):xt(u)?Ct(e,s,"whitespace")(u):(e.enter("atxHeadingText"),l(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),s(u))}function l(u){return u===null||u===35||zt(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),l)}}const Tz=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Yk=["pre","script","style","textarea"],$z={name:"htmlFlow",tokenize:Iz,resolveTo:Az,concrete:!0},Oz={tokenize:Pz,partial:!0},Cz={tokenize:Rz,partial:!0};function Az(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Iz(e,t,r){const n=this;let o,i,a,s,c;return l;function l(T){return u(T)}function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),i=!0,y):T===63?(e.consume(T),o=3,n.interrupt?t:E):on(T)?(e.consume(T),a=String.fromCharCode(T),m):r(T)}function p(T){return T===45?(e.consume(T),o=2,f):T===91?(e.consume(T),o=5,s=0,h):on(T)?(e.consume(T),o=4,n.interrupt?t:E):r(T)}function f(T){return T===45?(e.consume(T),n.interrupt?t:E):r(T)}function h(T){const ce="CDATA[";return T===ce.charCodeAt(s++)?(e.consume(T),s===ce.length?n.interrupt?t:K:h):r(T)}function y(T){return on(T)?(e.consume(T),a=String.fromCharCode(T),m):r(T)}function m(T){if(T===null||T===47||T===62||zt(T)){const ce=T===47,pe=a.toLowerCase();return!ce&&!i&&Yk.includes(pe)?(o=1,n.interrupt?t(T):K(T)):Tz.includes(a.toLowerCase())?(o=6,ce?(e.consume(T),g):n.interrupt?t(T):K(T)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(T):i?v(T):b(T))}return T===45||Kr(T)?(e.consume(T),a+=String.fromCharCode(T),m):r(T)}function g(T){return T===62?(e.consume(T),n.interrupt?t:K):r(T)}function v(T){return xt(T)?(e.consume(T),v):A(T)}function b(T){return T===47?(e.consume(T),A):T===58||T===95||on(T)?(e.consume(T),x):xt(T)?(e.consume(T),b):A(T)}function x(T){return T===45||T===46||T===58||T===95||Kr(T)?(e.consume(T),x):w(T)}function w(T){return T===61?(e.consume(T),S):xt(T)?(e.consume(T),w):b(T)}function S(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),c=T,C):xt(T)?(e.consume(T),S):I(T)}function C(T){return T===c?(e.consume(T),c=null,P):T===null||et(T)?r(T):(e.consume(T),C)}function I(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||zt(T)?w(T):(e.consume(T),I)}function P(T){return T===47||T===62||xt(T)?b(T):r(T)}function A(T){return T===62?(e.consume(T),L):r(T)}function L(T){return T===null||et(T)?K(T):xt(T)?(e.consume(T),L):r(T)}function K(T){return T===45&&o===2?(e.consume(T),j):T===60&&o===1?(e.consume(T),Z):T===62&&o===4?(e.consume(T),H):T===63&&o===3?(e.consume(T),E):T===93&&o===5?(e.consume(T),D):et(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Oz,Q,z)(T)):T===null||et(T)?(e.exit("htmlFlowData"),z(T)):(e.consume(T),K)}function z(T){return e.check(Cz,B,Q)(T)}function B(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),F}function F(T){return T===null||et(T)?z(T):(e.enter("htmlFlowData"),K(T))}function j(T){return T===45?(e.consume(T),E):K(T)}function Z(T){return T===47?(e.consume(T),a="",W):K(T)}function W(T){if(T===62){const ce=a.toLowerCase();return Yk.includes(ce)?(e.consume(T),H):K(T)}return on(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),W):K(T)}function D(T){return T===93?(e.consume(T),E):K(T)}function E(T){return T===62?(e.consume(T),H):T===45&&o===2?(e.consume(T),E):K(T)}function H(T){return T===null||et(T)?(e.exit("htmlFlowData"),Q(T)):(e.consume(T),H)}function Q(T){return e.exit("htmlFlow"),t(T)}}function Rz(e,t,r){const n=this;return o;function o(a){return et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):r(a)}function i(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function Pz(e,t,r){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Mc,t,r)}}const Nz={name:"htmlText",tokenize:Mz};function Mz(e,t,r){const n=this;let o,i,a;return s;function s(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),c}function c(E){return E===33?(e.consume(E),l):E===47?(e.consume(E),w):E===63?(e.consume(E),b):on(E)?(e.consume(E),I):r(E)}function l(E){return E===45?(e.consume(E),u):E===91?(e.consume(E),i=0,h):on(E)?(e.consume(E),v):r(E)}function u(E){return E===45?(e.consume(E),f):r(E)}function d(E){return E===null?r(E):E===45?(e.consume(E),p):et(E)?(a=d,Z(E)):(e.consume(E),d)}function p(E){return E===45?(e.consume(E),f):d(E)}function f(E){return E===62?j(E):E===45?p(E):d(E)}function h(E){const H="CDATA[";return E===H.charCodeAt(i++)?(e.consume(E),i===H.length?y:h):r(E)}function y(E){return E===null?r(E):E===93?(e.consume(E),m):et(E)?(a=y,Z(E)):(e.consume(E),y)}function m(E){return E===93?(e.consume(E),g):y(E)}function g(E){return E===62?j(E):E===93?(e.consume(E),g):y(E)}function v(E){return E===null||E===62?j(E):et(E)?(a=v,Z(E)):(e.consume(E),v)}function b(E){return E===null?r(E):E===63?(e.consume(E),x):et(E)?(a=b,Z(E)):(e.consume(E),b)}function x(E){return E===62?j(E):b(E)}function w(E){return on(E)?(e.consume(E),S):r(E)}function S(E){return E===45||Kr(E)?(e.consume(E),S):C(E)}function C(E){return et(E)?(a=C,Z(E)):xt(E)?(e.consume(E),C):j(E)}function I(E){return E===45||Kr(E)?(e.consume(E),I):E===47||E===62||zt(E)?P(E):r(E)}function P(E){return E===47?(e.consume(E),j):E===58||E===95||on(E)?(e.consume(E),A):et(E)?(a=P,Z(E)):xt(E)?(e.consume(E),P):j(E)}function A(E){return E===45||E===46||E===58||E===95||Kr(E)?(e.consume(E),A):L(E)}function L(E){return E===61?(e.consume(E),K):et(E)?(a=L,Z(E)):xt(E)?(e.consume(E),L):P(E)}function K(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(e.consume(E),o=E,z):et(E)?(a=K,Z(E)):xt(E)?(e.consume(E),K):(e.consume(E),B)}function z(E){return E===o?(e.consume(E),o=void 0,F):E===null?r(E):et(E)?(a=z,Z(E)):(e.consume(E),z)}function B(E){return E===null||E===34||E===39||E===60||E===61||E===96?r(E):E===47||E===62||zt(E)?P(E):(e.consume(E),B)}function F(E){return E===47||E===62||zt(E)?P(E):r(E)}function j(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):r(E)}function Z(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),W}function W(E){return xt(E)?Ct(e,D,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):D(E)}function D(E){return e.enter("htmlTextData"),a(E)}}const by={name:"labelEnd",tokenize:Bz,resolveTo:qz,resolveAll:Fz},jz={tokenize:Uz},Dz={tokenize:zz},Lz={tokenize:Zz};function Fz(e){let t=-1;for(;++t<e.length;){const r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function qz(e,t){let r=e.length,n=0,o,i,a,s;for(;r--;)if(o=e[r][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=r,o.type!=="labelLink")){n=2;break}}else o.type==="labelEnd"&&(a=r);const c={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[i+n+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",c,t],["enter",l,t]],s=Pn(s,e.slice(i+1,i+n+3)),s=Pn(s,[["enter",u,t]]),s=Pn(s,Hd(t.parser.constructs.insideSpan.null,e.slice(i+n+4,a-3),t)),s=Pn(s,[["exit",u,t],e[a-2],e[a-1],["exit",l,t]]),s=Pn(s,e.slice(a+1)),s=Pn(s,[["exit",c,t]]),vn(e,i,e.length,s),e}function Bz(e,t,r){const n=this;let o=n.events.length,i,a;for(;o--;)if((n.events[o][1].type==="labelImage"||n.events[o][1].type==="labelLink")&&!n.events[o][1]._balanced){i=n.events[o][1];break}return s;function s(p){return i?i._inactive?d(p):(a=n.parser.defined.includes(Gn(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):r(p)}function c(p){return p===40?e.attempt(jz,u,a?u:d)(p):p===91?e.attempt(Dz,u,a?l:d)(p):a?u(p):d(p)}function l(p){return e.attempt(Lz,u,d)(p)}function u(p){return t(p)}function d(p){return i._balanced=!0,r(p)}}function Uz(e,t,r){return n;function n(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),o}function o(d){return zt(d)?jc(e,i)(d):i(d)}function i(d){return d===41?u(d):Kk(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return zt(d)?jc(e,c)(d):u(d)}function s(d){return r(d)}function c(d){return d===34||d===39||d===40?Jk(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function l(d){return zt(d)?jc(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):r(d)}}function zz(e,t,r){const n=this;return o;function o(s){return Gk.call(n,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return n.parser.defined.includes(Gn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function a(s){return r(s)}}function Zz(e,t,r){return n;function n(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):r(i)}}const Vz={name:"labelStartImage",tokenize:Hz,resolveAll:by.resolveAll};function Hz(e,t,r){const n=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):r(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const Wz={name:"labelStartLink",tokenize:Kz,resolveAll:by.resolveAll};function Kz(e,t,r){const n=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}const wy={name:"lineEnding",tokenize:Gz};function Gz(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ct(e,t,"linePrefix")}}const Wd={name:"thematicBreak",tokenize:Jz};function Jz(e,t,r){let n=0,o;return i;function i(l){return e.enter("thematicBreak"),a(l)}function a(l){return o=l,s(l)}function s(l){return l===o?(e.enter("thematicBreakSequence"),c(l)):n>=3&&(l===null||et(l))?(e.exit("thematicBreak"),t(l)):r(l)}function c(l){return l===o?(e.consume(l),n++,c):(e.exit("thematicBreakSequence"),xt(l)?Ct(e,s,"whitespace")(l):s(l))}}const cn={name:"list",tokenize:Qz,continuation:{tokenize:e6},exit:r6},Yz={tokenize:n6,partial:!0},Xz={tokenize:t6,partial:!0};function Qz(e,t,r){const n=this,o=n.events[n.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(f){const h=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:yy(f)){if(n.containerState.type||(n.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Wd,r,l)(f):l(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(f)}return r(f)}function c(f){return yy(f)&&++a<10?(e.consume(f),c):(!n.interrupt||a<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),l(f)):r(f)}function l(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(Mc,n.interrupt?r:u,e.attempt(Yz,p,d))}function u(f){return n.containerState.initialBlankLine=!0,i++,p(f)}function d(f){return xt(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):r(f)}function p(f){return n.containerState.size=i+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function e6(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Mc,o,i);function o(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ct(e,t,"listItemIndent",n.containerState.size+1)(s)}function i(s){return n.containerState.furtherBlankLines||!xt(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Xz,t,a)(s))}function a(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ct(e,e.attempt(cn,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function t6(e,t,r){const n=this;return Ct(e,o,"listItemIndent",n.containerState.size+1);function o(i){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(i):r(i)}}function r6(e){e.exit(this.containerState.type)}function n6(e,t,r){const n=this;return Ct(e,o,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function o(i){const a=n.events[n.events.length-1];return!xt(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):r(i)}}const Xk={name:"setextUnderline",tokenize:i6,resolveTo:o6};function o6(e,t){let r=e.length,n,o,i;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&e.splice(r,1),!i&&e[r][1].type==="definition"&&(i=r);const a={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=a,e.push(["exit",a,t]),e}function i6(e,t,r){const n=this;let o;return i;function i(l){let u=n.events.length,d;for(;u--;)if(n.events[u][1].type!=="lineEnding"&&n.events[u][1].type!=="linePrefix"&&n.events[u][1].type!=="content"){d=n.events[u][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||d)?(e.enter("setextHeadingLine"),o=l,a(l)):r(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===o?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),xt(l)?Ct(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||et(l)?(e.exit("setextHeadingLine"),t(l)):r(l)}}const a6={tokenize:s6};function s6(e){const t=this,r=e.attempt(Mc,n,e.attempt(this.parser.constructs.flowInitial,o,Ct(e,e.attempt(this.parser.constructs.flow,o,e.attempt(fz,o)),"linePrefix")));return r;function n(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const c6={resolveAll:eT()},l6=Qk("string"),u6=Qk("text");function Qk(e){return{tokenize:t,resolveAll:eT(e==="text"?d6:void 0)};function t(r){const n=this,o=this.parser.constructs[e],i=r.attempt(o,a,s);return a;function a(u){return l(u)?i(u):s(u)}function s(u){if(u===null){r.consume(u);return}return r.enter("data"),r.consume(u),c}function c(u){return l(u)?(r.exit("data"),i(u)):(r.consume(u),c)}function l(u){if(u===null)return!0;const d=o[u];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function eT(e){return t;function t(r,n){let o=-1,i;for(;++o<=r.length;)i===void 0?r[o]&&r[o][1].type==="data"&&(i=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==i+2&&(r[i][1].end=r[o-1][1].end,r.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(r,n):r}}function d6(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],o=t.sliceStream(n);let i=o.length,a=-1,s=0,c;for(;i--;){const l=o[i];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)c=!0,s++;else if(l!==-1){i++;break}}if(s){const l={type:r===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-s,offset:n.end.offset-s,_index:n.start._index+i,_bufferIndex:i?a:n.start._bufferIndex+a},end:Object.assign({},n.end)};n.end=Object.assign({},l.start),n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}function f6(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let a=[],s=[];const c={consume:v,enter:b,exit:x,attempt:C(w),check:C(S),interrupt:C(S,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:p,now:h,defineSkip:y,write:d};let u=t.tokenize.call(l,c);return t.resolveAll&&i.push(t),l;function d(L){return a=Pn(a,L),m(),a[a.length-1]!==null?[]:(I(t,0),l.events=Hd(i,l.events,l),l.events)}function p(L,K){return h6(f(L),K)}function f(L){return p6(a,L)}function h(){const{line:L,column:K,offset:z,_index:B,_bufferIndex:F}=n;return{line:L,column:K,offset:z,_index:B,_bufferIndex:F}}function y(L){o[L.line]=L.column,A()}function m(){let L;for(;n._index<a.length;){const K=a[n._index];if(typeof K=="string")for(L=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===L&&n._bufferIndex<K.length;)g(K.charCodeAt(n._bufferIndex));else g(K)}}function g(L){u=u(L)}function v(L){et(L)?(n.line++,n.column=1,n.offset+=L===-3?2:1,A()):L!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),l.previous=L}function b(L,K){const z=K||{};return z.type=L,z.start=h(),l.events.push(["enter",z,l]),s.push(z),z}function x(L){const K=s.pop();return K.end=h(),l.events.push(["exit",K,l]),K}function w(L,K){I(L,K.from)}function S(L,K){K.restore()}function C(L,K){return z;function z(B,F,j){let Z,W,D,E;return Array.isArray(B)?Q(B):"tokenize"in B?Q([B]):H(B);function H(fe){return ve;function ve(_e){const Ce=_e!==null&&fe[_e],be=_e!==null&&fe.null,de=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(be)?be:be?[be]:[]];return Q(de)(_e)}}function Q(fe){return Z=fe,W=0,fe.length===0?j:T(fe[W])}function T(fe){return ve;function ve(_e){return E=P(),D=fe,fe.partial||(l.currentConstruct=fe),fe.name&&l.parser.constructs.disable.null.includes(fe.name)?pe():fe.tokenize.call(K?Object.assign(Object.create(l),K):l,c,ce,pe)(_e)}}function ce(fe){return L(D,E),F}function pe(fe){return E.restore(),++W<Z.length?T(Z[W]):j}}}function I(L,K){L.resolveAll&&!i.includes(L)&&i.push(L),L.resolve&&vn(l.events,K,l.events.length-K,L.resolve(l.events.slice(K),l)),L.resolveTo&&(l.events=L.resolveTo(l.events,l))}function P(){const L=h(),K=l.previous,z=l.currentConstruct,B=l.events.length,F=Array.from(s);return{restore:j,from:B};function j(){n=L,l.previous=K,l.currentConstruct=z,l.events.length=B,s=F,A()}}function A(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}function p6(e,t){const r=t.start._index,n=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(r===o)a=[e[r].slice(n,i)];else{if(a=e.slice(r,o),n>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(n):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function h6(e,t){let r=-1;const n=[];let o;for(;++r<e.length;){const i=e[r];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
105
105
  `;break}case-3:{a=`\r
106
106
  `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,n.push(a)}return n.join("")}const m6=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:gz},disable:{null:[]},document:{42:cn,43:cn,45:cn,48:cn,49:cn,50:cn,51:cn,52:cn,53:cn,54:cn,55:cn,56:cn,57:cn,62:Uk},flow:{35:_z,42:Wd,45:[Xk,Wd],60:$z,61:Xk,95:Wd,96:Hk,126:Hk},flowInitial:{[-2]:vy,[-1]:vy,32:vy},insideSpan:{null:[gy,c6]},string:{38:Zk,92:zk},text:{[-5]:wy,[-4]:wy,[-3]:wy,33:Vz,38:Zk,42:gy,60:[K4,Nz],91:Wz,92:[xz,zk],93:by,95:gy,96:sz}},Symbol.toStringTag,{value:"Module"}));function y6(e){const r=Lk([m6,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:r,content:o(B4),document:o(z4),flow:o(a6),string:o(l6),text:o(u6)};return n;function o(i){return a;function a(s){return f6(n,i,s)}}}function g6(e){for(;!Wk(e););return e}const tT=/[\0\t\n\r]/g;function v6(){let e=1,t="",r=!0,n;return o;function o(i,a,s){const c=[];let l,u,d,p,f;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t="",r&&(i.charCodeAt(0)===65279&&d++,r=void 0);d<i.length;){if(tT.lastIndex=d,l=tT.exec(i),p=l&&l.index!==void 0?l.index:i.length,f=i.charCodeAt(p),!l){t=i.slice(d);break}if(f===10&&d===p&&n)c.push(-3),n=void 0;else switch(n&&(c.push(-5),n=void 0),d<p&&(c.push(i.slice(d,p)),e+=p-d),f){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:n=!0,e=1}d=p+1}return s&&(n&&c.push(-5),t&&c.push(t),c.push(null)),c}}const b6=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function w6(e){return e.replace(b6,x6)}function x6(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),i=o===120||o===88;return Fk(r.slice(i?2:1),i?16:10)}return my(r)||e}const rT={}.hasOwnProperty;function S6(e,t,r){return typeof t!="string"&&(r=t,t=void 0),_6(r)(g6(y6(r).document().write(v6()(e,t,!0))))}function _6(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(he),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(Ae),blockQuote:i(Ce),characterEscape:P,characterReference:P,codeFenced:i(be),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(be,a),codeText:i(de,a),codeTextData:P,data:P,codeFlowValue:P,definition:i(te),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(we),hardBreakEscape:i(qe),hardBreakTrailing:i(qe),htmlFlow:i(q,a),htmlFlowData:P,htmlText:i(q,a),htmlTextData:P,image:i(le),label:a,link:i(he),listItem:i(je),listItemValue:p,listOrdered:i(me,d),listUnordered:i(me),paragraph:i(Ie),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Ae),strong:i(Ue),thematicBreak:i(Ke)},exit:{atxHeading:c(),atxHeadingSequence:w,autolink:c(),autolinkEmail:_e,autolinkProtocol:ve,blockQuote:c(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:fe,codeFenced:c(m),codeFencedFence:y,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:A,codeIndented:c(g),codeText:c(F),codeTextData:A,data:A,definition:c(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(K),hardBreakTrailing:c(K),htmlFlow:c(z),htmlFlowData:A,htmlText:c(B),htmlTextData:A,image:c(Z),label:D,labelText:W,lineEnding:L,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ce,resourceDestinationString:E,resourceTitleString:H,resource:Q,setextHeading:c(I),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};nT(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(G){let se={type:"root",children:[]};const Y={stack:[se],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:u,data:r},ye=[];let $e=-1;for(;++$e<G.length;)if(G[$e][1].type==="listOrdered"||G[$e][1].type==="listUnordered")if(G[$e][0]==="enter")ye.push($e);else{const tt=ye.pop();$e=o(G,tt,$e)}for($e=-1;++$e<G.length;){const tt=t[G[$e][0]];rT.call(tt,G[$e][1].type)&&tt[G[$e][1].type].call(Object.assign({sliceSerialize:G[$e][2].sliceSerialize},Y),G[$e][1])}if(Y.tokenStack.length>0){const tt=Y.tokenStack[Y.tokenStack.length-1];(tt[1]||oT).call(Y,void 0,tt[0])}for(se.position={start:fi(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:fi(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)se=t.transforms[$e](se)||se;return se}function o(G,se,Y){let ye=se-1,$e=-1,tt=!1,Ve,ct,$t,Wt;for(;++ye<=Y;){const U=G[ye];switch(U[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{U[0]==="enter"?$e++:$e--,Wt=void 0;break}case"lineEndingBlank":{U[0]==="enter"&&(Ve&&!Wt&&!$e&&!$t&&($t=ye),Wt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Wt=void 0}if(!$e&&U[0]==="enter"&&U[1].type==="listItemPrefix"||$e===-1&&U[0]==="exit"&&(U[1].type==="listUnordered"||U[1].type==="listOrdered")){if(Ve){let X=ye;for(ct=void 0;X--;){const ze=G[X];if(ze[1].type==="lineEnding"||ze[1].type==="lineEndingBlank"){if(ze[0]==="exit")continue;ct&&(G[ct][1].type="lineEndingBlank",tt=!0),ze[1].type="lineEnding",ct=X}else if(!(ze[1].type==="linePrefix"||ze[1].type==="blockQuotePrefix"||ze[1].type==="blockQuotePrefixWhitespace"||ze[1].type==="blockQuoteMarker"||ze[1].type==="listItemIndent"))break}$t&&(!ct||$t<ct)&&(Ve._spread=!0),Ve.end=Object.assign({},ct?G[ct][1].start:U[1].end),G.splice(ct||ye,0,["exit",Ve,U[2]]),ye++,Y++}if(U[1].type==="listItemPrefix"){const X={type:"listItem",_spread:!1,start:Object.assign({},U[1].start),end:void 0};Ve=X,G.splice(ye,0,["enter",X,U[2]]),ye++,Y++,$t=void 0,Wt=!0}}}return G[se][1]._spread=tt,Y}function i(G,se){return Y;function Y(ye){s.call(this,G(ye),ye),se&&se.call(this,ye)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(G,se,Y){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([se,Y]),G.position={start:fi(se.start),end:void 0}}function c(G){return se;function se(Y){G&&G.call(this,Y),l.call(this,Y)}}function l(G,se){const Y=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==G.type&&(se?se.call(this,G,ye[0]):(ye[1]||oT).call(this,G,ye[0]));else throw new Error("Cannot close `"+G.type+"` ("+Pc({start:G.start,end:G.end})+"): it’s not open");Y.position.end=fi(G.end)}function u(){return hy(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(G){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function f(){const G=this.resume(),se=this.stack[this.stack.length-1];se.lang=G}function h(){const G=this.resume(),se=this.stack[this.stack.length-1];se.meta=G}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G.replace(/(\r?\n|\r)$/g,"")}function v(G){const se=this.resume(),Y=this.stack[this.stack.length-1];Y.label=se,Y.identifier=Gn(this.sliceSerialize(G)).toLowerCase()}function b(){const G=this.resume(),se=this.stack[this.stack.length-1];se.title=G}function x(){const G=this.resume(),se=this.stack[this.stack.length-1];se.url=G}function w(G){const se=this.stack[this.stack.length-1];if(!se.depth){const Y=this.sliceSerialize(G).length;se.depth=Y}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(G){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function P(G){const Y=this.stack[this.stack.length-1].children;let ye=Y[Y.length-1];(!ye||ye.type!=="text")&&(ye=pt(),ye.position={start:fi(G.start),end:void 0},Y.push(ye)),this.stack.push(ye)}function A(G){const se=this.stack.pop();se.value+=this.sliceSerialize(G),se.position.end=fi(G.end)}function L(G){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Y=se.children[se.children.length-1];Y.position.end=fi(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(P.call(this,G),A.call(this,G))}function K(){this.data.atHardBreak=!0}function z(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G}function B(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G}function F(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G}function j(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=se,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function Z(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=se,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function W(G){const se=this.sliceSerialize(G),Y=this.stack[this.stack.length-2];Y.label=w6(se),Y.identifier=Gn(se).toLowerCase()}function D(){const G=this.stack[this.stack.length-1],se=this.resume(),Y=this.stack[this.stack.length-1];if(this.data.inReference=!0,Y.type==="link"){const ye=G.children;Y.children=ye}else Y.alt=se}function E(){const G=this.resume(),se=this.stack[this.stack.length-1];se.url=G}function H(){const G=this.resume(),se=this.stack[this.stack.length-1];se.title=G}function Q(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ce(G){const se=this.resume(),Y=this.stack[this.stack.length-1];Y.label=se,Y.identifier=Gn(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function pe(G){this.data.characterReferenceType=G.type}function fe(G){const se=this.sliceSerialize(G),Y=this.data.characterReferenceType;let ye;Y?(ye=Fk(se,Y==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=my(se);const $e=this.stack.pop();$e.value+=ye,$e.position.end=fi(G.end)}function ve(G){A.call(this,G);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(G)}function _e(G){A.call(this,G);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(G)}function Ce(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function Ae(){return{type:"heading",depth:0,children:[]}}function qe(){return{type:"break"}}function q(){return{type:"html",value:""}}function le(){return{type:"image",title:null,url:"",alt:null}}function he(){return{type:"link",title:null,url:"",children:[]}}function me(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function je(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function Ie(){return{type:"paragraph",children:[]}}function Ue(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function Ke(){return{type:"thematicBreak"}}}function fi(e){return{line:e.line,column:e.column,offset:e.offset}}function nT(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?nT(e,n):E6(e,n)}}function E6(e,t){let r;for(r in t)if(rT.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function oT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Pc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Pc({start:t.start,end:t.end})+") is still open")}function k6(e){const t=this;t.parser=r;function r(n){return S6(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function T6(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function $6(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
@@ -127,7 +127,7 @@ Check the top-level render call using <`+ke+">.")}return ge}}function Yt(M,ge){{
127
127
  `))+1))}const a="#".repeat(o),s=r.enter("headingAtx"),c=r.enter("phrasing");i.move(a+" ");let l=r.containerPhrasing(e,{before:"# ",after:`
128
128
  `,...i.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?a+" "+l:a,r.options.closeAtx&&(l+=" "+a),c(),s(),l}zT.peek=V9;function zT(e){return e.value||""}function V9(){return"<"}ZT.peek=H9;function ZT(e,t,r,n){const o=By(r),i=o==='"'?"Quote":"Apostrophe",a=r.enter("image");let s=r.enter("label");const c=r.createTracker(n);let l=c.move("![");return l+=c.move(r.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(r.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(s=r.enter("destinationRaw"),l+=c.move(r.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=r.enter(`title${i}`),l+=c.move(" "+o),l+=c.move(r.safe(e.title,{before:l,after:o,...c.current()})),l+=c.move(o),s()),l+=c.move(")"),a(),l}function H9(){return"!"}VT.peek=W9;function VT(e,t,r,n){const o=e.referenceType,i=r.enter("imageReference");let a=r.enter("label");const s=r.createTracker(n);let c=s.move("![");const l=r.safe(e.alt,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),a();const u=r.stack;r.stack=[],a=r.enter("reference");const d=r.safe(r.associationId(e),{before:c,after:"]",...s.current()});return a(),r.stack=u,i(),o==="full"||!l||l!==d?c+=s.move(d+"]"):o==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function W9(){return"!"}HT.peek=K9;function HT(e,t,r){let n=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(n);)o+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++i<r.unsafe.length;){const a=r.unsafe[i],s=r.compilePattern(a);let c;if(a.atBreak)for(;c=s.exec(n);){let l=c.index;n.charCodeAt(l)===10&&n.charCodeAt(l-1)===13&&l--,n=n.slice(0,l)+" "+n.slice(c.index+1)}}return o+n+o}function K9(){return"`"}function WT(e,t){const r=hy(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}KT.peek=G9;function KT(e,t,r,n){const o=By(r),i=o==='"'?"Quote":"Apostrophe",a=r.createTracker(n);let s,c;if(WT(e,r)){const u=r.stack;r.stack=[],s=r.enter("autolink");let d=a.move("<");return d+=a.move(r.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),s(),r.stack=u,d}s=r.enter("link"),c=r.enter("label");let l=a.move("[");return l+=a.move(r.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=r.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(r.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(c=r.enter("destinationRaw"),l+=a.move(r.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=r.enter(`title${i}`),l+=a.move(" "+o),l+=a.move(r.safe(e.title,{before:l,after:o,...a.current()})),l+=a.move(o),c()),l+=a.move(")"),s(),l}function G9(e,t,r){return WT(e,r)?"<":"["}GT.peek=J9;function GT(e,t,r,n){const o=e.referenceType,i=r.enter("linkReference");let a=r.enter("label");const s=r.createTracker(n);let c=s.move("[");const l=r.containerPhrasing(e,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),a();const u=r.stack;r.stack=[],a=r.enter("reference");const d=r.safe(r.associationId(e),{before:c,after:"]",...s.current()});return a(),r.stack=u,i(),o==="full"||!l||l!==d?c+=s.move(d+"]"):o==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function J9(){return"["}function Uy(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 Y9(e){const t=Uy(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function X9(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 JT(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 Q9(e,t,r,n){const o=r.enter("list"),i=r.bulletCurrent;let a=e.ordered?X9(r):Uy(r);const s=e.ordered?a==="."?")":".":Y9(r);let c=t&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(c=!0),JT(r)===a&&u){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=s),r.bulletCurrent=a;const l=r.containerFlow(e,n);return r.bulletLastUsed=a,r.bulletCurrent=i,o(),l}function e7(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 t7(e,t,r,n){const o=e7(r);let i=r.bulletCurrent||Uy(r);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=r.createTracker(n);s.move(i+" ".repeat(a-i.length)),s.shift(a);const c=r.enter("listItem"),l=r.indentLines(r.containerFlow(e,s.current()),u);return c(),l;function u(d,p,f){return p?(f?"":" ".repeat(a))+d:(f?i:i+" ".repeat(a-i.length))+d}}function r7(e,t,r,n){const o=r.enter("paragraph"),i=r.enter("phrasing"),a=r.containerPhrasing(e,n);return i(),o(),a}const n7=ef(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function o7(e,t,r,n){return(e.children.some(function(a){return n7(a)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function i7(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}YT.peek=a7;function YT(e,t,r,n){const o=i7(r),i=r.enter("strong"),a=r.createTracker(n);let s=a.move(o+o);return s+=a.move(r.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o+o),i(),s}function a7(e,t,r){return r.options.strong||"*"}function s7(e,t,r,n){return r.safe(e.value,n)}function c7(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 l7(e,t,r){const n=(JT(r)+(r.options.ruleSpaces?" ":"")).repeat(c7(r));return r.options.ruleSpaces?n.slice(0,-1):n}const XT={blockquote:R9,break:BT,code:L9,definition:q9,emphasis:UT,hardBreak:BT,heading:Z9,html:zT,image:ZT,imageReference:VT,inlineCode:HT,link:KT,linkReference:GT,list:Q9,listItem:t7,paragraph:r7,root:o7,strong:YT,text:s7,thematicBreak:l7};function u7(){return{enter:{table:d7,tableData:QT,tableHeader:QT,tableRow:p7},exit:{codeText:h7,table:f7,tableData:zy,tableHeader:zy,tableRow:zy}}}function d7(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function f7(e){this.exit(e),this.data.inTable=void 0}function p7(e){this.enter({type:"tableRow",children:[]},e)}function zy(e){this.exit(e)}function QT(e){this.enter({type:"tableCell",children:[]},e)}function h7(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,m7));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function m7(e,t){return t==="|"?t:e}function y7(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,o=t.stringLength,i=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
129
129
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:s}};function a(f,h,y,m){return l(u(f,y,m),f.align)}function s(f,h,y,m){const g=d(f,y,m),v=l([g]);return v.slice(0,v.indexOf(`
130
- `))}function c(f,h,y,m){const g=y.enter("tableCell"),v=y.enter("phrasing"),b=y.containerPhrasing(f,{...m,before:i,after:i});return v(),g(),b}function l(f,h){return C9(f,{align:h,alignDelimiters:n,padding:r,stringLength:o})}function u(f,h,y){const m=f.children;let g=-1;const v=[],b=h.enter("table");for(;++g<m.length;)v[g]=d(m[g],h,y);return b(),v}function d(f,h,y){const m=f.children;let g=-1;const v=[],b=h.enter("tableRow");for(;++g<m.length;)v[g]=c(m[g],f,h,y);return b(),v}function p(f,h,y){let m=XT.inlineCode(f,h,y);return y.stack.includes("tableCell")&&(m=m.replace(/\|/g,"\\$&")),m}}function g7(){return{exit:{taskListCheckValueChecked:e$,taskListCheckValueUnchecked:e$,paragraph:b7}}}function v7(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:w7}}}function e$(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function b7(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function w7(e,t,r,n){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);i&&s.move(a);let c=XT.listItem(e,t,r,{...n,...s.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(u){return u+a}}function x7(){return[XZ(),u9(),E9(),u7(),g7()]}function S7(e){return{extensions:[QZ(),d9(),k9(),y7(e),v7()]}}const _7={tokenize:C7,partial:!0},t$={tokenize:A7,partial:!0},r$={tokenize:I7,partial:!0},n$={tokenize:R7,partial:!0},E7={tokenize:P7,partial:!0},o$={tokenize:$7,previous:a$},i$={tokenize:O7,previous:s$},Fo={tokenize:T7,previous:c$},uo={};function k7(){return{text:uo}}let Xi=48;for(;Xi<123;)uo[Xi]=Fo,Xi++,Xi===58?Xi=65:Xi===91&&(Xi=97);uo[43]=Fo,uo[45]=Fo,uo[46]=Fo,uo[95]=Fo,uo[72]=[Fo,i$],uo[104]=[Fo,i$],uo[87]=[Fo,o$],uo[119]=[Fo,o$];function T7(e,t,r){const n=this;let o,i;return a;function a(d){return!Zy(d)||!c$.call(n,n.previous)||Vy(n.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Zy(d)?(e.consume(d),s):d===64?(e.consume(d),c):r(d)}function c(d){return d===46?e.check(E7,u,l)(d):d===45||d===95||Kr(d)?(i=!0,e.consume(d),c):u(d)}function l(d){return e.consume(d),o=!0,c}function u(d){return i&&o&&on(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):r(d)}}function $7(e,t,r){const n=this;return o;function o(a){return a!==87&&a!==119||!a$.call(n,n.previous)||Vy(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_7,e.attempt(t$,e.attempt(r$,i),r),r)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function O7(e,t,r){const n=this;let o="",i=!1;return a;function a(d){return(d===72||d===104)&&s$.call(n,n.previous)&&!Vy(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):r(d)}function s(d){if(on(d)&&o.length<5)return o+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(d),c}return r(d)}function c(d){return d===47?(e.consume(d),i?l:(i=!0,c)):r(d)}function l(d){return d===null||zd(d)||zt(d)||Yi(d)||Zd(d)?r(d):e.attempt(t$,e.attempt(r$,u),r)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function C7(e,t,r){let n=0;return o;function o(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),o):a===46&&n===3?(e.consume(a),i):r(a)}function i(a){return a===null?r(a):t(a)}}function A7(e,t,r){let n,o,i;return a;function a(l){return l===46||l===95?e.check(n$,c,s)(l):l===null||zt(l)||Yi(l)||l!==45&&Zd(l)?c(l):(i=!0,e.consume(l),a)}function s(l){return l===95?n=!0:(o=n,n=void 0),e.consume(l),a}function c(l){return o||n||!i?r(l):t(l)}}function I7(e,t){let r=0,n=0;return o;function o(a){return a===40?(r++,e.consume(a),o):a===41&&n<r?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(n$,t,i)(a):a===null||zt(a)||Yi(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&n++,e.consume(a),o}}function R7(e,t,r){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||zt(s)||Yi(s)?t(s):r(s)}function o(s){return s===null||s===40||s===91||zt(s)||Yi(s)?t(s):n(s)}function i(s){return on(s)?a(s):r(s)}function a(s){return s===59?(e.consume(s),n):on(s)?(e.consume(s),a):r(s)}}function P7(e,t,r){return n;function n(i){return e.consume(i),o}function o(i){return Kr(i)?r(i):t(i)}}function a$(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||zt(e)}function s$(e){return!on(e)}function c$(e){return!(e===47||Zy(e))}function Zy(e){return e===43||e===45||e===46||e===95||Kr(e)}function Vy(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const N7={tokenize:U7,partial:!0};function M7(){return{document:{91:{tokenize:F7,continuation:{tokenize:q7},exit:B7}},text:{91:{tokenize:L7},93:{add:"after",tokenize:j7,resolveTo:D7}}}}function j7(e,t,r){const n=this;let o=n.events.length;const i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;o--;){const c=n.events[o][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!a||!a._balanced)return r(c);const l=Gn(n.sliceSerialize({start:a.end,end:n.now()}));return l.codePointAt(0)!==94||!i.includes(l.slice(1))?r(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function D7(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function L7(e,t,r){const n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?r(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(i>999||d===93&&!a||d===null||d===91||zt(d))return r(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Gn(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(d)}return zt(d)||(a=!0),i++,e.consume(d),d===92?u:l}function u(d){return d===91||d===92||d===93?(e.consume(d),i++,l):l(d)}}function F7(e,t,r){const n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i,a=0,s;return c;function c(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):r(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||zt(h))return r(h);if(h===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=Gn(n.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return zt(h)||(s=!0),a++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),Ct(e,f,"gfmFootnoteDefinitionWhitespace")):r(h)}function f(h){return t(h)}}function q7(e,t,r){return e.check(Mc,t,e.attempt(N7,t,r))}function B7(e){e.exit("gfmFootnoteDefinition")}function U7(e,t,r){const n=this;return Ct(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):r(i)}}function z7(e){let r=(e||{}).singleTilde;const n={tokenize:i,resolveAll:o};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function o(a,s){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let l=c;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[c][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[c][1].end)},d={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[c][1].start)},p=[["enter",u,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&vn(p,p.length,0,Hd(f,a.slice(l+1,c),s)),vn(p,p.length,0,[["exit",d,s],["enter",a[c][1],s],["exit",a[c][1],s],["exit",u,s]]),vn(a,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,s,c){const l=this.previous,u=this.events;let d=0;return p;function p(h){return l===126&&u[u.length-1][1].type!=="characterEscape"?c(h):(a.enter("strikethroughSequenceTemporary"),f(h))}function f(h){const y=Vd(l);if(h===126)return d>1?c(h):(a.consume(h),d++,f);if(d<2&&!r)return c(h);const m=a.exit("strikethroughSequenceTemporary"),g=Vd(h);return m._open=!g||g===2&&!!y,m._close=!y||y===2&&!!g,s(h)}}}class Z7{constructor(){this.map=[]}add(t,r,n){V7(this,t,r,n)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push([...t]),t.length=0;let o=n.pop();for(;o;)t.push(...o),o=n.pop();this.map.length=0}}function V7(e,t,r,n){let o=0;if(!(r===0&&n.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=r,e.map[o][2].push(...n);return}o+=1}e.map.push([t,r,n])}}function H7(e,t){let r=!1;const n=[];for(;t<e.length;){const o=e[t];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=n.length-1;n[i]=n[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function W7(){return{flow:{null:{tokenize:K7,resolveAll:G7}}}}function K7(e,t,r){const n=this;let o=0,i=0,a;return s;function s(A){let L=n.events.length-1;for(;L>-1;){const B=n.events[L][1].type;if(B==="lineEnding"||B==="linePrefix")L--;else break}const K=L>-1?n.events[L][1].type:null,z=K==="tableHead"||K==="tableRow"?S:c;return z===S&&n.parser.lazy[n.now().line]?r(A):z(A)}function c(A){return e.enter("tableHead"),e.enter("tableRow"),l(A)}function l(A){return A===124||(a=!0,i+=1),u(A)}function u(A){return A===null?r(A):et(A)?i>1?(i=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),f):r(A):xt(A)?Ct(e,u,"whitespace")(A):(i+=1,a&&(a=!1,o+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),d(A)))}function d(A){return A===null||A===124||zt(A)?(e.exit("data"),u(A)):(e.consume(A),A===92?p:d)}function p(A){return A===92||A===124?(e.consume(A),d):d(A)}function f(A){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(A):(e.enter("tableDelimiterRow"),a=!1,xt(A)?Ct(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):h(A))}function h(A){return A===45||A===58?m(A):A===124?(a=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),y):w(A)}function y(A){return xt(A)?Ct(e,m,"whitespace")(A):m(A)}function m(A){return A===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),g):A===45?(i+=1,g(A)):A===null||et(A)?x(A):w(A)}function g(A){return A===45?(e.enter("tableDelimiterFiller"),v(A)):w(A)}function v(A){return A===45?(e.consume(A),v):A===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(A))}function b(A){return xt(A)?Ct(e,x,"whitespace")(A):x(A)}function x(A){return A===124?h(A):A===null||et(A)?!a||o!==i?w(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):w(A)}function w(A){return r(A)}function S(A){return e.enter("tableRow"),C(A)}function C(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),C):A===null||et(A)?(e.exit("tableRow"),t(A)):xt(A)?Ct(e,C,"whitespace")(A):(e.enter("data"),I(A))}function I(A){return A===null||A===124||zt(A)?(e.exit("data"),C(A)):(e.consume(A),A===92?P:I)}function P(A){return A===92||A===124?(e.consume(A),I):I(A)}}function G7(e,t){let r=-1,n=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,c=0,l,u,d;const p=new Z7;for(;++r<e.length;){const f=e[r],h=f[1];f[0]==="enter"?h.type==="tableHead"?(s=!1,c!==0&&(l$(p,t,c,l,u),u=void 0,c=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(n=!0,d=void 0,i=[0,0,0,0],a=[0,r+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],d=of(p,t,i,o,void 0,d),i=[0,0,0,0]),a[2]=r)):h.type==="tableCellDivider"&&(n?n=!1:(i[1]!==0&&(a[0]=a[1],d=of(p,t,i,o,void 0,d)),i=a,a=[i[1],r,0,0])):h.type==="tableHead"?(s=!0,c=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(c=r,i[1]!==0?(a[0]=a[1],d=of(p,t,i,o,r,d)):a[1]!==0&&(d=of(p,t,a,o,r,d)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(c!==0&&l$(p,t,c,l,u),p.consume(t.events),r=-1;++r<t.events.length;){const f=t.events[r];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=H7(t.events,r))}return e}function of(e,t,r,n,o,i){const a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(i.end=Object.assign({},Ga(t.events,r[0])),e.add(r[0],0,[["exit",i,t]]));const c=Ga(t.events,r[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(r[1],0,[["enter",i,t]]),r[2]!==0){const l=Ga(t.events,r[2]),u=Ga(t.events,r[3]),d={type:s,start:Object.assign({},l),end:Object.assign({},u)};if(e.add(r[2],0,[["enter",d,t]]),n!==2){const p=t.events[r[2]],f=t.events[r[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){const h=r[2]+1,y=r[3]-r[2]-1;e.add(h,y,[])}}e.add(r[3]+1,0,[["exit",d,t]])}return o!==void 0&&(i.end=Object.assign({},Ga(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function l$(e,t,r,n,o){const i=[],a=Ga(t.events,r);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),n.end=Object.assign({},a),i.push(["exit",n,t]),e.add(r+1,0,i)}function Ga(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const J7={tokenize:X7};function Y7(){return{text:{91:J7}}}function X7(e,t,r){const n=this;return o;function o(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return zt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):r(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(c)}function s(c){return et(c)?t(c):xt(c)?e.check({tokenize:Q7},t,r)(c):r(c)}}function Q7(e,t,r){return Ct(e,n,"whitespace");function n(o){return o===null?r(o):t(o)}}function e8(e){return Lk([k7(),M7(),z7(e),W7(),Y7()])}const t8={};function r8(e){const t=this,r=e||t8,n=t.data(),o=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);o.push(e8(r)),i.push(x7()),a.push(S7(r))}const Ht={container:{className:"bpContainer"},modal:{container:{className:"bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpModalDialogContainer"},title:{container:{className:"bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpHeaderContainer"},content:{container:{className:"bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpComposerUploadButtonContainer"}}},messageList:{scrollbar:{container:{className:"bpMessageListScrollbarContainer"},viewport:{className:"bpMessageListScrollbarViewport"},background:{className:"bpMessageListScrollbarBackground"},thumb:{className:"bpMessageListScrollbarThumb"},corner:{className:"bpMessageListScrollbarCorner"}},scrollDownButton:{container:{className:"bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}}},message:{container:{className:"bpMessageContainer"},avatar:{container:{className:"bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},n8=({text:e})=>{const{message:{blocks:{text:t}}}=Ht,r={h1:({node:n,...o})=>J.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:n,...o})=>J.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:n,...o})=>J.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:n,...o})=>J.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:n,...o})=>J.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:n,...o})=>J.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:n,...o})=>J.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:n,...o})=>J.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:n,...o})=>J.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:n,...o})=>J.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:n,...o})=>J.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:n,...o})=>J.jsx("br",{...o,...t==null?void 0:t.lineBreak}),img:()=>null,pre:({node:n,...o})=>J.jsx("pre",{...o,...t==null?void 0:t.pre})};return J.jsx(zZ,{components:r,remarkPlugins:[r8,YZ],children:e})},o8=(e,t,r=120)=>{$.useEffect(()=>{if(e){e.style.height="0px";const n=t?Math.min(e.scrollHeight,r):20;e.style.height=`${n}px`}},[e,t])};var u$={},Hy={},d$={};Object.defineProperty(d$,"__esModule",{value:!0});var af={},i8=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(af,"__esModule",{value:!0}),af.Emitter=void 0;let a8=class{constructor(){this.listeners={}}on(t,r,n=!1){const o=this.listeners[t];o?n?o.unshift(r):o.push(r):this.listeners[t]=[r]}emit(t,r){return i8(this,void 0,void 0,function*(){const n=this.listeners[t];if(n!=null&&n.length){for(const o of n)yield o(r);return!0}else return!1})}};af.Emitter=a8;var f$={};Object.defineProperty(f$,"__esModule",{value:!0});var p$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HealthEventType=void 0,function(t){t.Create="create",t.Configure="configure",t.Start="start",t.StartFailure="start-failure",t.Initialize="initialize",t.InitializeFailure="initialize-failure",t.Sleep="sleep",t.Delete="delete"}(e.HealthEventType||(e.HealthEventType={}))})(p$);var h$={};Object.defineProperty(h$,"__esModule",{value:!0});var m$={};Object.defineProperty(m$,"__esModule",{value:!0});var y$={};Object.defineProperty(y$,"__esModule",{value:!0});var g$={};Object.defineProperty(g$,"__esModule",{value:!0}),function(e){var t=We&&We.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i),Object.defineProperty(n,a,{enumerable:!0,get:function(){return o[i]}})}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=We&&We.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(d$,e),r(af,e),r(f$,e),r(p$,e),r(h$,e),r(m$,e),r(y$,e),r(g$,e)}(Hy);var sf={},v$={},Wy={exports:{}},cf={},Ky={},lf={},Fc={},Ja={},Qi={},Ya={},Xa={},fo={};Object.defineProperty(fo,"__esModule",{value:!0}),fo.ERROR_PACKET=fo.PACKET_TYPES_REVERSE=fo.PACKET_TYPES=void 0;const po=Object.create(null);fo.PACKET_TYPES=po,po.open="0",po.close="1",po.ping="2",po.pong="3",po.message="4",po.upgrade="5",po.noop="6";const b$=Object.create(null);fo.PACKET_TYPES_REVERSE=b$,Object.keys(po).forEach(e=>{b$[po[e]]=e});const s8={type:"error",data:"parser error"};fo.ERROR_PACKET=s8,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.encodePacket=Xa.encodePacketToBinary=void 0;const c8=fo,w$=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",x$=typeof ArrayBuffer=="function",S$=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,_$=({type:e,data:t},r,n)=>w$&&t instanceof Blob?r?n(t):E$(t,n):x$&&(t instanceof ArrayBuffer||S$(t))?r?n(t):E$(new Blob([t]),n):n(c8.PACKET_TYPES[e]+(t||""));Xa.encodePacket=_$;const E$=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function k$(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Gy;function l8(e,t){if(w$&&e.data instanceof Blob)return e.data.arrayBuffer().then(k$).then(t);if(x$&&(e.data instanceof ArrayBuffer||S$(e.data)))return t(k$(e.data));_$(e,!1,r=>{Gy||(Gy=new TextEncoder),t(Gy.encode(r))})}Xa.encodePacketToBinary=l8;var uf={},Qa={};Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.decode=Qa.encode=void 0;const es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<es.length;e++)qc[es.charCodeAt(e)]=e;const u8=e=>{let t=new Uint8Array(e),r,n=t.length,o="";for(r=0;r<n;r+=3)o+=es[t[r]>>2],o+=es[(t[r]&3)<<4|t[r+1]>>4],o+=es[(t[r+1]&15)<<2|t[r+2]>>6],o+=es[t[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o};Qa.encode=u8;const d8=e=>{let t=e.length*.75,r=e.length,n,o=0,i,a,s,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const l=new ArrayBuffer(t),u=new Uint8Array(l);for(n=0;n<r;n+=4)i=qc[e.charCodeAt(n)],a=qc[e.charCodeAt(n+1)],s=qc[e.charCodeAt(n+2)],c=qc[e.charCodeAt(n+3)],u[o++]=i<<2|a>>4,u[o++]=(a&15)<<4|s>>2,u[o++]=(s&3)<<6|c&63;return l};Qa.decode=d8,Object.defineProperty(uf,"__esModule",{value:!0}),uf.decodePacket=void 0;const df=fo,f8=Qa,p8=typeof ArrayBuffer=="function",h8=(e,t)=>{if(typeof e!="string")return{type:"message",data:T$(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:m8(e.substring(1),t)}:df.PACKET_TYPES_REVERSE[r]?e.length>1?{type:df.PACKET_TYPES_REVERSE[r],data:e.substring(1)}:{type:df.PACKET_TYPES_REVERSE[r]}:df.ERROR_PACKET};uf.decodePacket=h8;const m8=(e,t)=>{if(p8){const r=(0,f8.decode)(e);return T$(r,t)}else return{base64:!0,data:e}},T$=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=Xa;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const r=uf;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return r.decodePacket}});const n=fo,o=String.fromCharCode(30),i=(p,f)=>{const h=p.length,y=new Array(h);let m=0;p.forEach((g,v)=>{(0,t.encodePacket)(g,!1,b=>{y[v]=b,++m===h&&f(y.join(o))})})};e.encodePayload=i;const a=(p,f)=>{const h=p.split(o),y=[];for(let m=0;m<h.length;m++){const g=(0,r.decodePacket)(h[m],f);if(y.push(g),g.type==="error")break}return y};e.decodePayload=a;function s(){return new TransformStream({transform(p,f){(0,t.encodePacketToBinary)(p,h=>{const y=h.length;let m;if(y<126)m=new Uint8Array(1),new DataView(m.buffer).setUint8(0,y);else if(y<65536){m=new Uint8Array(3);const g=new DataView(m.buffer);g.setUint8(0,126),g.setUint16(1,y)}else{m=new Uint8Array(9);const g=new DataView(m.buffer);g.setUint8(0,127),g.setBigUint64(1,BigInt(y))}p.data&&typeof p.data!="string"&&(m[0]|=128),f.enqueue(m),f.enqueue(h)})}})}e.createPacketEncoderStream=s;let c;function l(p){return p.reduce((f,h)=>f+h.length,0)}function u(p,f){if(p[0].length===f)return p.shift();const h=new Uint8Array(f);let y=0;for(let m=0;m<f;m++)h[m]=p[0][y++],y===p[0].length&&(p.shift(),y=0);return p.length&&y<p[0].length&&(p[0]=p[0].slice(y)),h}function d(p,f){c||(c=new TextDecoder);const h=[];let y=0,m=-1,g=!1;return new TransformStream({transform(v,b){for(h.push(v);;){if(y===0){if(l(h)<1)break;const x=u(h,1);g=(x[0]&128)===128,m=x[0]&127,m<126?y=3:m===126?y=1:y=2}else if(y===1){if(l(h)<2)break;const x=u(h,2);m=new DataView(x.buffer,x.byteOffset,x.length).getUint16(0),y=3}else if(y===2){if(l(h)<8)break;const x=u(h,8),w=new DataView(x.buffer,x.byteOffset,x.length),S=w.getUint32(0);if(S>Math.pow(2,53-32)-1){b.enqueue(n.ERROR_PACKET);break}m=S*Math.pow(2,32)+w.getUint32(4),y=3}else{if(l(h)<m)break;const x=u(h,m);b.enqueue((0,r.decodePacket)(g?x:c.decode(x),f)),y=0}if(m===0||m>p){b.enqueue(n.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=d,e.protocol=4})(Ya);function an(e){if(e)return y8(e)}function y8(e){for(var t in an.prototype)e[t]=an.prototype[t];return e}an.prototype.on=an.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},an.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},an.prototype.off=an.prototype.removeListener=an.prototype.removeAllListeners=an.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},an.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,t)}return this},an.prototype.emitReserved=an.prototype.emit,an.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},an.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ts=Ih(Object.freeze(Object.defineProperty({__proto__:null,Emitter:an},Symbol.toStringTag,{value:"Module"})));var Nn={},ea={};Object.defineProperty(ea,"__esModule",{value:!0}),ea.globalThisShim=void 0,ea.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.byteLength=Nn.installTimerFunctions=Nn.pick=void 0;const pi=ea;function g8(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}Nn.pick=g8;const v8=pi.globalThisShim.setTimeout,b8=pi.globalThisShim.clearTimeout;function w8(e,t){t.useNativeTimers?(e.setTimeoutFn=v8.bind(pi.globalThisShim),e.clearTimeoutFn=b8.bind(pi.globalThisShim)):(e.setTimeoutFn=pi.globalThisShim.setTimeout.bind(pi.globalThisShim),e.clearTimeoutFn=pi.globalThisShim.clearTimeout.bind(pi.globalThisShim))}Nn.installTimerFunctions=w8;const x8=1.33;function S8(e){return typeof e=="string"?_8(e):Math.ceil((e.byteLength||e.size)*x8)}Nn.byteLength=S8;function _8(e){let t=0,r=0;for(let n=0,o=e.length;n<o;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}var Jy={exports:{}},Yy,$$;function E8(){if($$)return Yy;$$=1;var e=1e3,t=e*60,r=t*60,n=r*24,o=n*7,i=n*365.25;Yy=function(u,d){d=d||{};var p=typeof u;if(p==="string"&&u.length>0)return a(u);if(p==="number"&&isFinite(u))return d.long?c(u):s(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function a(u){if(u=String(u),!(u.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(d){var p=parseFloat(d[1]),f=(d[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return p*i;case"weeks":case"week":case"w":return p*o;case"days":case"day":case"d":return p*n;case"hours":case"hour":case"hrs":case"hr":case"h":return p*r;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function s(u){var d=Math.abs(u);return d>=n?Math.round(u/n)+"d":d>=r?Math.round(u/r)+"h":d>=t?Math.round(u/t)+"m":d>=e?Math.round(u/e)+"s":u+"ms"}function c(u){var d=Math.abs(u);return d>=n?l(u,d,n,"day"):d>=r?l(u,d,r,"hour"):d>=t?l(u,d,t,"minute"):d>=e?l(u,d,e,"second"):u+" ms"}function l(u,d,p,f){var h=d>=p*1.5;return Math.round(u/p)+" "+f+(h?"s":"")}return Yy}function k8(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=E8(),r.destroy=l,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let d=0;for(let p=0;p<u.length;p++)d=(d<<5)-d+u.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(u){let d,p=null,f,h;function y(...m){if(!y.enabled)return;const g=y,v=Number(new Date),b=v-(d||v);g.diff=b,g.prev=d,g.curr=v,d=v,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(S,C)=>{if(S==="%%")return"%";x++;const I=r.formatters[C];if(typeof I=="function"){const P=m[x];S=I.call(g,P),m.splice(x,1),x--}return S}),r.formatArgs.call(g,m),(g.log||r.log).apply(g,m)}return y.namespace=u,y.useColors=r.useColors(),y.color=r.selectColor(u),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(f!==r.namespaces&&(f=r.namespaces,h=r.enabled(u)),h),set:m=>{p=m}}),typeof r.init=="function"&&r.init(y),y}function n(u,d){const p=r(this.namespace+(typeof d>"u"?":":d)+u);return p.log=this.log,p}function o(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let d;const p=(typeof u=="string"?u:"").split(/[\s,]+/),f=p.length;for(d=0;d<f;d++)p[d]&&(u=p[d].replace(/\*/g,".*?"),u[0]==="-"?r.skips.push(new RegExp("^"+u.slice(1)+"$")):r.names.push(new RegExp("^"+u+"$")))}function i(){const u=[...r.names.map(s),...r.skips.map(s).map(d=>"-"+d)].join(",");return r.enable(""),u}function a(u){if(u[u.length-1]==="*")return!0;let d,p;for(d=0,p=r.skips.length;d<p;d++)if(r.skips[d].test(u))return!1;for(d=0,p=r.names.length;d<p;d++)if(r.names[d].test(u))return!0;return!1}function s(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var T8=k8;(function(e,t){t.formatArgs=n,t.save=o,t.load=i,t.useColors=r,t.storage=a(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let u=0,d=0;c[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(u++,p==="%c"&&(d=u))}),c.splice(d,0,l)}t.log=console.debug||console.log||(()=>{});function o(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function i(){let c;try{c=t.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function a(){try{return localStorage}catch{}}e.exports=T8(t);const{formatters:s}=e.exports;s.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(Jy,Jy.exports);var ho=Jy.exports,ta={};Object.defineProperty(ta,"__esModule",{value:!0}),ta.decode=ta.encode=void 0;function $8(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}ta.encode=$8;function O8(e){let t={},r=e.split("&");for(let n=0,o=r.length;n<o;n++){let i=r[n].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}ta.decode=O8;var C8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.Transport=void 0;const A8=Ya,I8=ts,R8=Nn,P8=C8(ho),N8=ta,M8=(0,P8.default)("engine.io-client:transport");class j8 extends Error{constructor(t,r,n){super(t),this.description=r,this.context=n,this.type="TransportError"}}class D8 extends I8.Emitter{constructor(t){super(),this.writable=!1,(0,R8.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,r,n){return super.emitReserved("error",new j8(t,r,n)),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):M8("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=(0,A8.decodePacket)(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_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 r=(0,N8.encode)(t);return r.length?"?"+r:""}}Qi.Transport=D8;var qo={};Object.defineProperty(qo,"__esModule",{value:!0}),qo.yeast=qo.decode=qo.encode=void 0;const O$="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ff=64,C$={};let A$=0,hi=0,I$;function Xy(e){let t="";do t=O$[e%ff]+t,e=Math.floor(e/ff);while(e>0);return t}qo.encode=Xy;function L8(e){let t=0;for(hi=0;hi<e.length;hi++)t=t*ff+C$[e.charAt(hi)];return t}qo.decode=L8;function F8(){const e=Xy(+new Date);return e!==I$?(A$=0,I$=e):e+"."+Xy(A$++)}for(qo.yeast=F8;hi<ff;hi++)C$[O$[hi]]=hi;var rs={},pf={};Object.defineProperty(pf,"__esModule",{value:!0}),pf.hasCORS=void 0;let R$=!1;try{R$=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}pf.hasCORS=R$,Object.defineProperty(rs,"__esModule",{value:!0}),rs.createCookieJar=rs.XHR=void 0;const q8=pf,B8=ea;function U8(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||q8.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new B8.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}rs.XHR=U8;function z8(){}rs.createCookieJar=z8;var Z8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.Request=Ja.Polling=void 0;const V8=Qi,H8=Z8(ho),W8=qo,P$=Ya,Qy=rs,K8=ts,N$=Nn,G8=ea,ln=(0,H8.default)("engine.io-client:polling");function J8(){}const Y8=function(){return new Qy.XHR({xdomain:!1}).responseType!=null}();class X8 extends V8.Transport{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const n=location.protocol==="https:";let o=location.port;o||(o=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}const r=t&&t.forceBase64;this.supportsBinary=Y8&&!r,this.opts.withCredentials&&(this.cookieJar=(0,Qy.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const r=()=>{ln("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let n=0;this.polling&&(ln("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){ln("pre-pause polling complete"),--n||r()})),this.writable||(ln("we are currently writing - waiting to pause"),n++,this.once("drain",function(){ln("pre-pause writing complete"),--n||r()}))}else r()}poll(){ln("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){ln("polling got data %s",t);const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};(0,P$.decodePayload)(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():ln('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{ln("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(ln("transport open - closing"),t()):(ln("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,P$.encodePayload)(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=(0,W8.yeast)()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ra(this.uri(),t)}doWrite(t,r){const n=this.request({method:"POST",data:t});n.on("success",r),n.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){ln("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=t}}Ja.Polling=X8;let ra=class Ah extends K8.Emitter{constructor(t,r){super(),(0,N$.installTimerFunctions)(this,r),this.opts=r,this.method=r.method||"GET",this.uri=t,this.data=r.data!==void 0?r.data:null,this.create()}create(){var t;const r=(0,N$.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const n=this.xhr=new Qy.XHR(r);try{ln("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(n)),n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},ln("xhr data %s",this.data),n.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=Ah.requestsCount++,Ah.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=J8,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ah.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(Ja.Request=ra,ra.requestsCount=0,ra.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",M$);else if(typeof addEventListener=="function"){const e="onpagehide"in G8.globalThisShim?"pagehide":"unload";addEventListener(e,M$,!1)}}function M$(){for(let e in ra.requests)ra.requests.hasOwnProperty(e)&&ra.requests[e].abort()}var hf={},bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.defaultBinaryType=bn.usingBrowserWebSocket=bn.WebSocket=bn.nextTick=void 0;const j$=ea;bn.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0))(),bn.WebSocket=j$.globalThisShim.WebSocket||j$.globalThisShim.MozWebSocket,bn.usingBrowserWebSocket=!0,bn.defaultBinaryType="arraybuffer";var Q8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hf,"__esModule",{value:!0}),hf.WS=void 0;const eV=Qi,tV=qo,rV=Nn,mi=bn,nV=Q8(ho),oV=Ya,iV=(0,nV.default)("engine.io-client:websocket"),D$=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class aV extends eV.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),r=this.opts.protocols,n=D$?{}:(0,rV.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=mi.usingBrowserWebSocket&&!D$?r?new mi.WebSocket(t,r):new mi.WebSocket(t):new mi.WebSocket(t,r,n)}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 r=0;r<t.length;r++){const n=t[r],o=r===t.length-1;(0,oV.encodePacket)(n,this.supportsBinary,i=>{const a={};mi.usingBrowserWebSocket||(n.options&&(a.compress=n.options.compress),this.opts.perMessageDeflate&&(typeof i=="string"?Buffer.byteLength(i):i.length)<this.opts.perMessageDeflate.threshold&&(a.compress=!1));try{mi.usingBrowserWebSocket?this.ws.send(i):this.ws.send(i,a)}catch{iV("websocket closed before onclose event")}o&&(0,mi.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=(0,tV.yeast)()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!mi.WebSocket}}hf.WS=aV;var mf={},sV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mf,"__esModule",{value:!0}),mf.WT=void 0;const cV=Qi,lV=bn,L$=Ya,Bc=(0,sV(ho).default)("engine.io-client:webtransport");class uV extends cV.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{Bc("transport closed gracefully"),this.onClose()}).catch(t=>{Bc("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const r=(0,L$.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),o=(0,L$.createPacketEncoderStream)();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{n.read().then(({done:s,value:c})=>{if(s){Bc("session is closed");return}Bc("received chunk: %o",c),this.onPacket(c),i()}).catch(s=>{Bc("an error occurred while reading: %s",s)})};i();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],o=r===t.length-1;this.writer.write(n).then(()=>{o&&(0,lV.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}mf.WT=uV,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.transports=void 0;const dV=Ja,fV=hf,pV=mf;Fc.transports={websocket:fV.WS,webtransport:pV.WT,polling:dV.Polling};var Uc={};Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.parse=void 0;const hV=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mV=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yV(e){const t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let o=hV.exec(e||""),i={},a=14;for(;a--;)i[mV[a]]=o[a]||"";return r!=-1&&n!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=gV(i,i.path),i.queryKey=vV(i,i.query),i}Uc.parse=yV;function gV(e,t){const r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function vV(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,i){o&&(r[o]=i)}),r}var bV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lf,"__esModule",{value:!0}),lf.Socket=void 0;const wV=Fc,F$=Nn,xV=ta,q$=Uc,SV=bV(ho),_V=ts,B$=Ya,EV=bn,tr=(0,SV.default)("engine.io-client:socket");let U$=class Zs extends _V.Emitter{constructor(t,r={}){super(),this.binaryType=EV.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=(0,q$.parse)(t),r.hostname=t.host,r.secure=t.protocol==="https"||t.protocol==="wss",r.port=t.port,t.query&&(r.query=t.query)):r.host&&(r.hostname=(0,q$.parse)(r.host).host),(0,F$.installTimerFunctions)(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,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},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,xV.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(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"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){tr('creating transport "%s"',t);const r=Object.assign({},this.opts.query);r.EIO=B$.protocol,r.transport=t,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return tr("options: %j",n),new wV.transports[t](n)}open(){let t;if(this.opts.rememberUpgrade&&Zs.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(r){tr("error while creating transport: %s",r),this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){tr("setting transport %s",t.name),this.transport&&(tr("clearing existing transport %s",this.transport.name),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",r=>this.onClose("transport close",r))}probe(t){tr('probing transport "%s"',t);let r=this.createTransport(t),n=!1;Zs.priorWebsocketSuccess=!1;const o=()=>{n||(tr('probe transport "%s" opened',t),r.send([{type:"ping",data:"probe"}]),r.once("packet",d=>{if(!n)if(d.type==="pong"&&d.data==="probe"){if(tr('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Zs.priorWebsocketSuccess=r.name==="websocket",tr('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{n||this.readyState!=="closed"&&(tr("changing transport and sending upgrade packet"),u(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{tr('probe transport "%s" failed',t);const p=new Error("probe error");p.transport=r.name,this.emitReserved("upgradeError",p)}}))};function i(){n||(n=!0,u(),r.close(),r=null)}const a=d=>{const p=new Error("probe error: "+d);p.transport=r.name,i(),tr('probe transport "%s" failed because of error: %s',t,d),this.emitReserved("upgradeError",p)};function s(){a("transport closed")}function c(){a("socket closed")}function l(d){r&&d.name!==r.name&&(tr('"%s" works - aborting "%s"',d.name,r.name),i())}const u=()=>{r.removeListener("open",o),r.removeListener("error",a),r.removeListener("close",s),this.off("close",c),this.off("upgrading",l)};r.once("open",o),r.once("error",a),r.once("close",s),this.once("close",c),this.once("upgrading",l),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onOpen(){if(tr("socket open"),this.readyState="open",Zs.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){tr("starting upgrade probes");let t=0;const r=this.upgrades.length;for(;t<r;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(tr('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const r=new Error("server error");r.code=t.data,this.onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}else tr('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),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();tr("flushing %d packets in socket",t.length),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 r=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(r+=(0,F$.byteLength)(o)),n>0&&r>this.maxPayload)return tr("only send %d out of %d packets",n,this.writeBuffer.length),this.writeBuffer.slice(0,n);r+=2}return tr("payload size is %d (max: %d)",r,this.maxPayload),this.writeBuffer}write(t,r,n){return this.sendPacket("message",t,r,n),this}send(t,r,n){return this.sendPacket("message",t,r,n),this}sendPacket(t,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const i={type:t,data:r,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),tr("socket closing - telling transport to close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}onError(t){tr("socket error %j",t),Zs.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,r){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(tr('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const r=[];let n=0;const o=t.length;for(;n<o;n++)~this.transports.indexOf(t[n])&&r.push(t[n]);return r}};lf.Socket=U$,U$.protocol=B$.protocol,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=lf;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var r=Qi;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return r.Transport}});var n=Fc;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return n.transports}});var o=Nn;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=Uc;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var a=bn;Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return a.nextTick}})}(Ky);var kV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cf,"__esModule",{value:!0}),cf.url=void 0;const TV=Ky,z$=kV(ho).default("socket.io-client:url");function $V(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(z$("protocol-less url %s",e),typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),z$("parse %s",e),n=TV.parse(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}cf.url=$V;var yf={},zc={},gf={},ns={},na={};Object.defineProperty(na,"__esModule",{value:!0}),na.hasBinary=na.isBinary=void 0;const OV=typeof ArrayBuffer=="function",CV=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Z$=Object.prototype.toString,AV=typeof Blob=="function"||typeof Blob<"u"&&Z$.call(Blob)==="[object BlobConstructor]",IV=typeof File=="function"||typeof File<"u"&&Z$.call(File)==="[object FileConstructor]";function V$(e){return OV&&(e instanceof ArrayBuffer||CV(e))||AV&&e instanceof Blob||IV&&e instanceof File}na.isBinary=V$;function vf(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(vf(e[r]))return!0;return!1}if(V$(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vf(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&vf(e[r]))return!0;return!1}na.hasBinary=vf,Object.defineProperty(ns,"__esModule",{value:!0}),ns.reconstructPacket=ns.deconstructPacket=void 0;const RV=na;function PV(e){const t=[],r=e.data,n=e;return n.data=eg(r,t),n.attachments=t.length,{packet:n,buffers:t}}ns.deconstructPacket=PV;function eg(e,t){if(!e)return e;if((0,RV.isBinary)(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=eg(e[n],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=eg(e[n],t));return r}return e}function NV(e,t){return e.data=tg(e.data,t),delete e.attachments,e}ns.reconstructPacket=NV;function tg(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 r=0;r<e.length;r++)e[r]=tg(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=tg(e[r],t));return e}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=ts,r=ns,n=na,i=(0,ho.default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var s;(function(p){p[p.CONNECT=0]="CONNECT",p[p.DISCONNECT=1]="DISCONNECT",p[p.EVENT=2]="EVENT",p[p.ACK=3]="ACK",p[p.CONNECT_ERROR=4]="CONNECT_ERROR",p[p.BINARY_EVENT=5]="BINARY_EVENT",p[p.BINARY_ACK=6]="BINARY_ACK"})(s=e.PacketType||(e.PacketType={}));class c{constructor(f){this.replacer=f}encode(f){return i("encoding packet %j",f),(f.type===s.EVENT||f.type===s.ACK)&&(0,n.hasBinary)(f)?this.encodeAsBinary({type:f.type===s.EVENT?s.BINARY_EVENT:s.BINARY_ACK,nsp:f.nsp,data:f.data,id:f.id}):[this.encodeAsString(f)]}encodeAsString(f){let h=""+f.type;return(f.type===s.BINARY_EVENT||f.type===s.BINARY_ACK)&&(h+=f.attachments+"-"),f.nsp&&f.nsp!=="/"&&(h+=f.nsp+","),f.id!=null&&(h+=f.id),f.data!=null&&(h+=JSON.stringify(f.data,this.replacer)),i("encoded %j as %s",f,h),h}encodeAsBinary(f){const h=(0,r.deconstructPacket)(f),y=this.encodeAsString(h.packet),m=h.buffers;return m.unshift(y),m}}e.Encoder=c;function l(p){return Object.prototype.toString.call(p)==="[object Object]"}class u extends t.Emitter{constructor(f){super(),this.reviver=f}add(f){let h;if(typeof f=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(f);const y=h.type===s.BINARY_EVENT;y||h.type===s.BINARY_ACK?(h.type=y?s.EVENT:s.ACK,this.reconstructor=new d(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if((0,n.isBinary)(f)||f.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(f),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+f)}decodeString(f){let h=0;const y={type:Number(f.charAt(0))};if(s[y.type]===void 0)throw new Error("unknown packet type "+y.type);if(y.type===s.BINARY_EVENT||y.type===s.BINARY_ACK){const g=h+1;for(;f.charAt(++h)!=="-"&&h!=f.length;);const v=f.substring(g,h);if(v!=Number(v)||f.charAt(h)!=="-")throw new Error("Illegal attachments");y.attachments=Number(v)}if(f.charAt(h+1)==="/"){const g=h+1;for(;++h&&!(f.charAt(h)===","||h===f.length););y.nsp=f.substring(g,h)}else y.nsp="/";const m=f.charAt(h+1);if(m!==""&&Number(m)==m){const g=h+1;for(;++h;){const v=f.charAt(h);if(v==null||Number(v)!=v){--h;break}if(h===f.length)break}y.id=Number(f.substring(g,h+1))}if(f.charAt(++h)){const g=this.tryParse(f.substr(h));if(u.isPayloadValid(y.type,g))y.data=g;else throw new Error("invalid payload")}return i("decoded %s as %j",f,y),y}tryParse(f){try{return JSON.parse(f,this.reviver)}catch{return!1}}static isPayloadValid(f,h){switch(f){case s.CONNECT:return l(h);case s.DISCONNECT:return h===void 0;case s.CONNECT_ERROR:return typeof h=="string"||l(h);case s.EVENT:case s.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&a.indexOf(h[0])===-1);case s.ACK:case s.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class d{constructor(f){this.packet=f,this.buffers=[],this.reconPack=f}takeBinaryData(f){if(this.buffers.push(f),this.buffers.length===this.reconPack.attachments){const h=(0,r.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}})(gf);var Zc={};Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.on=void 0;function MV(e,t,r){return e.on(t,r),function(){e.off(t,r)}}Zc.on=MV;var jV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zc,"__esModule",{value:!0}),zc.Socket=void 0;const Jn=gf,bf=Zc,DV=ts,br=jV(ho).default("socket.io-client:socket"),LV=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class FV extends DV.Emitter{constructor(t,r,n){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=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[bf.on(t,"open",this.onopen.bind(this)),bf.on(t,"packet",this.onpacket.bind(this)),bf.on(t,"error",this.onerror.bind(this)),bf.on(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,...r){if(LV.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const n={type:Jn.PacketType.EVENT,data:r};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const a=this.ids++;br("emitting packet with ack id %d",a);const s=r.pop();this._registerAckCallback(a,s),n.id=a}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)?br("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n),this.flags={},this}_registerAckCallback(t,r){var n;const o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[t]=r;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&(br("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));br("event with ack id %d has timed out after %d ms",t,o),r.call(this,new Error("operation has timed out"))},o);this.acks[t]=(...a)=>{this.io.clearTimeoutFn(i),r.apply(this,[null,...a])}}emitWithAck(t,...r){const n=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,i)=>{r.push((a,s)=>n?a?i(a):o(s):o(a)),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>n!==this._queue[0]?void 0:(o!==null?n.tryCount>this._opts.retries&&(br("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),r&&r(o)):(br("packet [%d] was successfully sent",n.id),this._queue.shift(),r&&r(null,...i)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(br("draining queue"),!this.connected||this._queue.length===0)return;const r=this._queue[0];if(r.pending&&!t){br("packet [%d] has already been sent and is waiting for an ack",r.id);return}r.pending=!0,r.tryCount++,br("sending packet [%d] (try n°%d)",r.id,r.tryCount),this.flags=r.flags,this.emit.apply(this,r.args)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){br("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Jn.PacketType.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,r){br("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Jn.PacketType.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 Jn.PacketType.EVENT:case Jn.PacketType.BINARY_EVENT:this.onevent(t);break;case Jn.PacketType.ACK:case Jn.PacketType.BINARY_ACK:this.onack(t);break;case Jn.PacketType.DISCONNECT:this.ondisconnect();break;case Jn.PacketType.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const r=t.data||[];br("emitting event %j",r),t.id!=null&&(br("attaching ack callback to event"),r.push(this.ack(t.id))),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.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 r=this;let n=!1;return function(...o){n||(n=!0,br("sending ack %j",o),r.packet({type:Jn.PacketType.ACK,id:t,data:o}))}}onack(t){const r=this.acks[t.id];typeof r=="function"?(br("calling ack %s with %j",t.id,t.data),r.apply(this,t.data),delete this.acks[t.id]):br("bad ack %s",t.id)}onconnect(t,r){br("socket connected with id %s",t),this.id=t,this.recovered=r&&this._pid===r,this._pid=r,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(){br("server disconnect (%s)",this.nsp),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&&(br("performing disconnect (%s)",this.nsp),this.packet({type:Jn.PacketType.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 r=this._anyListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,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 r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,t.data)}}}zc.Socket=FV;var wf={};Object.defineProperty(wf,"__esModule",{value:!0}),wf.Backoff=void 0;function os(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}wf.Backoff=os,os.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0},os.prototype.reset=function(){this.attempts=0},os.prototype.setMin=function(e){this.ms=e},os.prototype.setMax=function(e){this.max=e},os.prototype.setJitter=function(e){this.jitter=e};var qV=We&&We.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),BV=We&&We.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),UV=We&&We.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&qV(t,e,r);return BV(t,e),t},zV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yf,"__esModule",{value:!0}),yf.Manager=void 0;const rg=Ky,ZV=zc,VV=UV(gf),oa=Zc,HV=wf,WV=ts,Lr=zV(ho).default("socket.io-client:manager");class KV extends WV.Emitter{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,rg.installTimerFunctions(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new HV.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const o=r.parser||VV;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.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(Lr("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;Lr("opening %s",this.uri),this.engine=new rg.Socket(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=oa.on(r,"open",function(){n.onopen(),t&&t()}),i=s=>{Lr("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=oa.on(r,"error",i);if(this._timeout!==!1){const s=this._timeout;Lr("connect attempt will timeout after %d",s);const c=this.setTimeoutFn(()=>{Lr("connect attempt timed out after %d",s),o(),i(new Error("timeout")),r.close()},s);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){Lr("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(oa.on(t,"ping",this.onping.bind(this)),oa.on(t,"data",this.ondata.bind(this)),oa.on(t,"error",this.onerror.bind(this)),oa.on(t,"close",this.onclose.bind(this)),oa.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){rg.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){Lr("error",t),this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new ZV.Socket(this,t,r),this.nsps[t]=n),n}_destroy(t){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active){Lr("socket %s is still active, skipping close",n);return}this._close()}_packet(t){Lr("writing packet %j",t);const r=this.encoder.encode(t);for(let n=0;n<r.length;n++)this.engine.write(r[n],t.options)}cleanup(){Lr("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){Lr("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,r){Lr("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)Lr("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();Lr("will wait %dms before reconnect attempt",r),this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(Lr("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(Lr("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):(Lr("reconnect success"),t.onreconnect())}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}yf.Manager=KV,function(e,t){var r=We&&We.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const n=cf,o=yf;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=zc;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const s=r(ho).default("socket.io-client"),c={};function l(d,p){typeof d=="object"&&(p=d,d=void 0),p=p||{};const f=n.url(d,p.path||"/socket.io"),h=f.source,y=f.id,m=f.path,g=c[y]&&m in c[y].nsps,v=p.forceNew||p["force new connection"]||p.multiplex===!1||g;let b;return v?(s("ignoring socket cache for %s",h),b=new o.Manager(h,p)):(c[y]||(s("new io instance for %s",h),c[y]=new o.Manager(h,p)),b=c[y]),f.query&&!p.query&&(p.query=f.queryKey),b.socket(f.path,p)}t.io=l,t.connect=l,t.default=l,Object.assign(l,{Manager:o.Manager,Socket:i.Socket,io:l,connect:l});var u=gf;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=l}(Wy,Wy.exports);var GV=Wy.exports;(function(e){var t=We&&We.__awaiter||function(c,l,u,d){function p(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function y(v){try{g(d.next(v))}catch(b){h(b)}}function m(v){try{g(d.throw(v))}catch(b){h(b)}}function g(v){v.done?f(v.value):p(v.value).then(y,m)}g((d=d.apply(c,l||[])).next())})},r=We&&We.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocketComEmitter=e.SocketComEvents=e.SocketCom=void 0;const n=Hy,o=r(GV);class i{constructor(l){this.url=l,this.pending={},this.emitter=new s,this.events=this.emitter}connect(l,u){return t(this,void 0,void 0,function*(){return new Promise((d,p)=>{this.disconnect(),this.socket=(0,o.default)(this.url,{transports:["websocket"],auth:l,autoConnect:!1,query:u});const f=setTimeout(()=>{p("connection timed out")},5e3);this.socket.on("login",h=>t(this,void 0,void 0,function*(){clearTimeout(f),d(h)})),this.socket.on("connect_error",h=>{var y;(y=this.socket)===null||y===void 0||y.close(),clearTimeout(f),p(h.message)}),this.socket.on("message",h=>t(this,void 0,void 0,function*(){var y;this.pending[h.request]&&(!((y=h.data)===null||y===void 0)&&y.error?this.pending[h.request].reject(new Error(h.data.message)):this.pending[h.request].resolve(h.data),delete this.pending[h.request]),yield this.emitter.emit(a.Message,h)})),this.socket.connect()})})}disconnect(){var l;this.socket&&!(!((l=this.socket)===null||l===void 0)&&l.disconnected)&&this.socket.disconnect()}request(l,u){var d;return t(this,void 0,void 0,function*(){if(!(!((d=this.socket)===null||d===void 0)&&d.connected))throw new Error("Client is disconnected");const p=this.random(32),f=new Promise((h,y)=>{this.pending[p]={resolve:h,reject:y}});return this.socket.send({request:p,type:l,data:u}),f})}random(l){const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let d="";for(let p=0;p<l;p++)d+=u.charAt(Math.floor(Math.random()*u.length));return d}}e.SocketCom=i;var a;(function(c){c.Message="message"})(a=e.SocketComEvents||(e.SocketComEvents={}));class s extends n.Emitter{}e.SocketComEmitter=s})(v$);var xf={},JV=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(xf,"__esModule",{value:!0}),xf.SocketEmitter=void 0;class YV{constructor(){this.listeners={}}on(t,r){const n=this.listeners[t];n?n.push(r):this.listeners[t]=[r]}removeListeners(t){this.listeners[t]=[]}emit(t,r){return JV(this,void 0,void 0,function*(){const n=this.listeners[t];if(n!=null&&n.length){for(const o of n)yield o(r);return!0}else return!1})}}xf.SocketEmitter=YV;var un=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(sf,"__esModule",{value:!0}),sf.MessagingSocket=void 0;const H$=v$,XV=xf;class QV extends XV.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new H$.SocketCom(t.url),this.com.events.on(H$.SocketComEvents.Message,r=>un(this,void 0,void 0,function*(){r.type==="message.new"&&(yield this.emit("message",r.data.message))}))}get creds(){return this._creds}get userId(){var t;return(t=this._creds)===null||t===void 0?void 0:t.userId}get conversationId(){return this._conversationId}connect(t,r){return un(this,void 0,void 0,function*(){const n=r?{userData:JSON.stringify(r)}:void 0,o=yield this.com.connect({clientId:this.clientId,creds:t},n);return o.userId===(t==null?void 0:t.userId)&&!o.userToken&&(o.userToken=t.userToken),this._creds=o,yield this.emit("connect",this._creds),yield this.emit("user",this._creds.userId),o})}disconnect(){return un(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return un(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return un(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return un(this,void 0,void 0,function*(){const r=yield this.request("conversations.create",{});return(t==null?void 0:t.switch)!==!1&&(yield this.switchConversation(r.id)),r})}startConversation(t){return un(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return un(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return un(this,void 0,void 0,function*(){const r=yield this.request("conversations.delete",{id:t||this._conversationId});return r&&(yield this.switchConversation(void 0)),r})}listConversations(t){return un(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return un(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return un(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return un(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,r){return un(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:r})})}request(t,r){return this.com.request(t,r)}}sf.MessagingSocket=QV,function(e){var t=We&&We.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i),Object.defineProperty(n,a,{enumerable:!0,get:function(){return o[i]}})}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=We&&We.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Hy,e),r(sf,e)}(u$);class eH{constructor(t){k(this,"socket");k(this,"clientId");k(this,"apiUrl");k(this,"userId");k(this,"conversationId");k(this,"userToken");k(this,"connected",!1);k(this,"emitter");k(this,"on");k(this,"mode","messaging");this.socket=new u$.MessagingSocket(t),this.emitter=new Gm,this.clientId=t.clientId,this.apiUrl=t.url,this.on=this.emitter.on.bind(this.emitter),this.socket.on("message",r=>{const n=r.payload;if(n.type==="trigger")switch(n.trigger.type){case"webchat-visibility":this.emitter.emit("webchatVisibility",n.trigger.visibility);break;case"webchat-config":this.emitter.emit("webchatConfig",n.trigger.config);break;case"custom-event":this.emitter.emit("customEvent",n.trigger.event);break}else{const o=Ed.parse(n),{payload:i,disableInput:a}=zm(o);this.emitter.emit("message",{...r,payload:i,disableInput:a})}}),this.socket.on("conversation",r=>{this.emitter.emit("conversation",r)})}async connect(t,r){if(this.connected)return;this.connected=!0;const n=await this.socket.connect(t,r).catch(o=>{throw this.connected=!1,o});return this.userId=n.userId,this.userToken=n.userToken,n}async disconnect(){await this.socket.disconnect(),this.connected=!1}async getUser(){throw new Error("Get user is not supported in messaging mode")}async updateUser(){throw new Error("Update user is not supported in messaging mode")}async sendFile(t){throw new Error("Send file is not supported in messaging mode")}async sendMessage(t){this.conversationId||await this.newConversation(),await this.socket.sendText(t),this.emitter.emit("messageSent",t)}async sendEvent(t){this.conversationId||await this.newConversation(),await this.socket.sendPayload({type:"trigger",payload:t})}async switchConversation(t){await this.socket.switchConversation(t),this.conversationId=t}async conversationExists(t){return(await this.socket.listConversations()).some(n=>n.id===t)}async newConversation(){const{id:t}=await this.socket.createConversation();await this.socket.startConversation(),this.conversationId=t}async listMessages(t){return(await this.socket.listMessages(t)).map(n=>{const o=Ed.parse(n.payload),{payload:i,disableInput:a}=zm(o);return{...n,payload:i,disableInput:a}})}}function W$(e,t){return function(){return e.apply(t,arguments)}}const{toString:K$}=Object.prototype,{getPrototypeOf:ng}=Object,og=(e=>t=>{const r=K$.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bo=e=>(e=e.toLowerCase(),t=>og(t)===e),Sf=e=>t=>typeof t===e,{isArray:is}=Array,Vc=Sf("undefined");function tH(e){return e!==null&&!Vc(e)&&e.constructor!==null&&!Vc(e.constructor)&&ia(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const G$=Bo("ArrayBuffer");function rH(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&G$(e.buffer),t}const nH=Sf("string"),ia=Sf("function"),J$=Sf("number"),ig=e=>e!==null&&typeof e=="object",oH=e=>e===!0||e===!1,_f=e=>{if(og(e)!=="object")return!1;const t=ng(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},iH=Bo("Date"),aH=Bo("File"),sH=Bo("Blob"),cH=Bo("FileList"),lH=e=>ig(e)&&ia(e.pipe),uH=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||K$.call(e)===t||ia(e.toString)&&e.toString()===t)},dH=Bo("URLSearchParams"),fH=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),is(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(n=0;n<a;n++)s=i[n],t.call(null,e[s],s,e)}}function Y$(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const X$=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Q$=e=>!Vc(e)&&e!==X$;function ag(){const{caseless:e}=Q$(this)&&this||{},t={},r=(n,o)=>{const i=e&&Y$(t,o)||o;_f(t[i])&&_f(n)?t[i]=ag(t[i],n):_f(n)?t[i]=ag({},n):is(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Hc(arguments[n],r);return t}const pH=(e,t,r,{allOwnKeys:n}={})=>(Hc(t,(o,i)=>{r&&ia(o)?e[i]=W$(o,r):e[i]=o},{allOwnKeys:n}),e),hH=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mH=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},yH=(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=r!==!1&&ng(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},gH=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},vH=e=>{if(!e)return null;if(is(e))return e;let t=e.length;if(!J$(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},bH=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ng(Uint8Array)),wH=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},xH=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},SH=Bo("HTMLFormElement"),_H=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),eO=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),EH=Bo("RegExp"),tO=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Hc(r,(o,i)=>{t(o,i,e)!==!1&&(n[i]=o)}),Object.defineProperties(e,n)},ue={isArray:is,isArrayBuffer:G$,isBuffer:tH,isFormData:uH,isArrayBufferView:rH,isString:nH,isNumber:J$,isBoolean:oH,isObject:ig,isPlainObject:_f,isUndefined:Vc,isDate:iH,isFile:aH,isBlob:sH,isRegExp:EH,isFunction:ia,isStream:lH,isURLSearchParams:dH,isTypedArray:bH,isFileList:cH,forEach:Hc,merge:ag,extend:pH,trim:fH,stripBOM:hH,inherits:mH,toFlatObject:yH,kindOf:og,kindOfTest:Bo,endsWith:gH,toArray:vH,forEachEntry:wH,matchAll:xH,isHTMLForm:SH,hasOwnProperty:eO,hasOwnProp:eO,reduceDescriptors:tO,freezeMethods:e=>{tO(e,(t,r)=>{if(ia(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ia(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return is(e)?n(e):n(String(e).split(t)),r},toCamelCase:_H,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Y$,global:X$,isContextDefined:Q$,toJSONObject:e=>{const t=new Array(10),r=(n,o)=>{if(ig(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=is(n)?[]:{};return Hc(n,(a,s)=>{const c=r(a,o+1);!Vc(c)&&(i[s]=c)}),t[o]=void 0,i}}return n};return r(e,0)}};function It(e,t,r,n,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),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}ue.inherits(It,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:ue.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const rO=It.prototype,nO={};["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=>{nO[e]={value:e}}),Object.defineProperties(It,nO),Object.defineProperty(rO,"isAxiosError",{value:!0}),It.from=(e,t,r,n,o,i)=>{const a=Object.create(rO);return ue.toFlatObject(e,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),It.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var kH=typeof self=="object"?self.FormData:window.FormData;const TH=St(kH);function sg(e){return ue.isPlainObject(e)||ue.isArray(e)}function oO(e){return ue.endsWith(e,"[]")?e.slice(0,-2):e}function iO(e,t,r){return e?e.concat(t).map(function(o,i){return o=oO(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function $H(e){return ue.isArray(e)&&!e.some(sg)}const OH=ue.toFlatObject(ue,{},null,function(t){return/^is[A-Z]/.test(t)});function CH(e){return e&&ue.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Ef(e,t,r){if(!ue.isObject(e))throw new TypeError("target must be an object");t=t||new(TH||FormData),r=ue.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!ue.isUndefined(m[y])});const n=r.metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&CH(t);if(!ue.isFunction(o))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(ue.isDate(h))return h.toISOString();if(!c&&ue.isBlob(h))throw new It("Blob is not supported. Use a Buffer instead.");return ue.isArrayBuffer(h)||ue.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,y,m){let g=h;if(h&&!m&&typeof h=="object"){if(ue.endsWith(y,"{}"))y=n?y:y.slice(0,-2),h=JSON.stringify(h);else if(ue.isArray(h)&&$H(h)||ue.isFileList(h)||ue.endsWith(y,"[]")&&(g=ue.toArray(h)))return y=oO(y),g.forEach(function(b,x){!(ue.isUndefined(b)||b===null)&&t.append(a===!0?iO([y],x,i):a===null?y:y+"[]",l(b))}),!1}return sg(h)?!0:(t.append(iO(m,y,i),l(h)),!1)}const d=[],p=Object.assign(OH,{defaultVisitor:u,convertValue:l,isVisitable:sg});function f(h,y){if(!ue.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(h),ue.forEach(h,function(g,v){(!(ue.isUndefined(g)||g===null)&&o.call(t,g,ue.isString(v)?v.trim():v,y,p))===!0&&f(g,y?y.concat(v):[v])}),d.pop()}}if(!ue.isObject(e))throw new TypeError("data must be an object");return f(e),t}function aO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function cg(e,t){this._pairs=[],e&&Ef(e,this,t)}const sO=cg.prototype;sO.append=function(t,r){this._pairs.push([t,r])},sO.toString=function(t){const r=t?function(n){return t.call(this,n,aO)}:aO;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function AH(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function cO(e,t,r){if(!t)return e;const n=r&&r.encode||AH,o=r&&r.serialize;let i;if(o?i=o(t,r):i=ue.isURLSearchParams(t)?t.toString():new cg(t,r).toString(n),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class IH{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ue.forEach(this.handlers,function(n){n!==null&&t(n)})}}const lO=IH,uO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},RH=typeof URLSearchParams<"u"?URLSearchParams:cg,PH=FormData,NH=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),MH=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),mo={isBrowser:!0,classes:{URLSearchParams:RH,FormData:PH,Blob},isStandardBrowserEnv:NH,isStandardBrowserWebWorkerEnv:MH,protocols:["http","https","file","blob","url","data"]};function jH(e,t){return Ef(e,new mo.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return mo.isNode&&ue.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function DH(e){return ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function LH(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function dO(e){function t(r,n,o,i){let a=r[i++];const s=Number.isFinite(+a),c=i>=r.length;return a=!a&&ue.isArray(o)?o.length:a,c?(ue.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!s):((!o[a]||!ue.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],i)&&ue.isArray(o[a])&&(o[a]=LH(o[a])),!s)}if(ue.isFormData(e)&&ue.isFunction(e.entries)){const r={};return ue.forEachEntry(e,(n,o)=>{t(DH(n),o,r,0)}),r}return null}const FH={"Content-Type":void 0};function qH(e,t,r){if(ue.isString(e))try{return(t||JSON.parse)(e),ue.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const kf={transitional:uO,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=ue.isObject(t);if(i&&ue.isHTMLForm(t)&&(t=new FormData(t)),ue.isFormData(t))return o&&o?JSON.stringify(dO(t)):t;if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t))return t;if(ue.isArrayBufferView(t))return t.buffer;if(ue.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jH(t,this.formSerializer).toString();if((s=ue.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ef(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),qH(t)):t}],transformResponse:[function(t){const r=this.transitional||kf.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&ue.isString(t)&&(n&&!this.responseType||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?It.from(s,It.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mo.classes.FormData,Blob:mo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ue.forEach(["delete","get","head"],function(t){kf.headers[t]={}}),ue.forEach(["post","put","patch"],function(t){kf.headers[t]=ue.merge(FH)});const lg=kf,BH=ue.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"]),UH=e=>{const t={};let r,n,o;return e&&e.split(`
130
+ `))}function c(f,h,y,m){const g=y.enter("tableCell"),v=y.enter("phrasing"),b=y.containerPhrasing(f,{...m,before:i,after:i});return v(),g(),b}function l(f,h){return C9(f,{align:h,alignDelimiters:n,padding:r,stringLength:o})}function u(f,h,y){const m=f.children;let g=-1;const v=[],b=h.enter("table");for(;++g<m.length;)v[g]=d(m[g],h,y);return b(),v}function d(f,h,y){const m=f.children;let g=-1;const v=[],b=h.enter("tableRow");for(;++g<m.length;)v[g]=c(m[g],f,h,y);return b(),v}function p(f,h,y){let m=XT.inlineCode(f,h,y);return y.stack.includes("tableCell")&&(m=m.replace(/\|/g,"\\$&")),m}}function g7(){return{exit:{taskListCheckValueChecked:e$,taskListCheckValueUnchecked:e$,paragraph:b7}}}function v7(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:w7}}}function e$(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function b7(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function w7(e,t,r,n){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);i&&s.move(a);let c=XT.listItem(e,t,r,{...n,...s.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(u){return u+a}}function x7(){return[XZ(),u9(),E9(),u7(),g7()]}function S7(e){return{extensions:[QZ(),d9(),k9(),y7(e),v7()]}}const _7={tokenize:C7,partial:!0},t$={tokenize:A7,partial:!0},r$={tokenize:I7,partial:!0},n$={tokenize:R7,partial:!0},E7={tokenize:P7,partial:!0},o$={tokenize:$7,previous:a$},i$={tokenize:O7,previous:s$},Fo={tokenize:T7,previous:c$},uo={};function k7(){return{text:uo}}let Xi=48;for(;Xi<123;)uo[Xi]=Fo,Xi++,Xi===58?Xi=65:Xi===91&&(Xi=97);uo[43]=Fo,uo[45]=Fo,uo[46]=Fo,uo[95]=Fo,uo[72]=[Fo,i$],uo[104]=[Fo,i$],uo[87]=[Fo,o$],uo[119]=[Fo,o$];function T7(e,t,r){const n=this;let o,i;return a;function a(d){return!Zy(d)||!c$.call(n,n.previous)||Vy(n.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Zy(d)?(e.consume(d),s):d===64?(e.consume(d),c):r(d)}function c(d){return d===46?e.check(E7,u,l)(d):d===45||d===95||Kr(d)?(i=!0,e.consume(d),c):u(d)}function l(d){return e.consume(d),o=!0,c}function u(d){return i&&o&&on(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):r(d)}}function $7(e,t,r){const n=this;return o;function o(a){return a!==87&&a!==119||!a$.call(n,n.previous)||Vy(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_7,e.attempt(t$,e.attempt(r$,i),r),r)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function O7(e,t,r){const n=this;let o="",i=!1;return a;function a(d){return(d===72||d===104)&&s$.call(n,n.previous)&&!Vy(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):r(d)}function s(d){if(on(d)&&o.length<5)return o+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(d),c}return r(d)}function c(d){return d===47?(e.consume(d),i?l:(i=!0,c)):r(d)}function l(d){return d===null||zd(d)||zt(d)||Yi(d)||Zd(d)?r(d):e.attempt(t$,e.attempt(r$,u),r)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function C7(e,t,r){let n=0;return o;function o(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),o):a===46&&n===3?(e.consume(a),i):r(a)}function i(a){return a===null?r(a):t(a)}}function A7(e,t,r){let n,o,i;return a;function a(l){return l===46||l===95?e.check(n$,c,s)(l):l===null||zt(l)||Yi(l)||l!==45&&Zd(l)?c(l):(i=!0,e.consume(l),a)}function s(l){return l===95?n=!0:(o=n,n=void 0),e.consume(l),a}function c(l){return o||n||!i?r(l):t(l)}}function I7(e,t){let r=0,n=0;return o;function o(a){return a===40?(r++,e.consume(a),o):a===41&&n<r?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(n$,t,i)(a):a===null||zt(a)||Yi(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&n++,e.consume(a),o}}function R7(e,t,r){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||zt(s)||Yi(s)?t(s):r(s)}function o(s){return s===null||s===40||s===91||zt(s)||Yi(s)?t(s):n(s)}function i(s){return on(s)?a(s):r(s)}function a(s){return s===59?(e.consume(s),n):on(s)?(e.consume(s),a):r(s)}}function P7(e,t,r){return n;function n(i){return e.consume(i),o}function o(i){return Kr(i)?r(i):t(i)}}function a$(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||zt(e)}function s$(e){return!on(e)}function c$(e){return!(e===47||Zy(e))}function Zy(e){return e===43||e===45||e===46||e===95||Kr(e)}function Vy(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const N7={tokenize:U7,partial:!0};function M7(){return{document:{91:{tokenize:F7,continuation:{tokenize:q7},exit:B7}},text:{91:{tokenize:L7},93:{add:"after",tokenize:j7,resolveTo:D7}}}}function j7(e,t,r){const n=this;let o=n.events.length;const i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;o--;){const c=n.events[o][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!a||!a._balanced)return r(c);const l=Gn(n.sliceSerialize({start:a.end,end:n.now()}));return l.codePointAt(0)!==94||!i.includes(l.slice(1))?r(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function D7(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function L7(e,t,r){const n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?r(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(i>999||d===93&&!a||d===null||d===91||zt(d))return r(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Gn(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(d)}return zt(d)||(a=!0),i++,e.consume(d),d===92?u:l}function u(d){return d===91||d===92||d===93?(e.consume(d),i++,l):l(d)}}function F7(e,t,r){const n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i,a=0,s;return c;function c(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):r(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||zt(h))return r(h);if(h===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=Gn(n.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return zt(h)||(s=!0),a++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),Ct(e,f,"gfmFootnoteDefinitionWhitespace")):r(h)}function f(h){return t(h)}}function q7(e,t,r){return e.check(Mc,t,e.attempt(N7,t,r))}function B7(e){e.exit("gfmFootnoteDefinition")}function U7(e,t,r){const n=this;return Ct(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):r(i)}}function z7(e){let r=(e||{}).singleTilde;const n={tokenize:i,resolveAll:o};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function o(a,s){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let l=c;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[c][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[c][1].end)},d={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[c][1].start)},p=[["enter",u,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&vn(p,p.length,0,Hd(f,a.slice(l+1,c),s)),vn(p,p.length,0,[["exit",d,s],["enter",a[c][1],s],["exit",a[c][1],s],["exit",u,s]]),vn(a,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,s,c){const l=this.previous,u=this.events;let d=0;return p;function p(h){return l===126&&u[u.length-1][1].type!=="characterEscape"?c(h):(a.enter("strikethroughSequenceTemporary"),f(h))}function f(h){const y=Vd(l);if(h===126)return d>1?c(h):(a.consume(h),d++,f);if(d<2&&!r)return c(h);const m=a.exit("strikethroughSequenceTemporary"),g=Vd(h);return m._open=!g||g===2&&!!y,m._close=!y||y===2&&!!g,s(h)}}}class Z7{constructor(){this.map=[]}add(t,r,n){V7(this,t,r,n)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push([...t]),t.length=0;let o=n.pop();for(;o;)t.push(...o),o=n.pop();this.map.length=0}}function V7(e,t,r,n){let o=0;if(!(r===0&&n.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=r,e.map[o][2].push(...n);return}o+=1}e.map.push([t,r,n])}}function H7(e,t){let r=!1;const n=[];for(;t<e.length;){const o=e[t];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=n.length-1;n[i]=n[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function W7(){return{flow:{null:{tokenize:K7,resolveAll:G7}}}}function K7(e,t,r){const n=this;let o=0,i=0,a;return s;function s(A){let L=n.events.length-1;for(;L>-1;){const B=n.events[L][1].type;if(B==="lineEnding"||B==="linePrefix")L--;else break}const K=L>-1?n.events[L][1].type:null,z=K==="tableHead"||K==="tableRow"?S:c;return z===S&&n.parser.lazy[n.now().line]?r(A):z(A)}function c(A){return e.enter("tableHead"),e.enter("tableRow"),l(A)}function l(A){return A===124||(a=!0,i+=1),u(A)}function u(A){return A===null?r(A):et(A)?i>1?(i=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),f):r(A):xt(A)?Ct(e,u,"whitespace")(A):(i+=1,a&&(a=!1,o+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),d(A)))}function d(A){return A===null||A===124||zt(A)?(e.exit("data"),u(A)):(e.consume(A),A===92?p:d)}function p(A){return A===92||A===124?(e.consume(A),d):d(A)}function f(A){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(A):(e.enter("tableDelimiterRow"),a=!1,xt(A)?Ct(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):h(A))}function h(A){return A===45||A===58?m(A):A===124?(a=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),y):w(A)}function y(A){return xt(A)?Ct(e,m,"whitespace")(A):m(A)}function m(A){return A===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),g):A===45?(i+=1,g(A)):A===null||et(A)?x(A):w(A)}function g(A){return A===45?(e.enter("tableDelimiterFiller"),v(A)):w(A)}function v(A){return A===45?(e.consume(A),v):A===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(A))}function b(A){return xt(A)?Ct(e,x,"whitespace")(A):x(A)}function x(A){return A===124?h(A):A===null||et(A)?!a||o!==i?w(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):w(A)}function w(A){return r(A)}function S(A){return e.enter("tableRow"),C(A)}function C(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),C):A===null||et(A)?(e.exit("tableRow"),t(A)):xt(A)?Ct(e,C,"whitespace")(A):(e.enter("data"),I(A))}function I(A){return A===null||A===124||zt(A)?(e.exit("data"),C(A)):(e.consume(A),A===92?P:I)}function P(A){return A===92||A===124?(e.consume(A),I):I(A)}}function G7(e,t){let r=-1,n=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,c=0,l,u,d;const p=new Z7;for(;++r<e.length;){const f=e[r],h=f[1];f[0]==="enter"?h.type==="tableHead"?(s=!1,c!==0&&(l$(p,t,c,l,u),u=void 0,c=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(n=!0,d=void 0,i=[0,0,0,0],a=[0,r+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],d=of(p,t,i,o,void 0,d),i=[0,0,0,0]),a[2]=r)):h.type==="tableCellDivider"&&(n?n=!1:(i[1]!==0&&(a[0]=a[1],d=of(p,t,i,o,void 0,d)),i=a,a=[i[1],r,0,0])):h.type==="tableHead"?(s=!0,c=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(c=r,i[1]!==0?(a[0]=a[1],d=of(p,t,i,o,r,d)):a[1]!==0&&(d=of(p,t,a,o,r,d)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(c!==0&&l$(p,t,c,l,u),p.consume(t.events),r=-1;++r<t.events.length;){const f=t.events[r];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=H7(t.events,r))}return e}function of(e,t,r,n,o,i){const a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(i.end=Object.assign({},Ga(t.events,r[0])),e.add(r[0],0,[["exit",i,t]]));const c=Ga(t.events,r[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(r[1],0,[["enter",i,t]]),r[2]!==0){const l=Ga(t.events,r[2]),u=Ga(t.events,r[3]),d={type:s,start:Object.assign({},l),end:Object.assign({},u)};if(e.add(r[2],0,[["enter",d,t]]),n!==2){const p=t.events[r[2]],f=t.events[r[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){const h=r[2]+1,y=r[3]-r[2]-1;e.add(h,y,[])}}e.add(r[3]+1,0,[["exit",d,t]])}return o!==void 0&&(i.end=Object.assign({},Ga(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function l$(e,t,r,n,o){const i=[],a=Ga(t.events,r);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),n.end=Object.assign({},a),i.push(["exit",n,t]),e.add(r+1,0,i)}function Ga(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const J7={tokenize:X7};function Y7(){return{text:{91:J7}}}function X7(e,t,r){const n=this;return o;function o(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return zt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):r(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(c)}function s(c){return et(c)?t(c):xt(c)?e.check({tokenize:Q7},t,r)(c):r(c)}}function Q7(e,t,r){return Ct(e,n,"whitespace");function n(o){return o===null?r(o):t(o)}}function e8(e){return Lk([k7(),M7(),z7(e),W7(),Y7()])}const t8={};function r8(e){const t=this,r=e||t8,n=t.data(),o=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);o.push(e8(r)),i.push(x7()),a.push(S7(r))}const Ht={container:{className:"bpContainer"},modal:{container:{className:"bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpModalDialogContainer"},title:{container:{className:"bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpHeaderContainer"},content:{container:{className:"bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpComposerUploadButtonContainer"}}},messageList:{scrollbar:{container:{className:"bpMessageListScrollbarContainer"},viewport:{className:"bpMessageListScrollbarViewport"},background:{className:"bpMessageListScrollbarBackground"},thumb:{className:"bpMessageListScrollbarThumb"},corner:{className:"bpMessageListScrollbarCorner"}},scrollDownButton:{container:{className:"bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}}},message:{container:{className:"bpMessageContainer"},avatar:{container:{className:"bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},n8=({text:e})=>{const{message:{blocks:{text:t}}}=Ht,r={h1:({node:n,...o})=>J.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:n,...o})=>J.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:n,...o})=>J.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:n,...o})=>J.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:n,...o})=>J.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:n,...o})=>J.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:n,...o})=>J.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:n,...o})=>J.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:n,...o})=>J.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:n,...o})=>J.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:n,...o})=>J.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:n,...o})=>J.jsx("br",{...o,...t==null?void 0:t.lineBreak}),img:()=>null,pre:({node:n,...o})=>J.jsx("pre",{...o,...t==null?void 0:t.pre})};return J.jsx(zZ,{components:r,remarkPlugins:[r8,YZ],children:e})},o8=(e,t,r=120)=>{$.useEffect(()=>{if(e){e.style.height="0px";const n=t?Math.min(e.scrollHeight,r):20;e.style.height=`${n}px`}},[e,t])};var u$={},Hy={},d$={};Object.defineProperty(d$,"__esModule",{value:!0});var af={},i8=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(af,"__esModule",{value:!0}),af.Emitter=void 0;let a8=class{constructor(){this.listeners={}}on(t,r,n=!1){const o=this.listeners[t];o?n?o.unshift(r):o.push(r):this.listeners[t]=[r]}emit(t,r){return i8(this,void 0,void 0,function*(){const n=this.listeners[t];if(n!=null&&n.length){for(const o of n)yield o(r);return!0}else return!1})}};af.Emitter=a8;var f$={};Object.defineProperty(f$,"__esModule",{value:!0});var p$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HealthEventType=void 0,function(t){t.Create="create",t.Configure="configure",t.Start="start",t.StartFailure="start-failure",t.Initialize="initialize",t.InitializeFailure="initialize-failure",t.Sleep="sleep",t.Delete="delete"}(e.HealthEventType||(e.HealthEventType={}))})(p$);var h$={};Object.defineProperty(h$,"__esModule",{value:!0});var m$={};Object.defineProperty(m$,"__esModule",{value:!0});var y$={};Object.defineProperty(y$,"__esModule",{value:!0});var g$={};Object.defineProperty(g$,"__esModule",{value:!0}),function(e){var t=We&&We.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i),Object.defineProperty(n,a,{enumerable:!0,get:function(){return o[i]}})}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=We&&We.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(d$,e),r(af,e),r(f$,e),r(p$,e),r(h$,e),r(m$,e),r(y$,e),r(g$,e)}(Hy);var sf={},v$={},Wy={exports:{}},cf={},Ky={},lf={},Fc={},Ja={},Qi={},Ya={},Xa={},fo={};Object.defineProperty(fo,"__esModule",{value:!0}),fo.ERROR_PACKET=fo.PACKET_TYPES_REVERSE=fo.PACKET_TYPES=void 0;const po=Object.create(null);fo.PACKET_TYPES=po,po.open="0",po.close="1",po.ping="2",po.pong="3",po.message="4",po.upgrade="5",po.noop="6";const b$=Object.create(null);fo.PACKET_TYPES_REVERSE=b$,Object.keys(po).forEach(e=>{b$[po[e]]=e});const s8={type:"error",data:"parser error"};fo.ERROR_PACKET=s8,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.encodePacket=Xa.encodePacketToBinary=void 0;const c8=fo,w$=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",x$=typeof ArrayBuffer=="function",S$=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,_$=({type:e,data:t},r,n)=>w$&&t instanceof Blob?r?n(t):E$(t,n):x$&&(t instanceof ArrayBuffer||S$(t))?r?n(t):E$(new Blob([t]),n):n(c8.PACKET_TYPES[e]+(t||""));Xa.encodePacket=_$;const E$=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function k$(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Gy;function l8(e,t){if(w$&&e.data instanceof Blob)return e.data.arrayBuffer().then(k$).then(t);if(x$&&(e.data instanceof ArrayBuffer||S$(e.data)))return t(k$(e.data));_$(e,!1,r=>{Gy||(Gy=new TextEncoder),t(Gy.encode(r))})}Xa.encodePacketToBinary=l8;var uf={},Qa={};Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.decode=Qa.encode=void 0;const es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<es.length;e++)qc[es.charCodeAt(e)]=e;const u8=e=>{let t=new Uint8Array(e),r,n=t.length,o="";for(r=0;r<n;r+=3)o+=es[t[r]>>2],o+=es[(t[r]&3)<<4|t[r+1]>>4],o+=es[(t[r+1]&15)<<2|t[r+2]>>6],o+=es[t[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o};Qa.encode=u8;const d8=e=>{let t=e.length*.75,r=e.length,n,o=0,i,a,s,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const l=new ArrayBuffer(t),u=new Uint8Array(l);for(n=0;n<r;n+=4)i=qc[e.charCodeAt(n)],a=qc[e.charCodeAt(n+1)],s=qc[e.charCodeAt(n+2)],c=qc[e.charCodeAt(n+3)],u[o++]=i<<2|a>>4,u[o++]=(a&15)<<4|s>>2,u[o++]=(s&3)<<6|c&63;return l};Qa.decode=d8,Object.defineProperty(uf,"__esModule",{value:!0}),uf.decodePacket=void 0;const df=fo,f8=Qa,p8=typeof ArrayBuffer=="function",h8=(e,t)=>{if(typeof e!="string")return{type:"message",data:T$(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:m8(e.substring(1),t)}:df.PACKET_TYPES_REVERSE[r]?e.length>1?{type:df.PACKET_TYPES_REVERSE[r],data:e.substring(1)}:{type:df.PACKET_TYPES_REVERSE[r]}:df.ERROR_PACKET};uf.decodePacket=h8;const m8=(e,t)=>{if(p8){const r=(0,f8.decode)(e);return T$(r,t)}else return{base64:!0,data:e}},T$=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=Xa;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const r=uf;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return r.decodePacket}});const n=fo,o=String.fromCharCode(30),i=(p,f)=>{const h=p.length,y=new Array(h);let m=0;p.forEach((g,v)=>{(0,t.encodePacket)(g,!1,b=>{y[v]=b,++m===h&&f(y.join(o))})})};e.encodePayload=i;const a=(p,f)=>{const h=p.split(o),y=[];for(let m=0;m<h.length;m++){const g=(0,r.decodePacket)(h[m],f);if(y.push(g),g.type==="error")break}return y};e.decodePayload=a;function s(){return new TransformStream({transform(p,f){(0,t.encodePacketToBinary)(p,h=>{const y=h.length;let m;if(y<126)m=new Uint8Array(1),new DataView(m.buffer).setUint8(0,y);else if(y<65536){m=new Uint8Array(3);const g=new DataView(m.buffer);g.setUint8(0,126),g.setUint16(1,y)}else{m=new Uint8Array(9);const g=new DataView(m.buffer);g.setUint8(0,127),g.setBigUint64(1,BigInt(y))}p.data&&typeof p.data!="string"&&(m[0]|=128),f.enqueue(m),f.enqueue(h)})}})}e.createPacketEncoderStream=s;let c;function l(p){return p.reduce((f,h)=>f+h.length,0)}function u(p,f){if(p[0].length===f)return p.shift();const h=new Uint8Array(f);let y=0;for(let m=0;m<f;m++)h[m]=p[0][y++],y===p[0].length&&(p.shift(),y=0);return p.length&&y<p[0].length&&(p[0]=p[0].slice(y)),h}function d(p,f){c||(c=new TextDecoder);const h=[];let y=0,m=-1,g=!1;return new TransformStream({transform(v,b){for(h.push(v);;){if(y===0){if(l(h)<1)break;const x=u(h,1);g=(x[0]&128)===128,m=x[0]&127,m<126?y=3:m===126?y=1:y=2}else if(y===1){if(l(h)<2)break;const x=u(h,2);m=new DataView(x.buffer,x.byteOffset,x.length).getUint16(0),y=3}else if(y===2){if(l(h)<8)break;const x=u(h,8),w=new DataView(x.buffer,x.byteOffset,x.length),S=w.getUint32(0);if(S>Math.pow(2,53-32)-1){b.enqueue(n.ERROR_PACKET);break}m=S*Math.pow(2,32)+w.getUint32(4),y=3}else{if(l(h)<m)break;const x=u(h,m);b.enqueue((0,r.decodePacket)(g?x:c.decode(x),f)),y=0}if(m===0||m>p){b.enqueue(n.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=d,e.protocol=4})(Ya);function an(e){if(e)return y8(e)}function y8(e){for(var t in an.prototype)e[t]=an.prototype[t];return e}an.prototype.on=an.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},an.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},an.prototype.off=an.prototype.removeListener=an.prototype.removeAllListeners=an.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},an.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,t)}return this},an.prototype.emitReserved=an.prototype.emit,an.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},an.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ts=Ih(Object.freeze(Object.defineProperty({__proto__:null,Emitter:an},Symbol.toStringTag,{value:"Module"})));var Nn={},ea={};Object.defineProperty(ea,"__esModule",{value:!0}),ea.globalThisShim=void 0,ea.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.byteLength=Nn.installTimerFunctions=Nn.pick=void 0;const pi=ea;function g8(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}Nn.pick=g8;const v8=pi.globalThisShim.setTimeout,b8=pi.globalThisShim.clearTimeout;function w8(e,t){t.useNativeTimers?(e.setTimeoutFn=v8.bind(pi.globalThisShim),e.clearTimeoutFn=b8.bind(pi.globalThisShim)):(e.setTimeoutFn=pi.globalThisShim.setTimeout.bind(pi.globalThisShim),e.clearTimeoutFn=pi.globalThisShim.clearTimeout.bind(pi.globalThisShim))}Nn.installTimerFunctions=w8;const x8=1.33;function S8(e){return typeof e=="string"?_8(e):Math.ceil((e.byteLength||e.size)*x8)}Nn.byteLength=S8;function _8(e){let t=0,r=0;for(let n=0,o=e.length;n<o;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}var Jy={exports:{}},Yy,$$;function E8(){if($$)return Yy;$$=1;var e=1e3,t=e*60,r=t*60,n=r*24,o=n*7,i=n*365.25;Yy=function(u,d){d=d||{};var p=typeof u;if(p==="string"&&u.length>0)return a(u);if(p==="number"&&isFinite(u))return d.long?c(u):s(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function a(u){if(u=String(u),!(u.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(d){var p=parseFloat(d[1]),f=(d[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return p*i;case"weeks":case"week":case"w":return p*o;case"days":case"day":case"d":return p*n;case"hours":case"hour":case"hrs":case"hr":case"h":return p*r;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function s(u){var d=Math.abs(u);return d>=n?Math.round(u/n)+"d":d>=r?Math.round(u/r)+"h":d>=t?Math.round(u/t)+"m":d>=e?Math.round(u/e)+"s":u+"ms"}function c(u){var d=Math.abs(u);return d>=n?l(u,d,n,"day"):d>=r?l(u,d,r,"hour"):d>=t?l(u,d,t,"minute"):d>=e?l(u,d,e,"second"):u+" ms"}function l(u,d,p,f){var h=d>=p*1.5;return Math.round(u/p)+" "+f+(h?"s":"")}return Yy}function k8(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=E8(),r.destroy=l,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let d=0;for(let p=0;p<u.length;p++)d=(d<<5)-d+u.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(u){let d,p=null,f,h;function y(...m){if(!y.enabled)return;const g=y,v=Number(new Date),b=v-(d||v);g.diff=b,g.prev=d,g.curr=v,d=v,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(S,C)=>{if(S==="%%")return"%";x++;const I=r.formatters[C];if(typeof I=="function"){const P=m[x];S=I.call(g,P),m.splice(x,1),x--}return S}),r.formatArgs.call(g,m),(g.log||r.log).apply(g,m)}return y.namespace=u,y.useColors=r.useColors(),y.color=r.selectColor(u),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(f!==r.namespaces&&(f=r.namespaces,h=r.enabled(u)),h),set:m=>{p=m}}),typeof r.init=="function"&&r.init(y),y}function n(u,d){const p=r(this.namespace+(typeof d>"u"?":":d)+u);return p.log=this.log,p}function o(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let d;const p=(typeof u=="string"?u:"").split(/[\s,]+/),f=p.length;for(d=0;d<f;d++)p[d]&&(u=p[d].replace(/\*/g,".*?"),u[0]==="-"?r.skips.push(new RegExp("^"+u.slice(1)+"$")):r.names.push(new RegExp("^"+u+"$")))}function i(){const u=[...r.names.map(s),...r.skips.map(s).map(d=>"-"+d)].join(",");return r.enable(""),u}function a(u){if(u[u.length-1]==="*")return!0;let d,p;for(d=0,p=r.skips.length;d<p;d++)if(r.skips[d].test(u))return!1;for(d=0,p=r.names.length;d<p;d++)if(r.names[d].test(u))return!0;return!1}function s(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var T8=k8;(function(e,t){t.formatArgs=n,t.save=o,t.load=i,t.useColors=r,t.storage=a(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let u=0,d=0;c[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(u++,p==="%c"&&(d=u))}),c.splice(d,0,l)}t.log=console.debug||console.log||(()=>{});function o(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function i(){let c;try{c=t.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function a(){try{return localStorage}catch{}}e.exports=T8(t);const{formatters:s}=e.exports;s.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(Jy,Jy.exports);var ho=Jy.exports,ta={};Object.defineProperty(ta,"__esModule",{value:!0}),ta.decode=ta.encode=void 0;function $8(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}ta.encode=$8;function O8(e){let t={},r=e.split("&");for(let n=0,o=r.length;n<o;n++){let i=r[n].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}ta.decode=O8;var C8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.Transport=void 0;const A8=Ya,I8=ts,R8=Nn,P8=C8(ho),N8=ta,M8=(0,P8.default)("engine.io-client:transport");class j8 extends Error{constructor(t,r,n){super(t),this.description=r,this.context=n,this.type="TransportError"}}class D8 extends I8.Emitter{constructor(t){super(),this.writable=!1,(0,R8.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,r,n){return super.emitReserved("error",new j8(t,r,n)),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):M8("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=(0,A8.decodePacket)(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_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 r=(0,N8.encode)(t);return r.length?"?"+r:""}}Qi.Transport=D8;var qo={};Object.defineProperty(qo,"__esModule",{value:!0}),qo.yeast=qo.decode=qo.encode=void 0;const O$="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ff=64,C$={};let A$=0,hi=0,I$;function Xy(e){let t="";do t=O$[e%ff]+t,e=Math.floor(e/ff);while(e>0);return t}qo.encode=Xy;function L8(e){let t=0;for(hi=0;hi<e.length;hi++)t=t*ff+C$[e.charAt(hi)];return t}qo.decode=L8;function F8(){const e=Xy(+new Date);return e!==I$?(A$=0,I$=e):e+"."+Xy(A$++)}for(qo.yeast=F8;hi<ff;hi++)C$[O$[hi]]=hi;var rs={},pf={};Object.defineProperty(pf,"__esModule",{value:!0}),pf.hasCORS=void 0;let R$=!1;try{R$=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}pf.hasCORS=R$,Object.defineProperty(rs,"__esModule",{value:!0}),rs.createCookieJar=rs.XHR=void 0;const q8=pf,B8=ea;function U8(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||q8.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new B8.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}rs.XHR=U8;function z8(){}rs.createCookieJar=z8;var Z8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.Request=Ja.Polling=void 0;const V8=Qi,H8=Z8(ho),W8=qo,P$=Ya,Qy=rs,K8=ts,N$=Nn,G8=ea,ln=(0,H8.default)("engine.io-client:polling");function J8(){}const Y8=function(){return new Qy.XHR({xdomain:!1}).responseType!=null}();class X8 extends V8.Transport{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const n=location.protocol==="https:";let o=location.port;o||(o=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}const r=t&&t.forceBase64;this.supportsBinary=Y8&&!r,this.opts.withCredentials&&(this.cookieJar=(0,Qy.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const r=()=>{ln("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let n=0;this.polling&&(ln("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){ln("pre-pause polling complete"),--n||r()})),this.writable||(ln("we are currently writing - waiting to pause"),n++,this.once("drain",function(){ln("pre-pause writing complete"),--n||r()}))}else r()}poll(){ln("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){ln("polling got data %s",t);const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};(0,P$.decodePayload)(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():ln('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{ln("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(ln("transport open - closing"),t()):(ln("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,P$.encodePayload)(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=(0,W8.yeast)()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ra(this.uri(),t)}doWrite(t,r){const n=this.request({method:"POST",data:t});n.on("success",r),n.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){ln("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=t}}Ja.Polling=X8;let ra=class Ah extends K8.Emitter{constructor(t,r){super(),(0,N$.installTimerFunctions)(this,r),this.opts=r,this.method=r.method||"GET",this.uri=t,this.data=r.data!==void 0?r.data:null,this.create()}create(){var t;const r=(0,N$.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const n=this.xhr=new Qy.XHR(r);try{ln("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(n)),n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},ln("xhr data %s",this.data),n.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=Ah.requestsCount++,Ah.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=J8,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ah.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(Ja.Request=ra,ra.requestsCount=0,ra.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",M$);else if(typeof addEventListener=="function"){const e="onpagehide"in G8.globalThisShim?"pagehide":"unload";addEventListener(e,M$,!1)}}function M$(){for(let e in ra.requests)ra.requests.hasOwnProperty(e)&&ra.requests[e].abort()}var hf={},bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.defaultBinaryType=bn.usingBrowserWebSocket=bn.WebSocket=bn.nextTick=void 0;const j$=ea;bn.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0))(),bn.WebSocket=j$.globalThisShim.WebSocket||j$.globalThisShim.MozWebSocket,bn.usingBrowserWebSocket=!0,bn.defaultBinaryType="arraybuffer";var Q8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hf,"__esModule",{value:!0}),hf.WS=void 0;const eV=Qi,tV=qo,rV=Nn,mi=bn,nV=Q8(ho),oV=Ya,iV=(0,nV.default)("engine.io-client:websocket"),D$=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class aV extends eV.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),r=this.opts.protocols,n=D$?{}:(0,rV.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=mi.usingBrowserWebSocket&&!D$?r?new mi.WebSocket(t,r):new mi.WebSocket(t):new mi.WebSocket(t,r,n)}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 r=0;r<t.length;r++){const n=t[r],o=r===t.length-1;(0,oV.encodePacket)(n,this.supportsBinary,i=>{const a={};mi.usingBrowserWebSocket||(n.options&&(a.compress=n.options.compress),this.opts.perMessageDeflate&&(typeof i=="string"?Buffer.byteLength(i):i.length)<this.opts.perMessageDeflate.threshold&&(a.compress=!1));try{mi.usingBrowserWebSocket?this.ws.send(i):this.ws.send(i,a)}catch{iV("websocket closed before onclose event")}o&&(0,mi.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=(0,tV.yeast)()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!mi.WebSocket}}hf.WS=aV;var mf={},sV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mf,"__esModule",{value:!0}),mf.WT=void 0;const cV=Qi,lV=bn,L$=Ya,Bc=(0,sV(ho).default)("engine.io-client:webtransport");class uV extends cV.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{Bc("transport closed gracefully"),this.onClose()}).catch(t=>{Bc("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const r=(0,L$.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),o=(0,L$.createPacketEncoderStream)();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{n.read().then(({done:s,value:c})=>{if(s){Bc("session is closed");return}Bc("received chunk: %o",c),this.onPacket(c),i()}).catch(s=>{Bc("an error occurred while reading: %s",s)})};i();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],o=r===t.length-1;this.writer.write(n).then(()=>{o&&(0,lV.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}mf.WT=uV,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.transports=void 0;const dV=Ja,fV=hf,pV=mf;Fc.transports={websocket:fV.WS,webtransport:pV.WT,polling:dV.Polling};var Uc={};Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.parse=void 0;const hV=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mV=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yV(e){const t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let o=hV.exec(e||""),i={},a=14;for(;a--;)i[mV[a]]=o[a]||"";return r!=-1&&n!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=gV(i,i.path),i.queryKey=vV(i,i.query),i}Uc.parse=yV;function gV(e,t){const r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function vV(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,i){o&&(r[o]=i)}),r}var bV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lf,"__esModule",{value:!0}),lf.Socket=void 0;const wV=Fc,F$=Nn,xV=ta,q$=Uc,SV=bV(ho),_V=ts,B$=Ya,EV=bn,tr=(0,SV.default)("engine.io-client:socket");let U$=class Zs extends _V.Emitter{constructor(t,r={}){super(),this.binaryType=EV.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=(0,q$.parse)(t),r.hostname=t.host,r.secure=t.protocol==="https"||t.protocol==="wss",r.port=t.port,t.query&&(r.query=t.query)):r.host&&(r.hostname=(0,q$.parse)(r.host).host),(0,F$.installTimerFunctions)(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,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},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,xV.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(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"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){tr('creating transport "%s"',t);const r=Object.assign({},this.opts.query);r.EIO=B$.protocol,r.transport=t,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return tr("options: %j",n),new wV.transports[t](n)}open(){let t;if(this.opts.rememberUpgrade&&Zs.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(r){tr("error while creating transport: %s",r),this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){tr("setting transport %s",t.name),this.transport&&(tr("clearing existing transport %s",this.transport.name),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",r=>this.onClose("transport close",r))}probe(t){tr('probing transport "%s"',t);let r=this.createTransport(t),n=!1;Zs.priorWebsocketSuccess=!1;const o=()=>{n||(tr('probe transport "%s" opened',t),r.send([{type:"ping",data:"probe"}]),r.once("packet",d=>{if(!n)if(d.type==="pong"&&d.data==="probe"){if(tr('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Zs.priorWebsocketSuccess=r.name==="websocket",tr('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{n||this.readyState!=="closed"&&(tr("changing transport and sending upgrade packet"),u(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{tr('probe transport "%s" failed',t);const p=new Error("probe error");p.transport=r.name,this.emitReserved("upgradeError",p)}}))};function i(){n||(n=!0,u(),r.close(),r=null)}const a=d=>{const p=new Error("probe error: "+d);p.transport=r.name,i(),tr('probe transport "%s" failed because of error: %s',t,d),this.emitReserved("upgradeError",p)};function s(){a("transport closed")}function c(){a("socket closed")}function l(d){r&&d.name!==r.name&&(tr('"%s" works - aborting "%s"',d.name,r.name),i())}const u=()=>{r.removeListener("open",o),r.removeListener("error",a),r.removeListener("close",s),this.off("close",c),this.off("upgrading",l)};r.once("open",o),r.once("error",a),r.once("close",s),this.once("close",c),this.once("upgrading",l),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onOpen(){if(tr("socket open"),this.readyState="open",Zs.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){tr("starting upgrade probes");let t=0;const r=this.upgrades.length;for(;t<r;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(tr('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const r=new Error("server error");r.code=t.data,this.onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}else tr('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),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();tr("flushing %d packets in socket",t.length),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 r=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(r+=(0,F$.byteLength)(o)),n>0&&r>this.maxPayload)return tr("only send %d out of %d packets",n,this.writeBuffer.length),this.writeBuffer.slice(0,n);r+=2}return tr("payload size is %d (max: %d)",r,this.maxPayload),this.writeBuffer}write(t,r,n){return this.sendPacket("message",t,r,n),this}send(t,r,n){return this.sendPacket("message",t,r,n),this}sendPacket(t,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const i={type:t,data:r,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),tr("socket closing - telling transport to close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}onError(t){tr("socket error %j",t),Zs.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,r){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(tr('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const r=[];let n=0;const o=t.length;for(;n<o;n++)~this.transports.indexOf(t[n])&&r.push(t[n]);return r}};lf.Socket=U$,U$.protocol=B$.protocol,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=lf;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var r=Qi;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return r.Transport}});var n=Fc;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return n.transports}});var o=Nn;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=Uc;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var a=bn;Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return a.nextTick}})}(Ky);var kV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cf,"__esModule",{value:!0}),cf.url=void 0;const TV=Ky,z$=kV(ho).default("socket.io-client:url");function $V(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(z$("protocol-less url %s",e),typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),z$("parse %s",e),n=TV.parse(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}cf.url=$V;var yf={},zc={},gf={},ns={},na={};Object.defineProperty(na,"__esModule",{value:!0}),na.hasBinary=na.isBinary=void 0;const OV=typeof ArrayBuffer=="function",CV=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Z$=Object.prototype.toString,AV=typeof Blob=="function"||typeof Blob<"u"&&Z$.call(Blob)==="[object BlobConstructor]",IV=typeof File=="function"||typeof File<"u"&&Z$.call(File)==="[object FileConstructor]";function V$(e){return OV&&(e instanceof ArrayBuffer||CV(e))||AV&&e instanceof Blob||IV&&e instanceof File}na.isBinary=V$;function vf(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(vf(e[r]))return!0;return!1}if(V$(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vf(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&vf(e[r]))return!0;return!1}na.hasBinary=vf,Object.defineProperty(ns,"__esModule",{value:!0}),ns.reconstructPacket=ns.deconstructPacket=void 0;const RV=na;function PV(e){const t=[],r=e.data,n=e;return n.data=eg(r,t),n.attachments=t.length,{packet:n,buffers:t}}ns.deconstructPacket=PV;function eg(e,t){if(!e)return e;if((0,RV.isBinary)(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=eg(e[n],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=eg(e[n],t));return r}return e}function NV(e,t){return e.data=tg(e.data,t),delete e.attachments,e}ns.reconstructPacket=NV;function tg(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 r=0;r<e.length;r++)e[r]=tg(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=tg(e[r],t));return e}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=ts,r=ns,n=na,i=(0,ho.default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var s;(function(p){p[p.CONNECT=0]="CONNECT",p[p.DISCONNECT=1]="DISCONNECT",p[p.EVENT=2]="EVENT",p[p.ACK=3]="ACK",p[p.CONNECT_ERROR=4]="CONNECT_ERROR",p[p.BINARY_EVENT=5]="BINARY_EVENT",p[p.BINARY_ACK=6]="BINARY_ACK"})(s=e.PacketType||(e.PacketType={}));class c{constructor(f){this.replacer=f}encode(f){return i("encoding packet %j",f),(f.type===s.EVENT||f.type===s.ACK)&&(0,n.hasBinary)(f)?this.encodeAsBinary({type:f.type===s.EVENT?s.BINARY_EVENT:s.BINARY_ACK,nsp:f.nsp,data:f.data,id:f.id}):[this.encodeAsString(f)]}encodeAsString(f){let h=""+f.type;return(f.type===s.BINARY_EVENT||f.type===s.BINARY_ACK)&&(h+=f.attachments+"-"),f.nsp&&f.nsp!=="/"&&(h+=f.nsp+","),f.id!=null&&(h+=f.id),f.data!=null&&(h+=JSON.stringify(f.data,this.replacer)),i("encoded %j as %s",f,h),h}encodeAsBinary(f){const h=(0,r.deconstructPacket)(f),y=this.encodeAsString(h.packet),m=h.buffers;return m.unshift(y),m}}e.Encoder=c;function l(p){return Object.prototype.toString.call(p)==="[object Object]"}class u extends t.Emitter{constructor(f){super(),this.reviver=f}add(f){let h;if(typeof f=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(f);const y=h.type===s.BINARY_EVENT;y||h.type===s.BINARY_ACK?(h.type=y?s.EVENT:s.ACK,this.reconstructor=new d(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if((0,n.isBinary)(f)||f.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(f),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+f)}decodeString(f){let h=0;const y={type:Number(f.charAt(0))};if(s[y.type]===void 0)throw new Error("unknown packet type "+y.type);if(y.type===s.BINARY_EVENT||y.type===s.BINARY_ACK){const g=h+1;for(;f.charAt(++h)!=="-"&&h!=f.length;);const v=f.substring(g,h);if(v!=Number(v)||f.charAt(h)!=="-")throw new Error("Illegal attachments");y.attachments=Number(v)}if(f.charAt(h+1)==="/"){const g=h+1;for(;++h&&!(f.charAt(h)===","||h===f.length););y.nsp=f.substring(g,h)}else y.nsp="/";const m=f.charAt(h+1);if(m!==""&&Number(m)==m){const g=h+1;for(;++h;){const v=f.charAt(h);if(v==null||Number(v)!=v){--h;break}if(h===f.length)break}y.id=Number(f.substring(g,h+1))}if(f.charAt(++h)){const g=this.tryParse(f.substr(h));if(u.isPayloadValid(y.type,g))y.data=g;else throw new Error("invalid payload")}return i("decoded %s as %j",f,y),y}tryParse(f){try{return JSON.parse(f,this.reviver)}catch{return!1}}static isPayloadValid(f,h){switch(f){case s.CONNECT:return l(h);case s.DISCONNECT:return h===void 0;case s.CONNECT_ERROR:return typeof h=="string"||l(h);case s.EVENT:case s.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&a.indexOf(h[0])===-1);case s.ACK:case s.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class d{constructor(f){this.packet=f,this.buffers=[],this.reconPack=f}takeBinaryData(f){if(this.buffers.push(f),this.buffers.length===this.reconPack.attachments){const h=(0,r.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}})(gf);var Zc={};Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.on=void 0;function MV(e,t,r){return e.on(t,r),function(){e.off(t,r)}}Zc.on=MV;var jV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zc,"__esModule",{value:!0}),zc.Socket=void 0;const Jn=gf,bf=Zc,DV=ts,br=jV(ho).default("socket.io-client:socket"),LV=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class FV extends DV.Emitter{constructor(t,r,n){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=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[bf.on(t,"open",this.onopen.bind(this)),bf.on(t,"packet",this.onpacket.bind(this)),bf.on(t,"error",this.onerror.bind(this)),bf.on(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,...r){if(LV.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const n={type:Jn.PacketType.EVENT,data:r};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const a=this.ids++;br("emitting packet with ack id %d",a);const s=r.pop();this._registerAckCallback(a,s),n.id=a}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)?br("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n),this.flags={},this}_registerAckCallback(t,r){var n;const o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[t]=r;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&(br("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));br("event with ack id %d has timed out after %d ms",t,o),r.call(this,new Error("operation has timed out"))},o);this.acks[t]=(...a)=>{this.io.clearTimeoutFn(i),r.apply(this,[null,...a])}}emitWithAck(t,...r){const n=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,i)=>{r.push((a,s)=>n?a?i(a):o(s):o(a)),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>n!==this._queue[0]?void 0:(o!==null?n.tryCount>this._opts.retries&&(br("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),r&&r(o)):(br("packet [%d] was successfully sent",n.id),this._queue.shift(),r&&r(null,...i)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(br("draining queue"),!this.connected||this._queue.length===0)return;const r=this._queue[0];if(r.pending&&!t){br("packet [%d] has already been sent and is waiting for an ack",r.id);return}r.pending=!0,r.tryCount++,br("sending packet [%d] (try n°%d)",r.id,r.tryCount),this.flags=r.flags,this.emit.apply(this,r.args)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){br("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Jn.PacketType.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,r){br("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Jn.PacketType.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 Jn.PacketType.EVENT:case Jn.PacketType.BINARY_EVENT:this.onevent(t);break;case Jn.PacketType.ACK:case Jn.PacketType.BINARY_ACK:this.onack(t);break;case Jn.PacketType.DISCONNECT:this.ondisconnect();break;case Jn.PacketType.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const r=t.data||[];br("emitting event %j",r),t.id!=null&&(br("attaching ack callback to event"),r.push(this.ack(t.id))),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.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 r=this;let n=!1;return function(...o){n||(n=!0,br("sending ack %j",o),r.packet({type:Jn.PacketType.ACK,id:t,data:o}))}}onack(t){const r=this.acks[t.id];typeof r=="function"?(br("calling ack %s with %j",t.id,t.data),r.apply(this,t.data),delete this.acks[t.id]):br("bad ack %s",t.id)}onconnect(t,r){br("socket connected with id %s",t),this.id=t,this.recovered=r&&this._pid===r,this._pid=r,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(){br("server disconnect (%s)",this.nsp),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&&(br("performing disconnect (%s)",this.nsp),this.packet({type:Jn.PacketType.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 r=this._anyListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,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 r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,t.data)}}}zc.Socket=FV;var wf={};Object.defineProperty(wf,"__esModule",{value:!0}),wf.Backoff=void 0;function os(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}wf.Backoff=os,os.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0},os.prototype.reset=function(){this.attempts=0},os.prototype.setMin=function(e){this.ms=e},os.prototype.setMax=function(e){this.max=e},os.prototype.setJitter=function(e){this.jitter=e};var qV=We&&We.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),BV=We&&We.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),UV=We&&We.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&qV(t,e,r);return BV(t,e),t},zV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yf,"__esModule",{value:!0}),yf.Manager=void 0;const rg=Ky,ZV=zc,VV=UV(gf),oa=Zc,HV=wf,WV=ts,Lr=zV(ho).default("socket.io-client:manager");class KV extends WV.Emitter{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,rg.installTimerFunctions(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new HV.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const o=r.parser||VV;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.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(Lr("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;Lr("opening %s",this.uri),this.engine=new rg.Socket(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=oa.on(r,"open",function(){n.onopen(),t&&t()}),i=s=>{Lr("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=oa.on(r,"error",i);if(this._timeout!==!1){const s=this._timeout;Lr("connect attempt will timeout after %d",s);const c=this.setTimeoutFn(()=>{Lr("connect attempt timed out after %d",s),o(),i(new Error("timeout")),r.close()},s);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){Lr("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(oa.on(t,"ping",this.onping.bind(this)),oa.on(t,"data",this.ondata.bind(this)),oa.on(t,"error",this.onerror.bind(this)),oa.on(t,"close",this.onclose.bind(this)),oa.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){rg.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){Lr("error",t),this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new ZV.Socket(this,t,r),this.nsps[t]=n),n}_destroy(t){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active){Lr("socket %s is still active, skipping close",n);return}this._close()}_packet(t){Lr("writing packet %j",t);const r=this.encoder.encode(t);for(let n=0;n<r.length;n++)this.engine.write(r[n],t.options)}cleanup(){Lr("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){Lr("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,r){Lr("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)Lr("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();Lr("will wait %dms before reconnect attempt",r),this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(Lr("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(Lr("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):(Lr("reconnect success"),t.onreconnect())}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}yf.Manager=KV,function(e,t){var r=We&&We.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const n=cf,o=yf;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=zc;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const s=r(ho).default("socket.io-client"),c={};function l(d,p){typeof d=="object"&&(p=d,d=void 0),p=p||{};const f=n.url(d,p.path||"/socket.io"),h=f.source,y=f.id,m=f.path,g=c[y]&&m in c[y].nsps,v=p.forceNew||p["force new connection"]||p.multiplex===!1||g;let b;return v?(s("ignoring socket cache for %s",h),b=new o.Manager(h,p)):(c[y]||(s("new io instance for %s",h),c[y]=new o.Manager(h,p)),b=c[y]),f.query&&!p.query&&(p.query=f.queryKey),b.socket(f.path,p)}t.io=l,t.connect=l,t.default=l,Object.assign(l,{Manager:o.Manager,Socket:i.Socket,io:l,connect:l});var u=gf;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=l}(Wy,Wy.exports);var GV=Wy.exports;(function(e){var t=We&&We.__awaiter||function(c,l,u,d){function p(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function y(v){try{g(d.next(v))}catch(b){h(b)}}function m(v){try{g(d.throw(v))}catch(b){h(b)}}function g(v){v.done?f(v.value):p(v.value).then(y,m)}g((d=d.apply(c,l||[])).next())})},r=We&&We.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocketComEmitter=e.SocketComEvents=e.SocketCom=void 0;const n=Hy,o=r(GV);class i{constructor(l){this.url=l,this.pending={},this.emitter=new s,this.events=this.emitter}connect(l,u){return t(this,void 0,void 0,function*(){return new Promise((d,p)=>{this.disconnect(),this.socket=(0,o.default)(this.url,{transports:["websocket"],auth:l,autoConnect:!1,query:u});const f=setTimeout(()=>{p("connection timed out")},5e3);this.socket.on("login",h=>t(this,void 0,void 0,function*(){clearTimeout(f),d(h)})),this.socket.on("connect_error",h=>{var y;(y=this.socket)===null||y===void 0||y.close(),clearTimeout(f),p(h.message)}),this.socket.on("message",h=>t(this,void 0,void 0,function*(){var y;this.pending[h.request]&&(!((y=h.data)===null||y===void 0)&&y.error?this.pending[h.request].reject(new Error(h.data.message)):this.pending[h.request].resolve(h.data),delete this.pending[h.request]),yield this.emitter.emit(a.Message,h)})),this.socket.connect()})})}disconnect(){var l;this.socket&&!(!((l=this.socket)===null||l===void 0)&&l.disconnected)&&this.socket.disconnect()}request(l,u){var d;return t(this,void 0,void 0,function*(){if(!(!((d=this.socket)===null||d===void 0)&&d.connected))throw new Error("Client is disconnected");const p=this.random(32),f=new Promise((h,y)=>{this.pending[p]={resolve:h,reject:y}});return this.socket.send({request:p,type:l,data:u}),f})}random(l){const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let d="";for(let p=0;p<l;p++)d+=u.charAt(Math.floor(Math.random()*u.length));return d}}e.SocketCom=i;var a;(function(c){c.Message="message"})(a=e.SocketComEvents||(e.SocketComEvents={}));class s extends n.Emitter{}e.SocketComEmitter=s})(v$);var xf={},JV=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(xf,"__esModule",{value:!0}),xf.SocketEmitter=void 0;class YV{constructor(){this.listeners={}}on(t,r){const n=this.listeners[t];n?n.push(r):this.listeners[t]=[r]}removeListeners(t){this.listeners[t]=[]}emit(t,r){return JV(this,void 0,void 0,function*(){const n=this.listeners[t];if(n!=null&&n.length){for(const o of n)yield o(r);return!0}else return!1})}}xf.SocketEmitter=YV;var un=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(sf,"__esModule",{value:!0}),sf.MessagingSocket=void 0;const H$=v$,XV=xf;class QV extends XV.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new H$.SocketCom(t.url),this.com.events.on(H$.SocketComEvents.Message,r=>un(this,void 0,void 0,function*(){r.type==="message.new"&&(yield this.emit("message",r.data.message))}))}get creds(){return this._creds}get userId(){var t;return(t=this._creds)===null||t===void 0?void 0:t.userId}get conversationId(){return this._conversationId}connect(t,r){return un(this,void 0,void 0,function*(){const n=r?{userData:JSON.stringify(r)}:void 0,o=yield this.com.connect({clientId:this.clientId,creds:t},n);return o.userId===(t==null?void 0:t.userId)&&!o.userToken&&(o.userToken=t.userToken),this._creds=o,yield this.emit("connect",this._creds),yield this.emit("user",this._creds.userId),o})}disconnect(){return un(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return un(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return un(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return un(this,void 0,void 0,function*(){const r=yield this.request("conversations.create",{});return(t==null?void 0:t.switch)!==!1&&(yield this.switchConversation(r.id)),r})}startConversation(t){return un(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return un(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return un(this,void 0,void 0,function*(){const r=yield this.request("conversations.delete",{id:t||this._conversationId});return r&&(yield this.switchConversation(void 0)),r})}listConversations(t){return un(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return un(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return un(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return un(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,r){return un(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:r})})}request(t,r){return this.com.request(t,r)}}sf.MessagingSocket=QV,function(e){var t=We&&We.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i),Object.defineProperty(n,a,{enumerable:!0,get:function(){return o[i]}})}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=We&&We.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Hy,e),r(sf,e)}(u$);class eH{constructor(t){k(this,"socket");k(this,"clientId");k(this,"apiUrl");k(this,"userId");k(this,"conversationId");k(this,"userToken");k(this,"connected",!1);k(this,"emitter");k(this,"on");k(this,"mode","messaging");this.socket=new u$.MessagingSocket(t),this.emitter=new Gm,this.clientId=t.clientId,this.apiUrl=t.url,this.on=this.emitter.on.bind(this.emitter),this.socket.on("message",r=>{const n=r.payload;if(n.type==="trigger")switch(n.trigger.type){case"webchat-visibility":this.emitter.emit("webchatVisibility",n.trigger.visibility);break;case"webchat-config":this.emitter.emit("webchatConfig",n.trigger.config);break;case"custom-event":this.emitter.emit("customEvent",n.trigger.event);break}else{const o=Ed.parse(n),{payload:i,disableInput:a}=zm(o);this.emitter.emit("message",{...r,payload:i,disableInput:a})}}),this.socket.on("conversation",r=>{this.emitter.emit("conversation",r)})}async connect(t,r){if(this.connected)return;this.connected=!0;const n=await this.socket.connect(t,r).catch(o=>{throw this.connected=!1,o});return this.userId=n.userId,this.userToken=n.userToken,n}async disconnect(){await this.socket.disconnect(),this.connected=!1}async getUser(){throw new Error("Get user is not supported in messaging mode")}async updateUser(){throw new Error("Update user is not supported in messaging mode")}async sendFile(t){throw new Error("Send file is not supported in messaging mode")}async sendMessage(t){this.conversationId||await this.newConversation(),await this.socket.sendText(t),this.emitter.emit("messageSent",t)}async sendEvent(t){this.conversationId||await this.newConversation(),await this.socket.sendPayload({type:"trigger",payload:t})}async switchConversation(t){await this.socket.switchConversation(t),this.conversationId=t}async conversationExists(t){return(await this.socket.listConversations()).some(n=>n.id===t)}async newConversation(){const{id:t}=await this.socket.createConversation();await this.socket.startConversation(),this.conversationId=t}async listMessages(t){return(await this.socket.listMessages(t)).map(n=>{const o=Ed.parse(n.payload),{payload:i,disableInput:a}=zm(o);return{...n,payload:i,disableInput:a}})}}function W$(e,t){return function(){return e.apply(t,arguments)}}const{toString:K$}=Object.prototype,{getPrototypeOf:ng}=Object,og=(e=>t=>{const r=K$.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bo=e=>(e=e.toLowerCase(),t=>og(t)===e),Sf=e=>t=>typeof t===e,{isArray:is}=Array,Vc=Sf("undefined");function tH(e){return e!==null&&!Vc(e)&&e.constructor!==null&&!Vc(e.constructor)&&ia(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const G$=Bo("ArrayBuffer");function rH(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&G$(e.buffer),t}const nH=Sf("string"),ia=Sf("function"),J$=Sf("number"),ig=e=>e!==null&&typeof e=="object",oH=e=>e===!0||e===!1,_f=e=>{if(og(e)!=="object")return!1;const t=ng(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},iH=Bo("Date"),aH=Bo("File"),sH=Bo("Blob"),cH=Bo("FileList"),lH=e=>ig(e)&&ia(e.pipe),uH=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||K$.call(e)===t||ia(e.toString)&&e.toString()===t)},dH=Bo("URLSearchParams"),fH=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),is(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(n=0;n<a;n++)s=i[n],t.call(null,e[s],s,e)}}function Y$(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const X$=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Q$=e=>!Vc(e)&&e!==X$;function ag(){const{caseless:e}=Q$(this)&&this||{},t={},r=(n,o)=>{const i=e&&Y$(t,o)||o;_f(t[i])&&_f(n)?t[i]=ag(t[i],n):_f(n)?t[i]=ag({},n):is(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Hc(arguments[n],r);return t}const pH=(e,t,r,{allOwnKeys:n}={})=>(Hc(t,(o,i)=>{r&&ia(o)?e[i]=W$(o,r):e[i]=o},{allOwnKeys:n}),e),hH=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mH=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},yH=(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=r!==!1&&ng(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},gH=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},vH=e=>{if(!e)return null;if(is(e))return e;let t=e.length;if(!J$(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},bH=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ng(Uint8Array)),wH=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},xH=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},SH=Bo("HTMLFormElement"),_H=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),eO=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),EH=Bo("RegExp"),tO=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Hc(r,(o,i)=>{t(o,i,e)!==!1&&(n[i]=o)}),Object.defineProperties(e,n)},ue={isArray:is,isArrayBuffer:G$,isBuffer:tH,isFormData:uH,isArrayBufferView:rH,isString:nH,isNumber:J$,isBoolean:oH,isObject:ig,isPlainObject:_f,isUndefined:Vc,isDate:iH,isFile:aH,isBlob:sH,isRegExp:EH,isFunction:ia,isStream:lH,isURLSearchParams:dH,isTypedArray:bH,isFileList:cH,forEach:Hc,merge:ag,extend:pH,trim:fH,stripBOM:hH,inherits:mH,toFlatObject:yH,kindOf:og,kindOfTest:Bo,endsWith:gH,toArray:vH,forEachEntry:wH,matchAll:xH,isHTMLForm:SH,hasOwnProperty:eO,hasOwnProp:eO,reduceDescriptors:tO,freezeMethods:e=>{tO(e,(t,r)=>{if(ia(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ia(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return is(e)?n(e):n(String(e).split(t)),r},toCamelCase:_H,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Y$,global:X$,isContextDefined:Q$,toJSONObject:e=>{const t=new Array(10),r=(n,o)=>{if(ig(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=is(n)?[]:{};return Hc(n,(a,s)=>{const c=r(a,o+1);!Vc(c)&&(i[s]=c)}),t[o]=void 0,i}}return n};return r(e,0)}};function It(e,t,r,n,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),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}ue.inherits(It,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:ue.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const rO=It.prototype,nO={};["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=>{nO[e]={value:e}}),Object.defineProperties(It,nO),Object.defineProperty(rO,"isAxiosError",{value:!0}),It.from=(e,t,r,n,o,i)=>{const a=Object.create(rO);return ue.toFlatObject(e,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),It.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var kH=typeof self=="object"?self.FormData:window.FormData;const TH=St(kH);function sg(e){return ue.isPlainObject(e)||ue.isArray(e)}function oO(e){return ue.endsWith(e,"[]")?e.slice(0,-2):e}function iO(e,t,r){return e?e.concat(t).map(function(o,i){return o=oO(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function $H(e){return ue.isArray(e)&&!e.some(sg)}const OH=ue.toFlatObject(ue,{},null,function(t){return/^is[A-Z]/.test(t)});function CH(e){return e&&ue.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Ef(e,t,r){if(!ue.isObject(e))throw new TypeError("target must be an object");t=t||new(TH||FormData),r=ue.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!ue.isUndefined(m[y])});const n=r.metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&CH(t);if(!ue.isFunction(o))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(ue.isDate(h))return h.toISOString();if(!c&&ue.isBlob(h))throw new It("Blob is not supported. Use a Buffer instead.");return ue.isArrayBuffer(h)||ue.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,y,m){let g=h;if(h&&!m&&typeof h=="object"){if(ue.endsWith(y,"{}"))y=n?y:y.slice(0,-2),h=JSON.stringify(h);else if(ue.isArray(h)&&$H(h)||ue.isFileList(h)||ue.endsWith(y,"[]")&&(g=ue.toArray(h)))return y=oO(y),g.forEach(function(b,x){!(ue.isUndefined(b)||b===null)&&t.append(a===!0?iO([y],x,i):a===null?y:y+"[]",l(b))}),!1}return sg(h)?!0:(t.append(iO(m,y,i),l(h)),!1)}const d=[],p=Object.assign(OH,{defaultVisitor:u,convertValue:l,isVisitable:sg});function f(h,y){if(!ue.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(h),ue.forEach(h,function(g,v){(!(ue.isUndefined(g)||g===null)&&o.call(t,g,ue.isString(v)?v.trim():v,y,p))===!0&&f(g,y?y.concat(v):[v])}),d.pop()}}if(!ue.isObject(e))throw new TypeError("data must be an object");return f(e),t}function aO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function cg(e,t){this._pairs=[],e&&Ef(e,this,t)}const sO=cg.prototype;sO.append=function(t,r){this._pairs.push([t,r])},sO.toString=function(t){const r=t?function(n){return t.call(this,n,aO)}:aO;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function AH(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function cO(e,t,r){if(!t)return e;const n=r&&r.encode||AH,o=r&&r.serialize;let i;if(o?i=o(t,r):i=ue.isURLSearchParams(t)?t.toString():new cg(t,r).toString(n),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class IH{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ue.forEach(this.handlers,function(n){n!==null&&t(n)})}}const lO=IH,uO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},RH=typeof URLSearchParams<"u"?URLSearchParams:cg,PH=FormData,NH=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),MH=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),mo={isBrowser:!0,classes:{URLSearchParams:RH,FormData:PH,Blob},isStandardBrowserEnv:NH,isStandardBrowserWebWorkerEnv:MH,protocols:["http","https","file","blob","url","data"]};function jH(e,t){return Ef(e,new mo.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return mo.isNode&&ue.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function DH(e){return ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function LH(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function dO(e){function t(r,n,o,i){let a=r[i++];const s=Number.isFinite(+a),c=i>=r.length;return a=!a&&ue.isArray(o)?o.length:a,c?(ue.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!s):((!o[a]||!ue.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],i)&&ue.isArray(o[a])&&(o[a]=LH(o[a])),!s)}if(ue.isFormData(e)&&ue.isFunction(e.entries)){const r={};return ue.forEachEntry(e,(n,o)=>{t(DH(n),o,r,0)}),r}return null}const FH={"Content-Type":void 0};function qH(e,t,r){if(ue.isString(e))try{return(t||JSON.parse)(e),ue.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const kf={transitional:uO,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=ue.isObject(t);if(i&&ue.isHTMLForm(t)&&(t=new FormData(t)),ue.isFormData(t))return o&&o?JSON.stringify(dO(t)):t;if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t))return t;if(ue.isArrayBufferView(t))return t.buffer;if(ue.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jH(t,this.formSerializer).toString();if((s=ue.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ef(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),qH(t)):t}],transformResponse:[function(t){const r=this.transitional||kf.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&ue.isString(t)&&(n&&!this.responseType||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?It.from(s,It.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mo.classes.FormData,Blob:mo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ue.forEach(["delete","get","head"],function(t){kf.headers[t]={}}),ue.forEach(["post","put","patch"],function(t){kf.headers[t]=ue.merge(FH)});const lg=kf,BH=ue.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"]),UH=e=>{const t={};let r,n,o;return e&&e.split(`
131
131
  `).forEach(function(a){o=a.indexOf(":"),r=a.substring(0,o).trim().toLowerCase(),n=a.substring(o+1).trim(),!(!r||t[r]&&BH[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},fO=Symbol("internals");function Wc(e){return e&&String(e).trim().toLowerCase()}function Tf(e){return e===!1||e==null?e:ue.isArray(e)?e.map(Tf):String(e)}function zH(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}function ZH(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function pO(e,t,r,n){if(ue.isFunction(n))return n.call(this,t,r);if(ue.isString(t)){if(ue.isString(n))return t.indexOf(n)!==-1;if(ue.isRegExp(n))return n.test(t)}}function VH(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function HH(e,t){const r=ue.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,i,a){return this[n].call(this,t,o,i,a)},configurable:!0})})}class $f{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(s,c,l){const u=Wc(c);if(!u)throw new Error("header name must be a non-empty string");const d=ue.findKey(o,u);(!d||o[d]===void 0||l===!0||l===void 0&&o[d]!==!1)&&(o[d||c]=Tf(s))}const a=(s,c)=>ue.forEach(s,(l,u)=>i(l,u,c));return ue.isPlainObject(t)||t instanceof this.constructor?a(t,r):ue.isString(t)&&(t=t.trim())&&!ZH(t)?a(UH(t),r):t!=null&&i(r,t,n),this}get(t,r){if(t=Wc(t),t){const n=ue.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return zH(o);if(ue.isFunction(r))return r.call(this,o,n);if(ue.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Wc(t),t){const n=ue.findKey(this,t);return!!(n&&(!r||pO(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(a){if(a=Wc(a),a){const s=ue.findKey(n,a);s&&(!r||pO(n,n[s],s,r))&&(delete n[s],o=!0)}}return ue.isArray(t)?t.forEach(i):i(t),o}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const r=this,n={};return ue.forEach(this,(o,i)=>{const a=ue.findKey(n,i);if(a){r[a]=Tf(o),delete r[i];return}const s=t?VH(i):String(i).trim();s!==i&&delete r[i],r[s]=Tf(o),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return ue.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&ue.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
132
132
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[fO]=this[fO]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=Wc(a);n[s]||(HH(o,a),n[s]=!0)}return ue.isArray(t)?t.forEach(i):i(t),this}}$f.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),ue.freezeMethods($f.prototype),ue.freezeMethods($f);const Uo=$f;function ug(e,t){const r=this||lg,n=t||r,o=Uo.from(n.headers);let i=n.data;return ue.forEach(e,function(s){i=s.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function hO(e){return!!(e&&e.__CANCEL__)}function Kc(e,t,r){It.call(this,e??"canceled",It.ERR_CANCELED,t,r),this.name="CanceledError"}ue.inherits(Kc,It,{__CANCEL__:!0});const WH=null;function KH(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new It("Request failed with status code "+r.status,[It.ERR_BAD_REQUEST,It.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const GH=mo.isStandardBrowserEnv?function(){return{write:function(r,n,o,i,a,s){const c=[];c.push(r+"="+encodeURIComponent(n)),ue.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),ue.isString(i)&&c.push("path="+i),ue.isString(a)&&c.push("domain="+a),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function JH(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function YH(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function mO(e,t){return e&&!JH(t)?YH(e,t):t}const XH=mo.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(i){let a=i;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(a){const s=ue.isString(a)?o(a):a;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function QH(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function eW(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=n[i];a||(a=l),r[o]=c,n[o]=l;let d=i,p=0;for(;d!==o;)p+=r[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-a<t)return;const f=u&&l-u;return f?Math.round(p*1e3/f):void 0}}function yO(e,t){let r=0;const n=eW(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,c=n(s),l=i<=a;r=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&l?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const Of={http:WH,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){let o=e.data;const i=Uo.from(e.headers).normalize(),a=e.responseType;let s;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}ue.isFormData(o)&&(mo.isStandardBrowserEnv||mo.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const f=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(f+":"+h))}const u=mO(e.baseURL,e.url);l.open(e.method.toUpperCase(),cO(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function d(){if(!l)return;const f=Uo.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),y={data:!a||a==="text"||a==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:f,config:e,request:l};KH(function(g){r(g),c()},function(g){n(g),c()},y),l=null}if("onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(n(new It("Request aborted",It.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new It("Network Error",It.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const y=e.transitional||uO;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),n(new It(h,y.clarifyTimeoutError?It.ETIMEDOUT:It.ECONNABORTED,e,l)),l=null},mo.isStandardBrowserEnv){const f=(e.withCredentials||XH(u))&&e.xsrfCookieName&&GH.read(e.xsrfCookieName);f&&i.set(e.xsrfHeaderName,f)}o===void 0&&i.setContentType(null),"setRequestHeader"in l&&ue.forEach(i.toJSON(),function(h,y){l.setRequestHeader(y,h)}),ue.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&a!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",yO(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",yO(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=f=>{l&&(n(!f||f.type?new Kc(null,e,l):f),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=QH(u);if(p&&mo.protocols.indexOf(p)===-1){n(new It("Unsupported protocol "+p+":",It.ERR_BAD_REQUEST,e));return}l.send(o||null)})}};ue.forEach(Of,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const tW={getAdapter:e=>{e=ue.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=ue.isString(r)?Of[r.toLowerCase()]:r));o++);if(!n)throw n===!1?new It(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(ue.hasOwnProp(Of,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!ue.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Of};function dg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Kc(null,e)}function gO(e){return dg(e),e.headers=Uo.from(e.headers),e.data=ug.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tW.getAdapter(e.adapter||lg.adapter)(e).then(function(n){return dg(e),n.data=ug.call(e,e.transformResponse,n),n.headers=Uo.from(n.headers),n},function(n){return hO(n)||(dg(e),n&&n.response&&(n.response.data=ug.call(e,e.transformResponse,n.response),n.response.headers=Uo.from(n.response.headers))),Promise.reject(n)})}const vO=e=>e instanceof Uo?e.toJSON():e;function as(e,t){t=t||{};const r={};function n(l,u,d){return ue.isPlainObject(l)&&ue.isPlainObject(u)?ue.merge.call({caseless:d},l,u):ue.isPlainObject(u)?ue.merge({},u):ue.isArray(u)?u.slice():u}function o(l,u,d){if(ue.isUndefined(u)){if(!ue.isUndefined(l))return n(void 0,l,d)}else return n(l,u,d)}function i(l,u){if(!ue.isUndefined(u))return n(void 0,u)}function a(l,u){if(ue.isUndefined(u)){if(!ue.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function s(l,u,d){if(d in t)return n(l,u);if(d in e)return n(void 0,l)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,u)=>o(vO(l),vO(u),!0)};return ue.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const d=c[u]||o,p=d(e[u],t[u],u);ue.isUndefined(p)&&d!==s||(r[u]=p)}),r}const bO="1.2.5",fg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fg[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const wO={};fg.transitional=function(t,r,n){function o(i,a){return"[Axios v"+bO+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,s)=>{if(t===!1)throw new It(o(a," has been removed"+(r?" in "+r:"")),It.ERR_DEPRECATED);return r&&!wO[a]&&(wO[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,a,s):!0}};function rW(e,t,r){if(typeof e!="object")throw new It("options must be an object",It.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const s=e[i],c=s===void 0||a(s,i,e);if(c!==!0)throw new It("option "+i+" must be "+c,It.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new It("Unknown option "+i,It.ERR_BAD_OPTION)}}const pg={assertOptions:rW,validators:fg},yi=pg.validators;class Cf{constructor(t){this.defaults=t,this.interceptors={request:new lO,response:new lO}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=as(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&pg.assertOptions(n,{silentJSONParsing:yi.transitional(yi.boolean),forcedJSONParsing:yi.transitional(yi.boolean),clarifyTimeoutError:yi.transitional(yi.boolean)},!1),o!==void 0&&pg.assertOptions(o,{encode:yi.function,serialize:yi.function},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a;a=i&&ue.merge(i.common,i[r.method]),a&&ue.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=Uo.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(c=c&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let u,d=0,p;if(!c){const h=[gO.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,l),p=h.length,u=Promise.resolve(r);d<p;)u=u.then(h[d++],h[d++]);return u}p=s.length;let f=r;for(d=0;d<p;){const h=s[d++],y=s[d++];try{f=h(f)}catch(m){y.call(this,m);break}}try{u=gO.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,p=l.length;d<p;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=as(this.defaults,t);const r=mO(t.baseURL,t.url);return cO(r,t.params,t.paramsSerializer)}}ue.forEach(["delete","get","head","options"],function(t){Cf.prototype[t]=function(r,n){return this.request(as(n||{},{method:t,url:r,data:(n||{}).data}))}}),ue.forEach(["post","put","patch"],function(t){function r(n){return function(i,a,s){return this.request(as(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Cf.prototype[t]=r(),Cf.prototype[t+"Form"]=r(!0)});const Af=Cf;class hg{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{n.subscribe(s),i=s}).then(o);return a.cancel=function(){n.unsubscribe(i)},a},t(function(i,a,s){n.reason||(n.reason=new Kc(i,a,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new hg(function(o){t=o}),cancel:t}}}const nW=hg;function oW(e){return function(r){return e.apply(null,r)}}function iW(e){return ue.isObject(e)&&e.isAxiosError===!0}const mg={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mg).forEach(([e,t])=>{mg[t]=e});const aW=mg;function xO(e){const t=new Af(e),r=W$(Af.prototype.request,t);return ue.extend(r,Af.prototype,t,{allOwnKeys:!0}),ue.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return xO(as(e,o))},r}const wr=xO(lg);wr.Axios=Af,wr.CanceledError=Kc,wr.CancelToken=nW,wr.isCancel=hO,wr.VERSION=bO,wr.toFormData=Ef,wr.AxiosError=It,wr.Cancel=wr.CanceledError,wr.all=function(t){return Promise.all(t)},wr.spread=oW,wr.isAxiosError=iW,wr.mergeConfig=as,wr.AxiosHeaders=Uo,wr.formToJSON=e=>dO(ue.isHTMLForm(e)?new FormData(e):e),wr.HttpStatusCode=aW,wr.default=wr;const SO=wr,sW={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let yg=typeof window<"u"&&typeof window.document<"u"?window.crypto:nm;yg.getRandomValues||(yg=sW);class Zt extends Error{constructor(r,n,o,i,a,s){super(i);k(this,"isApiError",!0);this.code=r,this.description=n,this.type=o,this.message=i,this.error=a,this.id=s,this.id||(this.id=Zt.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){const r=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,i=Array.from(yg.getRandomValues(new Uint8Array(o))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${r}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}}const cW=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,gg=e=>e instanceof Zt||cW(e)&&e.isApiError===!0;class Gc extends Zt{constructor(t,r,n){super(500,"An unknown error occurred","Unknown",t,r,n)}}class lW extends Zt{constructor(t,r,n){super(500,"An internal error occurred","Internal",t,r,n)}}class uW extends Zt{constructor(t,r,n){super(401,"The request requires to be authenticated.","Unauthorized",t,r,n)}}class dW extends Zt{constructor(t,r,n){super(403,"The requested action can't be peform by this resource.","Forbidden",t,r,n)}}class fW extends Zt{constructor(t,r,n){super(413,"The request payload is too large.","PayloadTooLarge",t,r,n)}}class pW extends Zt{constructor(t,r,n){super(400,"The request payload is invalid.","InvalidPayload",t,r,n)}}class hW extends Zt{constructor(t,r,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,r,n)}}class mW extends Zt{constructor(t,r,n){super(405,"The requested method does not exist.","MethodNotFound",t,r,n)}}class yW extends Zt{constructor(t,r,n){super(404,"The requested resource does not exist.","ResourceNotFound",t,r,n)}}class gW extends Zt{constructor(t,r,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,r,n)}}class vW extends Zt{constructor(t,r,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,r,n)}}class bW extends Zt{constructor(t,r,n){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,r,n)}}class wW extends Zt{constructor(t,r,n){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,r,n)}}class xW extends Zt{constructor(t,r,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,r,n)}}class SW extends Zt{constructor(t,r,n){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,r,n)}}class _W extends Zt{constructor(t,r,n){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,r,n)}}class EW extends Zt{constructor(t,r,n){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,r,n)}}class kW extends Zt{constructor(t,r,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,r,n)}}class TW extends Zt{constructor(t,r,n){super(409,"The record attempted to be created already exists.","AlreadyExists",t,r,n)}}class $W extends Zt{constructor(t,r,n){super(429,"The request has been rate limited.","RateLimited",t,r,n)}}class OW extends Zt{constructor(t,r,n){super(402,"A payment is required to perform this request.","PaymentRequired",t,r,n)}}class CW extends Zt{constructor(t,r,n){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,r,n)}}class AW extends Zt{constructor(t,r,n){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,r,n)}}class IW extends Zt{constructor(t,r,n){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,r,n)}}const RW={Unknown:Gc,Internal:lW,Unauthorized:uW,Forbidden:dW,PayloadTooLarge:fW,InvalidPayload:pW,UnsupportedMediaType:hW,MethodNotFound:mW,ResourceNotFound:yW,InvalidJsonSchema:gW,InvalidDataFormat:vW,InvalidIdentifier:bW,RelationConflict:wW,ReferenceConstraint:xW,ResourceLockedConflict:SW,ReferenceNotFound:_W,InvalidQuery:EW,Runtime:kW,AlreadyExists:TW,RateLimited:$W,PaymentRequired:OW,QuotaExceeded:CW,LimitExceeded:AW,BreakingChanges:IW},_O=e=>gg(e)?e:e instanceof Error?new Gc(e.message,e):typeof e=="string"?new Gc(e):PW(e);function PW(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=RW[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Gc(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Gc("An invalid error occurred: "+JSON.stringify(e))}var NW=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==o||a.enumerable!==!0)return!1}return!0},EO=typeof Symbol<"u"&&Symbol,MW=NW,jW=function(){return typeof EO!="function"||typeof Symbol!="function"||typeof EO("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:MW()},kO={foo:{}},DW=Object,LW=function(){return{__proto__:kO}.foo===kO.foo&&!({__proto__:null}instanceof DW)},FW="Function.prototype.bind called on incompatible ",qW=Object.prototype.toString,BW=Math.max,UW="[object Function]",TO=function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var i=0;i<r.length;i+=1)n[i+t.length]=r[i];return n},zW=function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},ZW=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},VW=function(t){var r=this;if(typeof r!="function"||qW.apply(r)!==UW)throw new TypeError(FW+r);for(var n=zW(arguments,1),o,i=function(){if(this instanceof o){var u=r.apply(this,TO(n,arguments));return Object(u)===u?u:this}return r.apply(t,TO(n,arguments))},a=BW(0,r.length-n.length),s=[],c=0;c<a;c++)s[c]="$"+c;if(o=Function("binder","return function ("+ZW(s,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var l=function(){};l.prototype=r.prototype,o.prototype=new l,l.prototype=null}return o},HW=VW,vg=Function.prototype.bind||HW,WW=vg,KW=WW.call(Function.call,Object.prototype.hasOwnProperty),Et,ss=SyntaxError,$O=Function,cs=TypeError,bg=function(e){try{return $O('"use strict"; return ('+e+").constructor;")()}catch{}},aa=Object.getOwnPropertyDescriptor;if(aa)try{aa({},"")}catch{aa=null}var wg=function(){throw new cs},GW=aa?function(){try{return arguments.callee,wg}catch{try{return aa(arguments,"callee").get}catch{return wg}}}():wg,ls=jW(),JW=LW(),$r=Object.getPrototypeOf||(JW?function(e){return e.__proto__}:null),us={},YW=typeof Uint8Array>"u"||!$r?Et:$r(Uint8Array),sa={"%AggregateError%":typeof AggregateError>"u"?Et:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Et:ArrayBuffer,"%ArrayIteratorPrototype%":ls&&$r?$r([][Symbol.iterator]()):Et,"%AsyncFromSyncIteratorPrototype%":Et,"%AsyncFunction%":us,"%AsyncGenerator%":us,"%AsyncGeneratorFunction%":us,"%AsyncIteratorPrototype%":us,"%Atomics%":typeof Atomics>"u"?Et:Atomics,"%BigInt%":typeof BigInt>"u"?Et:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Et:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Et:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Et:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Et:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Et:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Et:FinalizationRegistry,"%Function%":$O,"%GeneratorFunction%":us,"%Int8Array%":typeof Int8Array>"u"?Et:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Et:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Et:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ls&&$r?$r($r([][Symbol.iterator]())):Et,"%JSON%":typeof JSON=="object"?JSON:Et,"%Map%":typeof Map>"u"?Et:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ls||!$r?Et:$r(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Et:Promise,"%Proxy%":typeof Proxy>"u"?Et:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Et:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Et:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ls||!$r?Et:$r(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Et:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ls&&$r?$r(""[Symbol.iterator]()):Et,"%Symbol%":ls?Symbol:Et,"%SyntaxError%":ss,"%ThrowTypeError%":GW,"%TypedArray%":YW,"%TypeError%":cs,"%Uint8Array%":typeof Uint8Array>"u"?Et:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Et:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Et:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Et:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Et:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Et:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Et:WeakSet};if($r)try{null.error}catch(e){var XW=$r($r(e));sa["%Error.prototype%"]=XW}var QW=function e(t){var r;if(t==="%AsyncFunction%")r=bg("async function () {}");else if(t==="%GeneratorFunction%")r=bg("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=bg("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&$r&&(r=$r(o.prototype))}return sa[t]=r,r},OO={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Jc=vg,If=KW,eK=Jc.call(Function.call,Array.prototype.concat),tK=Jc.call(Function.apply,Array.prototype.splice),CO=Jc.call(Function.call,String.prototype.replace),Rf=Jc.call(Function.call,String.prototype.slice),rK=Jc.call(Function.call,RegExp.prototype.exec),nK=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,oK=/\\(\\)?/g,iK=function(t){var r=Rf(t,0,1),n=Rf(t,-1);if(r==="%"&&n!=="%")throw new ss("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ss("invalid intrinsic syntax, expected opening `%`");var o=[];return CO(t,nK,function(i,a,s,c){o[o.length]=s?CO(c,oK,"$1"):a||i}),o},aK=function(t,r){var n=t,o;if(If(OO,n)&&(o=OO[n],n="%"+o[0]+"%"),If(sa,n)){var i=sa[n];if(i===us&&(i=QW(n)),typeof i>"u"&&!r)throw new cs("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new ss("intrinsic "+t+" does not exist!")},xg=function(t,r){if(typeof t!="string"||t.length===0)throw new cs("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new cs('"allowMissing" argument must be a boolean');if(rK(/^%?[^%]*%?$/,t)===null)throw new ss("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=iK(t),o=n.length>0?n[0]:"",i=aK("%"+o+"%",r),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],tK(n,eK([0,1],l)));for(var u=1,d=!0;u<n.length;u+=1){var p=n[u],f=Rf(p,0,1),h=Rf(p,-1);if((f==='"'||f==="'"||f==="`"||h==='"'||h==="'"||h==="`")&&f!==h)throw new ss("property names with quotes must have matching quotes");if((p==="constructor"||!d)&&(c=!0),o+="."+p,a="%"+o+"%",If(sa,a))s=sa[a];else if(s!=null){if(!(p in s)){if(!r)throw new cs("base intrinsic for "+t+" exists, but the property is not available.");return}if(aa&&u+1>=n.length){var y=aa(s,p);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?s=y.get:s=s[p]}else d=If(s,p),s=s[p];d&&!c&&(sa[a]=s)}}return s},AO={exports:{}};(function(e){var t=vg,r=xg,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),a=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(d){var p=i(t,o,arguments);if(a&&s){var f=a(p,"length");f.configurable&&s(p,"length",{value:1+c(0,d.length-(arguments.length-1))})}return p};var l=function(){return i(t,n,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l})(AO);var sK=AO.exports,IO=xg,RO=sK,cK=RO(IO("String.prototype.indexOf")),lK=function(t,r){var n=IO(t,!!r);return typeof n=="function"&&cK(t,".prototype.")>-1?RO(n):n},Sg=typeof Map=="function"&&Map.prototype,_g=Object.getOwnPropertyDescriptor&&Sg?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Pf=Sg&&_g&&typeof _g.get=="function"?_g.get:null,PO=Sg&&Map.prototype.forEach,Eg=typeof Set=="function"&&Set.prototype,kg=Object.getOwnPropertyDescriptor&&Eg?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Nf=Eg&&kg&&typeof kg.get=="function"?kg.get:null,NO=Eg&&Set.prototype.forEach,uK=typeof WeakMap=="function"&&WeakMap.prototype,Yc=uK?WeakMap.prototype.has:null,dK=typeof WeakSet=="function"&&WeakSet.prototype,Xc=dK?WeakSet.prototype.has:null,fK=typeof WeakRef=="function"&&WeakRef.prototype,MO=fK?WeakRef.prototype.deref:null,pK=Boolean.prototype.valueOf,hK=Object.prototype.toString,mK=Function.prototype.toString,yK=String.prototype.match,Tg=String.prototype.slice,gi=String.prototype.replace,gK=String.prototype.toUpperCase,jO=String.prototype.toLowerCase,DO=RegExp.prototype.test,LO=Array.prototype.concat,yo=Array.prototype.join,vK=Array.prototype.slice,FO=Math.floor,$g=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Og=Object.getOwnPropertySymbols,Cg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ds=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Gr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ds||"symbol")?Symbol.toStringTag:null,qO=Object.prototype.propertyIsEnumerable,BO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function UO(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||DO.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-FO(-e):FO(e);if(n!==e){var o=String(n),i=Tg.call(t,o.length+1);return gi.call(o,r,"$&_")+"."+gi.call(gi.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return gi.call(t,r,"$&_")}var Ag=om,zO=Ag.custom,ZO=WO(zO)?zO:null,bK=function e(t,r,n,o){var i=r||{};if(vi(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(vi(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=vi(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(vi(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(vi(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return GO(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return s?UO(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return s?UO(t,l):l}var u=typeof i.depth>"u"?5:i.depth;if(typeof n>"u"&&(n=0),n>=u&&u>0&&typeof t=="object")return Ig(t)?"[Array]":"[Object]";var d=DK(i,n);if(typeof o>"u")o=[];else if(KO(o,t)>=0)return"[Circular]";function p(z,B,F){if(B&&(o=vK.call(o),o.push(B)),F){var j={depth:i.depth};return vi(i,"quoteStyle")&&(j.quoteStyle=i.quoteStyle),e(z,j,n+1,o)}return e(z,i,n+1,o)}if(typeof t=="function"&&!HO(t)){var f=OK(t),h=Mf(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(h.length>0?" { "+yo.call(h,", ")+" }":"")}if(WO(t)){var y=ds?gi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Cg.call(t);return typeof t=="object"&&!ds?Qc(y):y}if(NK(t)){for(var m="<"+jO.call(String(t.nodeName)),g=t.attributes||[],v=0;v<g.length;v++)m+=" "+g[v].name+"="+VO(wK(g[v].value),"double",i);return m+=">",t.childNodes&&t.childNodes.length&&(m+="..."),m+="</"+jO.call(String(t.nodeName))+">",m}if(Ig(t)){if(t.length===0)return"[]";var b=Mf(t,p);return d&&!jK(b)?"["+Pg(b,d)+"]":"[ "+yo.call(b,", ")+" ]"}if(SK(t)){var x=Mf(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!qO.call(t,"cause")?"{ ["+String(t)+"] "+yo.call(LO.call("[cause]: "+p(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+yo.call(x,", ")+" }"}if(typeof t=="object"&&a){if(ZO&&typeof t[ZO]=="function"&&Ag)return Ag(t,{depth:u-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(CK(t)){var w=[];return PO&&PO.call(t,function(z,B){w.push(p(B,t,!0)+" => "+p(z,t))}),JO("Map",Pf.call(t),w,d)}if(RK(t)){var S=[];return NO&&NO.call(t,function(z){S.push(p(z,t))}),JO("Set",Nf.call(t),S,d)}if(AK(t))return Rg("WeakMap");if(PK(t))return Rg("WeakSet");if(IK(t))return Rg("WeakRef");if(EK(t))return Qc(p(Number(t)));if(TK(t))return Qc(p($g.call(t)));if(kK(t))return Qc(pK.call(t));if(_K(t))return Qc(p(String(t)));if(!xK(t)&&!HO(t)){var C=Mf(t,p),I=BO?BO(t)===Object.prototype:t instanceof Object||t.constructor===Object,P=t instanceof Object?"":"null prototype",A=!I&&Gr&&Object(t)===t&&Gr in t?Tg.call(bi(t),8,-1):P?"Object":"",L=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",K=L+(A||P?"["+yo.call(LO.call([],A||[],P||[]),": ")+"] ":"");return C.length===0?K+"{}":d?K+"{"+Pg(C,d)+"}":K+"{ "+yo.call(C,", ")+" }"}return String(t)};function VO(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function wK(e){return gi.call(String(e),/"/g,"&quot;")}function Ig(e){return bi(e)==="[object Array]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function xK(e){return bi(e)==="[object Date]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function HO(e){return bi(e)==="[object RegExp]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function SK(e){return bi(e)==="[object Error]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function _K(e){return bi(e)==="[object String]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function EK(e){return bi(e)==="[object Number]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function kK(e){return bi(e)==="[object Boolean]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function WO(e){if(ds)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Cg)return!1;try{return Cg.call(e),!0}catch{}return!1}function TK(e){if(!e||typeof e!="object"||!$g)return!1;try{return $g.call(e),!0}catch{}return!1}var $K=Object.prototype.hasOwnProperty||function(e){return e in this};function vi(e,t){return $K.call(e,t)}function bi(e){return hK.call(e)}function OK(e){if(e.name)return e.name;var t=yK.call(mK.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function KO(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function CK(e){if(!Pf||!e||typeof e!="object")return!1;try{Pf.call(e);try{Nf.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function AK(e){if(!Yc||!e||typeof e!="object")return!1;try{Yc.call(e,Yc);try{Xc.call(e,Xc)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function IK(e){if(!MO||!e||typeof e!="object")return!1;try{return MO.call(e),!0}catch{}return!1}function RK(e){if(!Nf||!e||typeof e!="object")return!1;try{Nf.call(e);try{Pf.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function PK(e){if(!Xc||!e||typeof e!="object")return!1;try{Xc.call(e,Xc);try{Yc.call(e,Yc)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function NK(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function GO(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return GO(Tg.call(e,0,t.maxStringLength),t)+n}var o=gi.call(gi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,MK);return VO(o,"single",t)}function MK(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+gK.call(t.toString(16))}function Qc(e){return"Object("+e+")"}function Rg(e){return e+" { ? }"}function JO(e,t,r,n){var o=n?Pg(r,n):yo.call(r,", ");return e+" ("+t+") {"+o+"}"}function jK(e){for(var t=0;t<e.length;t++)if(KO(e[t],`
133
133
  `)>=0)return!1;return!0}function DK(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=yo.call(Array(e.indent+1)," ");else return null;return{base:r,prev:yo.call(Array(t+1),r)}}function Pg(e,t){if(e.length===0)return"";var r=`