@streamlayer/sdk-web 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -7,7 +7,7 @@ import { computed as vi, map as Si, atom as Ct, batched as $r, onMount as gr } f
7
7
  import { nanoid as rr } from "nanoid";
8
8
  import { ConnectError as tt, Code as oe, createContextKey as Mr, createPromiseClient as Br, createContextValues as wi } from "@connectrpc/connect";
9
9
  import { createGrpcWebTransport as jr } from "@connectrpc/connect-web";
10
- import { nanoquery as Ur } from "@nanostores/query";
10
+ import { nanoquery as qr } from "@nanostores/query";
11
11
  import { Events as An } from "@streamlayer/sl-eslib/sports/events/events_connect";
12
12
  import { Client as nt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
13
13
  import { Users as br } from "@streamlayer/sl-eslib/users/users_connect";
@@ -15,7 +15,7 @@ import { Feed as Z } from "@streamlayer/sl-eslib/interactive/feed/interactive.fe
15
15
  import { Leaderboard as En } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
16
16
  import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
17
17
  import { LinksClient as Ai } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
18
- import { Kind as x, TopicSubType as we, TopicType as H, PollOpenedFrom as re, Category as G, ScreenOrientation as qr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
18
+ import { Kind as x, TopicSubType as we, TopicType as H, PollOpenedFrom as re, Category as K, ScreenOrientation as Ur } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
19
19
  import { AnalyticsService as In } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
20
20
  import { InteractionActionType as xr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
21
21
  import { NotificationKind as fe, NotificationType as Qr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
@@ -283,7 +283,7 @@ class X extends Lt {
283
283
  return this.getStore().get();
284
284
  }
285
285
  }
286
- const U = (t) => Ct(t);
286
+ const q = (t) => Ct(t);
287
287
  class ce extends Lt {
288
288
  atomStore;
289
289
  constructor(e, r, n) {
@@ -315,7 +315,7 @@ class ce extends Lt {
315
315
  key = () => this.getStore().key;
316
316
  off = () => this.getStore().off();
317
317
  }
318
- const K = new ki();
318
+ const Q = new ki();
319
319
  async function* Di(t, e) {
320
320
  for await (const r of e) {
321
321
  t.response.message = r, t.received_at = Date.now(), t.id = kn++;
@@ -444,7 +444,7 @@ class Vi {
444
444
  reconnectMaxDelay: i.reconnectMaxDelay ?? 3e4,
445
445
  reconnectMaxAttempts: i.reconnectMaxAttempts ?? 10,
446
446
  withStore: i.withStore ?? !1
447
- }, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new X(U(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
447
+ }, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new X(q(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
448
448
  this.state.getValue("status") === te.Connected && (this.addStateLog(`params updated, reconnect => ${JSON.stringify(s)}`), this.reconnect());
449
449
  })), this.updateState(te.Ready);
450
450
  }
@@ -584,7 +584,7 @@ class Kr {
584
584
  "sl-device-id": Bi(),
585
585
  "sl-device-os": ji()
586
586
  }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
587
- const [n, i, o] = Ur({
587
+ const [n, i, o] = qr({
588
588
  dedupeTime: r?.dedupeTime,
589
589
  refetchInterval: r?.refetchInterval
590
590
  });
@@ -617,7 +617,7 @@ class Kr {
617
617
  for (const [i, o] of this.subscriptions)
618
618
  o.disconnect(), this.subscriptions.delete(i);
619
619
  this.clients.clear(), this.streamClients.clear(), this.subscriptions.clear();
620
- const [e, r, n] = Ur({
620
+ const [e, r, n] = qr({
621
621
  dedupeTime: this.opts?.dedupeTime,
622
622
  refetchInterval: this.opts?.refetchInterval
623
623
  });
@@ -682,7 +682,7 @@ class Kr {
682
682
  this.interceptors.push(e), this.interceptors.push(Ri()), this.opts?.retryable && this.interceptors.push(Mi);
683
683
  };
684
684
  }
685
- const Ui = (t, e) => {
685
+ const qi = (t, e) => {
686
686
  const { client: r, queryKey: n } = e.createPromiseClient(An, {
687
687
  method: "retrieveEventId",
688
688
  params: [t]
@@ -700,7 +700,7 @@ const Ui = (t, e) => {
700
700
  }
701
701
  }
702
702
  });
703
- }, qi = (t, e) => {
703
+ }, Ui = (t, e) => {
704
704
  const { client: r, queryKey: n } = e.createPromiseClient(nt, { method: "getStream", params: [t] });
705
705
  return e.nanoquery.createFetcherStore(n, {
706
706
  fetcher: async (i, o, s) => s ? (await r.getStream({
@@ -793,7 +793,7 @@ var ye;
793
793
  t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
794
794
  })(ye || (ye = {}));
795
795
  const Yi = (t) => {
796
- const e = new je(), r = new X(U(e.getExternalToken()), "userKey"), n = new X(U(e.getToken()), "userToken"), i = new ce(Qi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
796
+ const e = new je(), r = new X(q(e.getExternalToken()), "userKey"), n = new X(q(e.getToken()), "userToken"), i = new ce(Qi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
797
797
  if (!a)
798
798
  return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
799
799
  }), o = new ce(Ki(n.getStore(), t), "userSettings");
@@ -804,7 +804,7 @@ const Yi = (t) => {
804
804
  userSettings: o
805
805
  };
806
806
  }, Ji = (t) => {
807
- const e = new X(U(void 0), "providerStreamId"), r = new ce(Ui(e.getStore(), t), "slStreamId", (o) => o?.data), n = new ce(qi(r.getAtomStore(), t), "streamSettings"), i = new ce(xi(r.getAtomStore(), t), "streamSettings");
807
+ const e = new X(q(void 0), "providerStreamId"), r = new ce(qi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new ce(Ui(r.getAtomStore(), t), "streamSettings"), i = new ce(xi(r.getAtomStore(), t), "streamSettings");
808
808
  return r.getAtomStore().listen((o) => {
809
809
  (o === "" || o === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
810
810
  }), {
@@ -814,7 +814,7 @@ const Yi = (t) => {
814
814
  streamSummary: i
815
815
  };
816
816
  }, Xi = (t) => {
817
- const e = new X(U(void 0), "enabled"), r = new X(U(ye.DISABLED), "status"), n = new ce(zi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ce(Hi(n.getAtomStore(), t), "organizationAdvertising"), o = Yi(t), s = Ji(t);
817
+ const e = new X(q(void 0), "enabled"), r = new X(q(ye.DISABLED), "status"), n = new ce(zi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ce(Hi(n.getAtomStore(), t), "organizationAdvertising"), o = Yi(t), s = Ji(t);
818
818
  return {
819
819
  enabled: e,
820
820
  status: r,
@@ -1045,9 +1045,17 @@ const ho = (t) => {
1045
1045
  let n = !1;
1046
1046
  const i = r.transport, o = ve("advertisement"), s = new po(), a = J({}), u = lo(t, i), d = () => {
1047
1047
  a.setKey("hasNotification", !1);
1048
+ const b = a.get(), g = b.data?.question.id, S = b.data?.promotion?.type;
1049
+ g && Q.emit("advertisement", {
1050
+ action: "notification-opened",
1051
+ payload: {
1052
+ id: g,
1053
+ type: S
1054
+ }
1055
+ });
1048
1056
  }, c = () => {
1049
1057
  const b = a.get(), g = b.data?.question.id, S = b.data?.promotion?.type, C = a.get()?.isOpened;
1050
- g && !C && (o.debug({ id: g }, "markAsViewed: %o"), s.setShowed(g), a.setKey("isOpened", !0), K.emit("advertisement", {
1058
+ g && !C && (o.debug({ id: g }, "markAsViewed: %o"), s.setShowed(g), a.setKey("isOpened", !0), Q.emit("advertisement", {
1051
1059
  action: "opened",
1052
1060
  payload: {
1053
1061
  id: g,
@@ -1076,7 +1084,7 @@ const ho = (t) => {
1076
1084
  })));
1077
1085
  };
1078
1086
  a.subscribe((b, g) => {
1079
- b.data && !b.isOpened && K.emit("advertisement", {
1087
+ b.data && !b.isOpened && Q.emit("advertisement", {
1080
1088
  action: "received",
1081
1089
  payload: {
1082
1090
  id: b.data.question.id,
@@ -1085,7 +1093,7 @@ const ho = (t) => {
1085
1093
  isViewed: !!s.isViewed(b.data.question.id)
1086
1094
  },
1087
1095
  skipAnalytics: b.data.question.id === g?.data?.question.id
1088
- }), !b?.data && g?.data && K.emit("advertisement", {
1096
+ }), !b?.data && g?.data && Q.emit("advertisement", {
1089
1097
  action: "closed",
1090
1098
  payload: {
1091
1099
  id: g.data.question.id,
@@ -1154,7 +1162,7 @@ class mo {
1154
1162
  transport;
1155
1163
  cancels = /* @__PURE__ */ new Set();
1156
1164
  constructor(e) {
1157
- this.transport = e.transport, this.log = ve("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new X(U(void 0), "moderationId").getStore(), this.interactiveAllowed = new X(U(Le.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new X(U(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ce(no(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new ce(co(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = io(this.slStreamId, e.transport), this.openedQuestion = fo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
1165
+ this.transport = e.transport, this.log = ve("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new X(q(void 0), "moderationId").getStore(), this.interactiveAllowed = new X(q(Le.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new X(q(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ce(no(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new ce(co(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = io(this.slStreamId, e.transport), this.openedQuestion = fo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
1158
1166
  this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = ao(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
1159
1167
  this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
1160
1168
  }), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
@@ -1240,7 +1248,7 @@ class go {
1240
1248
  options;
1241
1249
  logger;
1242
1250
  constructor(e) {
1243
- this.options = e, this.logger = ve("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = U(/* @__PURE__ */ new Map());
1251
+ this.options = e, this.logger = ve("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = q(/* @__PURE__ */ new Map());
1244
1252
  }
1245
1253
  addToQueue = (e) => {
1246
1254
  if (this.store.has(e.id)) {
@@ -1284,7 +1292,7 @@ class go {
1284
1292
  this.logger.debug({ notificationId: e }, "active queue tick skipped, notification not exist");
1285
1293
  return;
1286
1294
  }
1287
- K.emit("notification", {
1295
+ Q.emit("notification", {
1288
1296
  action: "received",
1289
1297
  payload: {
1290
1298
  questionId: r.data.questionId,
@@ -1309,7 +1317,7 @@ class go {
1309
1317
  const s = new Map(this.notificationsList.get());
1310
1318
  s.delete(e), this.notificationsList.set(s);
1311
1319
  const a = this.timeouts.get(e);
1312
- a !== void 0 && (clearTimeout(a), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden"), i.hiding && K.emit("notification", {
1320
+ a !== void 0 && (clearTimeout(a), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden"), i.hiding && Q.emit("notification", {
1313
1321
  action: "closed",
1314
1322
  payload: {
1315
1323
  questionId: i.data.questionId,
@@ -1357,7 +1365,7 @@ class vo {
1357
1365
  if (e.data && e.emitEvent) {
1358
1366
  const n = e.action;
1359
1367
  e.action = (...i) => {
1360
- n && n(...i), K.emit("notification", {
1368
+ n && n(...i), Q.emit("notification", {
1361
1369
  action: "opened",
1362
1370
  payload: {
1363
1371
  questionId: e.data.questionId,
@@ -1406,10 +1414,10 @@ const wo = async (t, e) => {
1406
1414
  const { client: r, createRequestOptions: n } = t.createPromiseClient(Z, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
1407
1415
  return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
1408
1416
  };
1409
- var Ue;
1417
+ var qe;
1410
1418
  (function(t) {
1411
1419
  t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
1412
- })(Ue || (Ue = {}));
1420
+ })(qe || (qe = {}));
1413
1421
  class Eo extends He {
1414
1422
  constructor() {
1415
1423
  super("gamification-session", window.sessionStorage);
@@ -1425,19 +1433,19 @@ class Dn extends He {
1425
1433
  super("gamification"), this.sessionStorage = new Eo();
1426
1434
  }
1427
1435
  saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
1428
- this.write(Ue.ONBOARDING, n, e, r, i);
1436
+ this.write(qe.ONBOARDING, n, e, r, i);
1429
1437
  };
1430
- getOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }) => this.read(Ue.ONBOARDING, n, e, r);
1438
+ getOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }) => this.read(qe.ONBOARDING, n, e, r);
1431
1439
  setOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => {
1432
- this.sessionStorage.writeValue([Ue.ONBOARDING_IO, n, e, r], "1");
1440
+ this.sessionStorage.writeValue([qe.ONBOARDING_IO, n, e, r], "1");
1433
1441
  };
1434
- getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([Ue.ONBOARDING_IO, n, e, r]);
1442
+ getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([qe.ONBOARDING_IO, n, e, r]);
1435
1443
  }
1436
1444
  const Io = {
1437
1445
  pageSize: 10
1438
1446
  }, To = (t, e, r, n, i) => {
1439
1447
  let o = 0;
1440
- const s = U({ pageSize: Io.pageSize, page: 0 }), a = J({
1448
+ const s = q({ pageSize: Io.pageSize, page: 0 }), a = J({
1441
1449
  data: [],
1442
1450
  key: Date.now(),
1443
1451
  hasMore: !0,
@@ -1743,6 +1751,14 @@ const Je = new je(), Fo = (t, e, r) => {
1743
1751
  if (a.slEventBus?.type === "advertisement" && e.withAd) {
1744
1752
  const u = a.slEventBus, { hasNotification: d, id: c, isViewed: f } = u.payload;
1745
1753
  switch (u.action) {
1754
+ case "notification-opened":
1755
+ t.sdk.uiState.set({
1756
+ promotionBanner: !0,
1757
+ promotionNotification: !1,
1758
+ promotionOverlay: !0,
1759
+ promotionSidebar: !0
1760
+ });
1761
+ break;
1746
1762
  case "received":
1747
1763
  if (t.sdk.closeFeature(), n({
1748
1764
  stage: "activate",
@@ -1781,7 +1797,7 @@ const Je = new je(), Fo = (t, e, r) => {
1781
1797
  break;
1782
1798
  }
1783
1799
  }
1784
- }, o = K.listen(i), s = t.activeFeature.subscribe((a) => {
1800
+ }, o = Q.listen(i), s = t.activeFeature.subscribe((a) => {
1785
1801
  a ? t.ui.enableApp() : t.ui.disableApp();
1786
1802
  });
1787
1803
  return () => {
@@ -1878,7 +1894,7 @@ var M;
1878
1894
  (function(t) {
1879
1895
  t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
1880
1896
  })(M || (M = {}));
1881
- const Uo = (t, e, r, n) => {
1897
+ const qo = (t, e, r, n) => {
1882
1898
  const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
1883
1899
  i && r.add({
1884
1900
  type: Ae.ONBOARDING,
@@ -1925,11 +1941,11 @@ const Uo = (t, e, r, n) => {
1925
1941
  } catch (s) {
1926
1942
  console.error(s);
1927
1943
  }
1928
- }, qo = (t, e, r, n) => {
1944
+ }, Uo = (t, e, r, n) => {
1929
1945
  let i = !1;
1930
- const o = new Dn(), s = U(M.Unset);
1946
+ const o = new Dn(), s = q(M.Unset);
1931
1947
  s.subscribe((d) => {
1932
- d !== M.Unset && (d === M.Optional || d === M.Required ? i === !1 && (Uo(t, e, n, o), i = !0) : t.onboardingProcessed.set(!0), d === M.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
1948
+ d !== M.Unset && (d === M.Optional || d === M.Required ? i === !1 && (qo(t, e, n, o), i = !0) : t.onboardingProcessed.set(!0), d === M.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
1933
1949
  userId: e.userId.get() || "",
1934
1950
  organizationId: e.organizationId.get() || "",
1935
1951
  eventId: e.slStreamId.get() || ""
@@ -1949,7 +1965,7 @@ const Uo = (t, e, r, n) => {
1949
1965
  organizationId: e.organizationId.get() || "",
1950
1966
  userId: e.userId.get() || "",
1951
1967
  eventId: d
1952
- }, M.Completed), K.emit("poll", {
1968
+ }, M.Completed), Q.emit("poll", {
1953
1969
  action: "onboardingPassed",
1954
1970
  payload: {}
1955
1971
  }), t.openFeature();
@@ -2022,7 +2038,7 @@ class Ko extends Ln {
2022
2038
  cancels = /* @__PURE__ */ new Set();
2023
2039
  onQuestionActivate;
2024
2040
  constructor(e, r, n) {
2025
- super(e, r), this.background = new mo(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Dn(), this.feedList = this.background.feedList, this.friends = new ce(ro(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = U(void 0), this.onboardingProcessed = U(!1), this.leaderboardId = new X(U(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = qo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(D.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = jo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = xo(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = To(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
2041
+ super(e, r), this.background = new mo(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Dn(), this.feedList = this.background.feedList, this.friends = new ce(ro(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = q(void 0), this.onboardingProcessed = q(!1), this.leaderboardId = new X(q(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Uo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(D.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = jo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = xo(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = To(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
2026
2042
  o?.summary && i?.summary && this.leaderboardList.invalidate();
2027
2043
  })), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), this.cancels.add(this.onboardingStatus.$store.listen((i, o) => {
2028
2044
  (o === void 0 || i !== M.Unset) && this.background.activeQuestionId.invalidate();
@@ -2051,7 +2067,7 @@ class Ko extends Ln {
2051
2067
  if (i === Y.RESOLVED && o === _.PREDICTION) {
2052
2068
  const u = this.background.getCurrentSessionId({
2053
2069
  prefix: `notification-id:${s}`
2054
- }), d = [...this.feedList.getValues().data || []], c = d.findIndex((Q) => Q.id === s), f = d[c];
2070
+ }), d = [...this.feedList.getValues().data || []], c = d.findIndex((G) => G.id === s), f = d[c];
2055
2071
  let p = f?.attributes?.attributes?.value?.answerId;
2056
2072
  const v = sr(s, this.transport), b = v.subscribe(() => {
2057
2073
  });
@@ -2059,8 +2075,8 @@ class Ko extends Ln {
2059
2075
  let g = v.get().data;
2060
2076
  g || (g = await uo(s, this.transport)), b(), window.requestAnimationFrame(() => {
2061
2077
  v.invalidate();
2062
- }), p || (p = g?.answers.find(({ youVoted: Q }) => Q)?.id);
2063
- const S = a.find(({ correct: Q }) => Q), C = p ? a.find(({ id: Q }) => Q === p) : void 0, R = !!C?.correct;
2078
+ }), p || (p = g?.answers.find(({ youVoted: G }) => G)?.id);
2079
+ const S = a.find(({ correct: G }) => G), C = p ? a.find(({ id: G }) => G === p) : void 0, R = !!C?.correct;
2064
2080
  if (f && d[c]?.attributes?.attributes.case === "question") {
2065
2081
  try {
2066
2082
  d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = R ? ct.WON : ct.LOST);
@@ -2142,7 +2158,7 @@ class Ko extends Ln {
2142
2158
  }
2143
2159
  });
2144
2160
  }
2145
- i === -1 && (r.unshift(n), K.emit("poll", {
2161
+ i === -1 && (r.unshift(n), Q.emit("poll", {
2146
2162
  action: "received",
2147
2163
  payload: {
2148
2164
  questionId: n.id,
@@ -2164,7 +2180,7 @@ class Ko extends Ln {
2164
2180
  return;
2165
2181
  const u = a.findIndex((f) => f.id === e), d = a[u], c = d?.attributes?.attributes.case === "question" && d.attributes.attributes.value;
2166
2182
  if (c) {
2167
- K.emit("poll", {
2183
+ Q.emit("poll", {
2168
2184
  action: "voted",
2169
2185
  payload: {
2170
2186
  questionId: e,
@@ -2206,7 +2222,7 @@ class Ko extends Ln {
2206
2222
  animateHiding: !1
2207
2223
  });
2208
2224
  let n = r?.attributes?.type;
2209
- return n || (n = (this.feedList.getStore().value?.data || []).find((o) => o.id === e)?.attributes?.type), K.emit("poll", {
2225
+ return n || (n = (this.feedList.getStore().value?.data || []).find((o) => o.id === e)?.attributes?.type), Q.emit("poll", {
2210
2226
  action: "opened",
2211
2227
  payload: {
2212
2228
  questionId: e,
@@ -2340,7 +2356,7 @@ class Ho extends Ln {
2340
2356
  }
2341
2357
  }
2342
2358
  const Wo = (t, e, r) => t.type === D.GAMES ? new Ko(t, e, r) : new Ho(t, e), Yo = (t, e, r) => {
2343
- t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new X(U(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new X(U(D.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
2359
+ t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new X(q(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new X(q(D.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
2344
2360
  t.activeFeature.setValue(n);
2345
2361
  }, t.sdk.closeFeature = (n = !1) => {
2346
2362
  const i = t.activeFeature.getValue();
@@ -2416,7 +2432,7 @@ class Jo {
2416
2432
  break;
2417
2433
  }
2418
2434
  };
2419
- return K.listen(r);
2435
+ return Q.listen(r);
2420
2436
  });
2421
2437
  }
2422
2438
  accepted = () => {
@@ -2455,7 +2471,7 @@ class Xo {
2455
2471
  break;
2456
2472
  }
2457
2473
  };
2458
- return K.listen(r);
2474
+ return Q.listen(r);
2459
2475
  });
2460
2476
  }
2461
2477
  tap = () => {
@@ -2512,7 +2528,7 @@ class es {
2512
2528
  }
2513
2529
  }
2514
2530
  };
2515
- return K.listen(r);
2531
+ return Q.listen(r);
2516
2532
  });
2517
2533
  }
2518
2534
  received = ({ id: e }, { topicSubType: r }) => {
@@ -2584,24 +2600,24 @@ const Ze = {
2584
2600
  };
2585
2601
  _.UNSET + "", fe.UNSET, _.FACTOID + "", fe.POLLS, _.POLL + "", fe.POLLS, _.PREDICTION + "", fe.POLLS, _.PROMOTION + "", fe.POLLS, _.TRIVIA + "", fe.POLLS, _.TWEET + "", fe.POLLS;
2586
2602
  const ts = {
2587
- [D.UNSET]: G.UNSET,
2588
- [D.INPLAY]: G.INPLAY,
2589
- [D.MESSAGING]: G.MESSAGING,
2590
- [D.STATISTICS]: G.STATS,
2591
- [D.BETTING]: G.BETTING,
2592
- [D.TWITTER]: G.TWITTER,
2593
- [D.MERCHANDISE]: G.MERCHANDISE,
2594
- [D.CONTESTS]: G.CONTESTS,
2595
- [D.VOICE_CHAT]: G.CALLING,
2596
- [D.TICKETS]: G.TICKETS,
2597
- [D.WHOIS_WATCHING]: G.WHOISWATCHING,
2598
- [D.PROFILE]: G.PROFILE,
2599
- [D.GAMES]: G.POLLS,
2603
+ [D.UNSET]: K.UNSET,
2604
+ [D.INPLAY]: K.INPLAY,
2605
+ [D.MESSAGING]: K.MESSAGING,
2606
+ [D.STATISTICS]: K.STATS,
2607
+ [D.BETTING]: K.BETTING,
2608
+ [D.TWITTER]: K.TWITTER,
2609
+ [D.MERCHANDISE]: K.MERCHANDISE,
2610
+ [D.CONTESTS]: K.CONTESTS,
2611
+ [D.VOICE_CHAT]: K.CALLING,
2612
+ [D.TICKETS]: K.TICKETS,
2613
+ [D.WHOIS_WATCHING]: K.WHOISWATCHING,
2614
+ [D.PROFILE]: K.PROFILE,
2615
+ [D.GAMES]: K.POLLS,
2600
2616
  // ??
2601
- [D.GOLF_STATISTICS]: G.STATS,
2617
+ [D.GOLF_STATISTICS]: K.STATS,
2602
2618
  // ??
2603
- [D.HIGHLIGHTS]: G.HIGHLIGHTS,
2604
- [D.PUBLIC_CHAT]: G.PUBLIC_CHAT
2619
+ [D.HIGHLIGHTS]: K.HIGHLIGHTS,
2620
+ [D.PUBLIC_CHAT]: K.PUBLIC_CHAT
2605
2621
  };
2606
2622
  class rs {
2607
2623
  analytics;
@@ -2618,7 +2634,7 @@ class rs {
2618
2634
  break;
2619
2635
  }
2620
2636
  };
2621
- return K.listen(r);
2637
+ return Q.listen(r);
2622
2638
  });
2623
2639
  }
2624
2640
  received = ({ questionId: e, questionType: r }) => {
@@ -2670,7 +2686,7 @@ class ns {
2670
2686
  break;
2671
2687
  }
2672
2688
  };
2673
- return K.listen(r);
2689
+ return Q.listen(r);
2674
2690
  });
2675
2691
  }
2676
2692
  // event when a poll is received from subscription or active question request
@@ -2732,7 +2748,7 @@ class ns {
2732
2748
  }
2733
2749
  const is = ({ transport: t, $commonStore: e }) => {
2734
2750
  let r;
2735
- const n = U(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(In, {
2751
+ const n = q(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(In, {
2736
2752
  method: "send",
2737
2753
  params: [n]
2738
2754
  }), a = t.nanoquery.createFetcherStore(s, {
@@ -2814,7 +2830,7 @@ class os {
2814
2830
  r && this.writeCommon("category", ts[r]), r !== D.UNSET ? this.writeCommon("overlaySessionId", rr()) : this.writeCommon("overlaySessionId", "");
2815
2831
  })), this.onConnect(() => {
2816
2832
  const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
2817
- this.writeCommon("screenOrientation", i.matches ? qr.PORTRAIT : qr.LANDSCAPE);
2833
+ this.writeCommon("screenOrientation", i.matches ? Ur.PORTRAIT : Ur.LANDSCAPE);
2818
2834
  };
2819
2835
  return r.addEventListener("change", n), () => {
2820
2836
  r.removeEventListener("change", n);
@@ -2876,7 +2892,7 @@ function $n(t, e, r) {
2876
2892
  unshift: S,
2877
2893
  empty: W,
2878
2894
  kill: R,
2879
- killAndDrain: Q,
2895
+ killAndDrain: G,
2880
2896
  error: ee
2881
2897
  };
2882
2898
  return u;
@@ -2925,7 +2941,7 @@ function $n(t, e, r) {
2925
2941
  function R() {
2926
2942
  i = null, o = null, u.drain = W;
2927
2943
  }
2928
- function Q() {
2944
+ function G() {
2929
2945
  i = null, o = null, u.drain(), u.drain = W;
2930
2946
  }
2931
2947
  function ee(P) {
@@ -3067,7 +3083,7 @@ N.prototype.emit = function(e) {
3067
3083
  Xr(c[n], this, r);
3068
3084
  return !0;
3069
3085
  };
3070
- function Un(t, e, r, n) {
3086
+ function qn(t, e, r, n) {
3071
3087
  var i, o, s;
3072
3088
  if (Pt(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
3073
3089
  "newListener",
@@ -3083,25 +3099,25 @@ function Un(t, e, r, n) {
3083
3099
  return t;
3084
3100
  }
3085
3101
  N.prototype.addListener = function(e, r) {
3086
- return Un(this, e, r, !1);
3102
+ return qn(this, e, r, !1);
3087
3103
  };
3088
3104
  N.prototype.on = N.prototype.addListener;
3089
3105
  N.prototype.prependListener = function(e, r) {
3090
- return Un(this, e, r, !0);
3106
+ return qn(this, e, r, !0);
3091
3107
  };
3092
3108
  function hs() {
3093
3109
  if (!this.fired)
3094
3110
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
3095
3111
  }
3096
- function qn(t, e, r) {
3112
+ function Un(t, e, r) {
3097
3113
  var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = hs.bind(n);
3098
3114
  return i.listener = r, n.wrapFn = i, i;
3099
3115
  }
3100
3116
  N.prototype.once = function(e, r) {
3101
- return Pt(r), this.on(e, qn(this, e, r)), this;
3117
+ return Pt(r), this.on(e, Un(this, e, r)), this;
3102
3118
  };
3103
3119
  N.prototype.prependOnceListener = function(e, r) {
3104
- return Pt(r), this.prependListener(e, qn(this, e, r)), this;
3120
+ return Pt(r), this.prependListener(e, Un(this, e, r)), this;
3105
3121
  };
3106
3122
  N.prototype.removeListener = function(e, r) {
3107
3123
  var n, i, o, s, a;
@@ -3283,7 +3299,7 @@ var zn = Ar.exports, Nt = {}, Hn = {}, Wn = function() {
3283
3299
  d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
3284
3300
  }
3285
3301
  return i;
3286
- }, Vs = Rs, Er = Function.prototype.bind || Vs, $s = Function.prototype.call, Ms = Object.prototype.hasOwnProperty, Bs = Er, js = Bs.call($s, Ms), I, Us = Ss, qs = ws, xs = As, Qs = Es, Ke = Yn, Ge = Dt, Gs = Is, Jn = Function, jt = function(t) {
3302
+ }, Vs = Rs, Er = Function.prototype.bind || Vs, $s = Function.prototype.call, Ms = Object.prototype.hasOwnProperty, Bs = Er, js = Bs.call($s, Ms), I, qs = Ss, Us = ws, xs = As, Qs = Es, Ke = Yn, Ge = Dt, Gs = Is, Jn = Function, jt = function(t) {
3287
3303
  try {
3288
3304
  return Jn('"use strict"; return (' + t + ").constructor;")();
3289
3305
  } catch {
@@ -3295,19 +3311,19 @@ if (ke)
3295
3311
  } catch {
3296
3312
  ke = null;
3297
3313
  }
3298
- var Ut = function() {
3314
+ var qt = function() {
3299
3315
  throw new Ge();
3300
3316
  }, Ks = ke ? function() {
3301
3317
  try {
3302
- return arguments.callee, Ut;
3318
+ return arguments.callee, qt;
3303
3319
  } catch {
3304
3320
  try {
3305
3321
  return ke(arguments, "callee").get;
3306
3322
  } catch {
3307
- return Ut;
3323
+ return qt;
3308
3324
  }
3309
3325
  }
3310
- }() : Ut, $e = Os(), zs = Cs(), B = Object.getPrototypeOf || (zs ? function(t) {
3326
+ }() : qt, $e = Os(), zs = Cs(), B = Object.getPrototypeOf || (zs ? function(t) {
3311
3327
  return t.__proto__;
3312
3328
  } : null), Be = {}, Hs = typeof Uint8Array > "u" || !B ? I : B(Uint8Array), Pe = {
3313
3329
  __proto__: null,
@@ -3331,10 +3347,10 @@ var Ut = function() {
3331
3347
  "%decodeURIComponent%": decodeURIComponent,
3332
3348
  "%encodeURI%": encodeURI,
3333
3349
  "%encodeURIComponent%": encodeURIComponent,
3334
- "%Error%": Us,
3350
+ "%Error%": qs,
3335
3351
  "%eval%": eval,
3336
3352
  // eslint-disable-line no-eval
3337
- "%EvalError%": qs,
3353
+ "%EvalError%": Us,
3338
3354
  "%Float32Array%": typeof Float32Array > "u" ? I : Float32Array,
3339
3355
  "%Float64Array%": typeof Float64Array > "u" ? I : Float64Array,
3340
3356
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? I : FinalizationRegistry,
@@ -3508,9 +3524,9 @@ var Ys = function t(e) {
3508
3524
  }
3509
3525
  }
3510
3526
  return a;
3511
- }, Xn = { exports: {} }, qt, on;
3527
+ }, Xn = { exports: {} }, Ut, on;
3512
3528
  function Ir() {
3513
- if (on) return qt;
3529
+ if (on) return Ut;
3514
3530
  on = 1;
3515
3531
  var t = ot, e = t("%Object.defineProperty%", !0) || !1;
3516
3532
  if (e)
@@ -3519,7 +3535,7 @@ function Ir() {
3519
3535
  } catch {
3520
3536
  e = !1;
3521
3537
  }
3522
- return qt = e, qt;
3538
+ return Ut = e, Ut;
3523
3539
  }
3524
3540
  var ia = ot, ht = ia("%Object.getOwnPropertyDescriptor%", !0);
3525
3541
  if (ht)
@@ -3640,21 +3656,21 @@ var ma = ya ? Vt : ri, ga = Object.prototype.toString, ba = Function.prototype.t
3640
3656
  Qt = n ? xt(n) : !1;
3641
3657
  }
3642
3658
  return xt(e) === Qt;
3643
- }, ii = Function.prototype.toString, qe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, cr, yt;
3644
- if (typeof qe == "function" && typeof Object.defineProperty == "function")
3659
+ }, ii = Function.prototype.toString, Ue = typeof Reflect == "object" && Reflect !== null && Reflect.apply, cr, yt;
3660
+ if (typeof Ue == "function" && typeof Object.defineProperty == "function")
3645
3661
  try {
3646
3662
  cr = Object.defineProperty({}, "length", {
3647
3663
  get: function() {
3648
3664
  throw yt;
3649
3665
  }
3650
- }), yt = {}, qe(function() {
3666
+ }), yt = {}, Ue(function() {
3651
3667
  throw 42;
3652
3668
  }, null, cr);
3653
3669
  } catch (t) {
3654
- t !== yt && (qe = null);
3670
+ t !== yt && (Ue = null);
3655
3671
  }
3656
3672
  else
3657
- qe = null;
3673
+ Ue = null;
3658
3674
  var Aa = /^\s*class\b/, lr = function(e) {
3659
3675
  try {
3660
3676
  var r = ii.call(e);
@@ -3683,13 +3699,13 @@ if (typeof document == "object") {
3683
3699
  return !1;
3684
3700
  });
3685
3701
  }
3686
- var Na = qe ? function(e) {
3702
+ var Na = Ue ? function(e) {
3687
3703
  if (dr(e))
3688
3704
  return !0;
3689
3705
  if (!e || typeof e != "function" && typeof e != "object")
3690
3706
  return !1;
3691
3707
  try {
3692
- qe(e, null, cr);
3708
+ Ue(e, null, cr);
3693
3709
  } catch (r) {
3694
3710
  if (r !== yt)
3695
3711
  return !1;
@@ -3736,7 +3752,7 @@ var Na = qe ? function(e) {
3736
3752
  for (var e = [], r = 0; r < Kt.length; r++)
3737
3753
  typeof ja[Kt[r]] == "function" && (e[e.length] = Kt[r]);
3738
3754
  return e;
3739
- }, Et = si, Ua = ai, dn = Tr, _r = Or, gt = Rt, qa = _r("Object.prototype.toString"), ui = Ft(), fn = typeof globalThis > "u" ? vr : globalThis, fr = Ua(), Cr = _r("String.prototype.slice"), zt = Object.getPrototypeOf, xa = _r("Array.prototype.indexOf", !0) || function(e, r) {
3755
+ }, Et = si, qa = ai, dn = Tr, _r = Or, gt = Rt, Ua = _r("Object.prototype.toString"), ui = Ft(), fn = typeof globalThis > "u" ? vr : globalThis, fr = qa(), Cr = _r("String.prototype.slice"), zt = Object.getPrototypeOf, xa = _r("Array.prototype.indexOf", !0) || function(e, r) {
3740
3756
  for (var n = 0; n < e.length; n += 1)
3741
3757
  if (e[n] === r)
3742
3758
  return n;
@@ -3778,7 +3794,7 @@ var Qa = function(e) {
3778
3794
  if (!e || typeof e != "object")
3779
3795
  return !1;
3780
3796
  if (!ui) {
3781
- var r = Cr(qa(e), 8, -1);
3797
+ var r = Cr(Ua(e), 8, -1);
3782
3798
  return xa(fr, r) > -1 ? r : r !== "Object" ? !1 : Ga(e);
3783
3799
  }
3784
3800
  return gt ? Qa(e) : null;
@@ -3881,10 +3897,10 @@ var Ya = function(e) {
3881
3897
  return n(y) === "Uint8ClampedArray";
3882
3898
  }
3883
3899
  t.isUint8ClampedArray = R;
3884
- function Q(y) {
3900
+ function G(y) {
3885
3901
  return n(y) === "Uint16Array";
3886
3902
  }
3887
- t.isUint16Array = Q;
3903
+ t.isUint16Array = G;
3888
3904
  function ee(y) {
3889
3905
  return n(y) === "Uint32Array";
3890
3906
  }
@@ -4282,10 +4298,10 @@ var ru = hr.exports;
4282
4298
  return l === null;
4283
4299
  }
4284
4300
  t.isNull = R;
4285
- function Q(l) {
4301
+ function G(l) {
4286
4302
  return l == null;
4287
4303
  }
4288
- t.isNullOrUndefined = Q;
4304
+ t.isNullOrUndefined = G;
4289
4305
  function ee(l) {
4290
4306
  return typeof l == "number";
4291
4307
  }
@@ -4658,8 +4674,8 @@ function cu(t) {
4658
4674
  function g(...S) {
4659
4675
  if (!g.enabled)
4660
4676
  return;
4661
- const C = g, R = Number(/* @__PURE__ */ new Date()), Q = R - (f || R);
4662
- C.diff = Q, C.prev = f, C.curr = R, f = R, S[0] = r.coerce(S[0]), typeof S[0] != "string" && S.unshift("%O");
4677
+ const C = g, R = Number(/* @__PURE__ */ new Date()), G = R - (f || R);
4678
+ C.diff = G, C.prev = f, C.curr = R, f = R, S[0] = r.coerce(S[0]), typeof S[0] != "string" && S.unshift("%O");
4663
4679
  let ee = 0;
4664
4680
  S[0] = S[0].replace(/%([a-zA-Z%])/g, (V, T) => {
4665
4681
  if (V === "%%")
@@ -5004,9 +5020,9 @@ function Ou(t, e, r) {
5004
5020
  return d ? (r.close(tr(d, this)), this) : r.close();
5005
5021
  };
5006
5022
  }
5007
- function q(t, e, r) {
5008
- if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof q)) {
5009
- const n = new q(t, e, r);
5023
+ function U(t, e, r) {
5024
+ if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof U)) {
5025
+ const n = new U(t, e, r);
5010
5026
  return t && Ou(t, e, n), n;
5011
5027
  }
5012
5028
  e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new Tu(), this._readyQ = Sn(this, pi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
@@ -5036,11 +5052,11 @@ function q(t, e, r) {
5036
5052
  function _u(t, e, r) {
5037
5053
  this._doStart = r, e.autostart && this.start();
5038
5054
  }
5039
- wu(q, Su);
5040
- q.prototype.start = function() {
5055
+ wu(U, Su);
5056
+ U.prototype.start = function() {
5041
5057
  return this.started = !0, A.nextTick(this._doStart), this;
5042
5058
  };
5043
- q.prototype.override = function(t, e, r) {
5059
+ U.prototype.override = function(t, e, r) {
5044
5060
  return t;
5045
5061
  };
5046
5062
  function Cu(t) {
@@ -5048,16 +5064,16 @@ function Cu(t) {
5048
5064
  throw new Au(typeof t);
5049
5065
  return t;
5050
5066
  }
5051
- q.prototype[_t] = !0;
5052
- q.prototype.use = function(t, e) {
5067
+ U.prototype[_t] = !0;
5068
+ U.prototype.use = function(t, e) {
5053
5069
  return this._lastUsed = this._addPlugin(t, e, !1), this;
5054
5070
  };
5055
- q.prototype._loadRegistered = function() {
5071
+ U.prototype._loadRegistered = function() {
5056
5072
  const t = this._current[0];
5057
5073
  return !this.started && !this.booted && A.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
5058
5074
  };
5059
- Object.defineProperty(q.prototype, "then", { get: fi });
5060
- q.prototype._addPlugin = function(t, e, r) {
5075
+ Object.defineProperty(U.prototype, "then", { get: fi });
5076
+ U.prototype._addPlugin = function(t, e, r) {
5061
5077
  if (t = Cu(t), e = e || {}, this.booted)
5062
5078
  throw new Eu();
5063
5079
  const n = this._current[0], i = new mr(this, t, e, r);
@@ -5072,7 +5088,7 @@ q.prototype._addPlugin = function(t, e, r) {
5072
5088
  o && (this._error = o);
5073
5089
  }), i;
5074
5090
  };
5075
- q.prototype.after = function(t) {
5091
+ U.prototype.after = function(t) {
5076
5092
  if (!t)
5077
5093
  return this._loadRegistered();
5078
5094
  this._addPlugin(e.bind(this), {}, !0);
@@ -5081,7 +5097,7 @@ q.prototype.after = function(t) {
5081
5097
  }
5082
5098
  return this;
5083
5099
  };
5084
- q.prototype.onClose = function(t) {
5100
+ U.prototype.onClose = function(t) {
5085
5101
  if (typeof t != "function")
5086
5102
  throw new Error("not a function");
5087
5103
  t[this._isOnCloseHandlerKey] = !0, this._closeQ.unshift(t, e.bind(this));
@@ -5090,7 +5106,7 @@ q.prototype.onClose = function(t) {
5090
5106
  }
5091
5107
  return this;
5092
5108
  };
5093
- q.prototype.close = function(t) {
5109
+ U.prototype.close = function(t) {
5094
5110
  let e;
5095
5111
  if (t) {
5096
5112
  if (typeof t != "function")
@@ -5107,7 +5123,7 @@ q.prototype.close = function(t) {
5107
5123
  this._error = null, this._closeQ.push(t), A.nextTick(this._closeQ.resume.bind(this._closeQ));
5108
5124
  }), e;
5109
5125
  };
5110
- q.prototype.ready = function(t) {
5126
+ U.prototype.ready = function(t) {
5111
5127
  if (t) {
5112
5128
  if (typeof t != "function")
5113
5129
  throw new et("ready", typeof t);
@@ -5122,10 +5138,10 @@ q.prototype.ready = function(t) {
5122
5138
  }
5123
5139
  });
5124
5140
  };
5125
- q.prototype.prettyPrint = function() {
5141
+ U.prototype.prettyPrint = function() {
5126
5142
  return this.pluginTree.prittyPrint();
5127
5143
  };
5128
- q.prototype.toJSON = function() {
5144
+ U.prototype.toJSON = function() {
5129
5145
  return this.pluginTree.toJSON();
5130
5146
  };
5131
5147
  function wn() {
@@ -5201,9 +5217,9 @@ function tr(t, e) {
5201
5217
  }, i) : A.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : A.nextTick(i);
5202
5218
  }
5203
5219
  }
5204
- Sr.exports = q;
5220
+ Sr.exports = U;
5205
5221
  Sr.exports.express = function(t) {
5206
- return q(t, {
5222
+ return U(t, {
5207
5223
  expose: {
5208
5224
  use: "load"
5209
5225
  }