@streamlayer/react 0.26.1 → 0.26.2
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.
- package/lib/{app-037724c5.cjs → app-3b0713d0.cjs} +1 -1
- package/lib/{app-215a7e7d.js → app-3bc05c48.js} +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/es/auth.js +2 -2
- package/lib/es/index.js +2 -2
- package/lib/es/masters.js +50 -54
- package/lib/es/points.js +2 -2
- package/lib/{index-e2714a2f.cjs → index-0f70e34a.cjs} +2 -2
- package/lib/{index-98298310.js → index-5a223768.js} +6 -6
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),i=require("react"),e=require("./index-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),i=require("react"),e=require("./index-0f70e34a.cjs");require("react-auth-code-input");require("react-phone-number-input");require("@connectrpc/connect");require("@connectrpc/connect-web");require("@streamlayer/sl-eslib/users/users_connect");require("react-countdown-circle-timer");require("@streamlayer/sdk-web-types");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-features");require("@streamlayer/sdk-web-api");require("@streamlayer/sdk-web-storage");require("@nanostores/react");require("@streamlayer/sdk-web-notifications");const s=()=>{const{sdk:t}=i.useContext(e.StreamLayerContext);return t},u=()=>{const{sdk:t,status:a}=i.useContext(e.StreamLayerContext);if(a===e.StreamLayerStatus.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return a===e.StreamLayerStatus.CONNECTED?r.jsx("div",{className:"StreamLayerSDK",children:"wait"}):t===null?r.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):r.jsx("div",{className:"StreamLayerSDK",children:r.jsx(e.p,{children:r.jsx(e.Sr,{sdk:t})})})};exports.StreamLayerSDKReact=u;exports.useStreamLayer=s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useContext as i } from "react";
|
|
3
|
-
import { a as m, b as a, p as o, c as s } from "./index-
|
|
3
|
+
import { a as m, b as a, p as o, c as s } from "./index-5a223768.js";
|
|
4
4
|
import "react-auth-code-input";
|
|
5
5
|
import "react-phone-number-input";
|
|
6
6
|
import "@connectrpc/connect";
|
package/lib/cjs/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),q=require("../app-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),q=require("../app-3b0713d0.cjs");require("react/jsx-runtime");require("../index-0f70e34a.cjs");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-types");require("@streamlayer/sdk-web-features");require("@streamlayer/sdk-web-api");require("@streamlayer/sdk-web-storage");require("@nanostores/react");require("@streamlayer/sdk-web-notifications");require("react-countdown-circle-timer");require("@streamlayer/sl-eslib/interactive/interactive.common_pb");require("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb");require("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb");require("@streamlayer/sl-eslib/sports/events/events_connect");require("@streamlayer/sl-eslib/sdkSettings/client/client_connect");require("@streamlayer/sl-eslib/users/users_connect");require("react-auth-code-input");require("react-phone-number-input");require("@connectrpc/connect");require("@connectrpc/connect-web");const t=({token:e,schema:r})=>{const i=q.useStreamLayer();return u.useEffect(()=>{e&&r&&i&&i.authorizationBypass(r,e)},[e,r,i]),null};exports.StreamLayerLogin=t;
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@streamlayer/sdk-web-api");require("@streamlayer/sdk-web-core");require("@streamlayer/sdk-web-types");require("@streamlayer/sdk-web-logger");require("@streamlayer/sdk-web-storage");require("@streamlayer/sdk-web-features");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-notifications");require("@streamlayer/feature-gamification");const r=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@streamlayer/sdk-web-api");require("@streamlayer/sdk-web-core");require("@streamlayer/sdk-web-types");require("@streamlayer/sdk-web-logger");require("@streamlayer/sdk-web-storage");require("@streamlayer/sdk-web-features");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-notifications");require("@streamlayer/feature-gamification");const r=require("../index-0f70e34a.cjs"),e=require("../app-3b0713d0.cjs");require("react/jsx-runtime");require("react");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");require("@nanostores/react");require("react-countdown-circle-timer");require("@streamlayer/sl-eslib/interactive/interactive.common_pb");require("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb");require("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb");require("@streamlayer/sl-eslib/sports/events/events_connect");require("@streamlayer/sl-eslib/sdkSettings/client/client_connect");require("@streamlayer/sl-eslib/users/users_connect");require("react-auth-code-input");require("react-phone-number-input");require("@connectrpc/connect");require("@connectrpc/connect-web");exports.StreamLayerProvider=r.StreamLayerProvider;exports.StreamLayerSDKReact=e.StreamLayerSDKReact;exports.useStreamLayer=e.useStreamLayer;
|
package/lib/cjs/masters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),n=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),n=require("../index-0f70e34a.cjs");require("react-auth-code-input");require("react-phone-number-input");require("@connectrpc/connect");require("@connectrpc/connect-web");require("@streamlayer/sl-eslib/users/users_connect");require("react-countdown-circle-timer");const y=require("@streamlayer/sdk-web-types"),x=require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-features");require("@streamlayer/sdk-web-api");require("@streamlayer/sdk-web-storage");const u=require("@nanostores/react");require("@streamlayer/sdk-web-notifications");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");require("@streamlayer/sl-eslib/interactive/interactive.common_pb");require("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb");require("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb");require("@streamlayer/sl-eslib/sports/events/events_connect");require("@streamlayer/sl-eslib/sdkSettings/client/client_connect");const g=({feature:e,sdk:t,children:a,className:r})=>{const o=u.useStore(e.status),{slStreamId:l}=u.useStore(t.sdkStore);return l!=null&&l.loading?s.jsx("div",{className:r,children:"event is loading..."}):l!=null&&l.data?o!==x.FeatureStatus.Ready?s.jsx("div",{className:r,children:"wait feature..."}):a:s.jsx("div",{className:r,children:"event is forbidden..."})};const S=n.styled_default("div")({name:"n",class:"n1aopxp8",propsAsIs:!1}),b=({children:e,style:t,className:a})=>s.jsx(S,{style:t,className:a,children:e});const k=()=>n.q,_=()=>n.q,q=n.styled_default("div")({name:"a",class:"acysrl1",propsAsIs:!1}),A=n.styled_default("div")({name:"l",class:"lo57cjm",propsAsIs:!1}),N=n.styled_default(k())({name:"p",class:"p14kwh4y",propsAsIs:!0}),I=n.styled_default("span")({name:"s",class:"sxun7sq",propsAsIs:!1}),$=n.styled_default("button")({name:"c",class:"c1i8ida8",propsAsIs:!1}),F=n.styled_default(_())({name:"g",class:"g1m0xfmw",propsAsIs:!0}),L=({type:e,close:t})=>{const a=n.o[e];return s.jsxs(q,{children:[s.jsxs(A,{children:[(a==null?void 0:a.iconName)&&s.jsx(N,{name:a.iconName}),(a==null?void 0:a.label)&&s.jsx(I,{children:a.label})]}),s.jsx($,{onClick:t,children:s.jsx(F,{name:"icon-cross"})})]})};const E=n.styled_default("div")({name:"r",class:"ruyb9yw",propsAsIs:!1}),C=n.styled_default("img")({name:"i",class:"imbcgl0",propsAsIs:!1}),O=({sponsorLogo:e})=>e&&s.jsx(E,{children:s.jsx(C,{alt:"sponsor-logo",src:e})});const Q=n.styled_default("div")({name:"x",class:"xk8r1eq",propsAsIs:!1}),R=({openedQuestion:e,closeQuestion:t,vote:a})=>{var r;return s.jsxs(Q,{children:[s.jsx(L,{close:t,type:(e==null?void 0:e.type)||y.QuestionType.UNSET}),e&&s.jsx(n.Y,{vote:a,openedQuestion:e}),s.jsx(O,{sponsorLogo:(r=e==null?void 0:e.sponsorship)==null?void 0:r.logo})]})},M=({leaderboardList:e})=>{const{data:t}=u.useStore(e.$store),[a,r]=i.useState(void 0),o=l=>{const c=t.find(d=>d.userId===l);r(c)};return s.jsxs(s.Fragment,{children:[a&&s.jsx(n.f$1,{comeBack:()=>o(null),...a}),!a&&s.jsx(n.j,{fetchMore:e.fetchMore,items:t,openItemDetail:o})]})},w=({store:e,openQuestion:t})=>{const a=u.useStore(e);return a!=null&&a.data?s.jsx(n.u,{openQuestion:t,questions:a.data}):s.jsx("div",{children:"wait questions..."})},G=({store:e})=>{const{data:t}=u.useStore(e);return t!=null&&t.summary?s.jsx(n.v,{...t.summary,...t.percentage}):s.jsx("div",{children:"wait user..."})},T=({gamification:e})=>{const[t,a]=i.useState(n.h.HOME);return s.jsxs(s.Fragment,{children:[s.jsxs(n.e,{children:[s.jsx(n.p$1,{activePage:t,toggleActivePage:a}),t===n.h.HOME&&s.jsx(G,{store:e.userSummary.getStore()})]}),t===n.h.HOME&&s.jsx(n.a$1,{children:s.jsx(w,{openQuestion:e.openQuestion,store:e.questions.getStore()})}),t===n.h.LEADERBOARD&&s.jsx(n.a$1,{style:{flex:"1 1 auto"},children:s.jsx(M,{leaderboardList:e.leaderboardList})})]})};const H=()=>b,D=n.styled_default(H())({name:"c",class:"c1ph66cs",propsAsIs:!0}),P=({gamification:e,className:t})=>{const{loading:a,data:r}=u.useStore(e.openedQuestion);return s.jsxs(s.Fragment,{children:[(a||r)&&s.jsx(D,{className:t,children:s.jsx(R,{closeQuestion:e.closeQuestion,vote:e.submitAnswer,openedQuestion:r})}),s.jsx(n.r,{className:t,"data-nav":"true",children:s.jsx(T,{gamification:e})})]})},B=({highlights:e,className:t})=>{const a=u.useStore(e.openedInsight);return s.jsxs(s.Fragment,{children:[!a&&e.insights&&s.jsx(n.c,{className:t,highlights:e,store:e.insights.getStore()}),a&&s.jsx(n.x,{className:t,openedInsight:a,closeHighlights:e.closeFeature,closeInsight:e.closeHighlight})]})},W=({sdk:e,feature:t,className:a})=>i.useMemo(()=>t?t.featureConfig.get().type===y.FeatureType.GAMES?s.jsx(g,{className:a,sdk:e,feature:t,children:s.jsx(P,{className:a,gamification:t,sdk:e})}):t.featureConfig.get().type===y.FeatureType.HIGHLIGHTS?s.jsx(g,{className:a,sdk:e,feature:t,children:s.jsx(B,{className:a,highlights:t,sdk:e})}):null:null,[e,t]);const z=n.styled_default("button")({name:"e",class:"enu64b2",propsAsIs:!1}),K=n.styled_default("span")({name:"t",class:"tw2meku",propsAsIs:!1}),U=n.styled_default("span")({name:"a",class:"aka8vam",propsAsIs:!1}),v=({disabled:e,active:t,onClick:a,label:r,icon:o})=>s.jsx(z,{onClick:a,disabled:e,"data-selected":t,children:s.jsxs(s.Fragment,{children:[o&&s.jsx(K,{children:o}),s.jsx(U,{children:r})]})});const Y=()=>n.q,J=n.styled_default(Y())({name:"a",class:"a10lggiw",propsAsIs:!0}),f="channels",V=e=>{var t;return s.jsx(v,{...e,id:"channels",label:"Channels",icon:s.jsx(J,{name:"icon-btn-channels","data-selected":(t=e.active)==null?void 0:t.toString()})})};const X=()=>n.q,Z=n.styled_default(X())({name:"d",class:"d1x5s8ie",propsAsIs:!0}),p="featuredGroups",ee=e=>{var t;return s.jsx(v,{...e,label:"FG+",id:"featuredGroups",icon:s.jsx(Z,{name:"icon-btn-feature-groups","data-selected":(t=e.active)==null?void 0:t.toString()})})};const se=()=>n.q,te=n.styled_default(se())({name:"n",class:"ntav86o",propsAsIs:!0}),j="leaderboard",ae=e=>{var t;return s.jsx(v,{...e,label:"Leader Board",id:"leaderboard",icon:s.jsx(te,{name:"icon-btn-leaderboard","data-selected":(t=e.active)==null?void 0:t.toString()})})};const ne=n.styled_default("div")({name:"n",class:"n1rlvhvz",propsAsIs:!1}),re=({children:e,className:t})=>s.jsx(ne,{className:t,children:e});const le=()=>re,oe=n.styled_default(le())({name:"n",class:"n9bnom",propsAsIs:!0}),ce=({activeOverlay:e,setActiveOverlay:t,sdkReady:a,className:r})=>s.jsxs(oe,{className:r,children:[s.jsx(V,{active:e===f,onClick:()=>t(f)}),s.jsx(ee,{active:e===p,disabled:!a,onClick:()=>{t(p)}}),s.jsx(ae,{active:e===j,onClick:()=>t(j)})]}),ie=e=>{const[t,a]=i.useState(!1),r=u.useStore(e.status)==="ready",[o,l]=i.useState(p),c=i.useCallback((d,m)=>{l(m),m===p?(d&&e.createEventSession(d),e.openFeature(y.FeatureType.GAMES)):e.closeFeature()},[e]);return i.useEffect(()=>{!r&&o===p&&(l(f),e.closeFeature())},[r,o,e]),{sdkEnabled:t,sdkReady:r,activeOverlay:o,activateAndLoadOverlay:c,enableSdk:d=>{e.initializeApp().then(({enabled:m,err:h})=>{if(a(!0),h){c(d,f);return}if(m){c(d,p);return}})},disableSdk:()=>{a(!1),e.disableApp()}}},de=e=>{const t=u.useStore(e.getActiveFeature()),[a,r]=i.useState(null);return i.useEffect(()=>{const o=e.getFeatures();if(t)for(const[l,c]of o)l===t?c.status.get()===x.FeatureStatus.Suspended&&(c.enable(),r(c)):c.status.get()===x.FeatureStatus.Ready&&c.disable();else{for(const[,l]of o)l.status.get()===x.FeatureStatus.Ready&&l.disable();r(null)}return()=>{for(const[,l]of o)l.status.get()===x.FeatureStatus.Ready&&l.disable()}},[t,e]),[t,a]},ue=({sdk:e,className:t})=>{const[,a]=de(e);return s.jsx(W,{className:t,feature:a,sdk:e})},pe=({sdk:e,overlays:t,children:a})=>{const{sdkEnabled:r,sdkReady:o,activeOverlay:l,activateAndLoadOverlay:c,enableSdk:d,disableSdk:m}=ie(e);return s.jsxs(n.i,{children:[r&&s.jsx(ce,{sdkReady:o,activeOverlay:l,className:n.f,setActiveOverlay:h=>c("",h)}),s.jsx(n.r,{"data-nav":r.toString(),style:{display:!r||l===f?"block":"none"},children:a&&a({enableSdk:d,disableSdk:m})}),s.jsx(n.r,{"data-nav":r.toString(),style:{display:l===j?"block":"none"},children:t&&l===j&&t[l]}),r&&l===p&&s.jsx(ue,{className:n.f,sdk:e})]})},me=({sdkKey:e,plugins:t,children:a,production:r=!0})=>s.jsx(n.StreamLayerProvider,{sdkKey:e,plugins:t,production:r,autoEnable:!1,children:a}),xe=({children:e,overlays:t})=>{const{sdk:a,status:r}=i.useContext(n.StreamLayerContext);if(r===n.StreamLayerStatus.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return a?s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(n.p,{children:s.jsx(pe,{sdk:a,overlays:t,children:e})})}):e({})};exports.MastersStreamLayerProvider=me;exports.MastersStreamLayerSDKReact=xe;
|
package/lib/cjs/points.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("@streamlayer/sdk-web-types"),o=require("react"),s=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("@streamlayer/sdk-web-types"),o=require("react"),s=require("../index-0f70e34a.cjs");require("react-auth-code-input");require("react-phone-number-input");require("@connectrpc/connect");require("@connectrpc/connect-web");require("@streamlayer/sl-eslib/users/users_connect");require("react-countdown-circle-timer");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-features");require("@streamlayer/sdk-web-api");require("@streamlayer/sdk-web-storage");const n=require("@nanostores/react");require("@streamlayer/sdk-web-notifications");const l=require("../app-3b0713d0.cjs");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");require("@streamlayer/sl-eslib/interactive/interactive.common_pb");require("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb");require("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb");require("@streamlayer/sl-eslib/sports/events/events_connect");require("@streamlayer/sl-eslib/sdkSettings/client/client_connect");const c=()=>s.q,d=s.styled_default("div")({name:"l",class:"l4qld3l",propsAsIs:!1}),m=s.styled_default("div")({name:"a",class:"ainhtok",propsAsIs:!1}),p=s.styled_default(c())({name:"x",class:"xk8yd5t",propsAsIs:!0}),q=s.styled_default("div")({name:"h",class:"h6rf9gb",propsAsIs:!1}),y=s.styled_default("div")({name:"c",class:"c18f5pxx",propsAsIs:!1}),f=s.styled_default("div")({name:"m",class:"m1jwsyj1",propsAsIs:!1}),S=({points:r})=>e.jsxs(d,{className:s.f,children:[e.jsx(m,{children:e.jsx(p,{name:"icon-trophy"})}),e.jsxs(q,{children:[e.jsx(y,{children:"Total points"}),e.jsx(f,{children:s.a(r)})]})]}),x=({userSummary:r})=>{var a,t;const i=n.useStore(r.getStore());return((t=(a=i.data)==null?void 0:a.summary)==null?void 0:t.points)===void 0?null:e.jsx("div",{className:"StreamLayerSDK",children:e.jsx(s.p,{children:e.jsx(S,{points:i.data.summary.points})})})},j=({sdk:r})=>{const{organizationSettings:i,streamSettings:a}=n.useStore(r.sdkStore),t=o.useMemo(()=>r.getFeature(u.FeatureType.GAMES),[r,i,a]);return t?e.jsx(x,{userSummary:t.userSummary}):null},h=()=>{const r=l.useStreamLayer();return r?e.jsx(j,{sdk:r}):null};exports.StreamLayerSDKPoints=h;
|
package/lib/es/auth.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect as i } from "react";
|
|
2
|
-
import { u as m } from "../app-
|
|
2
|
+
import { u as m } from "../app-3bc05c48.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
|
-
import "../index-
|
|
4
|
+
import "../index-5a223768.js";
|
|
5
5
|
import "./useStreamLayerApp.js";
|
|
6
6
|
import "@streamlayer/sdk-web";
|
|
7
7
|
import "@streamlayer/sdk-web-interfaces";
|
package/lib/es/index.js
CHANGED
|
@@ -7,8 +7,8 @@ import "@streamlayer/sdk-web-features";
|
|
|
7
7
|
import "@streamlayer/sdk-web-interfaces";
|
|
8
8
|
import "@streamlayer/sdk-web-notifications";
|
|
9
9
|
import "@streamlayer/feature-gamification";
|
|
10
|
-
import { S as l } from "../index-
|
|
11
|
-
import { S as q, u as w } from "../app-
|
|
10
|
+
import { S as l } from "../index-5a223768.js";
|
|
11
|
+
import { S as q, u as w } from "../app-3bc05c48.js";
|
|
12
12
|
import "react/jsx-runtime";
|
|
13
13
|
import "react";
|
|
14
14
|
import "./useStreamLayerApp.js";
|
package/lib/es/masters.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useState as v, useMemo as E, useCallback as C, useEffect as L, useContext as
|
|
3
|
-
import { s as r, q as y, o as
|
|
1
|
+
import { jsx as a, jsxs as i, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useMemo as E, useCallback as C, useEffect as L, useContext as Q } from "react";
|
|
3
|
+
import { s as r, q as y, o as O, Y as w, e as R, j as F, u as M, v as q, h as b, g as G, i as H, k as x, r as $, l as j, x as D, m as P, f as I, S as T, a as B, b as z, p as Y } from "../index-5a223768.js";
|
|
4
4
|
import "react-auth-code-input";
|
|
5
5
|
import "react-phone-number-input";
|
|
6
6
|
import "@connectrpc/connect";
|
|
7
7
|
import "@connectrpc/connect-web";
|
|
8
8
|
import "@streamlayer/sl-eslib/users/users_connect";
|
|
9
9
|
import "react-countdown-circle-timer";
|
|
10
|
-
import { QuestionType as K, FeatureType as
|
|
10
|
+
import { QuestionType as K, FeatureType as A } from "@streamlayer/sdk-web-types";
|
|
11
11
|
import { FeatureStatus as h } from "@streamlayer/sdk-web-interfaces";
|
|
12
12
|
import "@streamlayer/sdk-web-features";
|
|
13
13
|
import "@streamlayer/sdk-web-api";
|
|
@@ -63,9 +63,9 @@ const J = () => y, V = () => y, X = /* @__PURE__ */ r("div")({
|
|
|
63
63
|
class: "g1m0xfmw",
|
|
64
64
|
propsAsIs: !0
|
|
65
65
|
}), ne = ({ type: e, close: s }) => {
|
|
66
|
-
const t =
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
66
|
+
const t = O[e];
|
|
67
|
+
return /* @__PURE__ */ i(X, { children: [
|
|
68
|
+
/* @__PURE__ */ i(Z, { children: [
|
|
69
69
|
(t == null ? void 0 : t.iconName) && /* @__PURE__ */ a(ee, { name: t.iconName }),
|
|
70
70
|
(t == null ? void 0 : t.label) && /* @__PURE__ */ a(se, { children: t.label })
|
|
71
71
|
] }),
|
|
@@ -88,17 +88,17 @@ const oe = /* @__PURE__ */ r("div")({
|
|
|
88
88
|
src: e
|
|
89
89
|
})
|
|
90
90
|
});
|
|
91
|
-
const
|
|
91
|
+
const ce = /* @__PURE__ */ r("div")({
|
|
92
92
|
name: "x",
|
|
93
93
|
class: "xk8r1eq",
|
|
94
94
|
propsAsIs: !1
|
|
95
|
-
}),
|
|
95
|
+
}), ie = ({
|
|
96
96
|
openedQuestion: e,
|
|
97
97
|
closeQuestion: s,
|
|
98
98
|
vote: t
|
|
99
99
|
}) => {
|
|
100
100
|
var n;
|
|
101
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ i(ce, {
|
|
102
102
|
children: [/* @__PURE__ */ a(ne, {
|
|
103
103
|
close: s,
|
|
104
104
|
type: (e == null ? void 0 : e.type) || K.UNSET
|
|
@@ -111,10 +111,10 @@ const ie = /* @__PURE__ */ r("div")({
|
|
|
111
111
|
});
|
|
112
112
|
}, de = ({ leaderboardList: e }) => {
|
|
113
113
|
const { data: s } = p(e.$store), [t, n] = v(void 0), l = (o) => {
|
|
114
|
-
const
|
|
115
|
-
n(
|
|
114
|
+
const c = s.find((d) => d.userId === o);
|
|
115
|
+
n(c);
|
|
116
116
|
};
|
|
117
|
-
return /* @__PURE__ */
|
|
117
|
+
return /* @__PURE__ */ i(g, { children: [
|
|
118
118
|
t && /* @__PURE__ */ a(R, { comeBack: () => l(null), ...t }),
|
|
119
119
|
!t && /* @__PURE__ */ a(F, { fetchMore: e.fetchMore, items: s, openItemDetail: l })
|
|
120
120
|
] });
|
|
@@ -126,13 +126,13 @@ const ie = /* @__PURE__ */ r("div")({
|
|
|
126
126
|
return s != null && s.summary ? /* @__PURE__ */ a(q, { ...s.summary, ...s.percentage }) : /* @__PURE__ */ a("div", { children: "wait user..." });
|
|
127
127
|
}, me = ({ gamification: e }) => {
|
|
128
128
|
const [s, t] = v(b.HOME);
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ i(g, { children: [
|
|
130
|
+
/* @__PURE__ */ i(G, { children: [
|
|
131
131
|
/* @__PURE__ */ a(H, { activePage: s, toggleActivePage: t }),
|
|
132
132
|
s === b.HOME && /* @__PURE__ */ a(ue, { store: e.userSummary.getStore() })
|
|
133
133
|
] }),
|
|
134
|
-
s === b.HOME && /* @__PURE__ */ a(
|
|
135
|
-
s === b.LEADERBOARD && /* @__PURE__ */ a(
|
|
134
|
+
s === b.HOME && /* @__PURE__ */ a(x, { children: /* @__PURE__ */ a(pe, { openQuestion: e.openQuestion, store: e.questions.getStore() }) }),
|
|
135
|
+
s === b.LEADERBOARD && /* @__PURE__ */ a(x, { style: { flex: "1 1 auto" }, children: /* @__PURE__ */ a(de, { leaderboardList: e.leaderboardList }) })
|
|
136
136
|
] });
|
|
137
137
|
};
|
|
138
138
|
const he = () => W, ve = /* @__PURE__ */ r(he())({
|
|
@@ -147,10 +147,10 @@ const he = () => W, ve = /* @__PURE__ */ r(he())({
|
|
|
147
147
|
loading: t,
|
|
148
148
|
data: n
|
|
149
149
|
} = p(e.openedQuestion);
|
|
150
|
-
return /* @__PURE__ */
|
|
150
|
+
return /* @__PURE__ */ i(g, {
|
|
151
151
|
children: [(t || n) && /* @__PURE__ */ a(ve, {
|
|
152
152
|
className: s,
|
|
153
|
-
children: /* @__PURE__ */ a(
|
|
153
|
+
children: /* @__PURE__ */ a(ie, {
|
|
154
154
|
closeQuestion: e.closeQuestion,
|
|
155
155
|
vote: e.submitAnswer,
|
|
156
156
|
openedQuestion: n
|
|
@@ -158,10 +158,6 @@ const he = () => W, ve = /* @__PURE__ */ r(he())({
|
|
|
158
158
|
}), /* @__PURE__ */ a($, {
|
|
159
159
|
className: s,
|
|
160
160
|
"data-nav": "true",
|
|
161
|
-
style: {
|
|
162
|
-
display: "flex",
|
|
163
|
-
flexDirection: "column"
|
|
164
|
-
},
|
|
165
161
|
children: /* @__PURE__ */ a(me, {
|
|
166
162
|
gamification: e
|
|
167
163
|
})
|
|
@@ -172,10 +168,10 @@ const he = () => W, ve = /* @__PURE__ */ r(he())({
|
|
|
172
168
|
className: s
|
|
173
169
|
}) => {
|
|
174
170
|
const t = p(e.openedInsight);
|
|
175
|
-
return /* @__PURE__ */
|
|
176
|
-
!t && e.insights && /* @__PURE__ */ a(
|
|
171
|
+
return /* @__PURE__ */ i(g, { children: [
|
|
172
|
+
!t && e.insights && /* @__PURE__ */ a(j, { className: s, highlights: e, store: e.insights.getStore() }),
|
|
177
173
|
t && /* @__PURE__ */ a(
|
|
178
|
-
|
|
174
|
+
D,
|
|
179
175
|
{
|
|
180
176
|
className: s,
|
|
181
177
|
openedInsight: t,
|
|
@@ -188,7 +184,7 @@ const he = () => W, ve = /* @__PURE__ */ r(he())({
|
|
|
188
184
|
sdk: e,
|
|
189
185
|
feature: s,
|
|
190
186
|
className: t
|
|
191
|
-
}) => E(() => s ? s.featureConfig.get().type ===
|
|
187
|
+
}) => E(() => s ? s.featureConfig.get().type === A.GAMES ? /* @__PURE__ */ a(_, { className: t, sdk: e, feature: s, children: /* @__PURE__ */ a(fe, { className: t, gamification: s, sdk: e }) }) : s.featureConfig.get().type === A.HIGHLIGHTS ? /* @__PURE__ */ a(_, { className: t, sdk: e, feature: s, children: /* @__PURE__ */ a(ge, { className: t, highlights: s, sdk: e }) }) : null : null, [e, s]);
|
|
192
188
|
const be = /* @__PURE__ */ r("button")({
|
|
193
189
|
name: "e",
|
|
194
190
|
class: "enu64b2",
|
|
@@ -201,33 +197,33 @@ const be = /* @__PURE__ */ r("button")({
|
|
|
201
197
|
name: "a",
|
|
202
198
|
class: "aka8vam",
|
|
203
199
|
propsAsIs: !1
|
|
204
|
-
}),
|
|
200
|
+
}), N = ({ disabled: e, active: s, onClick: t, label: n, icon: l }) => /* @__PURE__ */ a(be, { onClick: t, disabled: e, "data-selected": s, children: /* @__PURE__ */ i(g, { children: [
|
|
205
201
|
l && /* @__PURE__ */ a(ke, { children: l }),
|
|
206
202
|
/* @__PURE__ */ a(Se, { children: n })
|
|
207
203
|
] }) });
|
|
208
|
-
const $e = () => y,
|
|
204
|
+
const $e = () => y, Ae = /* @__PURE__ */ r($e())({
|
|
209
205
|
name: "a",
|
|
210
206
|
class: "a10lggiw",
|
|
211
207
|
propsAsIs: !0
|
|
212
|
-
}), f = "channels",
|
|
208
|
+
}), f = "channels", Ne = (e) => {
|
|
213
209
|
var s;
|
|
214
|
-
return /* @__PURE__ */ a(
|
|
210
|
+
return /* @__PURE__ */ a(N, {
|
|
215
211
|
...e,
|
|
216
212
|
id: "channels",
|
|
217
213
|
label: "Channels",
|
|
218
|
-
icon: /* @__PURE__ */ a(
|
|
214
|
+
icon: /* @__PURE__ */ a(Ae, {
|
|
219
215
|
name: "icon-btn-channels",
|
|
220
216
|
"data-selected": (s = e.active) == null ? void 0 : s.toString()
|
|
221
217
|
})
|
|
222
218
|
});
|
|
223
219
|
};
|
|
224
|
-
const
|
|
220
|
+
const xe = () => y, Ie = /* @__PURE__ */ r(xe())({
|
|
225
221
|
name: "d",
|
|
226
222
|
class: "d1x5s8ie",
|
|
227
223
|
propsAsIs: !0
|
|
228
224
|
}), u = "featuredGroups", _e = (e) => {
|
|
229
225
|
var s;
|
|
230
|
-
return /* @__PURE__ */ a(
|
|
226
|
+
return /* @__PURE__ */ a(N, {
|
|
231
227
|
...e,
|
|
232
228
|
label: "FG+",
|
|
233
229
|
id: "featuredGroups",
|
|
@@ -243,7 +239,7 @@ const Le = () => y, Ee = /* @__PURE__ */ r(Le())({
|
|
|
243
239
|
propsAsIs: !0
|
|
244
240
|
}), k = "leaderboard", Ce = (e) => {
|
|
245
241
|
var s;
|
|
246
|
-
return /* @__PURE__ */ a(
|
|
242
|
+
return /* @__PURE__ */ a(N, {
|
|
247
243
|
...e,
|
|
248
244
|
label: "Leader Board",
|
|
249
245
|
id: "leaderboard",
|
|
@@ -253,23 +249,23 @@ const Le = () => y, Ee = /* @__PURE__ */ r(Le())({
|
|
|
253
249
|
})
|
|
254
250
|
});
|
|
255
251
|
};
|
|
256
|
-
const
|
|
252
|
+
const Qe = /* @__PURE__ */ r("div")({
|
|
257
253
|
name: "n",
|
|
258
254
|
class: "n1rlvhvz",
|
|
259
255
|
propsAsIs: !1
|
|
260
|
-
}),
|
|
256
|
+
}), Oe = ({
|
|
261
257
|
children: e,
|
|
262
258
|
className: s
|
|
263
|
-
}) => /* @__PURE__ */ a(
|
|
259
|
+
}) => /* @__PURE__ */ a(Qe, {
|
|
264
260
|
className: s,
|
|
265
261
|
children: e
|
|
266
262
|
});
|
|
267
|
-
const we = () =>
|
|
263
|
+
const we = () => Oe, Re = /* @__PURE__ */ r(we())({
|
|
268
264
|
name: "n",
|
|
269
265
|
class: "n9bnom",
|
|
270
266
|
propsAsIs: !0
|
|
271
|
-
}), Fe = ({ activeOverlay: e, setActiveOverlay: s, sdkReady: t, className: n }) => /* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */ a(
|
|
267
|
+
}), Fe = ({ activeOverlay: e, setActiveOverlay: s, sdkReady: t, className: n }) => /* @__PURE__ */ i(Re, { className: n, children: [
|
|
268
|
+
/* @__PURE__ */ a(Ne, { active: e === f, onClick: () => s(f) }),
|
|
273
269
|
/* @__PURE__ */ a(
|
|
274
270
|
_e,
|
|
275
271
|
{
|
|
@@ -288,9 +284,9 @@ const we = () => Qe, Re = /* @__PURE__ */ r(we())({
|
|
|
288
284
|
}
|
|
289
285
|
)
|
|
290
286
|
] }), Me = (e) => {
|
|
291
|
-
const [s, t] = v(!1), n = p(e.status) === "ready", [l, o] = v(u),
|
|
287
|
+
const [s, t] = v(!1), n = p(e.status) === "ready", [l, o] = v(u), c = C(
|
|
292
288
|
(d, m) => {
|
|
293
|
-
o(m), m === u ? (d && e.createEventSession(d), e.openFeature(
|
|
289
|
+
o(m), m === u ? (d && e.createEventSession(d), e.openFeature(A.GAMES)) : e.closeFeature();
|
|
294
290
|
},
|
|
295
291
|
[e]
|
|
296
292
|
);
|
|
@@ -300,15 +296,15 @@ const we = () => Qe, Re = /* @__PURE__ */ r(we())({
|
|
|
300
296
|
sdkEnabled: s,
|
|
301
297
|
sdkReady: n,
|
|
302
298
|
activeOverlay: l,
|
|
303
|
-
activateAndLoadOverlay:
|
|
299
|
+
activateAndLoadOverlay: c,
|
|
304
300
|
enableSdk: (d) => {
|
|
305
301
|
e.initializeApp().then(({ enabled: m, err: S }) => {
|
|
306
302
|
if (t(!0), S) {
|
|
307
|
-
|
|
303
|
+
c(d, f);
|
|
308
304
|
return;
|
|
309
305
|
}
|
|
310
306
|
if (m) {
|
|
311
|
-
|
|
307
|
+
c(d, u);
|
|
312
308
|
return;
|
|
313
309
|
}
|
|
314
310
|
});
|
|
@@ -322,8 +318,8 @@ const we = () => Qe, Re = /* @__PURE__ */ r(we())({
|
|
|
322
318
|
return L(() => {
|
|
323
319
|
const l = e.getFeatures();
|
|
324
320
|
if (s)
|
|
325
|
-
for (const [o,
|
|
326
|
-
o === s ?
|
|
321
|
+
for (const [o, c] of l)
|
|
322
|
+
o === s ? c.status.get() === h.Suspended && (c.enable(), n(c)) : c.status.get() === h.Ready && c.disable();
|
|
327
323
|
else {
|
|
328
324
|
for (const [, o] of l)
|
|
329
325
|
o.status.get() === h.Ready && o.disable();
|
|
@@ -338,15 +334,15 @@ const we = () => Qe, Re = /* @__PURE__ */ r(we())({
|
|
|
338
334
|
const [, t] = qe(e);
|
|
339
335
|
return /* @__PURE__ */ a(ye, { className: s, feature: t, sdk: e });
|
|
340
336
|
}, He = ({ sdk: e, overlays: s, children: t }) => {
|
|
341
|
-
const { sdkEnabled: n, sdkReady: l, activeOverlay: o, activateAndLoadOverlay:
|
|
342
|
-
return /* @__PURE__ */
|
|
337
|
+
const { sdkEnabled: n, sdkReady: l, activeOverlay: o, activateAndLoadOverlay: c, enableSdk: d, disableSdk: m } = Me(e);
|
|
338
|
+
return /* @__PURE__ */ i(P, { children: [
|
|
343
339
|
n && /* @__PURE__ */ a(
|
|
344
340
|
Fe,
|
|
345
341
|
{
|
|
346
342
|
sdkReady: l,
|
|
347
343
|
activeOverlay: o,
|
|
348
344
|
className: I,
|
|
349
|
-
setActiveOverlay: (S) =>
|
|
345
|
+
setActiveOverlay: (S) => c("", S)
|
|
350
346
|
}
|
|
351
347
|
),
|
|
352
348
|
/* @__PURE__ */ a(
|
|
@@ -367,18 +363,18 @@ const we = () => Qe, Re = /* @__PURE__ */ r(we())({
|
|
|
367
363
|
),
|
|
368
364
|
n && o === u && /* @__PURE__ */ a(Ge, { className: I, sdk: e })
|
|
369
365
|
] });
|
|
370
|
-
},
|
|
366
|
+
}, is = ({
|
|
371
367
|
sdkKey: e,
|
|
372
368
|
plugins: s,
|
|
373
369
|
children: t,
|
|
374
370
|
production: n = !0
|
|
375
371
|
}) => /* @__PURE__ */ a(T, { sdkKey: e, plugins: s, production: n, autoEnable: !1, children: t }), ds = ({ children: e, overlays: s }) => {
|
|
376
|
-
const { sdk: t, status: n } =
|
|
372
|
+
const { sdk: t, status: n } = Q(B);
|
|
377
373
|
if (n === z.UNSET)
|
|
378
374
|
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
379
375
|
return t ? /* @__PURE__ */ a("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ a(Y, { children: /* @__PURE__ */ a(He, { sdk: t, overlays: s, children: e }) }) }) : e({});
|
|
380
376
|
};
|
|
381
377
|
export {
|
|
382
|
-
|
|
378
|
+
is as MastersStreamLayerProvider,
|
|
383
379
|
ds as MastersStreamLayerSDKReact
|
|
384
380
|
};
|
package/lib/es/points.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { FeatureType as n } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { useMemo as p } from "react";
|
|
4
|
-
import { s, q as l, f as c, d as u, p as d } from "../index-
|
|
4
|
+
import { s, q as l, f as c, d as u, p as d } from "../index-5a223768.js";
|
|
5
5
|
import "react-auth-code-input";
|
|
6
6
|
import "react-phone-number-input";
|
|
7
7
|
import "@connectrpc/connect";
|
|
@@ -14,7 +14,7 @@ import "@streamlayer/sdk-web-api";
|
|
|
14
14
|
import "@streamlayer/sdk-web-storage";
|
|
15
15
|
import { useStore as a } from "@nanostores/react";
|
|
16
16
|
import "@streamlayer/sdk-web-notifications";
|
|
17
|
-
import { u as f } from "../app-
|
|
17
|
+
import { u as f } from "../app-3bc05c48.js";
|
|
18
18
|
import "./useStreamLayerApp.js";
|
|
19
19
|
import "@streamlayer/sdk-web";
|
|
20
20
|
import "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
8
8
|
* @license MIT
|
|
9
|
-
*/(function(r){const s=Ke,l=kt,h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=o,r.SlowBuffer=j,r.INSPECT_MAX_BYTES=50;const p=2147483647;r.kMaxLength=p,o.TYPED_ARRAY_SUPPORT=g(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function g(){try{const i=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(i,e),i.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function f(i){if(i>p)throw new RangeError('The value "'+i+'" is invalid for option "size"');const e=new Uint8Array(i);return Object.setPrototypeOf(e,o.prototype),e}function o(i,e,t){if(typeof i=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(i)}return y(i,e,t)}o.poolSize=8192;function y(i,e,t){if(typeof i=="string")return x(i,e);if(ArrayBuffer.isView(i))return D(i);if(i==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);if(Y(i,ArrayBuffer)||i&&Y(i.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Y(i,SharedArrayBuffer)||i&&Y(i.buffer,SharedArrayBuffer)))return I(i,e,t);if(typeof i=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const n=i.valueOf&&i.valueOf();if(n!=null&&n!==i)return o.from(n,e,t);const a=E(i);if(a)return a;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof i[Symbol.toPrimitive]=="function")return o.from(i[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i)}o.from=function(i,e,t){return y(i,e,t)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function A(i){if(typeof i!="number")throw new TypeError('"size" argument must be of type number');if(i<0)throw new RangeError('The value "'+i+'" is invalid for option "size"')}function w(i,e,t){return A(i),i<=0?f(i):e!==void 0?typeof t=="string"?f(i).fill(e,t):f(i).fill(e):f(i)}o.alloc=function(i,e,t){return w(i,e,t)};function N(i){return A(i),f(i<0?0:C(i)|0)}o.allocUnsafe=function(i){return N(i)},o.allocUnsafeSlow=function(i){return N(i)};function x(i,e){if((typeof e!="string"||e==="")&&(e="utf8"),!o.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=L(i,e)|0;let n=f(t);const a=n.write(i,e);return a!==t&&(n=n.slice(0,a)),n}function T(i){const e=i.length<0?0:C(i.length)|0,t=f(e);for(let n=0;n<e;n+=1)t[n]=i[n]&255;return t}function D(i){if(Y(i,Uint8Array)){const e=new Uint8Array(i);return I(e.buffer,e.byteOffset,e.byteLength)}return T(i)}function I(i,e,t){if(e<0||i.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(i.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&t===void 0?n=new Uint8Array(i):t===void 0?n=new Uint8Array(i,e):n=new Uint8Array(i,e,t),Object.setPrototypeOf(n,o.prototype),n}function E(i){if(o.isBuffer(i)){const e=C(i.length)|0,t=f(e);return t.length===0||i.copy(t,0,0,e),t}if(i.length!==void 0)return typeof i.length!="number"||Se(i.length)?f(0):T(i);if(i.type==="Buffer"&&Array.isArray(i.data))return T(i.data)}function C(i){if(i>=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return i|0}function j(i){return+i!=i&&(i=0),o.alloc(+i)}o.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==o.prototype},o.compare=function(e,t){if(Y(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,a=t.length;for(let c=0,d=Math.min(n,a);c<d;++c)if(e[c]!==t[c]){n=e[c],a=t[c];break}return n<a?-1:a<n?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return o.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const a=o.allocUnsafe(t);let c=0;for(n=0;n<e.length;++n){let d=e[n];if(Y(d,Uint8Array))c+d.length>a.length?(o.isBuffer(d)||(d=o.from(d)),d.copy(a,c)):Uint8Array.prototype.set.call(a,d,c);else if(o.isBuffer(d))d.copy(a,c);else throw new TypeError('"list" argument must be an Array of Buffers');c+=d.length}return a};function L(i,e){if(o.isBuffer(i))return i.length;if(ArrayBuffer.isView(i)||Y(i,ArrayBuffer))return i.byteLength;if(typeof i!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof i);const t=i.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let a=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Le(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return He(i).length;default:if(a)return n?-1:Le(i).length;e=(""+e).toLowerCase(),a=!0}}o.byteLength=L;function U(i,e,t){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(i||(i="utf8");;)switch(i){case"hex":return ne(this,e,t);case"utf8":case"utf-8":return re(this,e,t);case"ascii":return we(this,e,t);case"latin1":case"binary":return me(this,e,t);case"base64":return W(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ee(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),n=!0}}o.prototype._isBuffer=!0;function z(i,e,t){const n=i[e];i[e]=i[t],i[t]=n}o.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)z(this,t,t+1);return this},o.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)z(this,t,t+3),z(this,t+1,t+2);return this},o.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)z(this,t,t+7),z(this,t+1,t+6),z(this,t+2,t+5),z(this,t+3,t+4);return this},o.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?re(this,0,e):U.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:o.compare(this,e)===0},o.prototype.inspect=function(){let e="";const t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},h&&(o.prototype[h]=o.prototype.inspect),o.prototype.compare=function(e,t,n,a,c){if(Y(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),a===void 0&&(a=0),c===void 0&&(c=this.length),t<0||n>e.length||a<0||c>this.length)throw new RangeError("out of range index");if(a>=c&&t>=n)return 0;if(a>=c)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,a>>>=0,c>>>=0,this===e)return 0;let d=c-a,v=n-t;const B=Math.min(d,v),k=this.slice(a,c),b=e.slice(t,n);for(let S=0;S<B;++S)if(k[S]!==b[S]){d=k[S],v=b[S];break}return d<v?-1:v<d?1:0};function $(i,e,t,n,a){if(i.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Se(t)&&(t=a?0:i.length-1),t<0&&(t=i.length+t),t>=i.length){if(a)return-1;t=i.length-1}else if(t<0)if(a)t=0;else return-1;if(typeof e=="string"&&(e=o.from(e,n)),o.isBuffer(e))return e.length===0?-1:P(i,e,t,n,a);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(i,e,t):Uint8Array.prototype.lastIndexOf.call(i,e,t):P(i,[e],t,n,a);throw new TypeError("val must be string, number or Buffer")}function P(i,e,t,n,a){let c=1,d=i.length,v=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(i.length<2||e.length<2)return-1;c=2,d/=2,v/=2,t/=2}function B(b,S){return c===1?b[S]:b.readUInt16BE(S*c)}let k;if(a){let b=-1;for(k=t;k<d;k++)if(B(i,k)===B(e,b===-1?0:k-b)){if(b===-1&&(b=k),k-b+1===v)return b*c}else b!==-1&&(k-=k-b),b=-1}else for(t+v>d&&(t=d-v),k=t;k>=0;k--){let b=!0;for(let S=0;S<v;S++)if(B(i,k+S)!==B(e,S)){b=!1;break}if(b)return k}return-1}o.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},o.prototype.indexOf=function(e,t,n){return $(this,e,t,n,!0)},o.prototype.lastIndexOf=function(e,t,n){return $(this,e,t,n,!1)};function G(i,e,t,n){t=Number(t)||0;const a=i.length-t;n?(n=Number(n),n>a&&(n=a)):n=a;const c=e.length;n>c/2&&(n=c/2);let d;for(d=0;d<n;++d){const v=parseInt(e.substr(d*2,2),16);if(Se(v))return d;i[t+d]=v}return d}function q(i,e,t,n){return ye(Le(e,i.length-t),i,t,n)}function ae(i,e,t,n){return ye(nt(e),i,t,n)}function ie(i,e,t,n){return ye(He(e),i,t,n)}function le(i,e,t,n){return ye(st(e,i.length-t),i,t,n)}o.prototype.write=function(e,t,n,a){if(t===void 0)a="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")a=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,a===void 0&&(a="utf8")):(a=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const c=this.length-t;if((n===void 0||n>c)&&(n=c),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let d=!1;for(;;)switch(a){case"hex":return G(this,e,t,n);case"utf8":case"utf-8":return q(this,e,t,n);case"ascii":case"latin1":case"binary":return ae(this,e,t,n);case"base64":return ie(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le(this,e,t,n);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),d=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function W(i,e,t){return e===0&&t===i.length?s.fromByteArray(i):s.fromByteArray(i.slice(e,t))}function re(i,e,t){t=Math.min(i.length,t);const n=[];let a=e;for(;a<t;){const c=i[a];let d=null,v=c>239?4:c>223?3:c>191?2:1;if(a+v<=t){let B,k,b,S;switch(v){case 1:c<128&&(d=c);break;case 2:B=i[a+1],(B&192)===128&&(S=(c&31)<<6|B&63,S>127&&(d=S));break;case 3:B=i[a+1],k=i[a+2],(B&192)===128&&(k&192)===128&&(S=(c&15)<<12|(B&63)<<6|k&63,S>2047&&(S<55296||S>57343)&&(d=S));break;case 4:B=i[a+1],k=i[a+2],b=i[a+3],(B&192)===128&&(k&192)===128&&(b&192)===128&&(S=(c&15)<<18|(B&63)<<12|(k&63)<<6|b&63,S>65535&&S<1114112&&(d=S))}}d===null?(d=65533,v=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|d&1023),n.push(d),a+=v}return ve(n)}const ge=4096;function ve(i){const e=i.length;if(e<=ge)return String.fromCharCode.apply(String,i);let t="",n=0;for(;n<e;)t+=String.fromCharCode.apply(String,i.slice(n,n+=ge));return t}function we(i,e,t){let n="";t=Math.min(i.length,t);for(let a=e;a<t;++a)n+=String.fromCharCode(i[a]&127);return n}function me(i,e,t){let n="";t=Math.min(i.length,t);for(let a=e;a<t;++a)n+=String.fromCharCode(i[a]);return n}function ne(i,e,t){const n=i.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);let a="";for(let c=e;c<t;++c)a+=ot[i[c]];return a}function Ee(i,e,t){const n=i.slice(e,t);let a="";for(let c=0;c<n.length-1;c+=2)a+=String.fromCharCode(n[c]+n[c+1]*256);return a}o.prototype.slice=function(e,t){const n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);const a=this.subarray(e,t);return Object.setPrototypeOf(a,o.prototype),a};function _(i,e,t){if(i%1!==0||i<0)throw new RangeError("offset is not uint");if(i+e>t)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e],c=1,d=0;for(;++d<t&&(c*=256);)a+=this[e+d]*c;return a},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e+--t],c=1;for(;t>0&&(c*=256);)a+=this[e+--t]*c;return a},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e=e>>>0,t||_(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||_(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||_(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,c=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(a)+(BigInt(c)<<BigInt(32))}),o.prototype.readBigUInt64BE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],c=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(a)<<BigInt(32))+BigInt(c)}),o.prototype.readIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e],c=1,d=0;for(;++d<t&&(c*=256);)a+=this[e+d]*c;return c*=128,a>=c&&(a-=Math.pow(2,8*t)),a},o.prototype.readIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=t,c=1,d=this[e+--a];for(;a>0&&(c*=256);)d+=this[e+--a]*c;return c*=128,d>=c&&(d-=Math.pow(2,8*t)),d},o.prototype.readInt8=function(e,t){return e=e>>>0,t||_(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){e=e>>>0,t||_(e,2,this.length);const n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},o.prototype.readInt16BE=function(e,t){e=e>>>0,t||_(e,2,this.length);const n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},o.prototype.readInt32LE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(a)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),o.prototype.readBigInt64BE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(a)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)}),o.prototype.readFloatLE=function(e,t){return e=e>>>0,t||_(e,4,this.length),l.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e=e>>>0,t||_(e,4,this.length),l.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||_(e,8,this.length),l.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||_(e,8,this.length),l.read(this,e,!1,52,8)};function F(i,e,t,n,a,c){if(!o.isBuffer(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||e<c)throw new RangeError('"value" argument is out of bounds');if(t+n>i.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,n,a){if(e=+e,t=t>>>0,n=n>>>0,!a){const v=Math.pow(2,8*n)-1;F(this,e,t,n,v,0)}let c=1,d=0;for(this[t]=e&255;++d<n&&(c*=256);)this[t+d]=e/c&255;return t+n},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,n,a){if(e=+e,t=t>>>0,n=n>>>0,!a){const v=Math.pow(2,8*n)-1;F(this,e,t,n,v,0)}let c=n-1,d=1;for(this[t+c]=e&255;--c>=0&&(d*=256);)this[t+c]=e/d&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,1,255,0),this[t]=e&255,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Ae(i,e,t,n,a){Ze(e,n,a,i,t,7);let c=Number(e&BigInt(4294967295));i[t++]=c,c=c>>8,i[t++]=c,c=c>>8,i[t++]=c,c=c>>8,i[t++]=c;let d=Number(e>>BigInt(32)&BigInt(4294967295));return i[t++]=d,d=d>>8,i[t++]=d,d=d>>8,i[t++]=d,d=d>>8,i[t++]=d,t}function se(i,e,t,n,a){Ze(e,n,a,i,t,7);let c=Number(e&BigInt(4294967295));i[t+7]=c,c=c>>8,i[t+6]=c,c=c>>8,i[t+5]=c,c=c>>8,i[t+4]=c;let d=Number(e>>BigInt(32)&BigInt(4294967295));return i[t+3]=d,d=d>>8,i[t+2]=d,d=d>>8,i[t+1]=d,d=d>>8,i[t]=d,t+8}o.prototype.writeBigUInt64LE=H(function(e,t=0){return Ae(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=H(function(e,t=0){return se(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(e,t,n,a){if(e=+e,t=t>>>0,!a){const B=Math.pow(2,8*n-1);F(this,e,t,n,B-1,-B)}let c=0,d=1,v=0;for(this[t]=e&255;++c<n&&(d*=256);)e<0&&v===0&&this[t+c-1]!==0&&(v=1),this[t+c]=(e/d>>0)-v&255;return t+n},o.prototype.writeIntBE=function(e,t,n,a){if(e=+e,t=t>>>0,!a){const B=Math.pow(2,8*n-1);F(this,e,t,n,B-1,-B)}let c=n-1,d=1,v=0;for(this[t+c]=e&255;--c>=0&&(d*=256);)e<0&&v===0&&this[t+c+1]!==0&&(v=1),this[t+c]=(e/d>>0)-v&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},o.prototype.writeBigInt64LE=H(function(e,t=0){return Ae(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=H(function(e,t=0){return se(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ne(i,e,t,n,a,c){if(t+n>i.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Ye(i,e,t,n,a){return e=+e,t=t>>>0,a||Ne(i,e,t,4),l.write(i,e,t,n,23,4),t+4}o.prototype.writeFloatLE=function(e,t,n){return Ye(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return Ye(this,e,t,!1,n)};function Qe(i,e,t,n,a){return e=+e,t=t>>>0,a||Ne(i,e,t,8),l.write(i,e,t,n,52,8),t+8}o.prototype.writeDoubleLE=function(e,t,n){return Qe(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return Qe(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,a){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!a&&a!==0&&(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a<n&&(a=n),a===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-n&&(a=e.length-t+n);const c=a-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,a):Uint8Array.prototype.set.call(e,this.subarray(n,a),t),c},o.prototype.fill=function(e,t,n,a){if(typeof e=="string"){if(typeof t=="string"?(a=t,t=0,n=this.length):typeof n=="string"&&(a=n,n=this.length),a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!o.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(e.length===1){const d=e.charCodeAt(0);(a==="utf8"&&d<128||a==="latin1")&&(e=d)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let c;if(typeof e=="number")for(c=t;c<n;++c)this[c]=e;else{const d=o.isBuffer(e)?e:o.from(e,a),v=d.length;if(v===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(c=0;c<n-t;++c)this[c+t]=d[c%v]}return this};const J={};function De(i,e,t){J[i]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${i}]`,this.stack,delete this.name}get code(){return i}set code(a){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:a,writable:!0})}toString(){return`${this.name} [${i}]: ${this.message}`}}}De("ERR_BUFFER_OUT_OF_BOUNDS",function(i){return i?`${i} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),De("ERR_INVALID_ARG_TYPE",function(i,e){return`The "${i}" argument must be of type number. Received type ${typeof e}`},TypeError),De("ERR_OUT_OF_RANGE",function(i,e,t){let n=`The value of "${i}" is out of range.`,a=t;return Number.isInteger(t)&&Math.abs(t)>2**32?a=Ve(String(t)):typeof t=="bigint"&&(a=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(a=Ve(a)),a+="n"),n+=` It must be ${e}. Received ${a}`,n},RangeError);function Ve(i){let e="",t=i.length;const n=i[0]==="-"?1:0;for(;t>=n+4;t-=3)e=`_${i.slice(t-3,t)}${e}`;return`${i.slice(0,t)}${e}`}function tt(i,e,t){X(e,"offset"),(i[e]===void 0||i[e+t]===void 0)&&oe(e,i.length-(t+1))}function Ze(i,e,t,n,a,c){if(i>t||i<e){const d=typeof e=="bigint"?"n":"";let v;throw c>3?e===0||e===BigInt(0)?v=`>= 0${d} and < 2${d} ** ${(c+1)*8}${d}`:v=`>= -(2${d} ** ${(c+1)*8-1}${d}) and < 2 ** ${(c+1)*8-1}${d}`:v=`>= ${e}${d} and <= ${t}${d}`,new J.ERR_OUT_OF_RANGE("value",v,i)}tt(n,a,c)}function X(i,e){if(typeof i!="number")throw new J.ERR_INVALID_ARG_TYPE(e,"number",i)}function oe(i,e,t){throw Math.floor(i)!==i?(X(i,t),new J.ERR_OUT_OF_RANGE(t||"offset","an integer",i)):e<0?new J.ERR_BUFFER_OUT_OF_BOUNDS:new J.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,i)}const it=/[^+/0-9A-Za-z-_]/g;function rt(i){if(i=i.split("=")[0],i=i.trim().replace(it,""),i.length<2)return"";for(;i.length%4!==0;)i=i+"=";return i}function Le(i,e){e=e||1/0;let t;const n=i.length;let a=null;const c=[];for(let d=0;d<n;++d){if(t=i.charCodeAt(d),t>55295&&t<57344){if(!a){if(t>56319){(e-=3)>-1&&c.push(239,191,189);continue}else if(d+1===n){(e-=3)>-1&&c.push(239,191,189);continue}a=t;continue}if(t<56320){(e-=3)>-1&&c.push(239,191,189),a=t;continue}t=(a-55296<<10|t-56320)+65536}else a&&(e-=3)>-1&&c.push(239,191,189);if(a=null,t<128){if((e-=1)<0)break;c.push(t)}else if(t<2048){if((e-=2)<0)break;c.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;c.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;c.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return c}function nt(i){const e=[];for(let t=0;t<i.length;++t)e.push(i.charCodeAt(t)&255);return e}function st(i,e){let t,n,a;const c=[];for(let d=0;d<i.length&&!((e-=2)<0);++d)t=i.charCodeAt(d),n=t>>8,a=t%256,c.push(a),c.push(n);return c}function He(i){return s.toByteArray(rt(i))}function ye(i,e,t,n){let a;for(a=0;a<n&&!(a+t>=e.length||a>=i.length);++a)e[a+t]=i[a];return a}function Y(i,e){return i instanceof e||i!=null&&i.constructor!=null&&i.constructor.name!=null&&i.constructor.name===e.name}function Se(i){return i!==i}const ot=function(){const i="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){const n=t*16;for(let a=0;a<16;++a)e[n+a]=i[t]+i[a]}return e}();function H(i){return typeof BigInt>"u"?at:i}function at(){throw new Error("BigInt not supported")}})(wi);var Ai={exports:{}},Q=Ai.exports={},ce,ue;function xt(){throw new Error("setTimeout has not been defined")}function Ct(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ce=setTimeout:ce=xt}catch{ce=xt}try{typeof clearTimeout=="function"?ue=clearTimeout:ue=Ct}catch{ue=Ct}})();function Ni(r){if(ce===setTimeout)return setTimeout(r,0);if((ce===xt||!ce)&&setTimeout)return ce=setTimeout,setTimeout(r,0);try{return ce(r,0)}catch{try{return ce.call(null,r,0)}catch{return ce.call(this,r,0)}}}function ao(r){if(ue===clearTimeout)return clearTimeout(r);if((ue===Ct||!ue)&&clearTimeout)return ue=clearTimeout,clearTimeout(r);try{return ue(r)}catch{try{return ue.call(null,r)}catch{return ue.call(this,r)}}}var Ie=[],Fe=!1,ke,Je=-1;function lo(){!Fe||!ke||(Fe=!1,ke.length?Ie=ke.concat(Ie):Je=-1,Ie.length&&ji())}function ji(){if(!Fe){var r=Ni(lo);Fe=!0;for(var s=Ie.length;s;){for(ke=Ie,Ie=[];++Je<s;)ke&&ke[Je].run();Je=-1,s=Ie.length}ke=null,Fe=!1,ao(r)}}Q.nextTick=function(r){var s=new Array(arguments.length-1);if(arguments.length>1)for(var l=1;l<arguments.length;l++)s[l-1]=arguments[l];Ie.push(new Ti(r,s)),Ie.length===1&&!Fe&&Ni(ji)};function Ti(r,s){this.fun=r,this.array=s}Ti.prototype.run=function(){this.fun.apply(null,this.array)};Q.title="browser";Q.browser=!0;Q.env={};Q.argv=[];Q.version="";Q.versions={};function xe(){}Q.on=xe;Q.addListener=xe;Q.once=xe;Q.off=xe;Q.removeListener=xe;Q.removeAllListeners=xe;Q.emit=xe;Q.prependListener=xe;Q.prependOnceListener=xe;Q.listeners=function(r){return[]};Q.binding=function(r){throw new Error("process.binding is not supported")};Q.cwd=function(){return"/"};Q.chdir=function(r){throw new Error("process.chdir is not supported")};Q.umask=function(){return 0};var co=Ai.exports;(function(r){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});const s=wi,l=co,h=f=>f&&f.__esModule?f:{default:f},p=h(l),g=globalThis||void 0||self;Object.defineProperty(r,"Buffer",{enumerable:!0,get:()=>s.Buffer}),Object.defineProperty(r,"process",{enumerable:!0,get:()=>p.default}),r.global=g})(Ci);let te;typeof window<"u"?te=window:typeof self<"u"?te=self:te=Ci.global;let wt=null,Et=null;const Zt=20,ft=te.clearTimeout,Ht=te.setTimeout,gt=te.cancelAnimationFrame||te.mozCancelAnimationFrame||te.webkitCancelAnimationFrame,Gt=te.requestAnimationFrame||te.mozRequestAnimationFrame||te.webkitRequestAnimationFrame;gt==null||Gt==null?(wt=ft,Et=function(s){return Ht(s,Zt)}):(wt=function([s,l]){gt(s),ft(l)},Et=function(s){const l=Gt(function(){ft(h),s()}),h=Ht(function(){gt(l),s()},Zt);return[l,h]});function uo(r){let s,l,h,p,g,f,o;const y=typeof document<"u"&&document.attachEvent;if(!y){f=function(C){const j=C.__resizeTriggers__,L=j.firstElementChild,U=j.lastElementChild,z=L.firstElementChild;U.scrollLeft=U.scrollWidth,U.scrollTop=U.scrollHeight,z.style.width=L.offsetWidth+1+"px",z.style.height=L.offsetHeight+1+"px",L.scrollLeft=L.scrollWidth,L.scrollTop=L.scrollHeight},g=function(C){return C.offsetWidth!==C.__resizeLast__.width||C.offsetHeight!==C.__resizeLast__.height},o=function(C){if(C.target.className&&typeof C.target.className.indexOf=="function"&&C.target.className.indexOf("contract-trigger")<0&&C.target.className.indexOf("expand-trigger")<0)return;const j=this;f(this),this.__resizeRAF__&&wt(this.__resizeRAF__),this.__resizeRAF__=Et(function(){g(j)&&(j.__resizeLast__.width=j.offsetWidth,j.__resizeLast__.height=j.offsetHeight,j.__resizeListeners__.forEach(function(z){z.call(j,C)}))})};let x=!1,T="";h="animationstart";const D="Webkit Moz O ms".split(" ");let I="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),E="";{const C=document.createElement("fakeelement");if(C.style.animationName!==void 0&&(x=!0),x===!1){for(let j=0;j<D.length;j++)if(C.style[D[j]+"AnimationName"]!==void 0){E=D[j],T="-"+E.toLowerCase()+"-",h=I[j],x=!0;break}}}l="resizeanim",s="@"+T+"keyframes "+l+" { from { opacity: 0; } to { opacity: 0; } } ",p=T+"animation: 1ms "+l+"; "}const A=function(x){if(!x.getElementById("detectElementResize")){const T=(s||"")+".resize-triggers { "+(p||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',D=x.head||x.getElementsByTagName("head")[0],I=x.createElement("style");I.id="detectElementResize",I.type="text/css",r!=null&&I.setAttribute("nonce",r),I.styleSheet?I.styleSheet.cssText=T:I.appendChild(x.createTextNode(T)),D.appendChild(I)}};return{addResizeListener:function(x,T){if(y)x.attachEvent("onresize",T);else{if(!x.__resizeTriggers__){const D=x.ownerDocument,I=te.getComputedStyle(x);I&&I.position==="static"&&(x.style.position="relative"),A(D),x.__resizeLast__={},x.__resizeListeners__=[],(x.__resizeTriggers__=D.createElement("div")).className="resize-triggers";const E=D.createElement("div");E.className="expand-trigger",E.appendChild(D.createElement("div"));const C=D.createElement("div");C.className="contract-trigger",x.__resizeTriggers__.appendChild(E),x.__resizeTriggers__.appendChild(C),x.appendChild(x.__resizeTriggers__),f(x),x.addEventListener("scroll",o,!0),h&&(x.__resizeTriggers__.__animationListener__=function(L){L.animationName===l&&f(x)},x.__resizeTriggers__.addEventListener(h,x.__resizeTriggers__.__animationListener__))}x.__resizeListeners__.push(T)}},removeResizeListener:function(x,T){if(y)x.detachEvent("onresize",T);else if(x.__resizeListeners__.splice(x.__resizeListeners__.indexOf(T),1),!x.__resizeListeners__.length){x.removeEventListener("scroll",o,!0),x.__resizeTriggers__.__animationListener__&&(x.__resizeTriggers__.removeEventListener(h,x.__resizeTriggers__.__animationListener__),x.__resizeTriggers__.__animationListener__=null);try{x.__resizeTriggers__=!x.removeChild(x.__resizeTriggers__)}catch{}}}}}class ho extends R.Component{constructor(...s){super(...s),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:l,disableWidth:h,onResize:p}=this.props;if(this._parentNode){var g,f,o,y;const A=window.getComputedStyle(this._parentNode)||{},w=parseFloat((g=A.paddingLeft)!==null&&g!==void 0?g:"0"),N=parseFloat((f=A.paddingRight)!==null&&f!==void 0?f:"0"),x=parseFloat((o=A.paddingTop)!==null&&o!==void 0?o:"0"),T=parseFloat((y=A.paddingBottom)!==null&&y!==void 0?y:"0"),D=this._parentNode.getBoundingClientRect(),I=D.height-x-T,E=D.width-w-N,C=this._parentNode.offsetHeight-x-T,j=this._parentNode.offsetWidth-w-N;(!l&&(this.state.height!==C||this.state.scaledHeight!==I)||!h&&(this.state.width!==j||this.state.scaledWidth!==E))&&(this.setState({height:C,width:j,scaledHeight:I,scaledWidth:E}),typeof p=="function"&&p({height:C,scaledHeight:I,scaledWidth:E,width:j}))}},this._setRef=l=>{this._autoSizer=l}}componentDidMount(){const{nonce:s}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=uo(s),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:s,defaultHeight:l,defaultWidth:h,disableHeight:p=!1,disableWidth:g=!1,nonce:f,onResize:o,style:y={},tagName:A="div",...w}=this.props,{height:N,scaledHeight:x,scaledWidth:T,width:D}=this.state,I={overflow:"visible"},E={};let C=!1;return p||(N===0&&(C=!0),I.height=0,E.height=N,E.scaledHeight=x),g||(D===0&&(C=!0),I.width=0,E.width=D,E.scaledWidth=T),R.createElement(A,{ref:this._setRef,style:{...I,...y},...w},!C&&s(E))}}function At(){return At=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var h in l)Object.prototype.hasOwnProperty.call(l,h)&&(r[h]=l[h])}return r},At.apply(this,arguments)}function Wt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Nt(r,s){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,p){return h.__proto__=p,h},Nt(r,s)}function po(r,s){r.prototype=Object.create(s.prototype),r.prototype.constructor=r,Nt(r,s)}var qt=Number.isNaN||function(s){return typeof s=="number"&&s!==s};function fo(r,s){return!!(r===s||qt(r)&&qt(s))}function go(r,s){if(r.length!==s.length)return!1;for(var l=0;l<r.length;l++)if(!fo(r[l],s[l]))return!1;return!0}function mt(r,s){s===void 0&&(s=go);var l,h=[],p,g=!1;function f(){for(var o=[],y=0;y<arguments.length;y++)o[y]=arguments[y];return g&&l===this&&s(o,h)||(p=r.apply(this,o),g=!0,l=this,h=o),p}return f}var mo=typeof performance=="object"&&typeof performance.now=="function",Jt=mo?function(){return performance.now()}:function(){return Date.now()};function Xt(r){cancelAnimationFrame(r.id)}function yo(r,s){var l=Jt();function h(){Jt()-l>=s?r.call(null):p.id=requestAnimationFrame(h)}var p={id:requestAnimationFrame(h)};return p}var yt=-1;function Kt(r){if(r===void 0&&(r=!1),yt===-1||r){var s=document.createElement("div"),l=s.style;l.width="50px",l.height="50px",l.overflow="scroll",document.body.appendChild(s),yt=s.offsetWidth-s.clientWidth,document.body.removeChild(s)}return yt}var Oe=null;function ei(r){if(r===void 0&&(r=!1),Oe===null||r){var s=document.createElement("div"),l=s.style;l.width="50px",l.height="50px",l.overflow="scroll",l.direction="rtl";var h=document.createElement("div"),p=h.style;return p.width="100px",p.height="100px",s.appendChild(h),document.body.appendChild(s),s.scrollLeft>0?Oe="positive-descending":(s.scrollLeft=1,s.scrollLeft===0?Oe="negative":Oe="positive-ascending"),document.body.removeChild(s),Oe}return Oe}var Io=150,Mo=function(s,l){return s};function xo(r){var s,l=r.getItemOffset,h=r.getEstimatedTotalSize,p=r.getItemSize,g=r.getOffsetForIndexAndAlignment,f=r.getStartIndexForOffset,o=r.getStopIndexForStartIndex,y=r.initInstanceProps,A=r.shouldResetStyleCacheOnItemSizeChange,w=r.validateProps;return s=function(N){po(x,N);function x(D){var I;return I=N.call(this,D)||this,I._instanceProps=y(I.props,Wt(I)),I._outerRef=void 0,I._resetIsScrollingTimeoutId=null,I.state={instance:Wt(I),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof I.props.initialScrollOffset=="number"?I.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},I._callOnItemsRendered=void 0,I._callOnItemsRendered=mt(function(E,C,j,L){return I.props.onItemsRendered({overscanStartIndex:E,overscanStopIndex:C,visibleStartIndex:j,visibleStopIndex:L})}),I._callOnScroll=void 0,I._callOnScroll=mt(function(E,C,j){return I.props.onScroll({scrollDirection:E,scrollOffset:C,scrollUpdateWasRequested:j})}),I._getItemStyle=void 0,I._getItemStyle=function(E){var C=I.props,j=C.direction,L=C.itemSize,U=C.layout,z=I._getItemStyleCache(A&&L,A&&U,A&&j),$;if(z.hasOwnProperty(E))$=z[E];else{var P=l(I.props,E,I._instanceProps),G=p(I.props,E,I._instanceProps),q=j==="horizontal"||U==="horizontal",ae=j==="rtl",ie=q?P:0;z[E]=$={position:"absolute",left:ae?void 0:ie,right:ae?ie:void 0,top:q?0:P,height:q?"100%":G,width:q?G:"100%"}}return $},I._getItemStyleCache=void 0,I._getItemStyleCache=mt(function(E,C,j){return{}}),I._onScrollHorizontal=function(E){var C=E.currentTarget,j=C.clientWidth,L=C.scrollLeft,U=C.scrollWidth;I.setState(function(z){if(z.scrollOffset===L)return null;var $=I.props.direction,P=L;if($==="rtl")switch(ei()){case"negative":P=-L;break;case"positive-descending":P=U-j-L;break}return P=Math.max(0,Math.min(P,U-j)),{isScrolling:!0,scrollDirection:z.scrollOffset<L?"forward":"backward",scrollOffset:P,scrollUpdateWasRequested:!1}},I._resetIsScrollingDebounced)},I._onScrollVertical=function(E){var C=E.currentTarget,j=C.clientHeight,L=C.scrollHeight,U=C.scrollTop;I.setState(function(z){if(z.scrollOffset===U)return null;var $=Math.max(0,Math.min(U,L-j));return{isScrolling:!0,scrollDirection:z.scrollOffset<$?"forward":"backward",scrollOffset:$,scrollUpdateWasRequested:!1}},I._resetIsScrollingDebounced)},I._outerRefSetter=function(E){var C=I.props.outerRef;I._outerRef=E,typeof C=="function"?C(E):C!=null&&typeof C=="object"&&C.hasOwnProperty("current")&&(C.current=E)},I._resetIsScrollingDebounced=function(){I._resetIsScrollingTimeoutId!==null&&Xt(I._resetIsScrollingTimeoutId),I._resetIsScrollingTimeoutId=yo(I._resetIsScrolling,Io)},I._resetIsScrolling=function(){I._resetIsScrollingTimeoutId=null,I.setState({isScrolling:!1},function(){I._getItemStyleCache(-1,null)})},I}x.getDerivedStateFromProps=function(I,E){return Co(I,E),w(I),null};var T=x.prototype;return T.scrollTo=function(I){I=Math.max(0,I),this.setState(function(E){return E.scrollOffset===I?null:{scrollDirection:E.scrollOffset<I?"forward":"backward",scrollOffset:I,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},T.scrollToItem=function(I,E){E===void 0&&(E="auto");var C=this.props,j=C.itemCount,L=C.layout,U=this.state.scrollOffset;I=Math.max(0,Math.min(I,j-1));var z=0;if(this._outerRef){var $=this._outerRef;L==="vertical"?z=$.scrollWidth>$.clientWidth?Kt():0:z=$.scrollHeight>$.clientHeight?Kt():0}this.scrollTo(g(this.props,I,E,U,this._instanceProps,z))},T.componentDidMount=function(){var I=this.props,E=I.direction,C=I.initialScrollOffset,j=I.layout;if(typeof C=="number"&&this._outerRef!=null){var L=this._outerRef;E==="horizontal"||j==="horizontal"?L.scrollLeft=C:L.scrollTop=C}this._callPropsCallbacks()},T.componentDidUpdate=function(){var I=this.props,E=I.direction,C=I.layout,j=this.state,L=j.scrollOffset,U=j.scrollUpdateWasRequested;if(U&&this._outerRef!=null){var z=this._outerRef;if(E==="horizontal"||C==="horizontal")if(E==="rtl")switch(ei()){case"negative":z.scrollLeft=-L;break;case"positive-ascending":z.scrollLeft=L;break;default:var $=z.clientWidth,P=z.scrollWidth;z.scrollLeft=P-$-L;break}else z.scrollLeft=L;else z.scrollTop=L}this._callPropsCallbacks()},T.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Xt(this._resetIsScrollingTimeoutId)},T.render=function(){var I=this.props,E=I.children,C=I.className,j=I.direction,L=I.height,U=I.innerRef,z=I.innerElementType,$=I.innerTagName,P=I.itemCount,G=I.itemData,q=I.itemKey,ae=q===void 0?Mo:q,ie=I.layout,le=I.outerElementType,W=I.outerTagName,re=I.style,ge=I.useIsScrolling,ve=I.width,we=this.state.isScrolling,me=j==="horizontal"||ie==="horizontal",ne=me?this._onScrollHorizontal:this._onScrollVertical,Ee=this._getRangeToRender(),_=Ee[0],F=Ee[1],Ae=[];if(P>0)for(var se=_;se<=F;se++)Ae.push(R.createElement(E,{data:G,key:ae(se,G),index:se,isScrolling:ge?we:void 0,style:this._getItemStyle(se)}));var Ne=h(this.props,this._instanceProps);return R.createElement(le||W||"div",{className:C,onScroll:ne,ref:this._outerRefSetter,style:At({position:"relative",height:L,width:ve,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:j},re)},R.createElement(z||$||"div",{children:Ae,ref:U,style:{height:me?"100%":Ne,pointerEvents:we?"none":void 0,width:me?Ne:"100%"}}))},T._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var I=this.props.itemCount;if(I>0){var E=this._getRangeToRender(),C=E[0],j=E[1],L=E[2],U=E[3];this._callOnItemsRendered(C,j,L,U)}}if(typeof this.props.onScroll=="function"){var z=this.state,$=z.scrollDirection,P=z.scrollOffset,G=z.scrollUpdateWasRequested;this._callOnScroll($,P,G)}},T._getRangeToRender=function(){var I=this.props,E=I.itemCount,C=I.overscanCount,j=this.state,L=j.isScrolling,U=j.scrollDirection,z=j.scrollOffset;if(E===0)return[0,0,0,0];var $=f(this.props,z,this._instanceProps),P=o(this.props,$,z,this._instanceProps),G=!L||U==="backward"?Math.max(1,C):1,q=!L||U==="forward"?Math.max(1,C):1;return[Math.max(0,$-G),Math.max(0,Math.min(E-1,P+q)),$,P]},x}(R.PureComponent),s.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},s}var Co=function(s,l){s.children,s.direction,s.height,s.layout,s.innerTagName,s.outerTagName,s.width,l.instance},wo=xo({getItemOffset:function(s,l){var h=s.itemSize;return l*h},getItemSize:function(s,l){var h=s.itemSize;return h},getEstimatedTotalSize:function(s){var l=s.itemCount,h=s.itemSize;return h*l},getOffsetForIndexAndAlignment:function(s,l,h,p,g,f){var o=s.direction,y=s.height,A=s.itemCount,w=s.itemSize,N=s.layout,x=s.width,T=o==="horizontal"||N==="horizontal",D=T?x:y,I=Math.max(0,A*w-D),E=Math.min(I,l*w),C=Math.max(0,l*w-D+w+f);switch(h==="smart"&&(p>=C-D&&p<=E+D?h="auto":h="center"),h){case"start":return E;case"end":return C;case"center":{var j=Math.round(C+(E-C)/2);return j<Math.ceil(D/2)?0:j>I+Math.floor(D/2)?I:j}case"auto":default:return p>=C&&p<=E?p:p<C?C:E}},getStartIndexForOffset:function(s,l){var h=s.itemCount,p=s.itemSize;return Math.max(0,Math.min(h-1,Math.floor(l/p)))},getStopIndexForStartIndex:function(s,l,h){var p=s.direction,g=s.height,f=s.itemCount,o=s.itemSize,y=s.layout,A=s.width,w=p==="horizontal"||y==="horizontal",N=l*o,x=w?A:g,T=Math.ceil((x+h-N)/o);return Math.max(0,Math.min(f-1,l+T-1))},initInstanceProps:function(s){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(s){s.itemSize}});function Eo(r){var s=r.lastRenderedStartIndex,l=r.lastRenderedStopIndex,h=r.startIndex,p=r.stopIndex;return!(h>l||p<s)}function Ao(r){for(var s=r.isItemLoaded,l=r.itemCount,h=r.minimumBatchSize,p=r.startIndex,g=r.stopIndex,f=[],o=null,y=null,A=p;A<=g;A++){var w=s(A);w?y!==null&&(f.push(o,y),o=y=null):(y=A,o===null&&(o=A))}if(y!==null){for(var N=Math.min(Math.max(y,o+h-1),l-1),x=y+1;x<=N&&!s(x);x++)y=x;f.push(o,y)}if(f.length)for(;f[1]-f[0]+1<h&&f[0]>0;){var T=f[0]-1;if(!s(T))f[0]=T;else break}return f}var No=function(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")},jo=function(){function r(s,l){for(var h=0;h<l.length;h++){var p=l[h];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}return function(s,l,h){return l&&r(s.prototype,l),h&&r(s,h),s}}(),To=function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(r,s):r.__proto__=s)},ti=function(r,s){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:r},vo=function(r){To(s,r);function s(){var l,h,p,g;No(this,s);for(var f=arguments.length,o=Array(f),y=0;y<f;y++)o[y]=arguments[y];return g=(h=(p=ti(this,(l=s.__proto__||Object.getPrototypeOf(s)).call.apply(l,[this].concat(o))),p),p._lastRenderedStartIndex=-1,p._lastRenderedStopIndex=-1,p._memoizedUnloadedRanges=[],p._onItemsRendered=function(A){var w=A.visibleStartIndex,N=A.visibleStopIndex;p._lastRenderedStartIndex=w,p._lastRenderedStopIndex=N,p._ensureRowsLoaded(w,N)},p._setRef=function(A){p._listRef=A},h),ti(p,g)}return jo(s,[{key:"resetloadMoreItemsCache",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],h&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var h=this.props.children;return h({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(h,p){var g=this.props,f=g.isItemLoaded,o=g.itemCount,y=g.minimumBatchSize,A=y===void 0?10:y,w=g.threshold,N=w===void 0?15:w,x=Ao({isItemLoaded:f,itemCount:o,minimumBatchSize:A,startIndex:Math.max(0,h-N),stopIndex:Math.min(o-1,p+N)});(this._memoizedUnloadedRanges.length!==x.length||this._memoizedUnloadedRanges.some(function(T,D){return x[D]!==T}))&&(this._memoizedUnloadedRanges=x,this._loadUnloadedRanges(x))}},{key:"_loadUnloadedRanges",value:function(h){for(var p=this,g=this.props.loadMoreItems||this.props.loadMoreRows,f=function(A){var w=h[A],N=h[A+1],x=g(w,N);x!=null&&x.then(function(){if(Eo({lastRenderedStartIndex:p._lastRenderedStartIndex,lastRenderedStopIndex:p._lastRenderedStopIndex,startIndex:w,stopIndex:N})){if(p._listRef==null)return;typeof p._listRef.resetAfterIndex=="function"?p._listRef.resetAfterIndex(w,!0):(typeof p._listRef._getItemStyleCache=="function"&&p._listRef._getItemStyleCache(-1),p._listRef.forceUpdate())}})},o=0;o<h.length;o+=2)f(o)}}]),s}(R.PureComponent);const Do=()=>Te,Lo=m("div")({name:"a",class:"a1lvbkps",propsAsIs:!1}),So=m("div")({name:"l",class:"l2xe6fm",propsAsIs:!1}),zo=m("img")({name:"p",class:"p1yk5k0z",propsAsIs:!1}),ko=m("div")({name:"s",class:"s13yur3w",propsAsIs:!1}),Bo=m("div")({name:"c",class:"c1h2npcq",propsAsIs:!1}),bo=m("div")({name:"d",class:"d1kxek13",propsAsIs:!1}),Ro=m("span")({name:"g",class:"glf08ok",propsAsIs:!1}),_o=m(Do())({name:"x",class:"x1hkuau3",propsAsIs:!0}),Oo=({rank:r,avatar:s,name:l,points:h,isCurrentUser:p,openItemDetail:g,style:f})=>u.jsxs(Lo,{onClick:g,style:f,children:[u.jsx(So,{children:r||0}),u.jsxs(Bo,{children:[s?u.jsx(zo,{alt:"leaderboard-item-avatar",src:s}):u.jsx(ko,{children:gi(l||"")}),u.jsxs(bo,{children:[u.jsx(Ro,{children:l||""}),p&&u.jsx(_o,{name:"icon-star"})]})]}),u.jsx("div",{children:zt(h)})]}),vi=({items:r,openItemDetail:s,fetchMore:l})=>u.jsx(ho,{children:({width:h,height:p})=>u.jsx(vo,{isItemLoaded:g=>g<r.length,itemCount:r.length+1,loadMoreItems:l,children:({onItemsRendered:g,ref:f})=>u.jsx(wo,{itemSize:58,onItemsRendered:g,ref:f,itemCount:r.length,width:h,height:p,children:({index:o,style:y})=>u.jsx(Oo,{style:y,...r[o],openItemDetail:()=>s(r[o].userId)},r[o].userId)})})}),Uo=({store:r})=>{const{data:s}=Z.useStore(r),[l,h]=R.useState(void 0);if(!s)return u.jsx("div",{children:"wait leader board..."});const p=g=>{var f;const o=(f=s.find(y=>{var A;return((A=y.attributes)==null?void 0:A.userId)===g}))==null?void 0:f.attributes;h(o)};return u.jsxs(u.Fragment,{children:[l&&u.jsx(di,{comeBack:()=>p(null),...l}),!l&&u.jsx(vi,{items:s.filter(g=>g.attributes).map(g=>g.attributes),openItemDetail:p})]})};const Be=m("div")({name:"e",class:"e6qv3to",propsAsIs:!1}),$o=m("div")({name:"i",class:"i1jak95i",propsAsIs:!1}),Fo=m("div")({name:"r",class:"r1qp3jjx",propsAsIs:!1}),Po=m("div")({name:"n",class:"naeizu7",propsAsIs:!1}),It=m("button")({name:"a",class:"a4zecne",propsAsIs:!1}),Yo=({gamification:r,sdk:s})=>{var l,h,p,g,f,o,y,A,w,N,x,T,D,I,E,C,j,L,U,z,$,P,G;const q=Z.useStore(r.status),ae=Z.useStore(r.onboardingStatus),ie=Z.useStore(r.openedQuestion),{slStreamId:le}=Z.useStore(s.sdkStore),W=Z.useStore(r.featureSettings),[re,ge]=R.useState(Ge.HOME);if(q!==$e.FeatureStatus.Ready)return u.jsx("div",{children:"wait..."});if(le!=null&&le.loading)return u.jsx(Be,{children:u.jsx("div",{children:"Event is loading"})});if(!(le!=null&&le.data))return u.jsx(Be,{children:u.jsx("div",{children:"Event is forbidden"})});if(!ae)return u.jsx(Be,{children:u.jsx(Xr,{closeFeature:s.closeFeature,gamification:r,steps:(h=(l=W.inplayGame)==null?void 0:l.onboarding)==null?void 0:h.steps,gameIcon:(f=(g=(p=W.inplayGame)==null?void 0:p.overview)==null?void 0:g.media)==null?void 0:f.gameIcon,sponsorLogo:(A=(y=(o=W.inplayGame)==null?void 0:o.overview)==null?void 0:y.media)==null?void 0:A.sponsorLogo,rules:(N=(w=W.inplayGame)==null?void 0:w.rules)==null?void 0:N.rules,rulesBtnLabel:(T=(x=W.inplayGame)==null?void 0:x.rules)==null?void 0:T.buttonLabel,rulesTitle:(I=(D=W.inplayGame)==null?void 0:D.rules)==null?void 0:I.heading,primaryColor:(j=(C=(E=W.inplayGame)==null?void 0:E.overview)==null?void 0:C.appearance)==null?void 0:j.primaryColor,inviteCardTitle:(U=(L=W.inplayGame)==null?void 0:L.inviteCard)==null?void 0:U.heading,inviteCardSubtext:($=(z=W.inplayGame)==null?void 0:z.inviteCard)==null?void 0:$.subtext,inviteCardBtnLabel:(G=(P=W.inplayGame)==null?void 0:P.inviteCard)==null?void 0:G.buttonLabel})});const ve=ne=>{r.openQuestion(ne)},we=()=>{r.closeQuestion()},me=(ne,Ee)=>{r.submitAnswer(ne,Ee)};return u.jsxs(Be,{children:[u.jsx(ui,{activePage:re,toggleActivePage:ne=>{ge(ne)}}),re===Ge.HOME&&u.jsxs(u.Fragment,{children:[u.jsx($o,{children:r.userSummary&&u.jsx(zs,{store:r.userSummary.getStore()})}),u.jsxs(Fo,{children:[r.questions&&u.jsx(ks,{openQuestion:ve,store:r.questions.getStore()}),ie&&u.jsx(bs,{closeQuestion:we,vote:me,openedQuestion:ie})]})]}),re===Ge.LEADERBOARD&&r.leaderboardList&&u.jsx(Uo,{store:r.leaderboardList.getStore()})]})},Qo="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNMTIgOC4xNzIyMkMxMiA4LjI4NzgzIDExLjk3ODEgOC4zOTU1MyAxMS45MzQyIDguNDk1MzNDMTEuODkwMyA4LjU5NTEzIDExLjgyMiA4LjY4OTkyIDExLjcyOTIgOC43Nzk3TDYuMzY5NDkgMTMuOTQzOUM2LjIxNDYyIDE0LjA5NjUgNi4wMjc0MiAxNC4xNzI5IDUuODA3ODcgMTQuMTcyOUM1LjY1NzUyIDE0LjE3MjkgNS41MjE5MSAxNC4xMzc5IDUuNDAxMDQgMTQuMDY3OUM1LjI4MDE2IDEzLjk5OCA1LjE4MzEgMTMuOTAzOSA1LjEwOTg2IDEzLjc4NTZDNS4wMzY2MiAxMy42NjczIDUgMTMuNTM0NSA1IDEzLjM4NzNDNSAxMy4xNzIxIDUuMDgyODggMTIuOTgxOCA1LjI0ODYzIDEyLjgxNjRMMTAuMDgwNyA4LjE3MDk1TDUuMjQ4NjMgMy41Mjc5OUM1LjA4Mjg4IDMuMzY0MjUgNSAzLjE3NDM5IDUgMi45NTg0MUM1IDIuODExMTggNS4wMzY2MiAyLjY3ODQyIDUuMTA5ODYgMi41NjAxM0M1LjE4MzEgMi40NDE4MyA1LjI4MDE2IDIuMzQ3NzEgNS40MDEwNCAyLjI3Nzc3QzUuNTIxOTEgMi4yMDc4MiA1LjY1NzUyIDIuMTcyODUgNS44MDc4NyAyLjE3Mjg1QzYuMDI3NDIgMi4xNzI4NSA2LjIxNDYyIDIuMjQ3MzEgNi4zNjk0OSAyLjM5NjI0TDExLjcyOTIgNy41NjQ3M0MxMS44MjExIDcuNjU0NTEgMTEuODg5IDcuNzQ5MDkgMTEuOTMyOSA3Ljg0ODQ2QzExLjk3NjggNy45NDc4NCAxMS45OTkxIDguMDU1NzYgMTIgOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K",Vo=(r,s)=>{switch(r){case O.QuestionImages.ROUNDED:return u.jsx($s,{alt:"insight-icon",src:s});case O.QuestionImages.TRANSPARENT:return u.jsx(Fs,{alt:"insight-icon",src:s});case O.QuestionImages.CENTERED:return u.jsx(Us,{alt:"insight-icon",src:s});default:return null}},Zo=({title:r,image:s,questionId:l,imageMode:h,openInsight:p})=>u.jsxs(Rs,{onClick:()=>p(l),children:[u.jsx(Os,{children:s&&Vo(h,s)}),u.jsxs(_s,{children:[u.jsx(Ps,{children:r||""}),u.jsx(Ys,{alt:"next-icon",src:Qo})]})]}),Ho=({insights:r,openInsight:s,className:l})=>u.jsx(Qs,{className:l,children:u.jsx(Vs,{children:r==null?void 0:r.map(h=>u.jsx(Zo,{openInsight:s,...h},h.questionId))})}),Di=({highlights:r,store:s,className:l})=>{const{data:h}=Z.useStore(s);return h?u.jsx(Ho,{className:l,insights:h,openInsight:r.openHighlight}):u.jsx("div",{className:l,children:"wait insights..."})},Go="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGFzcz0ic2MtQU5kc04ga1RWV0pFIj48cGF0aCBkPSJNNi42NjY1IDMuMTY2NjlINC45OTk4NEM0LjI2MzQ2IDMuMTY2NjkgMy42NjY1IDMuNzYzNjQgMy42NjY1IDQuNTAwMDJWMTEuNUMzLjY2NjUgMTIuMjM2NCA0LjI2MzQ2IDEyLjgzMzQgNC45OTk4NCAxMi44MzM0SDExLjk5OThDMTIuNzM2MiAxMi44MzM0IDEzLjMzMzIgMTIuMjM2NCAxMy4zMzMyIDExLjVWOS44MzMzNSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BhdGg+PHBhdGggZD0iTTEzLjMzMzUgNi4xNjY2OVYzLjE2NjY5SDEwLjMzMzUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjxwYXRoIGQ9Ik0xMy4xNjY4IDMuMzMzMzFMOC4zMzM1IDguMTY2NjUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjwvc3ZnPgo=",Wo=({image:r,title:s,description:l,webLinkLabel:h,webLink:p,closeHighlights:g,closeInsight:f,className:o})=>u.jsxs(Zs,{className:o,children:[u.jsx(hi,{close:g,comeBack:f}),r&&u.jsx(Hs,{alt:"detail-insight-image",src:r}),u.jsxs(Gs,{children:[s&&u.jsx(Ws,{children:s}),l&&u.jsx(qs,{children:l})]}),p&&h&&u.jsxs(Js,{href:p,target:"_blank",children:[h,u.jsx(Xs,{alt:"link-icon",src:Go})]})]}),Li=({openedInsight:r,closeHighlights:s,closeInsight:l,className:h})=>{var p,g,f,o,y;const A=((p=r.options)==null?void 0:p.options.case)==="factoid"?{image:r.options.options.value.image,body:r.options.options.value.body,webLink:(g=r.options.options.value.webLink)==null?void 0:g.url,webLinkLabel:(f=r.options.options.value.webLink)==null?void 0:f.label}:{},w=r.subject||((o=r.notification)==null?void 0:o.title),N=A.body||((y=r.notification)==null?void 0:y.body);return u.jsx(Wo,{className:h,image:A.image,title:w,description:N,webLink:A.webLink,webLinkLabel:A.webLinkLabel,closeInsight:l,closeHighlights:s})},qo=({highlights:r,sdk:s})=>{const l=Z.useStore(r.status),h=Z.useStore(r.openedInsight),{slStreamId:p}=Z.useStore(s.sdkStore);return l!==$e.FeatureStatus.Ready?u.jsx("div",{children:"wait..."}):p!=null&&p.loading?u.jsx(Be,{children:u.jsx("div",{children:"Event is loading"})}):p!=null&&p.data?r.insights===void 0?u.jsx("div",{children:"wait insights..."}):u.jsxs(Be,{children:[!h&&u.jsx(Di,{highlights:r,store:r.insights.getStore()}),h&&u.jsx(Li,{openedInsight:h,closeHighlights:r.closeFeature,closeInsight:r.closeHighlight})]}):u.jsx(Be,{children:u.jsx("div",{children:"Event is forbidden"})})};var Jo={},Si={},et={};et.byteLength=e0;et.toByteArray=i0;et.fromByteArray=s0;var fe=[],ee=[],Xo=typeof Uint8Array<"u"?Uint8Array:Array,Mt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ue=0,Ko=Mt.length;Ue<Ko;++Ue)fe[Ue]=Mt[Ue],ee[Mt.charCodeAt(Ue)]=Ue;ee["-".charCodeAt(0)]=62;ee["_".charCodeAt(0)]=63;function zi(r){var s=r.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=r.indexOf("=");l===-1&&(l=s);var h=l===s?0:4-l%4;return[l,h]}function e0(r){var s=zi(r),l=s[0],h=s[1];return(l+h)*3/4-h}function t0(r,s,l){return(s+l)*3/4-l}function i0(r){var s,l=zi(r),h=l[0],p=l[1],g=new Xo(t0(r,h,p)),f=0,o=p>0?h-4:h,y;for(y=0;y<o;y+=4)s=ee[r.charCodeAt(y)]<<18|ee[r.charCodeAt(y+1)]<<12|ee[r.charCodeAt(y+2)]<<6|ee[r.charCodeAt(y+3)],g[f++]=s>>16&255,g[f++]=s>>8&255,g[f++]=s&255;return p===2&&(s=ee[r.charCodeAt(y)]<<2|ee[r.charCodeAt(y+1)]>>4,g[f++]=s&255),p===1&&(s=ee[r.charCodeAt(y)]<<10|ee[r.charCodeAt(y+1)]<<4|ee[r.charCodeAt(y+2)]>>2,g[f++]=s>>8&255,g[f++]=s&255),g}function r0(r){return fe[r>>18&63]+fe[r>>12&63]+fe[r>>6&63]+fe[r&63]}function n0(r,s,l){for(var h,p=[],g=s;g<l;g+=3)h=(r[g]<<16&16711680)+(r[g+1]<<8&65280)+(r[g+2]&255),p.push(r0(h));return p.join("")}function s0(r){for(var s,l=r.length,h=l%3,p=[],g=16383,f=0,o=l-h;f<o;f+=g)p.push(n0(r,f,f+g>o?o:f+g));return h===1?(s=r[l-1],p.push(fe[s>>2]+fe[s<<4&63]+"==")):h===2&&(s=(r[l-2]<<8)+r[l-1],p.push(fe[s>>10]+fe[s>>4&63]+fe[s<<2&63]+"=")),p.join("")}var Bt={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Bt.read=function(r,s,l,h,p){var g,f,o=p*8-h-1,y=(1<<o)-1,A=y>>1,w=-7,N=l?p-1:0,x=l?-1:1,T=r[s+N];for(N+=x,g=T&(1<<-w)-1,T>>=-w,w+=o;w>0;g=g*256+r[s+N],N+=x,w-=8);for(f=g&(1<<-w)-1,g>>=-w,w+=h;w>0;f=f*256+r[s+N],N+=x,w-=8);if(g===0)g=1-A;else{if(g===y)return f?NaN:(T?-1:1)*(1/0);f=f+Math.pow(2,h),g=g-A}return(T?-1:1)*f*Math.pow(2,g-h)};Bt.write=function(r,s,l,h,p,g){var f,o,y,A=g*8-p-1,w=(1<<A)-1,N=w>>1,x=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=h?0:g-1,D=h?1:-1,I=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(o=isNaN(s)?1:0,f=w):(f=Math.floor(Math.log(s)/Math.LN2),s*(y=Math.pow(2,-f))<1&&(f--,y*=2),f+N>=1?s+=x/y:s+=x*Math.pow(2,1-N),s*y>=2&&(f++,y/=2),f+N>=w?(o=0,f=w):f+N>=1?(o=(s*y-1)*Math.pow(2,p),f=f+N):(o=s*Math.pow(2,N-1)*Math.pow(2,p),f=0));p>=8;r[l+T]=o&255,T+=D,o/=256,p-=8);for(f=f<<p|o,A+=p;A>0;r[l+T]=f&255,T+=D,f/=256,A-=8);r[l+T-D]|=I*128};/*!
|
|
9
|
+
*/(function(r){const s=Ke,l=kt,h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=o,r.SlowBuffer=j,r.INSPECT_MAX_BYTES=50;const p=2147483647;r.kMaxLength=p,o.TYPED_ARRAY_SUPPORT=g(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function g(){try{const i=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(i,e),i.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function f(i){if(i>p)throw new RangeError('The value "'+i+'" is invalid for option "size"');const e=new Uint8Array(i);return Object.setPrototypeOf(e,o.prototype),e}function o(i,e,t){if(typeof i=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(i)}return y(i,e,t)}o.poolSize=8192;function y(i,e,t){if(typeof i=="string")return x(i,e);if(ArrayBuffer.isView(i))return D(i);if(i==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);if(Y(i,ArrayBuffer)||i&&Y(i.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Y(i,SharedArrayBuffer)||i&&Y(i.buffer,SharedArrayBuffer)))return I(i,e,t);if(typeof i=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const n=i.valueOf&&i.valueOf();if(n!=null&&n!==i)return o.from(n,e,t);const a=E(i);if(a)return a;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof i[Symbol.toPrimitive]=="function")return o.from(i[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i)}o.from=function(i,e,t){return y(i,e,t)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function A(i){if(typeof i!="number")throw new TypeError('"size" argument must be of type number');if(i<0)throw new RangeError('The value "'+i+'" is invalid for option "size"')}function w(i,e,t){return A(i),i<=0?f(i):e!==void 0?typeof t=="string"?f(i).fill(e,t):f(i).fill(e):f(i)}o.alloc=function(i,e,t){return w(i,e,t)};function N(i){return A(i),f(i<0?0:C(i)|0)}o.allocUnsafe=function(i){return N(i)},o.allocUnsafeSlow=function(i){return N(i)};function x(i,e){if((typeof e!="string"||e==="")&&(e="utf8"),!o.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=L(i,e)|0;let n=f(t);const a=n.write(i,e);return a!==t&&(n=n.slice(0,a)),n}function T(i){const e=i.length<0?0:C(i.length)|0,t=f(e);for(let n=0;n<e;n+=1)t[n]=i[n]&255;return t}function D(i){if(Y(i,Uint8Array)){const e=new Uint8Array(i);return I(e.buffer,e.byteOffset,e.byteLength)}return T(i)}function I(i,e,t){if(e<0||i.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(i.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&t===void 0?n=new Uint8Array(i):t===void 0?n=new Uint8Array(i,e):n=new Uint8Array(i,e,t),Object.setPrototypeOf(n,o.prototype),n}function E(i){if(o.isBuffer(i)){const e=C(i.length)|0,t=f(e);return t.length===0||i.copy(t,0,0,e),t}if(i.length!==void 0)return typeof i.length!="number"||Se(i.length)?f(0):T(i);if(i.type==="Buffer"&&Array.isArray(i.data))return T(i.data)}function C(i){if(i>=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return i|0}function j(i){return+i!=i&&(i=0),o.alloc(+i)}o.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==o.prototype},o.compare=function(e,t){if(Y(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,a=t.length;for(let c=0,d=Math.min(n,a);c<d;++c)if(e[c]!==t[c]){n=e[c],a=t[c];break}return n<a?-1:a<n?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return o.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const a=o.allocUnsafe(t);let c=0;for(n=0;n<e.length;++n){let d=e[n];if(Y(d,Uint8Array))c+d.length>a.length?(o.isBuffer(d)||(d=o.from(d)),d.copy(a,c)):Uint8Array.prototype.set.call(a,d,c);else if(o.isBuffer(d))d.copy(a,c);else throw new TypeError('"list" argument must be an Array of Buffers');c+=d.length}return a};function L(i,e){if(o.isBuffer(i))return i.length;if(ArrayBuffer.isView(i)||Y(i,ArrayBuffer))return i.byteLength;if(typeof i!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof i);const t=i.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let a=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Le(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return He(i).length;default:if(a)return n?-1:Le(i).length;e=(""+e).toLowerCase(),a=!0}}o.byteLength=L;function U(i,e,t){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(i||(i="utf8");;)switch(i){case"hex":return ne(this,e,t);case"utf8":case"utf-8":return re(this,e,t);case"ascii":return we(this,e,t);case"latin1":case"binary":return me(this,e,t);case"base64":return W(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ee(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),n=!0}}o.prototype._isBuffer=!0;function z(i,e,t){const n=i[e];i[e]=i[t],i[t]=n}o.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)z(this,t,t+1);return this},o.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)z(this,t,t+3),z(this,t+1,t+2);return this},o.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)z(this,t,t+7),z(this,t+1,t+6),z(this,t+2,t+5),z(this,t+3,t+4);return this},o.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?re(this,0,e):U.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:o.compare(this,e)===0},o.prototype.inspect=function(){let e="";const t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},h&&(o.prototype[h]=o.prototype.inspect),o.prototype.compare=function(e,t,n,a,c){if(Y(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),a===void 0&&(a=0),c===void 0&&(c=this.length),t<0||n>e.length||a<0||c>this.length)throw new RangeError("out of range index");if(a>=c&&t>=n)return 0;if(a>=c)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,a>>>=0,c>>>=0,this===e)return 0;let d=c-a,v=n-t;const B=Math.min(d,v),k=this.slice(a,c),b=e.slice(t,n);for(let S=0;S<B;++S)if(k[S]!==b[S]){d=k[S],v=b[S];break}return d<v?-1:v<d?1:0};function $(i,e,t,n,a){if(i.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Se(t)&&(t=a?0:i.length-1),t<0&&(t=i.length+t),t>=i.length){if(a)return-1;t=i.length-1}else if(t<0)if(a)t=0;else return-1;if(typeof e=="string"&&(e=o.from(e,n)),o.isBuffer(e))return e.length===0?-1:P(i,e,t,n,a);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(i,e,t):Uint8Array.prototype.lastIndexOf.call(i,e,t):P(i,[e],t,n,a);throw new TypeError("val must be string, number or Buffer")}function P(i,e,t,n,a){let c=1,d=i.length,v=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(i.length<2||e.length<2)return-1;c=2,d/=2,v/=2,t/=2}function B(b,S){return c===1?b[S]:b.readUInt16BE(S*c)}let k;if(a){let b=-1;for(k=t;k<d;k++)if(B(i,k)===B(e,b===-1?0:k-b)){if(b===-1&&(b=k),k-b+1===v)return b*c}else b!==-1&&(k-=k-b),b=-1}else for(t+v>d&&(t=d-v),k=t;k>=0;k--){let b=!0;for(let S=0;S<v;S++)if(B(i,k+S)!==B(e,S)){b=!1;break}if(b)return k}return-1}o.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},o.prototype.indexOf=function(e,t,n){return $(this,e,t,n,!0)},o.prototype.lastIndexOf=function(e,t,n){return $(this,e,t,n,!1)};function G(i,e,t,n){t=Number(t)||0;const a=i.length-t;n?(n=Number(n),n>a&&(n=a)):n=a;const c=e.length;n>c/2&&(n=c/2);let d;for(d=0;d<n;++d){const v=parseInt(e.substr(d*2,2),16);if(Se(v))return d;i[t+d]=v}return d}function q(i,e,t,n){return ye(Le(e,i.length-t),i,t,n)}function ae(i,e,t,n){return ye(nt(e),i,t,n)}function ie(i,e,t,n){return ye(He(e),i,t,n)}function le(i,e,t,n){return ye(st(e,i.length-t),i,t,n)}o.prototype.write=function(e,t,n,a){if(t===void 0)a="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")a=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,a===void 0&&(a="utf8")):(a=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const c=this.length-t;if((n===void 0||n>c)&&(n=c),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let d=!1;for(;;)switch(a){case"hex":return G(this,e,t,n);case"utf8":case"utf-8":return q(this,e,t,n);case"ascii":case"latin1":case"binary":return ae(this,e,t,n);case"base64":return ie(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le(this,e,t,n);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),d=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function W(i,e,t){return e===0&&t===i.length?s.fromByteArray(i):s.fromByteArray(i.slice(e,t))}function re(i,e,t){t=Math.min(i.length,t);const n=[];let a=e;for(;a<t;){const c=i[a];let d=null,v=c>239?4:c>223?3:c>191?2:1;if(a+v<=t){let B,k,b,S;switch(v){case 1:c<128&&(d=c);break;case 2:B=i[a+1],(B&192)===128&&(S=(c&31)<<6|B&63,S>127&&(d=S));break;case 3:B=i[a+1],k=i[a+2],(B&192)===128&&(k&192)===128&&(S=(c&15)<<12|(B&63)<<6|k&63,S>2047&&(S<55296||S>57343)&&(d=S));break;case 4:B=i[a+1],k=i[a+2],b=i[a+3],(B&192)===128&&(k&192)===128&&(b&192)===128&&(S=(c&15)<<18|(B&63)<<12|(k&63)<<6|b&63,S>65535&&S<1114112&&(d=S))}}d===null?(d=65533,v=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|d&1023),n.push(d),a+=v}return ve(n)}const ge=4096;function ve(i){const e=i.length;if(e<=ge)return String.fromCharCode.apply(String,i);let t="",n=0;for(;n<e;)t+=String.fromCharCode.apply(String,i.slice(n,n+=ge));return t}function we(i,e,t){let n="";t=Math.min(i.length,t);for(let a=e;a<t;++a)n+=String.fromCharCode(i[a]&127);return n}function me(i,e,t){let n="";t=Math.min(i.length,t);for(let a=e;a<t;++a)n+=String.fromCharCode(i[a]);return n}function ne(i,e,t){const n=i.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);let a="";for(let c=e;c<t;++c)a+=ot[i[c]];return a}function Ee(i,e,t){const n=i.slice(e,t);let a="";for(let c=0;c<n.length-1;c+=2)a+=String.fromCharCode(n[c]+n[c+1]*256);return a}o.prototype.slice=function(e,t){const n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);const a=this.subarray(e,t);return Object.setPrototypeOf(a,o.prototype),a};function _(i,e,t){if(i%1!==0||i<0)throw new RangeError("offset is not uint");if(i+e>t)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e],c=1,d=0;for(;++d<t&&(c*=256);)a+=this[e+d]*c;return a},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e+--t],c=1;for(;t>0&&(c*=256);)a+=this[e+--t]*c;return a},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e=e>>>0,t||_(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||_(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||_(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,c=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(a)+(BigInt(c)<<BigInt(32))}),o.prototype.readBigUInt64BE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],c=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(a)<<BigInt(32))+BigInt(c)}),o.prototype.readIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e],c=1,d=0;for(;++d<t&&(c*=256);)a+=this[e+d]*c;return c*=128,a>=c&&(a-=Math.pow(2,8*t)),a},o.prototype.readIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=t,c=1,d=this[e+--a];for(;a>0&&(c*=256);)d+=this[e+--a]*c;return c*=128,d>=c&&(d-=Math.pow(2,8*t)),d},o.prototype.readInt8=function(e,t){return e=e>>>0,t||_(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){e=e>>>0,t||_(e,2,this.length);const n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},o.prototype.readInt16BE=function(e,t){e=e>>>0,t||_(e,2,this.length);const n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},o.prototype.readInt32LE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(a)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),o.prototype.readBigInt64BE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(a)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)}),o.prototype.readFloatLE=function(e,t){return e=e>>>0,t||_(e,4,this.length),l.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e=e>>>0,t||_(e,4,this.length),l.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||_(e,8,this.length),l.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||_(e,8,this.length),l.read(this,e,!1,52,8)};function F(i,e,t,n,a,c){if(!o.isBuffer(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||e<c)throw new RangeError('"value" argument is out of bounds');if(t+n>i.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,n,a){if(e=+e,t=t>>>0,n=n>>>0,!a){const v=Math.pow(2,8*n)-1;F(this,e,t,n,v,0)}let c=1,d=0;for(this[t]=e&255;++d<n&&(c*=256);)this[t+d]=e/c&255;return t+n},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,n,a){if(e=+e,t=t>>>0,n=n>>>0,!a){const v=Math.pow(2,8*n)-1;F(this,e,t,n,v,0)}let c=n-1,d=1;for(this[t+c]=e&255;--c>=0&&(d*=256);)this[t+c]=e/d&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,1,255,0),this[t]=e&255,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Ae(i,e,t,n,a){Ze(e,n,a,i,t,7);let c=Number(e&BigInt(4294967295));i[t++]=c,c=c>>8,i[t++]=c,c=c>>8,i[t++]=c,c=c>>8,i[t++]=c;let d=Number(e>>BigInt(32)&BigInt(4294967295));return i[t++]=d,d=d>>8,i[t++]=d,d=d>>8,i[t++]=d,d=d>>8,i[t++]=d,t}function se(i,e,t,n,a){Ze(e,n,a,i,t,7);let c=Number(e&BigInt(4294967295));i[t+7]=c,c=c>>8,i[t+6]=c,c=c>>8,i[t+5]=c,c=c>>8,i[t+4]=c;let d=Number(e>>BigInt(32)&BigInt(4294967295));return i[t+3]=d,d=d>>8,i[t+2]=d,d=d>>8,i[t+1]=d,d=d>>8,i[t]=d,t+8}o.prototype.writeBigUInt64LE=H(function(e,t=0){return Ae(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=H(function(e,t=0){return se(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(e,t,n,a){if(e=+e,t=t>>>0,!a){const B=Math.pow(2,8*n-1);F(this,e,t,n,B-1,-B)}let c=0,d=1,v=0;for(this[t]=e&255;++c<n&&(d*=256);)e<0&&v===0&&this[t+c-1]!==0&&(v=1),this[t+c]=(e/d>>0)-v&255;return t+n},o.prototype.writeIntBE=function(e,t,n,a){if(e=+e,t=t>>>0,!a){const B=Math.pow(2,8*n-1);F(this,e,t,n,B-1,-B)}let c=n-1,d=1,v=0;for(this[t+c]=e&255;--c>=0&&(d*=256);)e<0&&v===0&&this[t+c+1]!==0&&(v=1),this[t+c]=(e/d>>0)-v&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},o.prototype.writeBigInt64LE=H(function(e,t=0){return Ae(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=H(function(e,t=0){return se(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ne(i,e,t,n,a,c){if(t+n>i.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Ye(i,e,t,n,a){return e=+e,t=t>>>0,a||Ne(i,e,t,4),l.write(i,e,t,n,23,4),t+4}o.prototype.writeFloatLE=function(e,t,n){return Ye(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return Ye(this,e,t,!1,n)};function Qe(i,e,t,n,a){return e=+e,t=t>>>0,a||Ne(i,e,t,8),l.write(i,e,t,n,52,8),t+8}o.prototype.writeDoubleLE=function(e,t,n){return Qe(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return Qe(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,a){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!a&&a!==0&&(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a<n&&(a=n),a===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-n&&(a=e.length-t+n);const c=a-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,a):Uint8Array.prototype.set.call(e,this.subarray(n,a),t),c},o.prototype.fill=function(e,t,n,a){if(typeof e=="string"){if(typeof t=="string"?(a=t,t=0,n=this.length):typeof n=="string"&&(a=n,n=this.length),a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!o.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(e.length===1){const d=e.charCodeAt(0);(a==="utf8"&&d<128||a==="latin1")&&(e=d)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let c;if(typeof e=="number")for(c=t;c<n;++c)this[c]=e;else{const d=o.isBuffer(e)?e:o.from(e,a),v=d.length;if(v===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(c=0;c<n-t;++c)this[c+t]=d[c%v]}return this};const J={};function De(i,e,t){J[i]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${i}]`,this.stack,delete this.name}get code(){return i}set code(a){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:a,writable:!0})}toString(){return`${this.name} [${i}]: ${this.message}`}}}De("ERR_BUFFER_OUT_OF_BOUNDS",function(i){return i?`${i} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),De("ERR_INVALID_ARG_TYPE",function(i,e){return`The "${i}" argument must be of type number. Received type ${typeof e}`},TypeError),De("ERR_OUT_OF_RANGE",function(i,e,t){let n=`The value of "${i}" is out of range.`,a=t;return Number.isInteger(t)&&Math.abs(t)>2**32?a=Ve(String(t)):typeof t=="bigint"&&(a=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(a=Ve(a)),a+="n"),n+=` It must be ${e}. Received ${a}`,n},RangeError);function Ve(i){let e="",t=i.length;const n=i[0]==="-"?1:0;for(;t>=n+4;t-=3)e=`_${i.slice(t-3,t)}${e}`;return`${i.slice(0,t)}${e}`}function tt(i,e,t){X(e,"offset"),(i[e]===void 0||i[e+t]===void 0)&&oe(e,i.length-(t+1))}function Ze(i,e,t,n,a,c){if(i>t||i<e){const d=typeof e=="bigint"?"n":"";let v;throw c>3?e===0||e===BigInt(0)?v=`>= 0${d} and < 2${d} ** ${(c+1)*8}${d}`:v=`>= -(2${d} ** ${(c+1)*8-1}${d}) and < 2 ** ${(c+1)*8-1}${d}`:v=`>= ${e}${d} and <= ${t}${d}`,new J.ERR_OUT_OF_RANGE("value",v,i)}tt(n,a,c)}function X(i,e){if(typeof i!="number")throw new J.ERR_INVALID_ARG_TYPE(e,"number",i)}function oe(i,e,t){throw Math.floor(i)!==i?(X(i,t),new J.ERR_OUT_OF_RANGE(t||"offset","an integer",i)):e<0?new J.ERR_BUFFER_OUT_OF_BOUNDS:new J.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,i)}const it=/[^+/0-9A-Za-z-_]/g;function rt(i){if(i=i.split("=")[0],i=i.trim().replace(it,""),i.length<2)return"";for(;i.length%4!==0;)i=i+"=";return i}function Le(i,e){e=e||1/0;let t;const n=i.length;let a=null;const c=[];for(let d=0;d<n;++d){if(t=i.charCodeAt(d),t>55295&&t<57344){if(!a){if(t>56319){(e-=3)>-1&&c.push(239,191,189);continue}else if(d+1===n){(e-=3)>-1&&c.push(239,191,189);continue}a=t;continue}if(t<56320){(e-=3)>-1&&c.push(239,191,189),a=t;continue}t=(a-55296<<10|t-56320)+65536}else a&&(e-=3)>-1&&c.push(239,191,189);if(a=null,t<128){if((e-=1)<0)break;c.push(t)}else if(t<2048){if((e-=2)<0)break;c.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;c.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;c.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return c}function nt(i){const e=[];for(let t=0;t<i.length;++t)e.push(i.charCodeAt(t)&255);return e}function st(i,e){let t,n,a;const c=[];for(let d=0;d<i.length&&!((e-=2)<0);++d)t=i.charCodeAt(d),n=t>>8,a=t%256,c.push(a),c.push(n);return c}function He(i){return s.toByteArray(rt(i))}function ye(i,e,t,n){let a;for(a=0;a<n&&!(a+t>=e.length||a>=i.length);++a)e[a+t]=i[a];return a}function Y(i,e){return i instanceof e||i!=null&&i.constructor!=null&&i.constructor.name!=null&&i.constructor.name===e.name}function Se(i){return i!==i}const ot=function(){const i="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){const n=t*16;for(let a=0;a<16;++a)e[n+a]=i[t]+i[a]}return e}();function H(i){return typeof BigInt>"u"?at:i}function at(){throw new Error("BigInt not supported")}})(wi);var Ai={exports:{}},Q=Ai.exports={},ce,ue;function xt(){throw new Error("setTimeout has not been defined")}function Ct(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ce=setTimeout:ce=xt}catch{ce=xt}try{typeof clearTimeout=="function"?ue=clearTimeout:ue=Ct}catch{ue=Ct}})();function Ni(r){if(ce===setTimeout)return setTimeout(r,0);if((ce===xt||!ce)&&setTimeout)return ce=setTimeout,setTimeout(r,0);try{return ce(r,0)}catch{try{return ce.call(null,r,0)}catch{return ce.call(this,r,0)}}}function ao(r){if(ue===clearTimeout)return clearTimeout(r);if((ue===Ct||!ue)&&clearTimeout)return ue=clearTimeout,clearTimeout(r);try{return ue(r)}catch{try{return ue.call(null,r)}catch{return ue.call(this,r)}}}var Ie=[],Fe=!1,ke,Je=-1;function lo(){!Fe||!ke||(Fe=!1,ke.length?Ie=ke.concat(Ie):Je=-1,Ie.length&&ji())}function ji(){if(!Fe){var r=Ni(lo);Fe=!0;for(var s=Ie.length;s;){for(ke=Ie,Ie=[];++Je<s;)ke&&ke[Je].run();Je=-1,s=Ie.length}ke=null,Fe=!1,ao(r)}}Q.nextTick=function(r){var s=new Array(arguments.length-1);if(arguments.length>1)for(var l=1;l<arguments.length;l++)s[l-1]=arguments[l];Ie.push(new Ti(r,s)),Ie.length===1&&!Fe&&Ni(ji)};function Ti(r,s){this.fun=r,this.array=s}Ti.prototype.run=function(){this.fun.apply(null,this.array)};Q.title="browser";Q.browser=!0;Q.env={};Q.argv=[];Q.version="";Q.versions={};function xe(){}Q.on=xe;Q.addListener=xe;Q.once=xe;Q.off=xe;Q.removeListener=xe;Q.removeAllListeners=xe;Q.emit=xe;Q.prependListener=xe;Q.prependOnceListener=xe;Q.listeners=function(r){return[]};Q.binding=function(r){throw new Error("process.binding is not supported")};Q.cwd=function(){return"/"};Q.chdir=function(r){throw new Error("process.chdir is not supported")};Q.umask=function(){return 0};var co=Ai.exports;(function(r){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});const s=wi,l=co,h=f=>f&&f.__esModule?f:{default:f},p=h(l),g=globalThis||void 0||self;Object.defineProperty(r,"Buffer",{enumerable:!0,get:()=>s.Buffer}),Object.defineProperty(r,"process",{enumerable:!0,get:()=>p.default}),r.global=g})(Ci);let te;typeof window<"u"?te=window:typeof self<"u"?te=self:te=Ci.global;let wt=null,Et=null;const Zt=20,ft=te.clearTimeout,Ht=te.setTimeout,gt=te.cancelAnimationFrame||te.mozCancelAnimationFrame||te.webkitCancelAnimationFrame,Gt=te.requestAnimationFrame||te.mozRequestAnimationFrame||te.webkitRequestAnimationFrame;gt==null||Gt==null?(wt=ft,Et=function(s){return Ht(s,Zt)}):(wt=function([s,l]){gt(s),ft(l)},Et=function(s){const l=Gt(function(){ft(h),s()}),h=Ht(function(){gt(l),s()},Zt);return[l,h]});function uo(r){let s,l,h,p,g,f,o;const y=typeof document<"u"&&document.attachEvent;if(!y){f=function(C){const j=C.__resizeTriggers__,L=j.firstElementChild,U=j.lastElementChild,z=L.firstElementChild;U.scrollLeft=U.scrollWidth,U.scrollTop=U.scrollHeight,z.style.width=L.offsetWidth+1+"px",z.style.height=L.offsetHeight+1+"px",L.scrollLeft=L.scrollWidth,L.scrollTop=L.scrollHeight},g=function(C){return C.offsetWidth!==C.__resizeLast__.width||C.offsetHeight!==C.__resizeLast__.height},o=function(C){if(C.target.className&&typeof C.target.className.indexOf=="function"&&C.target.className.indexOf("contract-trigger")<0&&C.target.className.indexOf("expand-trigger")<0)return;const j=this;f(this),this.__resizeRAF__&&wt(this.__resizeRAF__),this.__resizeRAF__=Et(function(){g(j)&&(j.__resizeLast__.width=j.offsetWidth,j.__resizeLast__.height=j.offsetHeight,j.__resizeListeners__.forEach(function(z){z.call(j,C)}))})};let x=!1,T="";h="animationstart";const D="Webkit Moz O ms".split(" ");let I="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),E="";{const C=document.createElement("fakeelement");if(C.style.animationName!==void 0&&(x=!0),x===!1){for(let j=0;j<D.length;j++)if(C.style[D[j]+"AnimationName"]!==void 0){E=D[j],T="-"+E.toLowerCase()+"-",h=I[j],x=!0;break}}}l="resizeanim",s="@"+T+"keyframes "+l+" { from { opacity: 0; } to { opacity: 0; } } ",p=T+"animation: 1ms "+l+"; "}const A=function(x){if(!x.getElementById("detectElementResize")){const T=(s||"")+".resize-triggers { "+(p||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',D=x.head||x.getElementsByTagName("head")[0],I=x.createElement("style");I.id="detectElementResize",I.type="text/css",r!=null&&I.setAttribute("nonce",r),I.styleSheet?I.styleSheet.cssText=T:I.appendChild(x.createTextNode(T)),D.appendChild(I)}};return{addResizeListener:function(x,T){if(y)x.attachEvent("onresize",T);else{if(!x.__resizeTriggers__){const D=x.ownerDocument,I=te.getComputedStyle(x);I&&I.position==="static"&&(x.style.position="relative"),A(D),x.__resizeLast__={},x.__resizeListeners__=[],(x.__resizeTriggers__=D.createElement("div")).className="resize-triggers";const E=D.createElement("div");E.className="expand-trigger",E.appendChild(D.createElement("div"));const C=D.createElement("div");C.className="contract-trigger",x.__resizeTriggers__.appendChild(E),x.__resizeTriggers__.appendChild(C),x.appendChild(x.__resizeTriggers__),f(x),x.addEventListener("scroll",o,!0),h&&(x.__resizeTriggers__.__animationListener__=function(L){L.animationName===l&&f(x)},x.__resizeTriggers__.addEventListener(h,x.__resizeTriggers__.__animationListener__))}x.__resizeListeners__.push(T)}},removeResizeListener:function(x,T){if(y)x.detachEvent("onresize",T);else if(x.__resizeListeners__.splice(x.__resizeListeners__.indexOf(T),1),!x.__resizeListeners__.length){x.removeEventListener("scroll",o,!0),x.__resizeTriggers__.__animationListener__&&(x.__resizeTriggers__.removeEventListener(h,x.__resizeTriggers__.__animationListener__),x.__resizeTriggers__.__animationListener__=null);try{x.__resizeTriggers__=!x.removeChild(x.__resizeTriggers__)}catch{}}}}}class ho extends R.Component{constructor(...s){super(...s),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:l,disableWidth:h,onResize:p}=this.props;if(this._parentNode){var g,f,o,y;const A=window.getComputedStyle(this._parentNode)||{},w=parseFloat((g=A.paddingLeft)!==null&&g!==void 0?g:"0"),N=parseFloat((f=A.paddingRight)!==null&&f!==void 0?f:"0"),x=parseFloat((o=A.paddingTop)!==null&&o!==void 0?o:"0"),T=parseFloat((y=A.paddingBottom)!==null&&y!==void 0?y:"0"),D=this._parentNode.getBoundingClientRect(),I=D.height-x-T,E=D.width-w-N,C=this._parentNode.offsetHeight-x-T,j=this._parentNode.offsetWidth-w-N;(!l&&(this.state.height!==C||this.state.scaledHeight!==I)||!h&&(this.state.width!==j||this.state.scaledWidth!==E))&&(this.setState({height:C,width:j,scaledHeight:I,scaledWidth:E}),typeof p=="function"&&p({height:C,scaledHeight:I,scaledWidth:E,width:j}))}},this._setRef=l=>{this._autoSizer=l}}componentDidMount(){const{nonce:s}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=uo(s),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:s,defaultHeight:l,defaultWidth:h,disableHeight:p=!1,disableWidth:g=!1,nonce:f,onResize:o,style:y={},tagName:A="div",...w}=this.props,{height:N,scaledHeight:x,scaledWidth:T,width:D}=this.state,I={overflow:"visible"},E={};let C=!1;return p||(N===0&&(C=!0),I.height=0,E.height=N,E.scaledHeight=x),g||(D===0&&(C=!0),I.width=0,E.width=D,E.scaledWidth=T),R.createElement(A,{ref:this._setRef,style:{...I,...y},...w},!C&&s(E))}}function At(){return At=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var h in l)Object.prototype.hasOwnProperty.call(l,h)&&(r[h]=l[h])}return r},At.apply(this,arguments)}function Wt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Nt(r,s){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,p){return h.__proto__=p,h},Nt(r,s)}function po(r,s){r.prototype=Object.create(s.prototype),r.prototype.constructor=r,Nt(r,s)}var qt=Number.isNaN||function(s){return typeof s=="number"&&s!==s};function fo(r,s){return!!(r===s||qt(r)&&qt(s))}function go(r,s){if(r.length!==s.length)return!1;for(var l=0;l<r.length;l++)if(!fo(r[l],s[l]))return!1;return!0}function mt(r,s){s===void 0&&(s=go);var l,h=[],p,g=!1;function f(){for(var o=[],y=0;y<arguments.length;y++)o[y]=arguments[y];return g&&l===this&&s(o,h)||(p=r.apply(this,o),g=!0,l=this,h=o),p}return f}var mo=typeof performance=="object"&&typeof performance.now=="function",Jt=mo?function(){return performance.now()}:function(){return Date.now()};function Xt(r){cancelAnimationFrame(r.id)}function yo(r,s){var l=Jt();function h(){Jt()-l>=s?r.call(null):p.id=requestAnimationFrame(h)}var p={id:requestAnimationFrame(h)};return p}var yt=-1;function Kt(r){if(r===void 0&&(r=!1),yt===-1||r){var s=document.createElement("div"),l=s.style;l.width="50px",l.height="50px",l.overflow="scroll",document.body.appendChild(s),yt=s.offsetWidth-s.clientWidth,document.body.removeChild(s)}return yt}var Oe=null;function ei(r){if(r===void 0&&(r=!1),Oe===null||r){var s=document.createElement("div"),l=s.style;l.width="50px",l.height="50px",l.overflow="scroll",l.direction="rtl";var h=document.createElement("div"),p=h.style;return p.width="100px",p.height="100px",s.appendChild(h),document.body.appendChild(s),s.scrollLeft>0?Oe="positive-descending":(s.scrollLeft=1,s.scrollLeft===0?Oe="negative":Oe="positive-ascending"),document.body.removeChild(s),Oe}return Oe}var Io=150,Mo=function(s,l){return s};function xo(r){var s,l=r.getItemOffset,h=r.getEstimatedTotalSize,p=r.getItemSize,g=r.getOffsetForIndexAndAlignment,f=r.getStartIndexForOffset,o=r.getStopIndexForStartIndex,y=r.initInstanceProps,A=r.shouldResetStyleCacheOnItemSizeChange,w=r.validateProps;return s=function(N){po(x,N);function x(D){var I;return I=N.call(this,D)||this,I._instanceProps=y(I.props,Wt(I)),I._outerRef=void 0,I._resetIsScrollingTimeoutId=null,I.state={instance:Wt(I),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof I.props.initialScrollOffset=="number"?I.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},I._callOnItemsRendered=void 0,I._callOnItemsRendered=mt(function(E,C,j,L){return I.props.onItemsRendered({overscanStartIndex:E,overscanStopIndex:C,visibleStartIndex:j,visibleStopIndex:L})}),I._callOnScroll=void 0,I._callOnScroll=mt(function(E,C,j){return I.props.onScroll({scrollDirection:E,scrollOffset:C,scrollUpdateWasRequested:j})}),I._getItemStyle=void 0,I._getItemStyle=function(E){var C=I.props,j=C.direction,L=C.itemSize,U=C.layout,z=I._getItemStyleCache(A&&L,A&&U,A&&j),$;if(z.hasOwnProperty(E))$=z[E];else{var P=l(I.props,E,I._instanceProps),G=p(I.props,E,I._instanceProps),q=j==="horizontal"||U==="horizontal",ae=j==="rtl",ie=q?P:0;z[E]=$={position:"absolute",left:ae?void 0:ie,right:ae?ie:void 0,top:q?0:P,height:q?"100%":G,width:q?G:"100%"}}return $},I._getItemStyleCache=void 0,I._getItemStyleCache=mt(function(E,C,j){return{}}),I._onScrollHorizontal=function(E){var C=E.currentTarget,j=C.clientWidth,L=C.scrollLeft,U=C.scrollWidth;I.setState(function(z){if(z.scrollOffset===L)return null;var $=I.props.direction,P=L;if($==="rtl")switch(ei()){case"negative":P=-L;break;case"positive-descending":P=U-j-L;break}return P=Math.max(0,Math.min(P,U-j)),{isScrolling:!0,scrollDirection:z.scrollOffset<L?"forward":"backward",scrollOffset:P,scrollUpdateWasRequested:!1}},I._resetIsScrollingDebounced)},I._onScrollVertical=function(E){var C=E.currentTarget,j=C.clientHeight,L=C.scrollHeight,U=C.scrollTop;I.setState(function(z){if(z.scrollOffset===U)return null;var $=Math.max(0,Math.min(U,L-j));return{isScrolling:!0,scrollDirection:z.scrollOffset<$?"forward":"backward",scrollOffset:$,scrollUpdateWasRequested:!1}},I._resetIsScrollingDebounced)},I._outerRefSetter=function(E){var C=I.props.outerRef;I._outerRef=E,typeof C=="function"?C(E):C!=null&&typeof C=="object"&&C.hasOwnProperty("current")&&(C.current=E)},I._resetIsScrollingDebounced=function(){I._resetIsScrollingTimeoutId!==null&&Xt(I._resetIsScrollingTimeoutId),I._resetIsScrollingTimeoutId=yo(I._resetIsScrolling,Io)},I._resetIsScrolling=function(){I._resetIsScrollingTimeoutId=null,I.setState({isScrolling:!1},function(){I._getItemStyleCache(-1,null)})},I}x.getDerivedStateFromProps=function(I,E){return Co(I,E),w(I),null};var T=x.prototype;return T.scrollTo=function(I){I=Math.max(0,I),this.setState(function(E){return E.scrollOffset===I?null:{scrollDirection:E.scrollOffset<I?"forward":"backward",scrollOffset:I,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},T.scrollToItem=function(I,E){E===void 0&&(E="auto");var C=this.props,j=C.itemCount,L=C.layout,U=this.state.scrollOffset;I=Math.max(0,Math.min(I,j-1));var z=0;if(this._outerRef){var $=this._outerRef;L==="vertical"?z=$.scrollWidth>$.clientWidth?Kt():0:z=$.scrollHeight>$.clientHeight?Kt():0}this.scrollTo(g(this.props,I,E,U,this._instanceProps,z))},T.componentDidMount=function(){var I=this.props,E=I.direction,C=I.initialScrollOffset,j=I.layout;if(typeof C=="number"&&this._outerRef!=null){var L=this._outerRef;E==="horizontal"||j==="horizontal"?L.scrollLeft=C:L.scrollTop=C}this._callPropsCallbacks()},T.componentDidUpdate=function(){var I=this.props,E=I.direction,C=I.layout,j=this.state,L=j.scrollOffset,U=j.scrollUpdateWasRequested;if(U&&this._outerRef!=null){var z=this._outerRef;if(E==="horizontal"||C==="horizontal")if(E==="rtl")switch(ei()){case"negative":z.scrollLeft=-L;break;case"positive-ascending":z.scrollLeft=L;break;default:var $=z.clientWidth,P=z.scrollWidth;z.scrollLeft=P-$-L;break}else z.scrollLeft=L;else z.scrollTop=L}this._callPropsCallbacks()},T.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Xt(this._resetIsScrollingTimeoutId)},T.render=function(){var I=this.props,E=I.children,C=I.className,j=I.direction,L=I.height,U=I.innerRef,z=I.innerElementType,$=I.innerTagName,P=I.itemCount,G=I.itemData,q=I.itemKey,ae=q===void 0?Mo:q,ie=I.layout,le=I.outerElementType,W=I.outerTagName,re=I.style,ge=I.useIsScrolling,ve=I.width,we=this.state.isScrolling,me=j==="horizontal"||ie==="horizontal",ne=me?this._onScrollHorizontal:this._onScrollVertical,Ee=this._getRangeToRender(),_=Ee[0],F=Ee[1],Ae=[];if(P>0)for(var se=_;se<=F;se++)Ae.push(R.createElement(E,{data:G,key:ae(se,G),index:se,isScrolling:ge?we:void 0,style:this._getItemStyle(se)}));var Ne=h(this.props,this._instanceProps);return R.createElement(le||W||"div",{className:C,onScroll:ne,ref:this._outerRefSetter,style:At({position:"relative",height:L,width:ve,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:j},re)},R.createElement(z||$||"div",{children:Ae,ref:U,style:{height:me?"100%":Ne,pointerEvents:we?"none":void 0,width:me?Ne:"100%"}}))},T._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var I=this.props.itemCount;if(I>0){var E=this._getRangeToRender(),C=E[0],j=E[1],L=E[2],U=E[3];this._callOnItemsRendered(C,j,L,U)}}if(typeof this.props.onScroll=="function"){var z=this.state,$=z.scrollDirection,P=z.scrollOffset,G=z.scrollUpdateWasRequested;this._callOnScroll($,P,G)}},T._getRangeToRender=function(){var I=this.props,E=I.itemCount,C=I.overscanCount,j=this.state,L=j.isScrolling,U=j.scrollDirection,z=j.scrollOffset;if(E===0)return[0,0,0,0];var $=f(this.props,z,this._instanceProps),P=o(this.props,$,z,this._instanceProps),G=!L||U==="backward"?Math.max(1,C):1,q=!L||U==="forward"?Math.max(1,C):1;return[Math.max(0,$-G),Math.max(0,Math.min(E-1,P+q)),$,P]},x}(R.PureComponent),s.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},s}var Co=function(s,l){s.children,s.direction,s.height,s.layout,s.innerTagName,s.outerTagName,s.width,l.instance},wo=xo({getItemOffset:function(s,l){var h=s.itemSize;return l*h},getItemSize:function(s,l){var h=s.itemSize;return h},getEstimatedTotalSize:function(s){var l=s.itemCount,h=s.itemSize;return h*l},getOffsetForIndexAndAlignment:function(s,l,h,p,g,f){var o=s.direction,y=s.height,A=s.itemCount,w=s.itemSize,N=s.layout,x=s.width,T=o==="horizontal"||N==="horizontal",D=T?x:y,I=Math.max(0,A*w-D),E=Math.min(I,l*w),C=Math.max(0,l*w-D+w+f);switch(h==="smart"&&(p>=C-D&&p<=E+D?h="auto":h="center"),h){case"start":return E;case"end":return C;case"center":{var j=Math.round(C+(E-C)/2);return j<Math.ceil(D/2)?0:j>I+Math.floor(D/2)?I:j}case"auto":default:return p>=C&&p<=E?p:p<C?C:E}},getStartIndexForOffset:function(s,l){var h=s.itemCount,p=s.itemSize;return Math.max(0,Math.min(h-1,Math.floor(l/p)))},getStopIndexForStartIndex:function(s,l,h){var p=s.direction,g=s.height,f=s.itemCount,o=s.itemSize,y=s.layout,A=s.width,w=p==="horizontal"||y==="horizontal",N=l*o,x=w?A:g,T=Math.ceil((x+h-N)/o);return Math.max(0,Math.min(f-1,l+T-1))},initInstanceProps:function(s){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(s){s.itemSize}});function Eo(r){var s=r.lastRenderedStartIndex,l=r.lastRenderedStopIndex,h=r.startIndex,p=r.stopIndex;return!(h>l||p<s)}function Ao(r){for(var s=r.isItemLoaded,l=r.itemCount,h=r.minimumBatchSize,p=r.startIndex,g=r.stopIndex,f=[],o=null,y=null,A=p;A<=g;A++){var w=s(A);w?y!==null&&(f.push(o,y),o=y=null):(y=A,o===null&&(o=A))}if(y!==null){for(var N=Math.min(Math.max(y,o+h-1),l-1),x=y+1;x<=N&&!s(x);x++)y=x;f.push(o,y)}if(f.length)for(;f[1]-f[0]+1<h&&f[0]>0;){var T=f[0]-1;if(!s(T))f[0]=T;else break}return f}var No=function(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")},jo=function(){function r(s,l){for(var h=0;h<l.length;h++){var p=l[h];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}return function(s,l,h){return l&&r(s.prototype,l),h&&r(s,h),s}}(),To=function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(r,s):r.__proto__=s)},ti=function(r,s){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:r},vo=function(r){To(s,r);function s(){var l,h,p,g;No(this,s);for(var f=arguments.length,o=Array(f),y=0;y<f;y++)o[y]=arguments[y];return g=(h=(p=ti(this,(l=s.__proto__||Object.getPrototypeOf(s)).call.apply(l,[this].concat(o))),p),p._lastRenderedStartIndex=-1,p._lastRenderedStopIndex=-1,p._memoizedUnloadedRanges=[],p._onItemsRendered=function(A){var w=A.visibleStartIndex,N=A.visibleStopIndex;p._lastRenderedStartIndex=w,p._lastRenderedStopIndex=N,p._ensureRowsLoaded(w,N)},p._setRef=function(A){p._listRef=A},h),ti(p,g)}return jo(s,[{key:"resetloadMoreItemsCache",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],h&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var h=this.props.children;return h({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(h,p){var g=this.props,f=g.isItemLoaded,o=g.itemCount,y=g.minimumBatchSize,A=y===void 0?10:y,w=g.threshold,N=w===void 0?15:w,x=Ao({isItemLoaded:f,itemCount:o,minimumBatchSize:A,startIndex:Math.max(0,h-N),stopIndex:Math.min(o-1,p+N)});(this._memoizedUnloadedRanges.length!==x.length||this._memoizedUnloadedRanges.some(function(T,D){return x[D]!==T}))&&(this._memoizedUnloadedRanges=x,this._loadUnloadedRanges(x))}},{key:"_loadUnloadedRanges",value:function(h){for(var p=this,g=this.props.loadMoreItems||this.props.loadMoreRows,f=function(A){var w=h[A],N=h[A+1],x=g(w,N);x!=null&&x.then(function(){if(Eo({lastRenderedStartIndex:p._lastRenderedStartIndex,lastRenderedStopIndex:p._lastRenderedStopIndex,startIndex:w,stopIndex:N})){if(p._listRef==null)return;typeof p._listRef.resetAfterIndex=="function"?p._listRef.resetAfterIndex(w,!0):(typeof p._listRef._getItemStyleCache=="function"&&p._listRef._getItemStyleCache(-1),p._listRef.forceUpdate())}})},o=0;o<h.length;o+=2)f(o)}}]),s}(R.PureComponent);const Do=()=>Te,Lo=m("div")({name:"a",class:"a1lvbkps",propsAsIs:!1}),So=m("div")({name:"l",class:"l2xe6fm",propsAsIs:!1}),zo=m("img")({name:"p",class:"p1yk5k0z",propsAsIs:!1}),ko=m("div")({name:"s",class:"s13yur3w",propsAsIs:!1}),Bo=m("div")({name:"c",class:"c1h2npcq",propsAsIs:!1}),bo=m("div")({name:"d",class:"d1kxek13",propsAsIs:!1}),Ro=m("span")({name:"g",class:"glf08ok",propsAsIs:!1}),_o=m(Do())({name:"x",class:"x1hkuau3",propsAsIs:!0}),Oo=({rank:r,avatar:s,name:l,points:h,isCurrentUser:p,openItemDetail:g,style:f})=>u.jsxs(Lo,{onClick:g,style:f,children:[u.jsx(So,{children:r||0}),u.jsxs(Bo,{children:[s?u.jsx(zo,{alt:"leaderboard-item-avatar",src:s}):u.jsx(ko,{children:gi(l||"")}),u.jsxs(bo,{children:[u.jsx(Ro,{children:l||""}),p&&u.jsx(_o,{name:"icon-star"})]})]}),u.jsx("div",{children:zt(h)})]}),vi=({items:r,openItemDetail:s,fetchMore:l})=>u.jsx(ho,{children:({width:h,height:p})=>u.jsx(vo,{isItemLoaded:g=>g<r.length,itemCount:r.length+1,loadMoreItems:l,children:({onItemsRendered:g,ref:f})=>u.jsx(wo,{itemSize:56,onItemsRendered:g,ref:f,itemCount:r.length,width:h,height:p,children:({index:o,style:y})=>u.jsx(Oo,{style:{...y,maxHeight:48},...r[o],openItemDetail:()=>s(r[o].userId)},r[o].userId)})})}),Uo=({store:r})=>{const{data:s}=Z.useStore(r),[l,h]=R.useState(void 0);if(!s)return u.jsx("div",{children:"wait leader board..."});const p=g=>{var f;const o=(f=s.find(y=>{var A;return((A=y.attributes)==null?void 0:A.userId)===g}))==null?void 0:f.attributes;h(o)};return u.jsxs(u.Fragment,{children:[l&&u.jsx(di,{comeBack:()=>p(null),...l}),!l&&u.jsx(vi,{items:s.filter(g=>g.attributes).map(g=>g.attributes),openItemDetail:p})]})};const Be=m("div")({name:"e",class:"e6qv3to",propsAsIs:!1}),$o=m("div")({name:"i",class:"i1jak95i",propsAsIs:!1}),Fo=m("div")({name:"r",class:"r1qp3jjx",propsAsIs:!1}),Po=m("div")({name:"n",class:"naeizu7",propsAsIs:!1}),It=m("button")({name:"a",class:"a4zecne",propsAsIs:!1}),Yo=({gamification:r,sdk:s})=>{var l,h,p,g,f,o,y,A,w,N,x,T,D,I,E,C,j,L,U,z,$,P,G;const q=Z.useStore(r.status),ae=Z.useStore(r.onboardingStatus),ie=Z.useStore(r.openedQuestion),{slStreamId:le}=Z.useStore(s.sdkStore),W=Z.useStore(r.featureSettings),[re,ge]=R.useState(Ge.HOME);if(q!==$e.FeatureStatus.Ready)return u.jsx("div",{children:"wait..."});if(le!=null&&le.loading)return u.jsx(Be,{children:u.jsx("div",{children:"Event is loading"})});if(!(le!=null&&le.data))return u.jsx(Be,{children:u.jsx("div",{children:"Event is forbidden"})});if(!ae)return u.jsx(Be,{children:u.jsx(Xr,{closeFeature:s.closeFeature,gamification:r,steps:(h=(l=W.inplayGame)==null?void 0:l.onboarding)==null?void 0:h.steps,gameIcon:(f=(g=(p=W.inplayGame)==null?void 0:p.overview)==null?void 0:g.media)==null?void 0:f.gameIcon,sponsorLogo:(A=(y=(o=W.inplayGame)==null?void 0:o.overview)==null?void 0:y.media)==null?void 0:A.sponsorLogo,rules:(N=(w=W.inplayGame)==null?void 0:w.rules)==null?void 0:N.rules,rulesBtnLabel:(T=(x=W.inplayGame)==null?void 0:x.rules)==null?void 0:T.buttonLabel,rulesTitle:(I=(D=W.inplayGame)==null?void 0:D.rules)==null?void 0:I.heading,primaryColor:(j=(C=(E=W.inplayGame)==null?void 0:E.overview)==null?void 0:C.appearance)==null?void 0:j.primaryColor,inviteCardTitle:(U=(L=W.inplayGame)==null?void 0:L.inviteCard)==null?void 0:U.heading,inviteCardSubtext:($=(z=W.inplayGame)==null?void 0:z.inviteCard)==null?void 0:$.subtext,inviteCardBtnLabel:(G=(P=W.inplayGame)==null?void 0:P.inviteCard)==null?void 0:G.buttonLabel})});const ve=ne=>{r.openQuestion(ne)},we=()=>{r.closeQuestion()},me=(ne,Ee)=>{r.submitAnswer(ne,Ee)};return u.jsxs(Be,{children:[u.jsx(ui,{activePage:re,toggleActivePage:ne=>{ge(ne)}}),re===Ge.HOME&&u.jsxs(u.Fragment,{children:[u.jsx($o,{children:r.userSummary&&u.jsx(zs,{store:r.userSummary.getStore()})}),u.jsxs(Fo,{children:[r.questions&&u.jsx(ks,{openQuestion:ve,store:r.questions.getStore()}),ie&&u.jsx(bs,{closeQuestion:we,vote:me,openedQuestion:ie})]})]}),re===Ge.LEADERBOARD&&r.leaderboardList&&u.jsx(Uo,{store:r.leaderboardList.getStore()})]})},Qo="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNMTIgOC4xNzIyMkMxMiA4LjI4NzgzIDExLjk3ODEgOC4zOTU1MyAxMS45MzQyIDguNDk1MzNDMTEuODkwMyA4LjU5NTEzIDExLjgyMiA4LjY4OTkyIDExLjcyOTIgOC43Nzk3TDYuMzY5NDkgMTMuOTQzOUM2LjIxNDYyIDE0LjA5NjUgNi4wMjc0MiAxNC4xNzI5IDUuODA3ODcgMTQuMTcyOUM1LjY1NzUyIDE0LjE3MjkgNS41MjE5MSAxNC4xMzc5IDUuNDAxMDQgMTQuMDY3OUM1LjI4MDE2IDEzLjk5OCA1LjE4MzEgMTMuOTAzOSA1LjEwOTg2IDEzLjc4NTZDNS4wMzY2MiAxMy42NjczIDUgMTMuNTM0NSA1IDEzLjM4NzNDNSAxMy4xNzIxIDUuMDgyODggMTIuOTgxOCA1LjI0ODYzIDEyLjgxNjRMMTAuMDgwNyA4LjE3MDk1TDUuMjQ4NjMgMy41Mjc5OUM1LjA4Mjg4IDMuMzY0MjUgNSAzLjE3NDM5IDUgMi45NTg0MUM1IDIuODExMTggNS4wMzY2MiAyLjY3ODQyIDUuMTA5ODYgMi41NjAxM0M1LjE4MzEgMi40NDE4MyA1LjI4MDE2IDIuMzQ3NzEgNS40MDEwNCAyLjI3Nzc3QzUuNTIxOTEgMi4yMDc4MiA1LjY1NzUyIDIuMTcyODUgNS44MDc4NyAyLjE3Mjg1QzYuMDI3NDIgMi4xNzI4NSA2LjIxNDYyIDIuMjQ3MzEgNi4zNjk0OSAyLjM5NjI0TDExLjcyOTIgNy41NjQ3M0MxMS44MjExIDcuNjU0NTEgMTEuODg5IDcuNzQ5MDkgMTEuOTMyOSA3Ljg0ODQ2QzExLjk3NjggNy45NDc4NCAxMS45OTkxIDguMDU1NzYgMTIgOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K",Vo=(r,s)=>{switch(r){case O.QuestionImages.ROUNDED:return u.jsx($s,{alt:"insight-icon",src:s});case O.QuestionImages.TRANSPARENT:return u.jsx(Fs,{alt:"insight-icon",src:s});case O.QuestionImages.CENTERED:return u.jsx(Us,{alt:"insight-icon",src:s});default:return null}},Zo=({title:r,image:s,questionId:l,imageMode:h,openInsight:p})=>u.jsxs(Rs,{onClick:()=>p(l),children:[u.jsx(Os,{children:s&&Vo(h,s)}),u.jsxs(_s,{children:[u.jsx(Ps,{children:r||""}),u.jsx(Ys,{alt:"next-icon",src:Qo})]})]}),Ho=({insights:r,openInsight:s,className:l})=>u.jsx(Qs,{className:l,children:u.jsx(Vs,{children:r==null?void 0:r.map(h=>u.jsx(Zo,{openInsight:s,...h},h.questionId))})}),Di=({highlights:r,store:s,className:l})=>{const{data:h}=Z.useStore(s);return h?u.jsx(Ho,{className:l,insights:h,openInsight:r.openHighlight}):u.jsx("div",{className:l,children:"wait insights..."})},Go="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGFzcz0ic2MtQU5kc04ga1RWV0pFIj48cGF0aCBkPSJNNi42NjY1IDMuMTY2NjlINC45OTk4NEM0LjI2MzQ2IDMuMTY2NjkgMy42NjY1IDMuNzYzNjQgMy42NjY1IDQuNTAwMDJWMTEuNUMzLjY2NjUgMTIuMjM2NCA0LjI2MzQ2IDEyLjgzMzQgNC45OTk4NCAxMi44MzM0SDExLjk5OThDMTIuNzM2MiAxMi44MzM0IDEzLjMzMzIgMTIuMjM2NCAxMy4zMzMyIDExLjVWOS44MzMzNSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BhdGg+PHBhdGggZD0iTTEzLjMzMzUgNi4xNjY2OVYzLjE2NjY5SDEwLjMzMzUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjxwYXRoIGQ9Ik0xMy4xNjY4IDMuMzMzMzFMOC4zMzM1IDguMTY2NjUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjwvc3ZnPgo=",Wo=({image:r,title:s,description:l,webLinkLabel:h,webLink:p,closeHighlights:g,closeInsight:f,className:o})=>u.jsxs(Zs,{className:o,children:[u.jsx(hi,{close:g,comeBack:f}),r&&u.jsx(Hs,{alt:"detail-insight-image",src:r}),u.jsxs(Gs,{children:[s&&u.jsx(Ws,{children:s}),l&&u.jsx(qs,{children:l})]}),p&&h&&u.jsxs(Js,{href:p,target:"_blank",children:[h,u.jsx(Xs,{alt:"link-icon",src:Go})]})]}),Li=({openedInsight:r,closeHighlights:s,closeInsight:l,className:h})=>{var p,g,f,o,y;const A=((p=r.options)==null?void 0:p.options.case)==="factoid"?{image:r.options.options.value.image,body:r.options.options.value.body,webLink:(g=r.options.options.value.webLink)==null?void 0:g.url,webLinkLabel:(f=r.options.options.value.webLink)==null?void 0:f.label}:{},w=r.subject||((o=r.notification)==null?void 0:o.title),N=A.body||((y=r.notification)==null?void 0:y.body);return u.jsx(Wo,{className:h,image:A.image,title:w,description:N,webLink:A.webLink,webLinkLabel:A.webLinkLabel,closeInsight:l,closeHighlights:s})},qo=({highlights:r,sdk:s})=>{const l=Z.useStore(r.status),h=Z.useStore(r.openedInsight),{slStreamId:p}=Z.useStore(s.sdkStore);return l!==$e.FeatureStatus.Ready?u.jsx("div",{children:"wait..."}):p!=null&&p.loading?u.jsx(Be,{children:u.jsx("div",{children:"Event is loading"})}):p!=null&&p.data?r.insights===void 0?u.jsx("div",{children:"wait insights..."}):u.jsxs(Be,{children:[!h&&u.jsx(Di,{highlights:r,store:r.insights.getStore()}),h&&u.jsx(Li,{openedInsight:h,closeHighlights:r.closeFeature,closeInsight:r.closeHighlight})]}):u.jsx(Be,{children:u.jsx("div",{children:"Event is forbidden"})})};var Jo={},Si={},et={};et.byteLength=e0;et.toByteArray=i0;et.fromByteArray=s0;var fe=[],ee=[],Xo=typeof Uint8Array<"u"?Uint8Array:Array,Mt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ue=0,Ko=Mt.length;Ue<Ko;++Ue)fe[Ue]=Mt[Ue],ee[Mt.charCodeAt(Ue)]=Ue;ee["-".charCodeAt(0)]=62;ee["_".charCodeAt(0)]=63;function zi(r){var s=r.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=r.indexOf("=");l===-1&&(l=s);var h=l===s?0:4-l%4;return[l,h]}function e0(r){var s=zi(r),l=s[0],h=s[1];return(l+h)*3/4-h}function t0(r,s,l){return(s+l)*3/4-l}function i0(r){var s,l=zi(r),h=l[0],p=l[1],g=new Xo(t0(r,h,p)),f=0,o=p>0?h-4:h,y;for(y=0;y<o;y+=4)s=ee[r.charCodeAt(y)]<<18|ee[r.charCodeAt(y+1)]<<12|ee[r.charCodeAt(y+2)]<<6|ee[r.charCodeAt(y+3)],g[f++]=s>>16&255,g[f++]=s>>8&255,g[f++]=s&255;return p===2&&(s=ee[r.charCodeAt(y)]<<2|ee[r.charCodeAt(y+1)]>>4,g[f++]=s&255),p===1&&(s=ee[r.charCodeAt(y)]<<10|ee[r.charCodeAt(y+1)]<<4|ee[r.charCodeAt(y+2)]>>2,g[f++]=s>>8&255,g[f++]=s&255),g}function r0(r){return fe[r>>18&63]+fe[r>>12&63]+fe[r>>6&63]+fe[r&63]}function n0(r,s,l){for(var h,p=[],g=s;g<l;g+=3)h=(r[g]<<16&16711680)+(r[g+1]<<8&65280)+(r[g+2]&255),p.push(r0(h));return p.join("")}function s0(r){for(var s,l=r.length,h=l%3,p=[],g=16383,f=0,o=l-h;f<o;f+=g)p.push(n0(r,f,f+g>o?o:f+g));return h===1?(s=r[l-1],p.push(fe[s>>2]+fe[s<<4&63]+"==")):h===2&&(s=(r[l-2]<<8)+r[l-1],p.push(fe[s>>10]+fe[s>>4&63]+fe[s<<2&63]+"=")),p.join("")}var Bt={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Bt.read=function(r,s,l,h,p){var g,f,o=p*8-h-1,y=(1<<o)-1,A=y>>1,w=-7,N=l?p-1:0,x=l?-1:1,T=r[s+N];for(N+=x,g=T&(1<<-w)-1,T>>=-w,w+=o;w>0;g=g*256+r[s+N],N+=x,w-=8);for(f=g&(1<<-w)-1,g>>=-w,w+=h;w>0;f=f*256+r[s+N],N+=x,w-=8);if(g===0)g=1-A;else{if(g===y)return f?NaN:(T?-1:1)*(1/0);f=f+Math.pow(2,h),g=g-A}return(T?-1:1)*f*Math.pow(2,g-h)};Bt.write=function(r,s,l,h,p,g){var f,o,y,A=g*8-p-1,w=(1<<A)-1,N=w>>1,x=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=h?0:g-1,D=h?1:-1,I=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(o=isNaN(s)?1:0,f=w):(f=Math.floor(Math.log(s)/Math.LN2),s*(y=Math.pow(2,-f))<1&&(f--,y*=2),f+N>=1?s+=x/y:s+=x*Math.pow(2,1-N),s*y>=2&&(f++,y/=2),f+N>=w?(o=0,f=w):f+N>=1?(o=(s*y-1)*Math.pow(2,p),f=f+N):(o=s*Math.pow(2,N-1)*Math.pow(2,p),f=0));p>=8;r[l+T]=o&255,T+=D,o/=256,p-=8);for(f=f<<p|o,A+=p;A>0;r[l+T]=f&255,T+=D,f/=256,A-=8);r[l+T-D]|=I*128};/*!
|
|
10
10
|
* The buffer module from node.js, for the browser.
|
|
11
11
|
*
|
|
12
12
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
13
13
|
* @license MIT
|
|
14
|
-
*/(function(r){const s=et,l=Bt,h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=o,r.SlowBuffer=j,r.INSPECT_MAX_BYTES=50;const p=2147483647;r.kMaxLength=p,o.TYPED_ARRAY_SUPPORT=g(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function g(){try{const i=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(i,e),i.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function f(i){if(i>p)throw new RangeError('The value "'+i+'" is invalid for option "size"');const e=new Uint8Array(i);return Object.setPrototypeOf(e,o.prototype),e}function o(i,e,t){if(typeof i=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(i)}return y(i,e,t)}o.poolSize=8192;function y(i,e,t){if(typeof i=="string")return x(i,e);if(ArrayBuffer.isView(i))return D(i);if(i==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);if(Y(i,ArrayBuffer)||i&&Y(i.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Y(i,SharedArrayBuffer)||i&&Y(i.buffer,SharedArrayBuffer)))return I(i,e,t);if(typeof i=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const n=i.valueOf&&i.valueOf();if(n!=null&&n!==i)return o.from(n,e,t);const a=E(i);if(a)return a;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof i[Symbol.toPrimitive]=="function")return o.from(i[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i)}o.from=function(i,e,t){return y(i,e,t)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function A(i){if(typeof i!="number")throw new TypeError('"size" argument must be of type number');if(i<0)throw new RangeError('The value "'+i+'" is invalid for option "size"')}function w(i,e,t){return A(i),i<=0?f(i):e!==void 0?typeof t=="string"?f(i).fill(e,t):f(i).fill(e):f(i)}o.alloc=function(i,e,t){return w(i,e,t)};function N(i){return A(i),f(i<0?0:C(i)|0)}o.allocUnsafe=function(i){return N(i)},o.allocUnsafeSlow=function(i){return N(i)};function x(i,e){if((typeof e!="string"||e==="")&&(e="utf8"),!o.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=L(i,e)|0;let n=f(t);const a=n.write(i,e);return a!==t&&(n=n.slice(0,a)),n}function T(i){const e=i.length<0?0:C(i.length)|0,t=f(e);for(let n=0;n<e;n+=1)t[n]=i[n]&255;return t}function D(i){if(Y(i,Uint8Array)){const e=new Uint8Array(i);return I(e.buffer,e.byteOffset,e.byteLength)}return T(i)}function I(i,e,t){if(e<0||i.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(i.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&t===void 0?n=new Uint8Array(i):t===void 0?n=new Uint8Array(i,e):n=new Uint8Array(i,e,t),Object.setPrototypeOf(n,o.prototype),n}function E(i){if(o.isBuffer(i)){const e=C(i.length)|0,t=f(e);return t.length===0||i.copy(t,0,0,e),t}if(i.length!==void 0)return typeof i.length!="number"||Se(i.length)?f(0):T(i);if(i.type==="Buffer"&&Array.isArray(i.data))return T(i.data)}function C(i){if(i>=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return i|0}function j(i){return+i!=i&&(i=0),o.alloc(+i)}o.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==o.prototype},o.compare=function(e,t){if(Y(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,a=t.length;for(let c=0,d=Math.min(n,a);c<d;++c)if(e[c]!==t[c]){n=e[c],a=t[c];break}return n<a?-1:a<n?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return o.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const a=o.allocUnsafe(t);let c=0;for(n=0;n<e.length;++n){let d=e[n];if(Y(d,Uint8Array))c+d.length>a.length?(o.isBuffer(d)||(d=o.from(d)),d.copy(a,c)):Uint8Array.prototype.set.call(a,d,c);else if(o.isBuffer(d))d.copy(a,c);else throw new TypeError('"list" argument must be an Array of Buffers');c+=d.length}return a};function L(i,e){if(o.isBuffer(i))return i.length;if(ArrayBuffer.isView(i)||Y(i,ArrayBuffer))return i.byteLength;if(typeof i!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof i);const t=i.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let a=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Le(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return He(i).length;default:if(a)return n?-1:Le(i).length;e=(""+e).toLowerCase(),a=!0}}o.byteLength=L;function U(i,e,t){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(i||(i="utf8");;)switch(i){case"hex":return ne(this,e,t);case"utf8":case"utf-8":return re(this,e,t);case"ascii":return we(this,e,t);case"latin1":case"binary":return me(this,e,t);case"base64":return W(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ee(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),n=!0}}o.prototype._isBuffer=!0;function z(i,e,t){const n=i[e];i[e]=i[t],i[t]=n}o.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)z(this,t,t+1);return this},o.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)z(this,t,t+3),z(this,t+1,t+2);return this},o.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)z(this,t,t+7),z(this,t+1,t+6),z(this,t+2,t+5),z(this,t+3,t+4);return this},o.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?re(this,0,e):U.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:o.compare(this,e)===0},o.prototype.inspect=function(){let e="";const t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},h&&(o.prototype[h]=o.prototype.inspect),o.prototype.compare=function(e,t,n,a,c){if(Y(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),a===void 0&&(a=0),c===void 0&&(c=this.length),t<0||n>e.length||a<0||c>this.length)throw new RangeError("out of range index");if(a>=c&&t>=n)return 0;if(a>=c)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,a>>>=0,c>>>=0,this===e)return 0;let d=c-a,v=n-t;const B=Math.min(d,v),k=this.slice(a,c),b=e.slice(t,n);for(let S=0;S<B;++S)if(k[S]!==b[S]){d=k[S],v=b[S];break}return d<v?-1:v<d?1:0};function $(i,e,t,n,a){if(i.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Se(t)&&(t=a?0:i.length-1),t<0&&(t=i.length+t),t>=i.length){if(a)return-1;t=i.length-1}else if(t<0)if(a)t=0;else return-1;if(typeof e=="string"&&(e=o.from(e,n)),o.isBuffer(e))return e.length===0?-1:P(i,e,t,n,a);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(i,e,t):Uint8Array.prototype.lastIndexOf.call(i,e,t):P(i,[e],t,n,a);throw new TypeError("val must be string, number or Buffer")}function P(i,e,t,n,a){let c=1,d=i.length,v=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(i.length<2||e.length<2)return-1;c=2,d/=2,v/=2,t/=2}function B(b,S){return c===1?b[S]:b.readUInt16BE(S*c)}let k;if(a){let b=-1;for(k=t;k<d;k++)if(B(i,k)===B(e,b===-1?0:k-b)){if(b===-1&&(b=k),k-b+1===v)return b*c}else b!==-1&&(k-=k-b),b=-1}else for(t+v>d&&(t=d-v),k=t;k>=0;k--){let b=!0;for(let S=0;S<v;S++)if(B(i,k+S)!==B(e,S)){b=!1;break}if(b)return k}return-1}o.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},o.prototype.indexOf=function(e,t,n){return $(this,e,t,n,!0)},o.prototype.lastIndexOf=function(e,t,n){return $(this,e,t,n,!1)};function G(i,e,t,n){t=Number(t)||0;const a=i.length-t;n?(n=Number(n),n>a&&(n=a)):n=a;const c=e.length;n>c/2&&(n=c/2);let d;for(d=0;d<n;++d){const v=parseInt(e.substr(d*2,2),16);if(Se(v))return d;i[t+d]=v}return d}function q(i,e,t,n){return ye(Le(e,i.length-t),i,t,n)}function ae(i,e,t,n){return ye(nt(e),i,t,n)}function ie(i,e,t,n){return ye(He(e),i,t,n)}function le(i,e,t,n){return ye(st(e,i.length-t),i,t,n)}o.prototype.write=function(e,t,n,a){if(t===void 0)a="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")a=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,a===void 0&&(a="utf8")):(a=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const c=this.length-t;if((n===void 0||n>c)&&(n=c),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let d=!1;for(;;)switch(a){case"hex":return G(this,e,t,n);case"utf8":case"utf-8":return q(this,e,t,n);case"ascii":case"latin1":case"binary":return ae(this,e,t,n);case"base64":return ie(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le(this,e,t,n);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),d=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function W(i,e,t){return e===0&&t===i.length?s.fromByteArray(i):s.fromByteArray(i.slice(e,t))}function re(i,e,t){t=Math.min(i.length,t);const n=[];let a=e;for(;a<t;){const c=i[a];let d=null,v=c>239?4:c>223?3:c>191?2:1;if(a+v<=t){let B,k,b,S;switch(v){case 1:c<128&&(d=c);break;case 2:B=i[a+1],(B&192)===128&&(S=(c&31)<<6|B&63,S>127&&(d=S));break;case 3:B=i[a+1],k=i[a+2],(B&192)===128&&(k&192)===128&&(S=(c&15)<<12|(B&63)<<6|k&63,S>2047&&(S<55296||S>57343)&&(d=S));break;case 4:B=i[a+1],k=i[a+2],b=i[a+3],(B&192)===128&&(k&192)===128&&(b&192)===128&&(S=(c&15)<<18|(B&63)<<12|(k&63)<<6|b&63,S>65535&&S<1114112&&(d=S))}}d===null?(d=65533,v=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|d&1023),n.push(d),a+=v}return ve(n)}const ge=4096;function ve(i){const e=i.length;if(e<=ge)return String.fromCharCode.apply(String,i);let t="",n=0;for(;n<e;)t+=String.fromCharCode.apply(String,i.slice(n,n+=ge));return t}function we(i,e,t){let n="";t=Math.min(i.length,t);for(let a=e;a<t;++a)n+=String.fromCharCode(i[a]&127);return n}function me(i,e,t){let n="";t=Math.min(i.length,t);for(let a=e;a<t;++a)n+=String.fromCharCode(i[a]);return n}function ne(i,e,t){const n=i.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);let a="";for(let c=e;c<t;++c)a+=ot[i[c]];return a}function Ee(i,e,t){const n=i.slice(e,t);let a="";for(let c=0;c<n.length-1;c+=2)a+=String.fromCharCode(n[c]+n[c+1]*256);return a}o.prototype.slice=function(e,t){const n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);const a=this.subarray(e,t);return Object.setPrototypeOf(a,o.prototype),a};function _(i,e,t){if(i%1!==0||i<0)throw new RangeError("offset is not uint");if(i+e>t)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e],c=1,d=0;for(;++d<t&&(c*=256);)a+=this[e+d]*c;return a},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e+--t],c=1;for(;t>0&&(c*=256);)a+=this[e+--t]*c;return a},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e=e>>>0,t||_(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||_(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||_(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,c=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(a)+(BigInt(c)<<BigInt(32))}),o.prototype.readBigUInt64BE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],c=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(a)<<BigInt(32))+BigInt(c)}),o.prototype.readIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e],c=1,d=0;for(;++d<t&&(c*=256);)a+=this[e+d]*c;return c*=128,a>=c&&(a-=Math.pow(2,8*t)),a},o.prototype.readIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=t,c=1,d=this[e+--a];for(;a>0&&(c*=256);)d+=this[e+--a]*c;return c*=128,d>=c&&(d-=Math.pow(2,8*t)),d},o.prototype.readInt8=function(e,t){return e=e>>>0,t||_(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){e=e>>>0,t||_(e,2,this.length);const n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},o.prototype.readInt16BE=function(e,t){e=e>>>0,t||_(e,2,this.length);const n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},o.prototype.readInt32LE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(a)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),o.prototype.readBigInt64BE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(a)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)}),o.prototype.readFloatLE=function(e,t){return e=e>>>0,t||_(e,4,this.length),l.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e=e>>>0,t||_(e,4,this.length),l.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||_(e,8,this.length),l.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||_(e,8,this.length),l.read(this,e,!1,52,8)};function F(i,e,t,n,a,c){if(!o.isBuffer(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||e<c)throw new RangeError('"value" argument is out of bounds');if(t+n>i.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,n,a){if(e=+e,t=t>>>0,n=n>>>0,!a){const v=Math.pow(2,8*n)-1;F(this,e,t,n,v,0)}let c=1,d=0;for(this[t]=e&255;++d<n&&(c*=256);)this[t+d]=e/c&255;return t+n},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,n,a){if(e=+e,t=t>>>0,n=n>>>0,!a){const v=Math.pow(2,8*n)-1;F(this,e,t,n,v,0)}let c=n-1,d=1;for(this[t+c]=e&255;--c>=0&&(d*=256);)this[t+c]=e/d&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,1,255,0),this[t]=e&255,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Ae(i,e,t,n,a){Ze(e,n,a,i,t,7);let c=Number(e&BigInt(4294967295));i[t++]=c,c=c>>8,i[t++]=c,c=c>>8,i[t++]=c,c=c>>8,i[t++]=c;let d=Number(e>>BigInt(32)&BigInt(4294967295));return i[t++]=d,d=d>>8,i[t++]=d,d=d>>8,i[t++]=d,d=d>>8,i[t++]=d,t}function se(i,e,t,n,a){Ze(e,n,a,i,t,7);let c=Number(e&BigInt(4294967295));i[t+7]=c,c=c>>8,i[t+6]=c,c=c>>8,i[t+5]=c,c=c>>8,i[t+4]=c;let d=Number(e>>BigInt(32)&BigInt(4294967295));return i[t+3]=d,d=d>>8,i[t+2]=d,d=d>>8,i[t+1]=d,d=d>>8,i[t]=d,t+8}o.prototype.writeBigUInt64LE=H(function(e,t=0){return Ae(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=H(function(e,t=0){return se(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(e,t,n,a){if(e=+e,t=t>>>0,!a){const B=Math.pow(2,8*n-1);F(this,e,t,n,B-1,-B)}let c=0,d=1,v=0;for(this[t]=e&255;++c<n&&(d*=256);)e<0&&v===0&&this[t+c-1]!==0&&(v=1),this[t+c]=(e/d>>0)-v&255;return t+n},o.prototype.writeIntBE=function(e,t,n,a){if(e=+e,t=t>>>0,!a){const B=Math.pow(2,8*n-1);F(this,e,t,n,B-1,-B)}let c=n-1,d=1,v=0;for(this[t+c]=e&255;--c>=0&&(d*=256);)e<0&&v===0&&this[t+c+1]!==0&&(v=1),this[t+c]=(e/d>>0)-v&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},o.prototype.writeBigInt64LE=H(function(e,t=0){return Ae(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=H(function(e,t=0){return se(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ne(i,e,t,n,a,c){if(t+n>i.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Ye(i,e,t,n,a){return e=+e,t=t>>>0,a||Ne(i,e,t,4),l.write(i,e,t,n,23,4),t+4}o.prototype.writeFloatLE=function(e,t,n){return Ye(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return Ye(this,e,t,!1,n)};function Qe(i,e,t,n,a){return e=+e,t=t>>>0,a||Ne(i,e,t,8),l.write(i,e,t,n,52,8),t+8}o.prototype.writeDoubleLE=function(e,t,n){return Qe(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return Qe(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,a){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!a&&a!==0&&(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a<n&&(a=n),a===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-n&&(a=e.length-t+n);const c=a-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,a):Uint8Array.prototype.set.call(e,this.subarray(n,a),t),c},o.prototype.fill=function(e,t,n,a){if(typeof e=="string"){if(typeof t=="string"?(a=t,t=0,n=this.length):typeof n=="string"&&(a=n,n=this.length),a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!o.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(e.length===1){const d=e.charCodeAt(0);(a==="utf8"&&d<128||a==="latin1")&&(e=d)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let c;if(typeof e=="number")for(c=t;c<n;++c)this[c]=e;else{const d=o.isBuffer(e)?e:o.from(e,a),v=d.length;if(v===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(c=0;c<n-t;++c)this[c+t]=d[c%v]}return this};const J={};function De(i,e,t){J[i]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${i}]`,this.stack,delete this.name}get code(){return i}set code(a){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:a,writable:!0})}toString(){return`${this.name} [${i}]: ${this.message}`}}}De("ERR_BUFFER_OUT_OF_BOUNDS",function(i){return i?`${i} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),De("ERR_INVALID_ARG_TYPE",function(i,e){return`The "${i}" argument must be of type number. Received type ${typeof e}`},TypeError),De("ERR_OUT_OF_RANGE",function(i,e,t){let n=`The value of "${i}" is out of range.`,a=t;return Number.isInteger(t)&&Math.abs(t)>2**32?a=Ve(String(t)):typeof t=="bigint"&&(a=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(a=Ve(a)),a+="n"),n+=` It must be ${e}. Received ${a}`,n},RangeError);function Ve(i){let e="",t=i.length;const n=i[0]==="-"?1:0;for(;t>=n+4;t-=3)e=`_${i.slice(t-3,t)}${e}`;return`${i.slice(0,t)}${e}`}function tt(i,e,t){X(e,"offset"),(i[e]===void 0||i[e+t]===void 0)&&oe(e,i.length-(t+1))}function Ze(i,e,t,n,a,c){if(i>t||i<e){const d=typeof e=="bigint"?"n":"";let v;throw c>3?e===0||e===BigInt(0)?v=`>= 0${d} and < 2${d} ** ${(c+1)*8}${d}`:v=`>= -(2${d} ** ${(c+1)*8-1}${d}) and < 2 ** ${(c+1)*8-1}${d}`:v=`>= ${e}${d} and <= ${t}${d}`,new J.ERR_OUT_OF_RANGE("value",v,i)}tt(n,a,c)}function X(i,e){if(typeof i!="number")throw new J.ERR_INVALID_ARG_TYPE(e,"number",i)}function oe(i,e,t){throw Math.floor(i)!==i?(X(i,t),new J.ERR_OUT_OF_RANGE(t||"offset","an integer",i)):e<0?new J.ERR_BUFFER_OUT_OF_BOUNDS:new J.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,i)}const it=/[^+/0-9A-Za-z-_]/g;function rt(i){if(i=i.split("=")[0],i=i.trim().replace(it,""),i.length<2)return"";for(;i.length%4!==0;)i=i+"=";return i}function Le(i,e){e=e||1/0;let t;const n=i.length;let a=null;const c=[];for(let d=0;d<n;++d){if(t=i.charCodeAt(d),t>55295&&t<57344){if(!a){if(t>56319){(e-=3)>-1&&c.push(239,191,189);continue}else if(d+1===n){(e-=3)>-1&&c.push(239,191,189);continue}a=t;continue}if(t<56320){(e-=3)>-1&&c.push(239,191,189),a=t;continue}t=(a-55296<<10|t-56320)+65536}else a&&(e-=3)>-1&&c.push(239,191,189);if(a=null,t<128){if((e-=1)<0)break;c.push(t)}else if(t<2048){if((e-=2)<0)break;c.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;c.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;c.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return c}function nt(i){const e=[];for(let t=0;t<i.length;++t)e.push(i.charCodeAt(t)&255);return e}function st(i,e){let t,n,a;const c=[];for(let d=0;d<i.length&&!((e-=2)<0);++d)t=i.charCodeAt(d),n=t>>8,a=t%256,c.push(a),c.push(n);return c}function He(i){return s.toByteArray(rt(i))}function ye(i,e,t,n){let a;for(a=0;a<n&&!(a+t>=e.length||a>=i.length);++a)e[a+t]=i[a];return a}function Y(i,e){return i instanceof e||i!=null&&i.constructor!=null&&i.constructor.name!=null&&i.constructor.name===e.name}function Se(i){return i!==i}const ot=function(){const i="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){const n=t*16;for(let a=0;a<16;++a)e[n+a]=i[t]+i[a]}return e}();function H(i){return typeof BigInt>"u"?at:i}function at(){throw new Error("BigInt not supported")}})(Si);var ki={exports:{}},V=ki.exports={},he,de;function jt(){throw new Error("setTimeout has not been defined")}function Tt(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?he=setTimeout:he=jt}catch{he=jt}try{typeof clearTimeout=="function"?de=clearTimeout:de=Tt}catch{de=Tt}})();function Bi(r){if(he===setTimeout)return setTimeout(r,0);if((he===jt||!he)&&setTimeout)return he=setTimeout,setTimeout(r,0);try{return he(r,0)}catch{try{return he.call(null,r,0)}catch{return he.call(this,r,0)}}}function o0(r){if(de===clearTimeout)return clearTimeout(r);if((de===Tt||!de)&&clearTimeout)return de=clearTimeout,clearTimeout(r);try{return de(r)}catch{try{return de.call(null,r)}catch{return de.call(this,r)}}}var Me=[],Pe=!1,be,Xe=-1;function a0(){!Pe||!be||(Pe=!1,be.length?Me=be.concat(Me):Xe=-1,Me.length&&bi())}function bi(){if(!Pe){var r=Bi(a0);Pe=!0;for(var s=Me.length;s;){for(be=Me,Me=[];++Xe<s;)be&&be[Xe].run();Xe=-1,s=Me.length}be=null,Pe=!1,o0(r)}}V.nextTick=function(r){var s=new Array(arguments.length-1);if(arguments.length>1)for(var l=1;l<arguments.length;l++)s[l-1]=arguments[l];Me.push(new Ri(r,s)),Me.length===1&&!Pe&&Bi(bi)};function Ri(r,s){this.fun=r,this.array=s}Ri.prototype.run=function(){this.fun.apply(null,this.array)};V.title="browser";V.browser=!0;V.env={};V.argv=[];V.version="";V.versions={};function Ce(){}V.on=Ce;V.addListener=Ce;V.once=Ce;V.off=Ce;V.removeListener=Ce;V.removeAllListeners=Ce;V.emit=Ce;V.prependListener=Ce;V.prependOnceListener=Ce;V.listeners=function(r){return[]};V.binding=function(r){throw new Error("process.binding is not supported")};V.cwd=function(){return"/"};V.chdir=function(r){throw new Error("process.chdir is not supported")};V.umask=function(){return 0};var l0=ki.exports;(function(r){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});const s=Si,l=l0,h=f=>f&&f.__esModule?f:{default:f},p=h(l),g=globalThis||void 0||self;Object.defineProperty(r,"Buffer",{enumerable:!0,get:()=>s.Buffer}),Object.defineProperty(r,"process",{enumerable:!0,get:()=>p.default}),r.global=g})(Jo);window.slStore=Object.create(null);var ii;(function(r){r.ORGANIZATION="ORGANIZATION",r.STREAM="STREAM"})(ii||(ii={}));We.SdkOverlayType.BETTING+"",We.SdkOverlayType.GAMES+"",We.SdkOverlayType.PUBLIC_CHAT+"",We.SdkOverlayType.TWITTER+"";var ri;(function(r){r.Ready="ready",r.Suspended="suspended"})(ri||(ri={}));window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));var ni;(function(r){r.Init="init",r.Ready="ready",r.Connecting="connecting",r.Connected="connected",r.Disconnected="disconnected",r.Failed="failed",r.Reconnecting="reconnecting"})(ni||(ni={}));const c0=({sdk:r})=>Z.useStore(r.getUserStore()).data?u.jsx("button",{onClick:r.logout,children:"logout"}):u.jsx(xr,{login:async s=>{try{await r.authorizationBypass("streamlayer:streamlayer",s)}catch(l){throw console.log("login err",l),l}},anonymousLogin:r.anonymousAuthorization,host:r.host});var u0=Object.defineProperty,h0=(r,s,l)=>s in r?u0(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,ze=(r,s,l)=>(h0(r,typeof s!="symbol"?s+"":s,l),l);class d0 extends Ui.Storage{constructor(){super("user"),ze(this,"setSchema",s=>{this.write("schema",s)}),ze(this,"getSchema",()=>this.read("schema")),ze(this,"setToken",s=>{this.write("token",s)}),ze(this,"getToken",()=>this.read("token")),ze(this,"setExternalToken",s=>{this.write("eToken",s)}),ze(this,"getExternalToken",()=>this.read("eToken")),ze(this,"removeToken",()=>{this.remove("token")})}}new d0;const p0=({activeFeature:r,sdk:s})=>{const[l,h]=R.useState(null),{organizationSettings:p,streamSettings:g}=Z.useStore(s.sdkStore),f=R.useMemo(()=>{const y=(g==null?void 0:g.data)||(p==null?void 0:p.data);return y!=null&&y.overlays?y.overlays:[]},[p,g]);R.useEffect(()=>{const y=s.getFeatures();if(r)for(const[A,w]of y)A===r?w.status.get()===$e.FeatureStatus.Suspended&&(w.enable(),h(w)):w.status.get()===$e.FeatureStatus.Ready&&w.disable();else{for(const[,A]of y)A.status.get()===$e.FeatureStatus.Ready&&A.disable();h(null)}return()=>{for(const[,A]of y)A.status.get()===$e.FeatureStatus.Ready&&A.disable()}},[r,s]);const o=R.useMemo(()=>l?l.featureConfig.get().type===O.FeatureType.GAMES?l?u.jsx("div",{children:u.jsx(Yo,{gamification:l,sdk:s})}):u.jsx("div",{children:"wait gamification..."}):l.featureConfig.get().type===O.FeatureType.HIGHLIGHTS?l?u.jsx("div",{children:u.jsx(qo,{highlights:l,sdk:s})}):u.jsx("div",{children:"wait highlights..."}):u.jsx("div",{children:"unknown feature"}):null,[s,l]);return u.jsxs("div",{children:[u.jsxs(Po,{children:[u.jsx(It,{onClick:()=>s.closeFeature(),disabled:!o,children:"close"}),u.jsx(It,{onClick:()=>s.logout(),children:"logout"}),f.map(y=>u.jsxs(It,{onClick:()=>s.openFeature(y.type),disabled:!(y.type in Oi.AvailableFeatures),"data-enable_sdk_button":y.enableSdkButton.toString(),"data-selected":y.type===r,children:[u.jsx("img",{src:y.icon,alt:""}),y.name]},y.name))]}),o]})},f0=({sdk:r})=>{const s=Z.useStore(r.organizationStore()),l=Z.useStore(r.getUserStore()),h=Z.useStore(r.getActiveFeature());return s.loading?u.jsx("div",{children:"authentication..."}):s.data?l.loading?u.jsx("div",{children:"authentication..."}):l.data?u.jsxs(u.Fragment,{children:[u.jsx(Ss,{notificationsStore:r.getNotificationsStore()}),u.jsx(p0,{sdk:r,activeFeature:h})]}):u.jsx(c0,{sdk:r}):u.jsx("div",{children:"wrong sdk key..."})};const g0="StreamLayerCSSReset",m0="pedqibx";const y0=({children:r,style:s})=>u.jsx("div",{className:"StreamLayerSDKTheme",children:u.jsx("div",{className:m0,style:s,children:r})});exports.Sr=f0;exports.StreamLayerContext=oi;exports.StreamLayerProvider=Yi;exports.StreamLayerStatus=si;exports.Y=xi;exports.a=zt;exports.a$1=Ii;exports.c=Di;exports.e=L1;exports.f=g0;exports.f$1=di;exports.h=Ge;exports.i=D1;exports.o=pi;exports.p=y0;exports.p$1=ui;exports.q=Te;exports.r=yi;exports.styled_default=m;exports.u=fi;exports.v=mi;exports.x=vi;exports.x$1=Li;
|
|
14
|
+
*/(function(r){const s=et,l=Bt,h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=o,r.SlowBuffer=j,r.INSPECT_MAX_BYTES=50;const p=2147483647;r.kMaxLength=p,o.TYPED_ARRAY_SUPPORT=g(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function g(){try{const i=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(i,e),i.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function f(i){if(i>p)throw new RangeError('The value "'+i+'" is invalid for option "size"');const e=new Uint8Array(i);return Object.setPrototypeOf(e,o.prototype),e}function o(i,e,t){if(typeof i=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(i)}return y(i,e,t)}o.poolSize=8192;function y(i,e,t){if(typeof i=="string")return x(i,e);if(ArrayBuffer.isView(i))return D(i);if(i==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);if(Y(i,ArrayBuffer)||i&&Y(i.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Y(i,SharedArrayBuffer)||i&&Y(i.buffer,SharedArrayBuffer)))return I(i,e,t);if(typeof i=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const n=i.valueOf&&i.valueOf();if(n!=null&&n!==i)return o.from(n,e,t);const a=E(i);if(a)return a;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof i[Symbol.toPrimitive]=="function")return o.from(i[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i)}o.from=function(i,e,t){return y(i,e,t)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function A(i){if(typeof i!="number")throw new TypeError('"size" argument must be of type number');if(i<0)throw new RangeError('The value "'+i+'" is invalid for option "size"')}function w(i,e,t){return A(i),i<=0?f(i):e!==void 0?typeof t=="string"?f(i).fill(e,t):f(i).fill(e):f(i)}o.alloc=function(i,e,t){return w(i,e,t)};function N(i){return A(i),f(i<0?0:C(i)|0)}o.allocUnsafe=function(i){return N(i)},o.allocUnsafeSlow=function(i){return N(i)};function x(i,e){if((typeof e!="string"||e==="")&&(e="utf8"),!o.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=L(i,e)|0;let n=f(t);const a=n.write(i,e);return a!==t&&(n=n.slice(0,a)),n}function T(i){const e=i.length<0?0:C(i.length)|0,t=f(e);for(let n=0;n<e;n+=1)t[n]=i[n]&255;return t}function D(i){if(Y(i,Uint8Array)){const e=new Uint8Array(i);return I(e.buffer,e.byteOffset,e.byteLength)}return T(i)}function I(i,e,t){if(e<0||i.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(i.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&t===void 0?n=new Uint8Array(i):t===void 0?n=new Uint8Array(i,e):n=new Uint8Array(i,e,t),Object.setPrototypeOf(n,o.prototype),n}function E(i){if(o.isBuffer(i)){const e=C(i.length)|0,t=f(e);return t.length===0||i.copy(t,0,0,e),t}if(i.length!==void 0)return typeof i.length!="number"||Se(i.length)?f(0):T(i);if(i.type==="Buffer"&&Array.isArray(i.data))return T(i.data)}function C(i){if(i>=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return i|0}function j(i){return+i!=i&&(i=0),o.alloc(+i)}o.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==o.prototype},o.compare=function(e,t){if(Y(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,a=t.length;for(let c=0,d=Math.min(n,a);c<d;++c)if(e[c]!==t[c]){n=e[c],a=t[c];break}return n<a?-1:a<n?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return o.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const a=o.allocUnsafe(t);let c=0;for(n=0;n<e.length;++n){let d=e[n];if(Y(d,Uint8Array))c+d.length>a.length?(o.isBuffer(d)||(d=o.from(d)),d.copy(a,c)):Uint8Array.prototype.set.call(a,d,c);else if(o.isBuffer(d))d.copy(a,c);else throw new TypeError('"list" argument must be an Array of Buffers');c+=d.length}return a};function L(i,e){if(o.isBuffer(i))return i.length;if(ArrayBuffer.isView(i)||Y(i,ArrayBuffer))return i.byteLength;if(typeof i!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof i);const t=i.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let a=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Le(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return He(i).length;default:if(a)return n?-1:Le(i).length;e=(""+e).toLowerCase(),a=!0}}o.byteLength=L;function U(i,e,t){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(i||(i="utf8");;)switch(i){case"hex":return ne(this,e,t);case"utf8":case"utf-8":return re(this,e,t);case"ascii":return we(this,e,t);case"latin1":case"binary":return me(this,e,t);case"base64":return W(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ee(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),n=!0}}o.prototype._isBuffer=!0;function z(i,e,t){const n=i[e];i[e]=i[t],i[t]=n}o.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)z(this,t,t+1);return this},o.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)z(this,t,t+3),z(this,t+1,t+2);return this},o.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)z(this,t,t+7),z(this,t+1,t+6),z(this,t+2,t+5),z(this,t+3,t+4);return this},o.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?re(this,0,e):U.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:o.compare(this,e)===0},o.prototype.inspect=function(){let e="";const t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},h&&(o.prototype[h]=o.prototype.inspect),o.prototype.compare=function(e,t,n,a,c){if(Y(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),a===void 0&&(a=0),c===void 0&&(c=this.length),t<0||n>e.length||a<0||c>this.length)throw new RangeError("out of range index");if(a>=c&&t>=n)return 0;if(a>=c)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,a>>>=0,c>>>=0,this===e)return 0;let d=c-a,v=n-t;const B=Math.min(d,v),k=this.slice(a,c),b=e.slice(t,n);for(let S=0;S<B;++S)if(k[S]!==b[S]){d=k[S],v=b[S];break}return d<v?-1:v<d?1:0};function $(i,e,t,n,a){if(i.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Se(t)&&(t=a?0:i.length-1),t<0&&(t=i.length+t),t>=i.length){if(a)return-1;t=i.length-1}else if(t<0)if(a)t=0;else return-1;if(typeof e=="string"&&(e=o.from(e,n)),o.isBuffer(e))return e.length===0?-1:P(i,e,t,n,a);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(i,e,t):Uint8Array.prototype.lastIndexOf.call(i,e,t):P(i,[e],t,n,a);throw new TypeError("val must be string, number or Buffer")}function P(i,e,t,n,a){let c=1,d=i.length,v=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(i.length<2||e.length<2)return-1;c=2,d/=2,v/=2,t/=2}function B(b,S){return c===1?b[S]:b.readUInt16BE(S*c)}let k;if(a){let b=-1;for(k=t;k<d;k++)if(B(i,k)===B(e,b===-1?0:k-b)){if(b===-1&&(b=k),k-b+1===v)return b*c}else b!==-1&&(k-=k-b),b=-1}else for(t+v>d&&(t=d-v),k=t;k>=0;k--){let b=!0;for(let S=0;S<v;S++)if(B(i,k+S)!==B(e,S)){b=!1;break}if(b)return k}return-1}o.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},o.prototype.indexOf=function(e,t,n){return $(this,e,t,n,!0)},o.prototype.lastIndexOf=function(e,t,n){return $(this,e,t,n,!1)};function G(i,e,t,n){t=Number(t)||0;const a=i.length-t;n?(n=Number(n),n>a&&(n=a)):n=a;const c=e.length;n>c/2&&(n=c/2);let d;for(d=0;d<n;++d){const v=parseInt(e.substr(d*2,2),16);if(Se(v))return d;i[t+d]=v}return d}function q(i,e,t,n){return ye(Le(e,i.length-t),i,t,n)}function ae(i,e,t,n){return ye(nt(e),i,t,n)}function ie(i,e,t,n){return ye(He(e),i,t,n)}function le(i,e,t,n){return ye(st(e,i.length-t),i,t,n)}o.prototype.write=function(e,t,n,a){if(t===void 0)a="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")a=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,a===void 0&&(a="utf8")):(a=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const c=this.length-t;if((n===void 0||n>c)&&(n=c),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let d=!1;for(;;)switch(a){case"hex":return G(this,e,t,n);case"utf8":case"utf-8":return q(this,e,t,n);case"ascii":case"latin1":case"binary":return ae(this,e,t,n);case"base64":return ie(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le(this,e,t,n);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),d=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function W(i,e,t){return e===0&&t===i.length?s.fromByteArray(i):s.fromByteArray(i.slice(e,t))}function re(i,e,t){t=Math.min(i.length,t);const n=[];let a=e;for(;a<t;){const c=i[a];let d=null,v=c>239?4:c>223?3:c>191?2:1;if(a+v<=t){let B,k,b,S;switch(v){case 1:c<128&&(d=c);break;case 2:B=i[a+1],(B&192)===128&&(S=(c&31)<<6|B&63,S>127&&(d=S));break;case 3:B=i[a+1],k=i[a+2],(B&192)===128&&(k&192)===128&&(S=(c&15)<<12|(B&63)<<6|k&63,S>2047&&(S<55296||S>57343)&&(d=S));break;case 4:B=i[a+1],k=i[a+2],b=i[a+3],(B&192)===128&&(k&192)===128&&(b&192)===128&&(S=(c&15)<<18|(B&63)<<12|(k&63)<<6|b&63,S>65535&&S<1114112&&(d=S))}}d===null?(d=65533,v=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|d&1023),n.push(d),a+=v}return ve(n)}const ge=4096;function ve(i){const e=i.length;if(e<=ge)return String.fromCharCode.apply(String,i);let t="",n=0;for(;n<e;)t+=String.fromCharCode.apply(String,i.slice(n,n+=ge));return t}function we(i,e,t){let n="";t=Math.min(i.length,t);for(let a=e;a<t;++a)n+=String.fromCharCode(i[a]&127);return n}function me(i,e,t){let n="";t=Math.min(i.length,t);for(let a=e;a<t;++a)n+=String.fromCharCode(i[a]);return n}function ne(i,e,t){const n=i.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);let a="";for(let c=e;c<t;++c)a+=ot[i[c]];return a}function Ee(i,e,t){const n=i.slice(e,t);let a="";for(let c=0;c<n.length-1;c+=2)a+=String.fromCharCode(n[c]+n[c+1]*256);return a}o.prototype.slice=function(e,t){const n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);const a=this.subarray(e,t);return Object.setPrototypeOf(a,o.prototype),a};function _(i,e,t){if(i%1!==0||i<0)throw new RangeError("offset is not uint");if(i+e>t)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e],c=1,d=0;for(;++d<t&&(c*=256);)a+=this[e+d]*c;return a},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e+--t],c=1;for(;t>0&&(c*=256);)a+=this[e+--t]*c;return a},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e=e>>>0,t||_(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||_(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||_(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,c=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(a)+(BigInt(c)<<BigInt(32))}),o.prototype.readBigUInt64BE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],c=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(a)<<BigInt(32))+BigInt(c)}),o.prototype.readIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=this[e],c=1,d=0;for(;++d<t&&(c*=256);)a+=this[e+d]*c;return c*=128,a>=c&&(a-=Math.pow(2,8*t)),a},o.prototype.readIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||_(e,t,this.length);let a=t,c=1,d=this[e+--a];for(;a>0&&(c*=256);)d+=this[e+--a]*c;return c*=128,d>=c&&(d-=Math.pow(2,8*t)),d},o.prototype.readInt8=function(e,t){return e=e>>>0,t||_(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){e=e>>>0,t||_(e,2,this.length);const n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},o.prototype.readInt16BE=function(e,t){e=e>>>0,t||_(e,2,this.length);const n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},o.prototype.readInt32LE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e=e>>>0,t||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(a)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),o.prototype.readBigInt64BE=H(function(e){e=e>>>0,X(e,"offset");const t=this[e],n=this[e+7];(t===void 0||n===void 0)&&oe(e,this.length-8);const a=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(a)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)}),o.prototype.readFloatLE=function(e,t){return e=e>>>0,t||_(e,4,this.length),l.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e=e>>>0,t||_(e,4,this.length),l.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||_(e,8,this.length),l.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||_(e,8,this.length),l.read(this,e,!1,52,8)};function F(i,e,t,n,a,c){if(!o.isBuffer(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||e<c)throw new RangeError('"value" argument is out of bounds');if(t+n>i.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,n,a){if(e=+e,t=t>>>0,n=n>>>0,!a){const v=Math.pow(2,8*n)-1;F(this,e,t,n,v,0)}let c=1,d=0;for(this[t]=e&255;++d<n&&(c*=256);)this[t+d]=e/c&255;return t+n},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,n,a){if(e=+e,t=t>>>0,n=n>>>0,!a){const v=Math.pow(2,8*n)-1;F(this,e,t,n,v,0)}let c=n-1,d=1;for(this[t+c]=e&255;--c>=0&&(d*=256);)this[t+c]=e/d&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,1,255,0),this[t]=e&255,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Ae(i,e,t,n,a){Ze(e,n,a,i,t,7);let c=Number(e&BigInt(4294967295));i[t++]=c,c=c>>8,i[t++]=c,c=c>>8,i[t++]=c,c=c>>8,i[t++]=c;let d=Number(e>>BigInt(32)&BigInt(4294967295));return i[t++]=d,d=d>>8,i[t++]=d,d=d>>8,i[t++]=d,d=d>>8,i[t++]=d,t}function se(i,e,t,n,a){Ze(e,n,a,i,t,7);let c=Number(e&BigInt(4294967295));i[t+7]=c,c=c>>8,i[t+6]=c,c=c>>8,i[t+5]=c,c=c>>8,i[t+4]=c;let d=Number(e>>BigInt(32)&BigInt(4294967295));return i[t+3]=d,d=d>>8,i[t+2]=d,d=d>>8,i[t+1]=d,d=d>>8,i[t]=d,t+8}o.prototype.writeBigUInt64LE=H(function(e,t=0){return Ae(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=H(function(e,t=0){return se(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(e,t,n,a){if(e=+e,t=t>>>0,!a){const B=Math.pow(2,8*n-1);F(this,e,t,n,B-1,-B)}let c=0,d=1,v=0;for(this[t]=e&255;++c<n&&(d*=256);)e<0&&v===0&&this[t+c-1]!==0&&(v=1),this[t+c]=(e/d>>0)-v&255;return t+n},o.prototype.writeIntBE=function(e,t,n,a){if(e=+e,t=t>>>0,!a){const B=Math.pow(2,8*n-1);F(this,e,t,n,B-1,-B)}let c=n-1,d=1,v=0;for(this[t+c]=e&255;--c>=0&&(d*=256);)e<0&&v===0&&this[t+c+1]!==0&&(v=1),this[t+c]=(e/d>>0)-v&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},o.prototype.writeBigInt64LE=H(function(e,t=0){return Ae(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=H(function(e,t=0){return se(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ne(i,e,t,n,a,c){if(t+n>i.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Ye(i,e,t,n,a){return e=+e,t=t>>>0,a||Ne(i,e,t,4),l.write(i,e,t,n,23,4),t+4}o.prototype.writeFloatLE=function(e,t,n){return Ye(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return Ye(this,e,t,!1,n)};function Qe(i,e,t,n,a){return e=+e,t=t>>>0,a||Ne(i,e,t,8),l.write(i,e,t,n,52,8),t+8}o.prototype.writeDoubleLE=function(e,t,n){return Qe(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return Qe(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,a){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!a&&a!==0&&(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a<n&&(a=n),a===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-n&&(a=e.length-t+n);const c=a-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,a):Uint8Array.prototype.set.call(e,this.subarray(n,a),t),c},o.prototype.fill=function(e,t,n,a){if(typeof e=="string"){if(typeof t=="string"?(a=t,t=0,n=this.length):typeof n=="string"&&(a=n,n=this.length),a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!o.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(e.length===1){const d=e.charCodeAt(0);(a==="utf8"&&d<128||a==="latin1")&&(e=d)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let c;if(typeof e=="number")for(c=t;c<n;++c)this[c]=e;else{const d=o.isBuffer(e)?e:o.from(e,a),v=d.length;if(v===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(c=0;c<n-t;++c)this[c+t]=d[c%v]}return this};const J={};function De(i,e,t){J[i]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${i}]`,this.stack,delete this.name}get code(){return i}set code(a){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:a,writable:!0})}toString(){return`${this.name} [${i}]: ${this.message}`}}}De("ERR_BUFFER_OUT_OF_BOUNDS",function(i){return i?`${i} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),De("ERR_INVALID_ARG_TYPE",function(i,e){return`The "${i}" argument must be of type number. Received type ${typeof e}`},TypeError),De("ERR_OUT_OF_RANGE",function(i,e,t){let n=`The value of "${i}" is out of range.`,a=t;return Number.isInteger(t)&&Math.abs(t)>2**32?a=Ve(String(t)):typeof t=="bigint"&&(a=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(a=Ve(a)),a+="n"),n+=` It must be ${e}. Received ${a}`,n},RangeError);function Ve(i){let e="",t=i.length;const n=i[0]==="-"?1:0;for(;t>=n+4;t-=3)e=`_${i.slice(t-3,t)}${e}`;return`${i.slice(0,t)}${e}`}function tt(i,e,t){X(e,"offset"),(i[e]===void 0||i[e+t]===void 0)&&oe(e,i.length-(t+1))}function Ze(i,e,t,n,a,c){if(i>t||i<e){const d=typeof e=="bigint"?"n":"";let v;throw c>3?e===0||e===BigInt(0)?v=`>= 0${d} and < 2${d} ** ${(c+1)*8}${d}`:v=`>= -(2${d} ** ${(c+1)*8-1}${d}) and < 2 ** ${(c+1)*8-1}${d}`:v=`>= ${e}${d} and <= ${t}${d}`,new J.ERR_OUT_OF_RANGE("value",v,i)}tt(n,a,c)}function X(i,e){if(typeof i!="number")throw new J.ERR_INVALID_ARG_TYPE(e,"number",i)}function oe(i,e,t){throw Math.floor(i)!==i?(X(i,t),new J.ERR_OUT_OF_RANGE(t||"offset","an integer",i)):e<0?new J.ERR_BUFFER_OUT_OF_BOUNDS:new J.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,i)}const it=/[^+/0-9A-Za-z-_]/g;function rt(i){if(i=i.split("=")[0],i=i.trim().replace(it,""),i.length<2)return"";for(;i.length%4!==0;)i=i+"=";return i}function Le(i,e){e=e||1/0;let t;const n=i.length;let a=null;const c=[];for(let d=0;d<n;++d){if(t=i.charCodeAt(d),t>55295&&t<57344){if(!a){if(t>56319){(e-=3)>-1&&c.push(239,191,189);continue}else if(d+1===n){(e-=3)>-1&&c.push(239,191,189);continue}a=t;continue}if(t<56320){(e-=3)>-1&&c.push(239,191,189),a=t;continue}t=(a-55296<<10|t-56320)+65536}else a&&(e-=3)>-1&&c.push(239,191,189);if(a=null,t<128){if((e-=1)<0)break;c.push(t)}else if(t<2048){if((e-=2)<0)break;c.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;c.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;c.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return c}function nt(i){const e=[];for(let t=0;t<i.length;++t)e.push(i.charCodeAt(t)&255);return e}function st(i,e){let t,n,a;const c=[];for(let d=0;d<i.length&&!((e-=2)<0);++d)t=i.charCodeAt(d),n=t>>8,a=t%256,c.push(a),c.push(n);return c}function He(i){return s.toByteArray(rt(i))}function ye(i,e,t,n){let a;for(a=0;a<n&&!(a+t>=e.length||a>=i.length);++a)e[a+t]=i[a];return a}function Y(i,e){return i instanceof e||i!=null&&i.constructor!=null&&i.constructor.name!=null&&i.constructor.name===e.name}function Se(i){return i!==i}const ot=function(){const i="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){const n=t*16;for(let a=0;a<16;++a)e[n+a]=i[t]+i[a]}return e}();function H(i){return typeof BigInt>"u"?at:i}function at(){throw new Error("BigInt not supported")}})(Si);var ki={exports:{}},V=ki.exports={},he,de;function jt(){throw new Error("setTimeout has not been defined")}function Tt(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?he=setTimeout:he=jt}catch{he=jt}try{typeof clearTimeout=="function"?de=clearTimeout:de=Tt}catch{de=Tt}})();function Bi(r){if(he===setTimeout)return setTimeout(r,0);if((he===jt||!he)&&setTimeout)return he=setTimeout,setTimeout(r,0);try{return he(r,0)}catch{try{return he.call(null,r,0)}catch{return he.call(this,r,0)}}}function o0(r){if(de===clearTimeout)return clearTimeout(r);if((de===Tt||!de)&&clearTimeout)return de=clearTimeout,clearTimeout(r);try{return de(r)}catch{try{return de.call(null,r)}catch{return de.call(this,r)}}}var Me=[],Pe=!1,be,Xe=-1;function a0(){!Pe||!be||(Pe=!1,be.length?Me=be.concat(Me):Xe=-1,Me.length&&bi())}function bi(){if(!Pe){var r=Bi(a0);Pe=!0;for(var s=Me.length;s;){for(be=Me,Me=[];++Xe<s;)be&&be[Xe].run();Xe=-1,s=Me.length}be=null,Pe=!1,o0(r)}}V.nextTick=function(r){var s=new Array(arguments.length-1);if(arguments.length>1)for(var l=1;l<arguments.length;l++)s[l-1]=arguments[l];Me.push(new Ri(r,s)),Me.length===1&&!Pe&&Bi(bi)};function Ri(r,s){this.fun=r,this.array=s}Ri.prototype.run=function(){this.fun.apply(null,this.array)};V.title="browser";V.browser=!0;V.env={};V.argv=[];V.version="";V.versions={};function Ce(){}V.on=Ce;V.addListener=Ce;V.once=Ce;V.off=Ce;V.removeListener=Ce;V.removeAllListeners=Ce;V.emit=Ce;V.prependListener=Ce;V.prependOnceListener=Ce;V.listeners=function(r){return[]};V.binding=function(r){throw new Error("process.binding is not supported")};V.cwd=function(){return"/"};V.chdir=function(r){throw new Error("process.chdir is not supported")};V.umask=function(){return 0};var l0=ki.exports;(function(r){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});const s=Si,l=l0,h=f=>f&&f.__esModule?f:{default:f},p=h(l),g=globalThis||void 0||self;Object.defineProperty(r,"Buffer",{enumerable:!0,get:()=>s.Buffer}),Object.defineProperty(r,"process",{enumerable:!0,get:()=>p.default}),r.global=g})(Jo);window.slStore=Object.create(null);var ii;(function(r){r.ORGANIZATION="ORGANIZATION",r.STREAM="STREAM"})(ii||(ii={}));We.SdkOverlayType.BETTING+"",We.SdkOverlayType.GAMES+"",We.SdkOverlayType.PUBLIC_CHAT+"",We.SdkOverlayType.TWITTER+"";var ri;(function(r){r.Ready="ready",r.Suspended="suspended"})(ri||(ri={}));window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));var ni;(function(r){r.Init="init",r.Ready="ready",r.Connecting="connecting",r.Connected="connected",r.Disconnected="disconnected",r.Failed="failed",r.Reconnecting="reconnecting"})(ni||(ni={}));const c0=({sdk:r})=>Z.useStore(r.getUserStore()).data?u.jsx("button",{onClick:r.logout,children:"logout"}):u.jsx(xr,{login:async s=>{try{await r.authorizationBypass("streamlayer:streamlayer",s)}catch(l){throw console.log("login err",l),l}},anonymousLogin:r.anonymousAuthorization,host:r.host});var u0=Object.defineProperty,h0=(r,s,l)=>s in r?u0(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,ze=(r,s,l)=>(h0(r,typeof s!="symbol"?s+"":s,l),l);class d0 extends Ui.Storage{constructor(){super("user"),ze(this,"setSchema",s=>{this.write("schema",s)}),ze(this,"getSchema",()=>this.read("schema")),ze(this,"setToken",s=>{this.write("token",s)}),ze(this,"getToken",()=>this.read("token")),ze(this,"setExternalToken",s=>{this.write("eToken",s)}),ze(this,"getExternalToken",()=>this.read("eToken")),ze(this,"removeToken",()=>{this.remove("token")})}}new d0;const p0=({activeFeature:r,sdk:s})=>{const[l,h]=R.useState(null),{organizationSettings:p,streamSettings:g}=Z.useStore(s.sdkStore),f=R.useMemo(()=>{const y=(g==null?void 0:g.data)||(p==null?void 0:p.data);return y!=null&&y.overlays?y.overlays:[]},[p,g]);R.useEffect(()=>{const y=s.getFeatures();if(r)for(const[A,w]of y)A===r?w.status.get()===$e.FeatureStatus.Suspended&&(w.enable(),h(w)):w.status.get()===$e.FeatureStatus.Ready&&w.disable();else{for(const[,A]of y)A.status.get()===$e.FeatureStatus.Ready&&A.disable();h(null)}return()=>{for(const[,A]of y)A.status.get()===$e.FeatureStatus.Ready&&A.disable()}},[r,s]);const o=R.useMemo(()=>l?l.featureConfig.get().type===O.FeatureType.GAMES?l?u.jsx("div",{children:u.jsx(Yo,{gamification:l,sdk:s})}):u.jsx("div",{children:"wait gamification..."}):l.featureConfig.get().type===O.FeatureType.HIGHLIGHTS?l?u.jsx("div",{children:u.jsx(qo,{highlights:l,sdk:s})}):u.jsx("div",{children:"wait highlights..."}):u.jsx("div",{children:"unknown feature"}):null,[s,l]);return u.jsxs("div",{children:[u.jsxs(Po,{children:[u.jsx(It,{onClick:()=>s.closeFeature(),disabled:!o,children:"close"}),u.jsx(It,{onClick:()=>s.logout(),children:"logout"}),f.map(y=>u.jsxs(It,{onClick:()=>s.openFeature(y.type),disabled:!(y.type in Oi.AvailableFeatures),"data-enable_sdk_button":y.enableSdkButton.toString(),"data-selected":y.type===r,children:[u.jsx("img",{src:y.icon,alt:""}),y.name]},y.name))]}),o]})},f0=({sdk:r})=>{const s=Z.useStore(r.organizationStore()),l=Z.useStore(r.getUserStore()),h=Z.useStore(r.getActiveFeature());return s.loading?u.jsx("div",{children:"authentication..."}):s.data?l.loading?u.jsx("div",{children:"authentication..."}):l.data?u.jsxs(u.Fragment,{children:[u.jsx(Ss,{notificationsStore:r.getNotificationsStore()}),u.jsx(p0,{sdk:r,activeFeature:h})]}):u.jsx(c0,{sdk:r}):u.jsx("div",{children:"wrong sdk key..."})};const g0="StreamLayerCSSReset",m0="pedqibx";const y0=({children:r,style:s})=>u.jsx("div",{className:"StreamLayerSDKTheme",children:u.jsx("div",{className:m0,style:s,children:r})});exports.Sr=f0;exports.StreamLayerContext=oi;exports.StreamLayerProvider=Yi;exports.StreamLayerStatus=si;exports.Y=xi;exports.a=zt;exports.a$1=Ii;exports.c=Di;exports.e=L1;exports.f=g0;exports.f$1=di;exports.h=Ge;exports.i=D1;exports.j=vi;exports.o=pi;exports.p=y0;exports.p$1=ui;exports.q=Te;exports.r=yi;exports.styled_default=m;exports.u=fi;exports.v=mi;exports.x=Li;
|
|
@@ -3898,7 +3898,7 @@ const Us = () => Ue, $s = /* @__PURE__ */ m("div")({
|
|
|
3898
3898
|
children: ({ onItemsRendered: g, ref: f }) => /* @__PURE__ */ p(
|
|
3899
3899
|
js,
|
|
3900
3900
|
{
|
|
3901
|
-
itemSize:
|
|
3901
|
+
itemSize: 56,
|
|
3902
3902
|
onItemsRendered: g,
|
|
3903
3903
|
ref: f,
|
|
3904
3904
|
itemCount: r.length,
|
|
@@ -3907,7 +3907,7 @@ const Us = () => Ue, $s = /* @__PURE__ */ m("div")({
|
|
|
3907
3907
|
children: ({ index: s, style: I }) => /* @__PURE__ */ p(
|
|
3908
3908
|
Gs,
|
|
3909
3909
|
{
|
|
3910
|
-
style: I,
|
|
3910
|
+
style: { ...I, maxHeight: 48 },
|
|
3911
3911
|
...r[s],
|
|
3912
3912
|
openItemDetail: () => o(r[s].userId)
|
|
3913
3913
|
},
|
|
@@ -5361,9 +5361,9 @@ export {
|
|
|
5361
5361
|
J0 as g,
|
|
5362
5362
|
nt as h,
|
|
5363
5363
|
ln as i,
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5364
|
+
Ws as j,
|
|
5365
|
+
U1 as k,
|
|
5366
|
+
o0 as l,
|
|
5367
5367
|
q0 as m,
|
|
5368
5368
|
In as o,
|
|
5369
5369
|
i2 as p,
|
|
@@ -5372,5 +5372,5 @@ export {
|
|
|
5372
5372
|
m as s,
|
|
5373
5373
|
h1 as u,
|
|
5374
5374
|
R1 as v,
|
|
5375
|
-
|
|
5375
|
+
l0 as x
|
|
5376
5376
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "StreamLayer, Inc (https://streamlayer.io)",
|
|
6
6
|
"maintainers": [
|
|
@@ -54,16 +54,16 @@
|
|
|
54
54
|
}
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@streamlayer/feature-gamification": "^0.19.
|
|
58
|
-
"@streamlayer/sdk-web": "^0.28.
|
|
57
|
+
"@streamlayer/feature-gamification": "^0.19.5",
|
|
58
|
+
"@streamlayer/sdk-web": "^0.28.12",
|
|
59
59
|
"@streamlayer/sdk-web-api": "^0.0.1",
|
|
60
|
-
"@streamlayer/sdk-web-core": "^0.17.
|
|
61
|
-
"@streamlayer/sdk-web-features": "^0.10.
|
|
62
|
-
"@streamlayer/sdk-web-logger": "^0.5.10",
|
|
60
|
+
"@streamlayer/sdk-web-core": "^0.17.2",
|
|
61
|
+
"@streamlayer/sdk-web-features": "^0.10.15",
|
|
63
62
|
"@streamlayer/sdk-web-interfaces": "^0.18.9",
|
|
63
|
+
"@streamlayer/sdk-web-logger": "^0.5.10",
|
|
64
64
|
"@streamlayer/sdk-web-notifications": "^0.10.8",
|
|
65
|
-
"@streamlayer/sdk-web-
|
|
66
|
-
"@streamlayer/sdk-web-
|
|
65
|
+
"@streamlayer/sdk-web-storage": "^0.3.10",
|
|
66
|
+
"@streamlayer/sdk-web-types": "^0.17.1"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@bufbuild/protobuf": "^1.4.2",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"size-limit": "^11.0.0",
|
|
113
113
|
"url-loader": "^4.1.1",
|
|
114
114
|
"vite-plugin-dts": "^3.6.3",
|
|
115
|
-
"@streamlayer/react-ui": "^0.52.
|
|
115
|
+
"@streamlayer/react-ui": "^0.52.2"
|
|
116
116
|
},
|
|
117
117
|
"scripts": {
|
|
118
118
|
"size-limit": "size-limit"
|