@realsee/live 0.6.3 → 0.6.5

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/dist/index.es.js CHANGED
@@ -1,24 +1,24 @@
1
- var At = Object.defineProperty;
2
- var Dt = (t, s, e) => s in t ? At(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
3
- var o = (t, s, e) => (Dt(t, typeof s != "symbol" ? s + "" : s, e), e);
4
- import Vt from "@realsee/jsbridge-x";
5
- import ke from "trtc-js-sdk";
6
- import { ConsoleLogger as Mt, LogLevel as $t, DefaultDeviceController as xt, MeetingSessionConfiguration as Ut, DefaultMeetingSession as Bt, DefaultModality as et, MeetingSessionStatusCode as Wt } from "amazon-chime-sdk-js";
7
- import V, { createContext as Ft } from "react";
8
- const oe = Symbol("$$REALSEE_LIVE_EVENT$$");
9
- function ge(t) {
10
- return t[oe] || (t[oe] = {}), t[oe];
1
+ var Vt = Object.defineProperty;
2
+ var $t = (r, s, e) => s in r ? Vt(r, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[s] = e;
3
+ var o = (r, s, e) => ($t(r, typeof s != "symbol" ? s + "" : s, e), e);
4
+ import xt from "@realsee/jsbridge-x";
5
+ import Ne from "trtc-js-sdk";
6
+ import { ConsoleLogger as Ut, LogLevel as Ft, DefaultDeviceController as Bt, MeetingSessionConfiguration as Wt, DefaultMeetingSession as Kt, DefaultModality as tt, MeetingSessionStatusCode as qt } from "amazon-chime-sdk-js";
7
+ import D, { createContext as Gt } from "react";
8
+ const ce = Symbol("$$REALSEE_LIVE_EVENT$$");
9
+ function pe(r) {
10
+ return r[ce] || (r[ce] = {}), r[ce];
11
11
  }
12
- function qt(t) {
13
- t[oe] || delete t[oe];
12
+ function Yt(r) {
13
+ r[ce] || delete r[ce];
14
14
  }
15
- class ae {
15
+ class ue {
16
16
  /**
17
17
  * 判断是否注册了事件
18
18
  * @param name 事件类型
19
19
  */
20
20
  hasListener(s) {
21
- const e = ge(this);
21
+ const e = pe(this);
22
22
  return e && e[s] && e[s].length > 0;
23
23
  }
24
24
  /**
@@ -30,9 +30,9 @@ class ae {
30
30
  * @template K 预设的监听事件名称
31
31
  * @template C 回调函数函数上下文
32
32
  */
33
- on(s, e, n) {
34
- const i = ge(this);
35
- return i[s] || (i[s] = []), i[s].push([e, n || !1]), () => this.off(s, e);
33
+ on(s, e, i) {
34
+ const n = pe(this);
35
+ return n[s] || (n[s] = []), n[s].push([e, i || !1]), () => this.off(s, e);
36
36
  }
37
37
  /**
38
38
  * 注册事件(是否只执行一次)
@@ -56,18 +56,18 @@ class ae {
56
56
  */
57
57
  off(s, e) {
58
58
  if (s === void 0) {
59
- qt(this);
59
+ Yt(this);
60
60
  return;
61
61
  }
62
- const n = ge(this);
63
- if (n[s] || (n[s] = []), e === void 0) {
64
- n[s].length = 0;
62
+ const i = pe(this);
63
+ if (i[s] || (i[s] = []), e === void 0) {
64
+ i[s].length = 0;
65
65
  return;
66
66
  }
67
- let i = 0;
68
- for (; i < n[s].length && n[s][i][0] !== e; i++)
67
+ let n = 0;
68
+ for (; n < i[s].length && i[s][n][0] !== e; n++)
69
69
  ;
70
- i < n[s].length && n[s].splice(i, 1);
70
+ n < i[s].length && i[s].splice(n, 1);
71
71
  }
72
72
  /**
73
73
  * 触发事件
@@ -77,23 +77,23 @@ class ae {
77
77
  * @template K 预设的监听事件名称
78
78
  */
79
79
  emit(s, ...e) {
80
- let n = !1;
81
- const a = ge(this)[s] || [];
82
- for (let u of a.slice()) {
83
- const [f, v = !1] = u, h = f(...e);
84
- v && this.off(s, f), h === !1 && (n = !0);
80
+ let i = !1;
81
+ const c = pe(this)[s] || [];
82
+ for (let u of c.slice()) {
83
+ const [d, g = !1] = u, v = d(...e);
84
+ g && this.off(s, d), v === !1 && (i = !0);
85
85
  }
86
- return n;
86
+ return i;
87
87
  }
88
88
  }
89
- class De extends ae {
89
+ class Me extends ue {
90
90
  }
91
- var Q = /* @__PURE__ */ ((t) => (t.RealseeBrowserRTC = "RealseeBrowserRTC", t.RealseeVRWebViewRTC = "RealseeVRWebViewRTC", t.RealseeBrowserChimeRTC = "RealseeBrowserChimeRTC", t))(Q || {}), ut = /* @__PURE__ */ ((t) => (t.RealseeXTRTC = "trtc", t.RealseeXChimeRTC = "chime", t))(ut || {});
92
- const Kt = () => {
93
- const t = new Date(), s = t.getFullYear(), e = (t.getMonth() + 1).toString().padStart(2, "0"), n = t.getDate().toString().padStart(2, "0"), i = t.getHours().toString().padStart(2, "0"), a = t.getMinutes().toString().padStart(2, "0"), u = t.getSeconds().toString().padStart(2, "0"), f = t.getMilliseconds();
94
- return `[${s}-${e}-${n} ${i}:${a}:${u}.${f}]`;
95
- }, pe = (t, s = []) => {
96
- switch (s.unshift(`Realsee Live ${Kt()} <${t}> `), t) {
91
+ var Q = /* @__PURE__ */ ((r) => (r.RealseeBrowserRTC = "RealseeBrowserRTC", r.RealseeVRWebViewRTC = "RealseeVRWebViewRTC", r.RealseeBrowserChimeRTC = "RealseeBrowserChimeRTC", r))(Q || {}), ut = /* @__PURE__ */ ((r) => (r.RealseeXTRTC = "trtc", r.RealseeXChimeRTC = "chime", r))(ut || {});
92
+ const Ht = () => {
93
+ const r = new Date(), s = r.getFullYear(), e = (r.getMonth() + 1).toString().padStart(2, "0"), i = r.getDate().toString().padStart(2, "0"), n = r.getHours().toString().padStart(2, "0"), c = r.getMinutes().toString().padStart(2, "0"), u = r.getSeconds().toString().padStart(2, "0"), d = r.getMilliseconds();
94
+ return `[${s}-${e}-${i} ${n}:${c}:${u}.${d}]`;
95
+ }, be = (r, s = []) => {
96
+ switch (s.unshift(`Realsee Live ${Ht()} <${r}> `), r) {
97
97
  case "INFO":
98
98
  return console.info(...s);
99
99
  case "ERROR":
@@ -103,19 +103,19 @@ const Kt = () => {
103
103
  default:
104
104
  return console.log(...s);
105
105
  }
106
- }, Yt = (...t) => pe("LOG", t), Gt = (...t) => pe("INFO", t), Ht = (...t) => pe("ERROR", t), Jt = (...t) => pe("WARN", t), zt = {
107
- log: Yt,
108
- info: Gt,
109
- error: Ht,
110
- warn: Jt
111
- }, L = zt;
106
+ }, Jt = (...r) => be("LOG", r), zt = (...r) => be("INFO", r), Xt = (...r) => be("ERROR", r), Zt = (...r) => be("WARN", r), Qt = {
107
+ log: Jt,
108
+ info: zt,
109
+ error: Xt,
110
+ warn: Zt
111
+ }, O = Qt;
112
112
  function X() {
113
113
  return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
114
114
  }
115
- function me() {
115
+ function Ee() {
116
116
  return (X() + X() + "-" + X() + "-4" + X().substr(0, 3) + "-" + X() + "-" + X() + X() + X()).toLowerCase();
117
117
  }
118
- class tt extends De {
118
+ class rt extends Me {
119
119
  constructor(e) {
120
120
  super();
121
121
  o(this, "type", Q.RealseeBrowserRTC);
@@ -126,105 +126,105 @@ class tt extends De {
126
126
  throw new Error("方法 getVoiceSign 未实现");
127
127
  });
128
128
  o(this, "_autoPlayConfirm");
129
- o(this, "checkRequirement", () => ke.checkSystemRequirements());
129
+ o(this, "checkRequirement", () => Ne.checkSystemRequirements());
130
130
  o(this, "$dom", document.createElement("div"));
131
131
  o(this, "_trtc", {
132
132
  client: null,
133
133
  stream: null
134
134
  });
135
135
  o(this, "join", async (e) => {
136
- var a;
136
+ var c;
137
137
  this.emit("joinWillStart");
138
- const n = await this._getVoiceSign({
138
+ const i = await this._getVoiceSign({
139
139
  voiceId: e.voiceId,
140
140
  roomId: e.roomId,
141
141
  userId: e.userId
142
142
  });
143
- this._trtc.client = ke.createClient({
143
+ this._trtc.client = Ne.createClient({
144
144
  mode: "rtc",
145
- ...n,
145
+ ...i,
146
146
  enableAutoPlayDialog: typeof this._autoPlayConfirm != "function"
147
- }), (a = this._trtc.client) == null || a.enableAudioVolumeEvaluation(), this._registerRtcEvent();
148
- let i = await new Promise((u) => {
149
- var f;
150
- (f = this._trtc.client) == null || f.join({ roomId: Number(e.voiceId) }).then(() => u(!0)).catch(() => u(!1));
147
+ }), (c = this._trtc.client) == null || c.enableAudioVolumeEvaluation(), this._registerRtcEvent();
148
+ let n = await new Promise((u) => {
149
+ var d;
150
+ (d = this._trtc.client) == null || d.join({ roomId: Number(e.voiceId) }).then(() => u(!0)).catch(() => u(!1));
151
151
  });
152
- return this.joined = i, i ? (this._trtc.stream = ke.createStream({
153
- userId: n.userId,
152
+ return this.joined = n, n ? (this._trtc.stream = Ne.createStream({
153
+ userId: i.userId,
154
154
  audio: !0,
155
155
  video: !1
156
- }), i = await new Promise((u) => {
157
- var f;
158
- (f = this._trtc.stream) == null || f.initialize().then(() => u(!0)).catch(() => u(!1));
159
- }), i = await new Promise((u) => {
160
- var f;
161
- (f = this._trtc.client) == null || f.publish(this._trtc.stream).then(() => u(!0)).catch(() => u(!1));
162
- }), this.joined = i, this.joined && this.emit("joined"), i) : !1;
156
+ }), n = await new Promise((u) => {
157
+ var d;
158
+ (d = this._trtc.stream) == null || d.initialize().then(() => u(!0)).catch(() => u(!1));
159
+ }), n = await new Promise((u) => {
160
+ var d;
161
+ (d = this._trtc.client) == null || d.publish(this._trtc.stream).then(() => u(!0)).catch(() => u(!1));
162
+ }), this.joined = n, this.joined && this.emit("joined"), n) : !1;
163
163
  });
164
164
  o(this, "_handleStreamAdded", (e) => {
165
- var i;
166
- const n = e.stream;
167
- console.log("远端流增加: " + n.getId()), (i = this._trtc.client) == null || i.subscribe(n);
165
+ var n;
166
+ const i = e.stream;
167
+ console.log("远端流增加: " + i.getId()), (n = this._trtc.client) == null || n.subscribe(i);
168
168
  });
169
169
  o(this, "_handleStreamSubscribed", (e) => {
170
- const n = e.stream;
171
- console.log("远端流订阅成功:" + n.getId());
172
- const a = `rs-rtc-remote_stream-${n.getId()}`, u = document.createElement("div");
173
- u.id = a, this.$dom.appendChild(u), typeof this._autoPlayConfirm == "function" ? (n.play(a).catch((f) => {
174
- }), n.on("error", (f) => {
175
- if (f.getCode() === 16451) {
176
- const h = () => n.resume();
177
- this._autoPlayConfirm({ onConfirm: h });
170
+ const i = e.stream;
171
+ console.log("远端流订阅成功:" + i.getId());
172
+ const c = `rs-rtc-remote_stream-${i.getId()}`, u = document.createElement("div");
173
+ u.id = c, this.$dom.appendChild(u), typeof this._autoPlayConfirm == "function" ? (i.play(c).catch((d) => {
174
+ }), i.on("error", (d) => {
175
+ if (d.getCode() === 16451) {
176
+ const v = () => i.resume();
177
+ this._autoPlayConfirm({ onConfirm: v });
178
178
  }
179
- })) : n.play(a);
179
+ })) : i.play(c);
180
180
  });
181
181
  this._getVoiceSign = e.getVoiceSign, this._autoPlayConfirm = e.autoPlayConfirm, this._initParentDom();
182
182
  }
183
183
  _initParentDom() {
184
- this.$dom.id = `rs-rtc-${me()}`, this.$dom.style.display = "none", document.body.appendChild(this.$dom);
184
+ this.$dom.id = `rs-rtc-${Ee()}`, this.$dom.style.display = "none", document.body.appendChild(this.$dom);
185
185
  }
186
186
  quit() {
187
187
  return new Promise(async (e) => {
188
- var n, i;
189
- this.joined = !1, this._trtc.stream && (await ((n = this._trtc.client) == null ? void 0 : n.unpublish(this._trtc.stream)), this._trtc.stream.stop(), this._trtc.stream.close(), this._trtc.stream = null), (i = this._trtc.client) == null || i.leave().then(() => this._trtc.client = null).then(() => e(!0)).catch(() => e(!1)), e(!0);
188
+ var i, n;
189
+ this.joined = !1, this._trtc.stream && (await ((i = this._trtc.client) == null ? void 0 : i.unpublish(this._trtc.stream)), this._trtc.stream.stop(), this._trtc.stream.close(), this._trtc.stream = null), (n = this._trtc.client) == null || n.leave().then(() => this._trtc.client = null).then(() => e(!0)).catch(() => e(!1)), e(!0);
190
190
  });
191
191
  }
192
192
  detectMicro() {
193
193
  return new Promise((e) => {
194
- const n = { audio: !0, video: !1 };
194
+ const i = { audio: !0, video: !1 };
195
195
  try {
196
- navigator.mediaDevices.getUserMedia(n).then(() => e(!0)).catch((i) => {
197
- L.error(i.message), e(!1);
196
+ navigator.mediaDevices.getUserMedia(i).then(() => e(!0)).catch((n) => {
197
+ O.error(n.message), e(!1);
198
198
  });
199
- } catch (i) {
200
- console.error(i), e(!1);
199
+ } catch (n) {
200
+ console.error(n), e(!1);
201
201
  }
202
202
  });
203
203
  }
204
204
  toggleMicro(e) {
205
- var n, i, a, u;
205
+ var i, n, c, u;
206
206
  return Promise.resolve(
207
- (e ? (i = (n = this._trtc) == null ? void 0 : n.stream) == null ? void 0 : i.unmuteAudio() : (u = (a = this._trtc) == null ? void 0 : a.stream) == null ? void 0 : u.muteAudio()) || !1
207
+ (e ? (n = (i = this._trtc) == null ? void 0 : i.stream) == null ? void 0 : n.unmuteAudio() : (u = (c = this._trtc) == null ? void 0 : c.stream) == null ? void 0 : u.muteAudio()) || !1
208
208
  );
209
209
  }
210
210
  shock() {
211
211
  throw new Error("Method not implemented.");
212
212
  }
213
213
  _registerRtcEvent() {
214
- var e, n, i, a;
215
- (e = this._trtc.client) == null || e.on("stream-added", this._handleStreamAdded), (n = this._trtc.client) == null || n.on("stream-subscribed", this._handleStreamSubscribed), (i = this._trtc.client) == null || i.on(
214
+ var e, i, n, c;
215
+ (e = this._trtc.client) == null || e.on("stream-added", this._handleStreamAdded), (i = this._trtc.client) == null || i.on("stream-subscribed", this._handleStreamSubscribed), (n = this._trtc.client) == null || n.on(
216
216
  "audio-volume",
217
217
  (u) => this.emit(
218
218
  "userVolumes",
219
- u.result.map(({ userId: f, audioVolume: v }) => ({
220
- userId: f,
221
- audioVolume: v
219
+ u.result.map(({ userId: d, audioVolume: g }) => ({
220
+ userId: d,
221
+ audioVolume: g
222
222
  }))
223
223
  )
224
- ), (a = this._trtc.client) == null || a.on("error", (u) => this.emit("error", u));
224
+ ), (c = this._trtc.client) == null || c.on("error", (u) => this.emit("error", u));
225
225
  }
226
226
  }
227
- class rt extends De {
227
+ class it extends Me {
228
228
  constructor(e) {
229
229
  super();
230
230
  o(this, "type", Q.RealseeBrowserChimeRTC);
@@ -239,16 +239,18 @@ class rt extends De {
239
239
  o(this, "audioOutput");
240
240
  o(this, "deviceChangeObserver", {});
241
241
  o(this, "audioVideoObserver", {});
242
+ o(this, "audioMixObserver");
242
243
  o(this, "_getVoiceSign", () => {
243
244
  throw new Error("方法 getVoiceSign 未实现");
244
245
  });
246
+ o(this, "_autoPlayConfirm");
245
247
  o(this, "$dom", document.createElement("div"));
246
248
  o(this, "$audio", document.createElement("audio"));
247
249
  /**
248
250
  * 对audio标签初始化
249
251
  */
250
252
  o(this, "_initDom", () => {
251
- this.$audio.id = `rs-rtc-${me()}`, this.$dom.id = `rs-rtc-${me()}`, this.$dom.appendChild(this.$audio), document.body.appendChild(this.$dom);
253
+ this.$audio.id = `rs-rtc-${Ee()}`, this.$dom.id = `rs-rtc-${Ee()}`, this.$dom.appendChild(this.$audio), document.body.appendChild(this.$dom);
252
254
  });
253
255
  /**
254
256
  * 初始化事件监听器
@@ -256,20 +258,20 @@ class rt extends De {
256
258
  o(this, "initObservers", () => {
257
259
  this.deviceChangeObserver = {
258
260
  audioInputsChanged: (e) => {
259
- this.logger.info(`audioInputsChanged ${typeof e}`), e == null || e.forEach((n) => {
260
- this.logger.info(`Device ID: ${n.deviceId} Microphone: ${n.label}`);
261
+ this.logger.info(`audioInputsChanged ${typeof e}`), e == null || e.forEach((i) => {
262
+ this.logger.info(`Device ID: ${i.deviceId} Microphone: ${i.label}`);
261
263
  });
262
264
  },
263
265
  audioOutputsChanged: (e) => {
264
- this.logger.info(`audioOutputsChanged ${typeof e}`), e == null || e.forEach((n) => {
265
- this.logger.info(`Device ID: ${n.deviceId} Speaker: ${n.label}`);
266
+ this.logger.info(`audioOutputsChanged ${typeof e}`), e == null || e.forEach((i) => {
267
+ this.logger.info(`Device ID: ${i.deviceId} Speaker: ${i.label}`);
266
268
  });
267
269
  },
268
270
  // videoInputsChanged: (freshVideoInputDeviceList: any) => {
269
271
  // this.logger.info(`Video inputs updated: ${freshVideoInputDeviceList}`);
270
272
  // },
271
- audioInputMuteStateChanged: (e, n) => {
272
- this.logger.info(`Device ${e.toString()} ${n ? "is muted in hardware" : "is not muted"}`);
273
+ audioInputMuteStateChanged: (e, i) => {
274
+ this.logger.info(`Device ${e.toString()} ${i ? "is muted in hardware" : "is not muted"}`);
273
275
  }
274
276
  }, this.audioVideoObserver = {
275
277
  audioVideoDidStart: () => {
@@ -281,52 +283,67 @@ class rt extends De {
281
283
  audioVideoDidStartConnecting: (e) => {
282
284
  e && this.logger.info("Attempting to reconnect");
283
285
  }
286
+ }, this.audioMixObserver = {
287
+ meetingAudioStreamBecameActive: (e) => {
288
+ if (this.$audio.paused) {
289
+ const i = () => this.$audio.play().then(() => {
290
+ }).catch((n) => {
291
+ if (O.error("播放远端流失败!", n), typeof this._autoPlayConfirm == "function") {
292
+ const c = () => i();
293
+ this._autoPlayConfirm({ onConfirm: c });
294
+ }
295
+ });
296
+ i();
297
+ }
298
+ },
299
+ meetingAudioStreamBecameInactive: (e) => {
300
+ }
284
301
  };
285
302
  });
286
303
  /**
287
304
  * 注册rtc事件
288
305
  */
289
306
  o(this, "_registerRtcEvent", () => {
290
- var n, i, a, u, f, v;
291
- const e = ((a = (i = (n = this.meetingSession) == null ? void 0 : n.configuration) == null ? void 0 : i.credentials) == null ? void 0 : a.attendeeId) || "";
307
+ var i, n, c, u, d, g;
308
+ const e = ((c = (n = (i = this.meetingSession) == null ? void 0 : i.configuration) == null ? void 0 : n.credentials) == null ? void 0 : c.attendeeId) || "";
292
309
  if (e) {
293
- const h = /* @__PURE__ */ new Map(), _ = () => {
294
- const E = [];
295
- return h.forEach((w, m) => {
296
- E.push({
297
- userId: w.userId,
298
- volume: w.muted || w.signalStrength === 0 || !Boolean(w.volume) ? 0 : w.volume
310
+ const v = /* @__PURE__ */ new Map(), E = () => {
311
+ const y = [];
312
+ return v.forEach((I, _) => {
313
+ y.push({
314
+ userId: I.userId,
315
+ volume: I.muted || I.signalStrength === 0 || !Boolean(I.volume) ? 0 : I.volume
299
316
  });
300
- }), E;
317
+ }), y;
301
318
  };
302
319
  (u = this.meetingSession) == null || u.audioVideo.realtimeSubscribeToAttendeeIdPresence(
303
- (E, w, m) => {
304
- var A;
305
- if (!w) {
306
- h.delete(E), this.emit("userVolumes", _());
320
+ (y, I, _) => {
321
+ var V;
322
+ if (!I) {
323
+ v.delete(y), this.emit("userVolumes", E());
307
324
  return;
308
325
  }
309
- (A = this.meetingSession) == null || A.audioVideo.realtimeSubscribeToVolumeIndicator(
310
- E,
311
- (M, k, H, J) => {
312
- new et(M).base() === M && (h.set(M, {
313
- userId: m || M,
326
+ (V = this.meetingSession) == null || V.audioVideo.realtimeSubscribeToVolumeIndicator(
327
+ y,
328
+ (C, k, U, P) => {
329
+ new tt(C).base() === C && (v.set(C, {
330
+ userId: _ || C,
314
331
  volume: k,
315
- muted: H,
316
- signalStrength: J
317
- }), this.emit("userVolumes", _()));
332
+ muted: U,
333
+ signalStrength: P
334
+ }), this.emit("userVolumes", E()));
318
335
  }
319
336
  );
320
337
  }
321
- ), (f = this.meetingSession) == null || f.audioVideo.realtimeSubscribeToVolumeIndicator(
338
+ ), (d = this.meetingSession) == null || d.audioVideo.realtimeSubscribeToVolumeIndicator(
322
339
  e,
323
- (E, w, m, A) => {
324
- new et(E).base() === E && A !== null && A !== 1 && this.emit("weakNetwork");
340
+ (y, I, _, V) => {
341
+ new tt(y).base() === y && V !== null && V !== 1 && this.emit("weakNetwork");
325
342
  }
326
- ), (v = this.meetingSession) == null || v.audioVideo.realtimeSubscribeToFatalError((E) => this.emit("error", E));
343
+ ), (g = this.meetingSession) == null || g.audioVideo.realtimeSubscribeToFatalError((y) => this.emit("error", y));
327
344
  }
328
345
  });
329
- this._getVoiceSign = e.getVoiceSign, this._initDom(), this.logger = new Mt("WebRTCLogger", e.logLevel || $t.INFO), this.deviceController = new xt(this.logger), this.initObservers();
346
+ this._getVoiceSign = e.getVoiceSign, this._autoPlayConfirm = e.autoPlayConfirm, this._initDom(), this.logger = new Ut("WebRTCLogger", e.logLevel || Ft.INFO), this.deviceController = new Bt(this.logger), this.initObservers();
330
347
  }
331
348
  /**
332
349
  * 加入语音会议
@@ -334,99 +351,114 @@ class rt extends De {
334
351
  * @returns
335
352
  */
336
353
  async join(e) {
337
- return new Promise(async (n, i) => {
338
- var a;
354
+ return new Promise(async (i, n) => {
355
+ var c, u;
339
356
  this.emit("joinWillStart");
340
357
  try {
341
- const { sdkAppId: u, userId: f, roomId: v, userSig: h } = await this._getVoiceSign({
358
+ const { sdkAppId: d, userId: g, roomId: v, userSig: E } = await this._getVoiceSign({
342
359
  ...e,
343
360
  roomId: e.roomId || 0
344
361
  });
345
- this.userId = f;
346
- const { attendence: _, vendor_wrapper: E } = JSON.parse(
347
- decodeURIComponent(h)
348
- ), w = new Ut(
362
+ this.userId = g;
363
+ const { attendence: y, vendor_wrapper: I } = JSON.parse(
364
+ decodeURIComponent(E)
365
+ ), _ = new Wt(
349
366
  {
350
- Meeting: E
367
+ Meeting: I
351
368
  },
352
369
  {
353
370
  Attendee: {
354
- ExternalUserId: _.external_user_id,
355
- AttendeeId: _.attendee_id,
356
- JoinToken: _.join_token
371
+ ExternalUserId: y.external_user_id,
372
+ AttendeeId: y.attendee_id,
373
+ JoinToken: y.join_token
357
374
  }
358
375
  }
359
376
  );
360
- this.meetingSession = new Bt(w, this.logger, this.deviceController), this._registerRtcEvent(), this.meetingSession.audioVideo.addDeviceChangeObserver(this.deviceChangeObserver), this.meetingSession.audioVideo.addObserver(this.audioVideoObserver), this.meetingSession.audioVideo.bindAudioElement(this.$audio);
361
- const m = {
377
+ this.meetingSession = new Kt(_, this.logger, this.deviceController), this._registerRtcEvent(), this.meetingSession.audioVideo.addDeviceChangeObserver(this.deviceChangeObserver), this.meetingSession.audioVideo.addObserver(this.audioVideoObserver), this.meetingSession.audioVideo.bindAudioElement(this.$audio);
378
+ const V = {
362
379
  audioVideoDidStart: () => {
363
- var k;
364
- (k = this.meetingSession) == null || k.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), n(!0);
380
+ var C;
381
+ (C = this.meetingSession) == null || C.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), i(!0);
365
382
  },
366
383
  audioVideoDidStop: () => {
367
- this.joined = !1, n(!1);
384
+ this.joined = !1, i(!1);
368
385
  }
369
386
  };
370
- this.meetingSession.audioVideo.addObserver(m), this.meetingSession.audioVideo.setDeviceLabelTrigger(
387
+ this.meetingSession.audioVideo.addObserver(V), this.audioMixObserver && this.meetingSession.audioVideo.addAudioMixObserver(this.audioMixObserver), this.meetingSession.audioVideo.setDeviceLabelTrigger(
371
388
  async () => await navigator.mediaDevices.getUserMedia({ audio: !0, video: !1 })
372
389
  );
373
- const M = ((a = (await this.meetingSession.audioVideo.listAudioInputDevices())[0]) == null ? void 0 : a.deviceId) || "default";
374
- await this.meetingSession.audioVideo.startAudioInput(M), this.meetingSession.audioVideo.start();
375
- } catch (u) {
376
- this.emit("error", u), this.logger.error(u.message), n(!1);
390
+ try {
391
+ const C = await this.meetingSession.audioVideo.listAudioInputDevices();
392
+ O.info("audioInputDevices ===>", C);
393
+ const k = ((c = C[0]) == null ? void 0 : c.deviceId) || "default";
394
+ await this.meetingSession.audioVideo.startAudioInput(k);
395
+ } catch (C) {
396
+ O.error(`设置语音输入设备失败:${C.message}`);
397
+ }
398
+ try {
399
+ const C = await this.meetingSession.audioVideo.listAudioOutputDevices();
400
+ O.info("audioOutputDevices ===>", C);
401
+ const k = ((u = C[0]) == null ? void 0 : u.deviceId) || "default";
402
+ await this.meetingSession.audioVideo.chooseAudioOutput(k);
403
+ } catch (C) {
404
+ O.error(`设置语音输出设备失败:${C.message}`);
405
+ }
406
+ this.meetingSession.audioVideo.start();
407
+ } catch (d) {
408
+ this.emit("error", d), this.logger.error(d.message), i(!1);
377
409
  }
378
410
  });
379
411
  }
380
412
  quit() {
381
- return this.joined ? new Promise((e, n) => {
382
- var a, u;
413
+ return this.joined ? new Promise((e, i) => {
414
+ var c, u;
383
415
  this.joined = !1;
384
- const i = {
385
- audioVideoDidStop: async (f) => {
386
- var h;
387
- const v = f.statusCode();
388
- (h = this.meetingSession) == null || h.deviceController.destroy(), v === Wt.Left ? (this.logger.info("You left the session"), e(!0)) : (this.logger.info(`Stopped with a session status code: ${v}`), e(!0));
416
+ const n = {
417
+ audioVideoDidStop: async (d) => {
418
+ var v;
419
+ const g = d.statusCode();
420
+ (v = this.meetingSession) == null || v.deviceController.destroy(), g === qt.Left ? (this.logger.info("You left the session"), e(!0)) : (this.logger.info(`Stopped with a session status code: ${g}`), e(!0));
389
421
  }
390
422
  };
391
- (a = this.meetingSession) == null || a.audioVideo.addObserver(i), (u = this.meetingSession) == null || u.audioVideo.stop();
423
+ (c = this.meetingSession) == null || c.audioVideo.addObserver(n), (u = this.meetingSession) == null || u.audioVideo.stop();
392
424
  }) : Promise.resolve(!0);
393
425
  }
394
426
  async detectMicro() {
395
427
  return new Promise((e) => {
396
- const n = { audio: !0, video: !1 };
428
+ const i = { audio: !0, video: !1 };
397
429
  try {
398
- navigator.mediaDevices.getUserMedia(n).then(() => e(!0)).catch(() => e(!1));
399
- } catch (i) {
400
- this.logger.error(i.message), e(!1);
430
+ navigator.mediaDevices.getUserMedia(i).then(() => e(!0)).catch(() => e(!1));
431
+ } catch (n) {
432
+ this.logger.error(n.message), e(!1);
401
433
  }
402
434
  });
403
435
  }
404
436
  async toggleMicro(e) {
405
- var i, a, u;
406
- e ? (i = this.meetingSession) == null || i.audioVideo.realtimeUnmuteLocalAudio() : (a = this.meetingSession) == null || a.audioVideo.realtimeMuteLocalAudio();
407
- const n = (u = this.meetingSession) == null ? void 0 : u.audioVideo.realtimeIsLocalAudioMuted();
408
- return n !== void 0 ? e !== n : !1;
437
+ var n, c, u;
438
+ e ? (n = this.meetingSession) == null || n.audioVideo.realtimeUnmuteLocalAudio() : (c = this.meetingSession) == null || c.audioVideo.realtimeMuteLocalAudio();
439
+ const i = (u = this.meetingSession) == null ? void 0 : u.audioVideo.realtimeIsLocalAudioMuted();
440
+ return i !== void 0 ? e !== i : !1;
409
441
  }
410
442
  shock() {
411
443
  throw new Error("Method not implemented.");
412
444
  }
413
445
  }
414
- var lt = /* @__PURE__ */ ((t) => (t[t.Success = 0] = "Success", t[t.Failure = 1] = "Failure", t[t.ReJoin = 2] = "ReJoin", t[t.NoMicroPermission = 3] = "NoMicroPermission", t))(lt || {});
415
- class nt extends De {
416
- constructor({ jsBridge: e, getVoiceSign: n }) {
446
+ var lt = /* @__PURE__ */ ((r) => (r[r.Success = 0] = "Success", r[r.Failure = 1] = "Failure", r[r.ReJoin = 2] = "ReJoin", r[r.NoMicroPermission = 3] = "NoMicroPermission", r))(lt || {});
447
+ class nt extends Me {
448
+ constructor({ jsBridge: e, getVoiceSign: i }) {
417
449
  super();
418
450
  o(this, "type", Q.RealseeVRWebViewRTC);
419
451
  o(this, "joined", !1);
420
452
  o(this, "micro", !1);
421
453
  o(this, "voiceId", "");
422
454
  o(this, "options");
423
- this.options = { jsBridge: e, getVoiceSign: n }, this.jsBridge.webViewType !== "WxMiniProgramWebView" && this.jsBridge.callAndListen(
455
+ this.options = { jsBridge: e, getVoiceSign: i }, this.jsBridge.webViewType !== "WxMiniProgramWebView" && this.jsBridge.callAndListen(
424
456
  "live/userVolumes",
425
- (i) => {
426
- this.emit("userVolumes", i);
457
+ (n) => {
458
+ this.emit("userVolumes", n);
427
459
  }
428
- ), this.jsBridge.callAndListen("live/weakNetwork", (i) => {
429
- i && this.emit("weakNetwork");
460
+ ), this.jsBridge.callAndListen("live/weakNetwork", (n) => {
461
+ n && this.emit("weakNetwork");
430
462
  });
431
463
  }
432
464
  get jsBridge() {
@@ -435,49 +467,49 @@ class nt extends De {
435
467
  async join(e) {
436
468
  try {
437
469
  this.emit("joinWillStart");
438
- const { sdkAppId: n, userId: i, userSig: a } = await this.options.getVoiceSign(
470
+ const { sdkAppId: i, userId: n, userSig: c } = await this.options.getVoiceSign(
439
471
  e
440
472
  );
441
- if (!(Boolean(n) && Boolean(i) && Boolean(a)))
473
+ if (!(Boolean(i) && Boolean(n) && Boolean(c)))
442
474
  return this.emit("error", new Error("加入房间失败:rtc 签名请求异常")), this.joined = !1, this.joined;
443
475
  this.type = e.type;
444
- const [u, f] = await this.jsBridge.callAndBackfeed(
445
- `live/join?sdkAppID=${n}&userID=${i}&roomID=${Number(
476
+ const [u, d] = await this.jsBridge.callAndBackfeed(
477
+ `live/join?sdkAppID=${i}&userID=${n}&roomID=${Number(
446
478
  e.voiceId
447
- )}&userSig=${a}`
479
+ )}&userSig=${c}`
448
480
  );
449
481
  return u ? u.code === lt.Success ? (this.emit("joined"), this.joined = !0) : (this.emit("error", u), this.joined = !1) : (this.emit(
450
482
  "error",
451
- f || new Error("加入房间失败:未知异常。")
483
+ d || new Error("加入房间失败:未知异常。")
452
484
  ), this.joined = !1), this.joined;
453
- } catch (n) {
454
- return this.emit("error", new Error("加入房间失败:" + n.message)), this.joined = !1, this.joined;
485
+ } catch (i) {
486
+ return this.emit("error", new Error("加入房间失败:" + i.message)), this.joined = !1, this.joined;
455
487
  }
456
488
  }
457
489
  async quit() {
458
- const [e, n] = await this.jsBridge.callAndBackfeed(
490
+ const [e, i] = await this.jsBridge.callAndBackfeed(
459
491
  "live/quit"
460
492
  );
461
- return e === null && this.emit("error", n || new Error("退出房间失败:未知异常。")), this.joined = !1, !!e;
493
+ return e === null && this.emit("error", i || new Error("退出房间失败:未知异常。")), this.joined = !1, !!e;
462
494
  }
463
495
  async detectMicro() {
464
- const [e, n] = await this.jsBridge.detectMicro();
465
- return e === null ? (this.emit("error", n || new Error("麦克风监测异常!")), !1) : e;
496
+ const [e, i] = await this.jsBridge.detectMicro();
497
+ return e === null ? (this.emit("error", i || new Error("麦克风监测异常!")), !1) : e;
466
498
  }
467
499
  async toggleMicro(e) {
468
- const [n, i] = await this.jsBridge.callAndBackfeed(
500
+ const [i, n] = await this.jsBridge.callAndBackfeed(
469
501
  `live/toggleMicro?flag=${e ? 1 : 0}`
470
502
  );
471
- return n === null ? (this.emit("error", i || new Error("麦克风监测异常!")), !1) : (this.micro = n, n);
503
+ return i === null ? (this.emit("error", n || new Error("麦克风监测异常!")), !1) : (this.micro = i, i);
472
504
  }
473
505
  shock() {
474
506
  this.jsBridge.shock(1);
475
507
  }
476
508
  }
477
- var W = /* @__PURE__ */ ((t) => (t.SelfUserInfo = "SELF_USER_INFO", t.RoomInfo = "ROOM_INFO", t.RTCInfo = "RTC_INFO", t.UserList = "USER_LIST", t.BuiltinMsg = "BUILTIN_MSG", t.CustomEvent = "CUSTOM_EVENT", t.KeyframeSync = "KEYFRAME_SYNC", t.UserKickOut = "USER_KICK_OUT", t))(W || {}), q = /* @__PURE__ */ ((t) => (t.UserChange = "user_change", t.RoomChange = "room_change", t))(q || {}), G = /* @__PURE__ */ ((t) => (t.UserMicroStatus = "change_micro_status", t.UserMicroStatusSync = "sync_micro_status", t.UserPermission = "change_permission", t.UserStatus = "change_status", t.UserInfo = "change_info", t.RoomClose = "close", t))(G || {}), Z = /* @__PURE__ */ ((t) => (t.OPEN = "OPEN", t.CLOSE = "CLOSE", t))(Z || {});
478
- function Tr(t) {
509
+ var K = /* @__PURE__ */ ((r) => (r.SelfUserInfo = "SELF_USER_INFO", r.RoomInfo = "ROOM_INFO", r.RTCInfo = "RTC_INFO", r.UserList = "USER_LIST", r.BuiltinMsg = "BUILTIN_MSG", r.CustomEvent = "CUSTOM_EVENT", r.KeyframeSync = "KEYFRAME_SYNC", r.UserKickOut = "USER_KICK_OUT", r))(K || {}), q = /* @__PURE__ */ ((r) => (r.UserChange = "user_change", r.RoomChange = "room_change", r))(q || {}), H = /* @__PURE__ */ ((r) => (r.UserMicroStatus = "change_micro_status", r.UserMicroStatusSync = "sync_micro_status", r.UserPermission = "change_permission", r.UserStatus = "change_status", r.UserInfo = "change_info", r.RoomClose = "close", r))(H || {}), Z = /* @__PURE__ */ ((r) => (r.OPEN = "OPEN", r.CLOSE = "CLOSE", r))(Z || {});
510
+ function Nr(r) {
479
511
  try {
480
- const s = JSON.parse(t), e = {
512
+ const s = JSON.parse(r), e = {
481
513
  code: s.code,
482
514
  message: s.message,
483
515
  command: s.command,
@@ -487,17 +519,17 @@ function Tr(t) {
487
519
  frontRequestId: s.front_request_id,
488
520
  triggerUserID: s.trigger_user_id,
489
521
  data: s.data || {}
490
- }, n = Object.keys(e).filter(
491
- (i) => e[i] === void 0
522
+ }, i = Object.keys(e).filter(
523
+ (n) => e[n] === void 0
492
524
  );
493
- return n.length > 0 && console.warn(`推送数据格式异常:${n.join(" ")} 值不存在!`), e;
525
+ return i.length > 0 && console.warn(`推送数据格式异常:${i.join(" ")} 值不存在!`), e;
494
526
  } catch (s) {
495
527
  return !1;
496
528
  }
497
529
  }
498
- var x = /* @__PURE__ */ ((t) => (t[t.NOTINITIALIZED = -1] = "NOTINITIALIZED", t[t.CONNECTING = 0] = "CONNECTING", t[t.OPEN = 1] = "OPEN", t[t.CLOSED = 3] = "CLOSED", t))(x || {}), Xt = /* @__PURE__ */ ((t) => (t[t.Normal = 0] = "Normal", t[t.Removed = 1] = "Removed", t[t.Replaced = 2] = "Replaced", t))(Xt || {}), Zt = /* @__PURE__ */ ((t) => (t.WAIT_ENTER = "WAIT_ENTER", t.ONLINE = "ONLINE", t.LEAVE = "LEAVE", t.KICK_OUT = "KICK_OUT", t.BE_REPLACE = "BE_REPLACE", t.EXCEPTION = "EXCEPTION", t))(Zt || {}), Le = /* @__PURE__ */ ((t) => (t[t.NOTINITIALIZED = -1] = "NOTINITIALIZED", t[t.CONNECTING = 0] = "CONNECTING", t[t.OPEN = 1] = "OPEN", t[t.CLOSING = 2] = "CLOSING", t[t.CLOSED = 3] = "CLOSED", t))(Le || {}), Qt = /* @__PURE__ */ ((t) => (t.Error = "Error", t.Close = "Close", t.MicroAuth = "MicroAuth", t.DuplicateConnect = "DuplicateConnect", t.IllegalURL = "IllegalURL", t.Unknown = "Unknown", t.IllegalArgs = "IllegalArgs", t))(Qt || {}), er = /* @__PURE__ */ ((t) => (t.Err_1000 = "CLOSE_NORMAL", t.Err_1001 = "CLOSE_GOING_AWAY", t.Err_1002 = "CLOSE_PROTOCOL_ERROR", t.Err_1003 = "CLOSE_UNSUPPORTED", t.Err_1006 = "CLOSE_ABNORMAL", t.Err_1007 = "Unsupported Data", t.Err_1008 = "Policy Violation", t.Err_1009 = "CLOSE_TOO_LARGE", t.Err_unknown = "unknown", t))(er || {});
499
- function tr(t) {
500
- switch (t) {
530
+ var x = /* @__PURE__ */ ((r) => (r[r.NOTINITIALIZED = -1] = "NOTINITIALIZED", r[r.CONNECTING = 0] = "CONNECTING", r[r.OPEN = 1] = "OPEN", r[r.CLOSED = 3] = "CLOSED", r))(x || {}), er = /* @__PURE__ */ ((r) => (r[r.Normal = 0] = "Normal", r[r.Removed = 1] = "Removed", r[r.Replaced = 2] = "Replaced", r))(er || {}), tr = /* @__PURE__ */ ((r) => (r.WAIT_ENTER = "WAIT_ENTER", r.ONLINE = "ONLINE", r.LEAVE = "LEAVE", r.KICK_OUT = "KICK_OUT", r.BE_REPLACE = "BE_REPLACE", r.EXCEPTION = "EXCEPTION", r))(tr || {}), Le = /* @__PURE__ */ ((r) => (r[r.NOTINITIALIZED = -1] = "NOTINITIALIZED", r[r.CONNECTING = 0] = "CONNECTING", r[r.OPEN = 1] = "OPEN", r[r.CLOSING = 2] = "CLOSING", r[r.CLOSED = 3] = "CLOSED", r))(Le || {}), rr = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Close = "Close", r.MicroAuth = "MicroAuth", r.DuplicateConnect = "DuplicateConnect", r.IllegalURL = "IllegalURL", r.Unknown = "Unknown", r.IllegalArgs = "IllegalArgs", r))(rr || {}), ir = /* @__PURE__ */ ((r) => (r.Err_1000 = "CLOSE_NORMAL", r.Err_1001 = "CLOSE_GOING_AWAY", r.Err_1002 = "CLOSE_PROTOCOL_ERROR", r.Err_1003 = "CLOSE_UNSUPPORTED", r.Err_1006 = "CLOSE_ABNORMAL", r.Err_1007 = "Unsupported Data", r.Err_1008 = "Policy Violation", r.Err_1009 = "CLOSE_TOO_LARGE", r.Err_unknown = "unknown", r))(ir || {});
531
+ function nr(r) {
532
+ switch (r) {
501
533
  case 1e3:
502
534
  return "CLOSE_NORMAL";
503
535
  case 1001:
@@ -517,80 +549,80 @@ function tr(t) {
517
549
  }
518
550
  return "unknown";
519
551
  }
520
- function rr(t) {
521
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
552
+ function sr(r) {
553
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
522
554
  }
523
555
  var ft = {};
524
- (function(t) {
525
- Object.defineProperty(t, "__esModule", { value: !0 }), t.LogLevel = void 0;
556
+ (function(r) {
557
+ Object.defineProperty(r, "__esModule", { value: !0 }), r.LogLevel = void 0;
526
558
  var s;
527
559
  (function(e) {
528
560
  e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e[e.OFF = 4] = "OFF";
529
- })(s = t.LogLevel || (t.LogLevel = {})), t.default = s;
561
+ })(s = r.LogLevel || (r.LogLevel = {})), r.default = s;
530
562
  })(ft);
531
- const it = /* @__PURE__ */ rr(ft);
532
- function nr(t, s = {}) {
533
- const e = t.indexOf("?") !== -1, n = Object.keys(s).reduce(
534
- (i, a, u) => `${i}${u === 0 && !e ? "?" : "&"}${a}=${s[a]}`,
563
+ const st = /* @__PURE__ */ sr(ft);
564
+ function or(r, s = {}) {
565
+ const e = r.indexOf("?") !== -1, i = Object.keys(s).reduce(
566
+ (n, c, u) => `${n}${u === 0 && !e ? "?" : "&"}${c}=${s[c]}`,
535
567
  ""
536
568
  );
537
- return t + n;
569
+ return r + i;
538
570
  }
539
- const ce = globalThis.navigator.userAgent, ir = /android/gi.test(ce), sr = /iPhone|iPad\s+OS/gi.test(ce), or = /MicroMessenger/gi.test(ce) && /miniProgram/gi.test(ce), ar = /realsee/gi.test(ce);
540
- function ve(t) {
541
- return Object.prototype.toString.call(t) === "[object Object]";
571
+ const le = globalThis.navigator.userAgent, ar = /android/gi.test(le), cr = /iPhone|iPad\s+OS/gi.test(le), ur = /MicroMessenger/gi.test(le) && /miniProgram/gi.test(le), lr = /realsee/gi.test(le);
572
+ function ye(r) {
573
+ return Object.prototype.toString.call(r) === "[object Object]";
542
574
  }
543
- function Ee(t, s) {
544
- return t === s ? !0 : typeof t != typeof s ? !1 : !!(Number.isNaN(t) && Number.isNaN(s));
575
+ function Se(r, s) {
576
+ return r === s ? !0 : typeof r != typeof s ? !1 : !!(Number.isNaN(r) && Number.isNaN(s));
545
577
  }
546
- function cr(t, s) {
547
- const e = Object.getOwnPropertyNames(t), n = Object.getOwnPropertyNames(s);
548
- if (e.length !== n.length)
578
+ function fr(r, s) {
579
+ const e = Object.getOwnPropertyNames(r), i = Object.getOwnPropertyNames(s);
580
+ if (e.length !== i.length)
549
581
  return !1;
550
- for (let i = 0, a = e.length; i < a; i++) {
551
- const u = e[i];
552
- if (!Ee(t[u], s[u]))
582
+ for (let n = 0, c = e.length; n < c; n++) {
583
+ const u = e[n];
584
+ if (!Se(r[u], s[u]))
553
585
  return !1;
554
586
  }
555
587
  return !0;
556
588
  }
557
- function ur(t, s) {
558
- if (t.length !== s.length)
589
+ function dr(r, s) {
590
+ if (r.length !== s.length)
559
591
  return !1;
560
- for (let e = 0, n = t.length; e < n; e++)
561
- if (!Ee(t[e], s[e]))
592
+ for (let e = 0, i = r.length; e < i; e++)
593
+ if (!Se(r[e], s[e]))
562
594
  return !1;
563
595
  return !0;
564
596
  }
565
- function lr(t, s) {
566
- return Ee(t, s) ? !0 : ve(t) && ve(s) ? cr(t, s) : Array.isArray(t) && Array.isArray(s) ? ur(t, s) : !1;
597
+ function hr(r, s) {
598
+ return Se(r, s) ? !0 : ye(r) && ye(s) ? fr(r, s) : Array.isArray(r) && Array.isArray(s) ? dr(r, s) : !1;
567
599
  }
568
- function Ve(t, s) {
569
- return Ee(t, s) ? !0 : ve(t) && ve(s) ? dr(t, s) : Array.isArray(t) && Array.isArray(s) ? fr(t, s) : !1;
600
+ function De(r, s) {
601
+ return Se(r, s) ? !0 : ye(r) && ye(s) ? gr(r, s) : Array.isArray(r) && Array.isArray(s) ? _r(r, s) : !1;
570
602
  }
571
- function fr(t, s) {
572
- if (t.length !== s.length)
603
+ function _r(r, s) {
604
+ if (r.length !== s.length)
573
605
  return !1;
574
- for (let e = 0, n = t.length; e < n; e++)
575
- if (!Ve(t[e], s[e]))
606
+ for (let e = 0, i = r.length; e < i; e++)
607
+ if (!De(r[e], s[e]))
576
608
  return !1;
577
609
  return !0;
578
610
  }
579
- function dr(t, s) {
580
- const e = Object.getOwnPropertyNames(t), n = Object.getOwnPropertyNames(s);
581
- if (e.length !== n.length)
611
+ function gr(r, s) {
612
+ const e = Object.getOwnPropertyNames(r), i = Object.getOwnPropertyNames(s);
613
+ if (e.length !== i.length)
582
614
  return !1;
583
- for (let i = 0, a = e.length; i < a; i++) {
584
- const u = e[i];
585
- if (!Ve(t[u], s[u]))
615
+ for (let n = 0, c = e.length; n < c; n++) {
616
+ const u = e[n];
617
+ if (!De(r[u], s[u]))
586
618
  return !1;
587
619
  }
588
620
  return !0;
589
621
  }
590
- function st(t, s, e = { deep: !1 }) {
591
- return e.deep ? Ve(t, s) : lr(t, s);
622
+ function ot(r, s, e = { deep: !1 }) {
623
+ return e.deep ? De(r, s) : hr(r, s);
592
624
  }
593
- class hr extends ae {
625
+ class mr extends ue {
594
626
  constructor(e) {
595
627
  super();
596
628
  o(this, "_realWebSocket");
@@ -599,9 +631,9 @@ class hr extends ae {
599
631
  o(this, "_readyState", Le.NOTINITIALIZED);
600
632
  o(this, "_options", {
601
633
  timeout: 1e4,
602
- shouldReconnect: (e, n) => {
634
+ shouldReconnect: (e, i) => {
603
635
  if (!(e.code === 1008 || e.code === 1011))
604
- return [0, 3e3, 1e4][n.attempts];
636
+ return [0, 3e3, 1e4][i.attempts % 3];
605
637
  },
606
638
  should1000Reconnect: !1,
607
639
  ignoreConnectivityEvents: !1,
@@ -677,8 +709,8 @@ class hr extends ae {
677
709
  * @returns
678
710
  */
679
711
  o(this, "send", (e) => {
680
- var n, i, a;
681
- ((n = this._realWebSocket) == null ? void 0 : n.readyState) === ((i = this._realWebSocket) == null ? void 0 : i.OPEN) && ((a = this._realWebSocket) == null || a.send(e));
712
+ var i, n, c;
713
+ ((i = this._realWebSocket) == null ? void 0 : i.readyState) === ((n = this._realWebSocket) == null ? void 0 : n.OPEN) && ((c = this._realWebSocket) == null || c.send(e));
682
714
  });
683
715
  /**
684
716
  * 关闭连接
@@ -686,23 +718,23 @@ class hr extends ae {
686
718
  * @param reason 原因
687
719
  * @returns
688
720
  */
689
- o(this, "close", (e, n) => {
690
- var i;
691
- return typeof e != "number" && (n = e, e = 1e3), this._clearPendingReconnectIfNeeded(), this._reconnectWhenOnlineAgain = !1, this._explicitlyClosed = !0, this._detachConnectivityEvents(), (i = this._realWebSocket) == null ? void 0 : i.close(e, n);
721
+ o(this, "close", (e, i) => {
722
+ var n;
723
+ return typeof e != "number" && (i = e, e = 1e3), this._clearPendingReconnectIfNeeded(), this._reconnectWhenOnlineAgain = !1, this._explicitlyClosed = !0, this._detachConnectivityEvents(), (n = this._realWebSocket) == null ? void 0 : n.close(e, i);
692
724
  });
693
725
  /**
694
726
  * 进行ws连接
695
727
  */
696
728
  o(this, "open", (e) => {
697
- var n, i;
698
- e && (this._url = e), ((n = this._realWebSocket) == null ? void 0 : n.readyState) !== WebSocket.OPEN && ((i = this._realWebSocket) == null ? void 0 : i.readyState) !== WebSocket.CONNECTING && (this._clearPendingReconnectIfNeeded(), this._reconnectWhenOnlineAgain = !1, this._explicitlyClosed = !1, this._createWebSocket());
729
+ var i, n;
730
+ e && (this._url = e), ((i = this._realWebSocket) == null ? void 0 : i.readyState) !== WebSocket.OPEN && ((n = this._realWebSocket) == null ? void 0 : n.readyState) !== WebSocket.CONNECTING && (this._clearPendingReconnectIfNeeded(), this._reconnectWhenOnlineAgain = !1, this._explicitlyClosed = !1, this._createWebSocket());
699
731
  });
700
732
  /**
701
733
  * 创建ws连接
702
734
  */
703
735
  o(this, "_createWebSocket", () => {
704
- var i, a, u;
705
- const e = typeof this._url == "string" ? this._url : (i = this._url) == null ? void 0 : i.call(this, this);
736
+ var n, c, u;
737
+ const e = typeof this._url == "string" ? this._url : (n = this._url) == null ? void 0 : n.call(this, this);
706
738
  if (!e)
707
739
  return;
708
740
  this._pendingReconnect = void 0, this._removeWebSocketEvent(), this._realWebSocket = new WebSocket(e, this._protocols || void 0), this._attempts = this._attempts + 1, this.emit(
@@ -711,7 +743,7 @@ class hr extends ae {
711
743
  detail: { attempts: this._attempts, reconnects: this._reconnects }
712
744
  })
713
745
  );
714
- const n = () => {
746
+ const i = () => {
715
747
  this._connectTimeout = void 0, this._detachConnectivityEvents(), this.emit(
716
748
  "timeout",
717
749
  new CustomEvent("connecting", {
@@ -722,36 +754,21 @@ class hr extends ae {
722
754
  })
723
755
  );
724
756
  };
725
- this._connectTimeout = setTimeout(n, (a = this._options) == null ? void 0 : a.timeout), this._dispatchWebSocketEvent(), (u = this._options) != null && u.ignoreConnectivityEvents || this._attachConnectivityEvents();
757
+ this._connectTimeout = setTimeout(i, (c = this._options) == null ? void 0 : c.timeout), this._dispatchWebSocketEvent(), (u = this._options) != null && u.ignoreConnectivityEvents || this._attachConnectivityEvents();
726
758
  });
727
759
  /**
728
760
  * 断开ws事件
729
761
  */
730
762
  o(this, "_removeWebSocketEvent", () => {
731
- var e, n, i, a;
732
- (e = this._realWebSocket) == null || e.removeEventListener(
733
- "open",
734
- this._webSocketOpenHandler
735
- ), (n = this._realWebSocket) == null || n.removeEventListener(
736
- "close",
737
- this._webSocketCloseHandler
738
- ), (i = this._realWebSocket) == null || i.removeEventListener(
739
- "error",
740
- this._webSocketErrorHandler
741
- ), (a = this._realWebSocket) == null || a.removeEventListener(
742
- "message",
743
- this._webSocketMessageHandler
744
- );
763
+ var e, i, n, c;
764
+ (e = this._realWebSocket) == null || e.removeEventListener("open", this._webSocketOpenHandler), (i = this._realWebSocket) == null || i.removeEventListener("close", this._webSocketCloseHandler), (n = this._realWebSocket) == null || n.removeEventListener("error", this._webSocketErrorHandler), (c = this._realWebSocket) == null || c.removeEventListener("message", this._webSocketMessageHandler);
745
765
  });
746
766
  /**
747
767
  * 分发ws事件
748
768
  */
749
769
  o(this, "_dispatchWebSocketEvent", () => {
750
- var e, n, i, a;
751
- (e = this._realWebSocket) == null || e.addEventListener("open", this._webSocketOpenHandler), (n = this._realWebSocket) == null || n.addEventListener("close", this._webSocketCloseHandler), (i = this._realWebSocket) == null || i.addEventListener("error", this._webSocketErrorHandler), (a = this._realWebSocket) == null || a.addEventListener(
752
- "message",
753
- this._webSocketMessageHandler
754
- );
770
+ var e, i, n, c;
771
+ (e = this._realWebSocket) == null || e.addEventListener("open", this._webSocketOpenHandler), (i = this._realWebSocket) == null || i.addEventListener("close", this._webSocketCloseHandler), (n = this._realWebSocket) == null || n.addEventListener("error", this._webSocketErrorHandler), (c = this._realWebSocket) == null || c.addEventListener("message", this._webSocketMessageHandler);
755
772
  });
756
773
  /**
757
774
  * ws连接事件
@@ -759,11 +776,8 @@ class hr extends ae {
759
776
  */
760
777
  o(this, "_webSocketOpenHandler", (e) => {
761
778
  this._connectTimeout && (clearTimeout(this._connectTimeout), this._connectTimeout = void 0);
762
- const n = ++this._reconnects, i = this._attempts;
763
- return this._attempts = 0, this._reconnectWhenOnlineAgain = !1, this._startHealthCheck(), this.emit(
764
- "open",
765
- Object.assign(e, { detail: { reconnects: n, attempts: i } })
766
- );
779
+ const i = ++this._reconnects, n = this._attempts;
780
+ return this._attempts = 0, this._reconnectWhenOnlineAgain = !1, this._startHealthCheck(), this.emit("open", Object.assign(e, { detail: { reconnects: i, attempts: n } }));
767
781
  });
768
782
  /**
769
783
  * ws 关闭事件
@@ -776,10 +790,7 @@ class hr extends ae {
776
790
  * @param event
777
791
  * @returns
778
792
  */
779
- o(this, "_webSocketErrorHandler", (e) => this.emit(
780
- "error",
781
- new CustomEvent("error", { detail: { error: e } })
782
- ));
793
+ o(this, "_webSocketErrorHandler", (e) => this.emit("error", new CustomEvent("error", { detail: { error: e } })));
783
794
  /**
784
795
  * ws消息
785
796
  * @param event
@@ -795,16 +806,14 @@ class hr extends ae {
795
806
  if (!e)
796
807
  return;
797
808
  this._url = e.url, this._protocols = e.protocols;
798
- const n = Object.assign(this._options, e.robustOptions || {});
799
- if (typeof (n == null ? void 0 : n.timeout) != "number")
800
- throw new Error(
801
- "timeout must be the number of milliseconds to timeout a connection attempt"
802
- );
803
- if (typeof (n == null ? void 0 : n.shouldReconnect) != "function")
809
+ const i = Object.assign(this._options, e.robustOptions || {});
810
+ if (typeof (i == null ? void 0 : i.timeout) != "number")
811
+ throw new Error("timeout must be the number of milliseconds to timeout a connection attempt");
812
+ if (typeof (i == null ? void 0 : i.shouldReconnect) != "function")
804
813
  throw new Error(
805
814
  "shouldReconnect must be a function that returns the number of milliseconds to wait for a reconnect attempt, or null or undefined to not reconnect."
806
815
  );
807
- this._options = n, this._options.automaticOpen && this._createWebSocket();
816
+ this._options = i, this._options.automaticOpen && this._createWebSocket();
808
817
  }
809
818
  /**
810
819
  * 进行重连
@@ -812,26 +821,26 @@ class hr extends ae {
812
821
  * @returns
813
822
  */
814
823
  _reconnect(e) {
815
- var i, a, u, f;
816
- if (!((i = this._options) != null && i.should1000Reconnect) && e.code === 1e3 || this._explicitlyClosed) {
824
+ var n, c, u, d;
825
+ if (!((n = this._options) != null && n.should1000Reconnect) && e.code === 1e3 || this._explicitlyClosed) {
817
826
  this._attempts = 0;
818
827
  return;
819
828
  }
820
- if (((a = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : a.onLine) === !1) {
829
+ if (((c = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : c.onLine) === !1) {
821
830
  this._reconnectWhenOnlineAgain = !0;
822
831
  return;
823
832
  }
824
- const n = (f = (u = this._options) == null ? void 0 : u.shouldReconnect) == null ? void 0 : f.call(u, e, this);
825
- typeof n == "number" && (this._pendingReconnect = setTimeout(this._createWebSocket, n));
833
+ const i = (d = (u = this._options) == null ? void 0 : u.shouldReconnect) == null ? void 0 : d.call(u, e, this);
834
+ typeof i == "number" && (this._pendingReconnect = setTimeout(this._createWebSocket, i));
826
835
  }
827
836
  }
828
- class _r extends ae {
837
+ class vr extends ue {
829
838
  constructor() {
830
839
  super();
831
840
  /**
832
841
  * ws代理器
833
842
  */
834
- o(this, "_ws", new hr({
843
+ o(this, "_ws", new mr({
835
844
  url: "",
836
845
  robustOptions: { timeout: 18e4 }
837
846
  }));
@@ -856,8 +865,8 @@ class _r extends ae {
856
865
  * @param event
857
866
  */
858
867
  o(this, "_handleCloseEvent", (e) => {
859
- L.info(
860
- `live room closed bacause of ${e.code}-${e.reason || tr(e.code)}`
868
+ O.info(
869
+ `live room closed bacause of ${e.code}-${e.reason || nr(e.code)}`
861
870
  ), this.state = x.CLOSED;
862
871
  });
863
872
  /**
@@ -865,49 +874,49 @@ class _r extends ae {
865
874
  */
866
875
  o(this, "_handleClosingEvent", () => {
867
876
  var e;
868
- L.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state = x.CLOSED;
877
+ O.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state = x.CLOSED;
869
878
  });
870
879
  /**
871
880
  * 连接中
872
881
  * @param event
873
882
  */
874
883
  o(this, "_handleConnectingEvent", () => {
875
- L.info("live room is connecting"), this.state = x.CONNECTING;
884
+ O.info("live room is connecting"), this.state = x.CONNECTING;
876
885
  });
877
886
  /**
878
887
  * 连接发送异常
879
888
  * @param event
880
889
  */
881
890
  o(this, "_handleErrorEvent", (e) => {
882
- L.error("live room error", e), this.state = x.CLOSED;
891
+ O.error("live room error", e), this.state = x.CLOSED;
883
892
  });
884
893
  /**
885
894
  * 接收到消息
886
895
  * @param event
887
896
  */
888
897
  o(this, "_handleMessageEvent", (e) => {
889
- let n = (() => {
898
+ let i = (() => {
890
899
  try {
891
900
  return JSON.parse(e.data);
892
- } catch (i) {
901
+ } catch (n) {
893
902
  return e.data;
894
903
  }
895
904
  })();
896
- this.emit("message", n);
905
+ this.emit("message", i);
897
906
  });
898
907
  /**
899
908
  * 连接建立成功
900
909
  * @param event
901
910
  */
902
911
  o(this, "_handleOpenEvent", (e) => {
903
- L.info("live room open", e.detail), this.state = x.OPEN, e.detail.reconnects > 0 && this.emit("reconnected", e.detail);
912
+ O.info("live room open", e.detail), this.state = x.OPEN, e.detail.reconnects > 0 && this.emit("reconnected", e.detail);
904
913
  });
905
914
  /**
906
915
  * 处理超时
907
916
  * @param event
908
917
  */
909
918
  o(this, "_handleTimeoutEvent", (e) => {
910
- L.error("live room connect timeout!", e.detail), this.state = x.CLOSED;
919
+ O.error("live room connect timeout!", e.detail), this.state = x.CLOSED;
911
920
  });
912
921
  /**
913
922
  * 释放资源,释放之后需要重新实例化
@@ -925,14 +934,14 @@ class _r extends ae {
925
934
  * @param code
926
935
  * @param reason
927
936
  */
928
- o(this, "close", (e, n) => new Promise((i) => {
929
- this._ws.once("close", () => i(!0)), this._ws.close(e, n);
937
+ o(this, "close", (e, i) => new Promise((n) => {
938
+ this._ws.once("close", () => n(!0)), this._ws.close(e, i);
930
939
  }));
931
940
  this._addWebSocketEventListeners();
932
941
  }
933
942
  set state(e) {
934
- const n = JSON.parse(JSON.stringify(this._state));
935
- this._state = e, this.emit("stateChange", this.state, n);
943
+ const i = JSON.parse(JSON.stringify(this._state));
944
+ this._state = e, this.emit("stateChange", this.state, i);
936
945
  }
937
946
  get state() {
938
947
  return this._state;
@@ -949,20 +958,20 @@ class _r extends ae {
949
958
  throw new Error("live has not yet been initialized!");
950
959
  }
951
960
  }
952
- const gr = (t) => Promise.reject("unimplemented method GetVoiceSign"), Pe = (t, s = {}, e = []) => ({
953
- command: t,
954
- front_request_id: me(),
961
+ const pr = (r) => Promise.reject("unimplemented method GetVoiceSign"), je = (r, s = {}, e = []) => ({
962
+ command: r,
963
+ front_request_id: Ee(),
955
964
  data: {
956
965
  ...s,
957
966
  to_user_ids: Array.isArray(e) ? e : [e]
958
967
  }
959
- }), mr = () => {
960
- var t, s;
961
- window != null && window.__Realsee_Live__ && ((s = (t = window == null ? void 0 : window.__Realsee_Live__) == null ? void 0 : t.dispose) == null || s.call(t), window.__Realsee_Live__ = null);
968
+ }), Er = () => {
969
+ var r, s;
970
+ window != null && window.__Realsee_Live__ && ((s = (r = window == null ? void 0 : window.__Realsee_Live__) == null ? void 0 : r.dispose) == null || s.call(r), window.__Realsee_Live__ = null);
962
971
  };
963
- class vr extends ae {
972
+ class yr extends ue {
964
973
  constructor(e) {
965
- var n;
974
+ var i;
966
975
  super();
967
976
  /**
968
977
  * 带看的配置
@@ -971,7 +980,7 @@ class vr extends ae {
971
980
  /**
972
981
  * 帧数据监听
973
982
  */
974
- o(this, "keyframes", new ae());
983
+ o(this, "keyframes", new ue());
975
984
  /**
976
985
  * 内置的一些数据
977
986
  */
@@ -990,24 +999,24 @@ class vr extends ae {
990
999
  * @param frame 帧数据本体
991
1000
  * @returns
992
1001
  */
993
- o(this, "sendKeyframe", (e, n) => {
1002
+ o(this, "sendKeyframe", (e, i) => {
994
1003
  if (this.state !== x.OPEN)
995
1004
  return !1;
996
1005
  this._buildInData.keyframes = {
997
1006
  ...this._buildInData.keyframes,
998
- [e]: n
1007
+ [e]: i
999
1008
  };
1000
- const i = Pe(W.KeyframeSync, this.snapshot);
1009
+ const n = je(K.KeyframeSync, this.snapshot);
1001
1010
  try {
1002
- return this._controller.sendMessage(i), !0;
1003
- } catch (a) {
1004
- return L.error(a), !1;
1011
+ return this._controller.sendMessage(n), !0;
1012
+ } catch (c) {
1013
+ return O.error(c), !1;
1005
1014
  }
1006
1015
  });
1007
1016
  /**
1008
1017
  * 带看控制器
1009
1018
  */
1010
- o(this, "_controller", new _r());
1019
+ o(this, "_controller", new vr());
1011
1020
  /**
1012
1021
  * 添加带看控制的事件监听
1013
1022
  */
@@ -1025,101 +1034,101 @@ class vr extends ae {
1025
1034
  * @param state
1026
1035
  * @returns
1027
1036
  */
1028
- o(this, "_handleStateChange", (e, n) => this.emit("stateChange", e, n));
1037
+ o(this, "_handleStateChange", (e, i) => this.emit("stateChange", e, i));
1029
1038
  /**
1030
1039
  * 消息接收
1031
1040
  * @param liveMsg
1032
1041
  */
1033
1042
  o(this, "_handleMessage", async (e) => {
1034
- var n, i, a, u, f;
1043
+ var i, n, c, u, d;
1035
1044
  if (typeof e == "object") {
1036
- const { command: v, data: h = {}, frontRequestId: _, code: E, message: w } = e;
1037
- if (E === "SUCCESS")
1038
- switch (v) {
1039
- case W.SelfUserInfo: {
1040
- const m = h;
1041
- st(this.selfInfo, m, { deep: !0 }) || (this._buildInData.selfInfo = m, this.emit(
1045
+ const { command: g, data: v = {}, frontRequestId: E, code: y, message: I } = e;
1046
+ if (y === "SUCCESS")
1047
+ switch (g) {
1048
+ case K.SelfUserInfo: {
1049
+ const _ = v;
1050
+ ot(this.selfInfo, _, { deep: !0 }) || (this._buildInData.selfInfo = _, this.emit(
1042
1051
  "selfInfoUpdate",
1043
1052
  this._buildInData.selfInfo,
1044
- _
1053
+ E
1045
1054
  ));
1046
1055
  break;
1047
1056
  }
1048
- case W.RoomInfo: {
1049
- const m = h;
1050
- this._buildInData.roomInfo = Object.assign({}, m), this.emit(
1057
+ case K.RoomInfo: {
1058
+ const _ = v;
1059
+ this._buildInData.roomInfo = Object.assign({}, _), this.emit(
1051
1060
  "readyKeyframeSync",
1052
- m.last_frame || {}
1061
+ _.last_frame || {}
1053
1062
  );
1054
1063
  break;
1055
1064
  }
1056
- case W.RTCInfo: {
1057
- const { voice_id: m, type: A } = h;
1058
- if (this._buildInData.rtcInfo = { voiceId: m, type: A }, (n = this.$RTC) != null && n.joined)
1059
- L.warn("已加入语音房间,无需重复加入!");
1065
+ case K.RTCInfo: {
1066
+ const { voice_id: _, type: V } = v;
1067
+ if (this._buildInData.rtcInfo = { voiceId: _, type: V }, (i = this.$RTC) != null && i.joined)
1068
+ O.warn("已加入语音房间,无需重复加入!");
1060
1069
  else if (await ((u = this.$RTC) == null ? void 0 : u.join({
1061
- voiceId: m,
1062
- userId: ((i = this.selfInfo) == null ? void 0 : i.id) || "",
1063
- roomId: (a = this.roomInfo) == null ? void 0 : a.info.room_code,
1064
- type: A
1070
+ voiceId: _,
1071
+ userId: ((n = this.selfInfo) == null ? void 0 : n.id) || "",
1072
+ roomId: (c = this.roomInfo) == null ? void 0 : c.info.room_code,
1073
+ type: V
1065
1074
  }))) {
1066
- const k = (f = this._options.initialMicroStatus) != null ? f : Z.OPEN;
1075
+ const k = (d = this._options.initialMicroStatus) != null ? d : Z.OPEN;
1067
1076
  await this.toggleMicro(k === Z.OPEN);
1068
1077
  } else
1069
- L.error("加入语音房间失败");
1078
+ O.error("加入语音房间失败");
1070
1079
  break;
1071
1080
  }
1072
- case W.UserList: {
1073
- const m = h;
1074
- this._buildInData.userList = m, this.emit("userListUpdate", this.userList, _);
1081
+ case K.UserList: {
1082
+ const _ = v;
1083
+ this._buildInData.userList = _, this.emit("userListUpdate", this.userList, E);
1075
1084
  break;
1076
1085
  }
1077
- case W.CustomEvent: {
1078
- const m = h;
1079
- this.emit("broadcast", m, _);
1086
+ case K.CustomEvent: {
1087
+ const _ = v;
1088
+ this.emit("broadcast", _, E);
1080
1089
  break;
1081
1090
  }
1082
- case W.KeyframeSync: {
1083
- const m = h, A = Object.keys(
1084
- m
1091
+ case K.KeyframeSync: {
1092
+ const _ = v, V = Object.keys(
1093
+ _
1085
1094
  ).reduce(
1086
- (M, k) => {
1087
- if (st(
1088
- m[k],
1095
+ (C, k) => {
1096
+ if (ot(
1097
+ _[k],
1089
1098
  this._buildInData.keyframes[k],
1090
1099
  {
1091
1100
  deep: !0
1092
1101
  }
1093
1102
  ))
1094
- return M;
1095
- const H = [
1096
- m[k],
1103
+ return C;
1104
+ const U = [
1105
+ _[k],
1097
1106
  this._buildInData.keyframes[k],
1098
- _
1099
- ], J = k;
1107
+ E
1108
+ ], P = k;
1100
1109
  return this.keyframes.emit(
1101
- J,
1102
- ...H
1103
- ), this._buildInData.keyframes[k] = m[k], M[k] = m[k], M;
1110
+ P,
1111
+ ...U
1112
+ ), this._buildInData.keyframes[k] = _[k], C[k] = _[k], C;
1104
1113
  },
1105
1114
  {}
1106
1115
  );
1107
- this.emit("keyframes", A, _);
1116
+ this.emit("keyframes", V, E);
1108
1117
  break;
1109
1118
  }
1110
- case W.BuiltinMsg: {
1111
- const m = h;
1112
- this.emit("builtinEvent", m), m.event_type === q.UserChange && this.emit("userChange", m), m.event_type === q.RoomChange && this.emit("roomChange", m), m.event_type === q.UserChange && m.action === G.UserMicroStatus && await this.toggleMicro(
1113
- m.data.status === Z.OPEN
1114
- ), m.event_type === q.RoomChange && m.action === G.RoomClose && await this.exit();
1119
+ case K.BuiltinMsg: {
1120
+ const _ = v;
1121
+ this.emit("builtinEvent", _), _.event_type === q.UserChange && this.emit("userChange", _), _.event_type === q.RoomChange && this.emit("roomChange", _), _.event_type === q.UserChange && _.action === H.UserMicroStatus && await this.toggleMicro(
1122
+ _.data.status === Z.OPEN
1123
+ ), _.event_type === q.RoomChange && _.action === H.RoomClose && await this.exit();
1115
1124
  break;
1116
1125
  }
1117
- case W.UserKickOut: {
1126
+ case K.UserKickOut: {
1118
1127
  this.emit("kickOut");
1119
1128
  break;
1120
1129
  }
1121
1130
  default:
1122
- console.warn("unknown command: ", v);
1131
+ console.warn("unknown command: ", g);
1123
1132
  }
1124
1133
  else
1125
1134
  this.emit("error", e);
@@ -1137,28 +1146,28 @@ class vr extends ae {
1137
1146
  * @returns
1138
1147
  */
1139
1148
  o(this, "connect", async (e = {}) => {
1140
- var u, f, v, h;
1141
- if (this._options.url = (f = (u = e.url) != null ? u : this._options.url) != null ? f : "", this._options.getTicket = (v = e.getTicket) != null ? v : this._options.getTicket, this._options.initialMicroStatus = (h = e.rtcMicStatus) != null ? h : this._options.initialMicroStatus, !/^ws(s):\/\//.test(this._options.url) || typeof this._options.getTicket != "function")
1149
+ var u, d, g, v;
1150
+ if (this._options.url = (d = (u = e.url) != null ? u : this._options.url) != null ? d : "", this._options.getTicket = (g = e.getTicket) != null ? g : this._options.getTicket, this._options.initialMicroStatus = (v = e.rtcMicStatus) != null ? v : this._options.initialMicroStatus, !/^ws(s):\/\//.test(this._options.url) || typeof this._options.getTicket != "function")
1142
1151
  return /^ws(s):\/\//.test(this._options.url) ? typeof this._options.getTicket != "function" ? new Error("getTicket muse be function") : !1 : new Error("Illegal realsee live room link");
1143
- const { force: n = !1 } = e;
1152
+ const { force: i = !1 } = e;
1144
1153
  if (this._options.rtc && !await this._options.rtc.detectMicro())
1145
1154
  return new Error("Failed to obtain microphone authorization");
1146
- const i = this.state;
1147
- if (i === x.CONNECTING || i === x.OPEN)
1148
- if (n)
1155
+ const n = this.state;
1156
+ if (n === x.CONNECTING || n === x.OPEN)
1157
+ if (i)
1149
1158
  try {
1150
1159
  await this._controller.close("force close by connect");
1151
- } catch (_) {
1152
- console.warn(_);
1160
+ } catch (E) {
1161
+ console.warn(E);
1153
1162
  }
1154
1163
  else
1155
1164
  return new Error("已有Live实例正在连接中,请勿重复连接!");
1156
1165
  this._clearLiveData();
1157
- const a = nr(this._options.url, {
1166
+ const c = or(this._options.url, {
1158
1167
  ticket: await this._options.getTicket(),
1159
- force: Number(!!n)
1168
+ force: Number(!!i)
1160
1169
  });
1161
- return this._controller.open(a), !0;
1170
+ return this._controller.open(c), !0;
1162
1171
  });
1163
1172
  /**
1164
1173
  * 退出带看
@@ -1170,8 +1179,8 @@ class vr extends ae {
1170
1179
  return !0;
1171
1180
  try {
1172
1181
  await ((e = this.$RTC) == null ? void 0 : e.quit());
1173
- } catch (n) {
1174
- L.warn(n);
1182
+ } catch (i) {
1183
+ O.warn(i);
1175
1184
  }
1176
1185
  return await this._controller.close();
1177
1186
  });
@@ -1182,11 +1191,11 @@ class vr extends ae {
1182
1191
  * @returns
1183
1192
  */
1184
1193
  o(this, "close", async () => {
1185
- var e, n;
1186
- if ((n = (e = this.selfInfo) == null ? void 0 : e.permission) != null && n.close_live_room)
1194
+ var e, i;
1195
+ if ((i = (e = this.selfInfo) == null ? void 0 : e.permission) != null && i.close_live_room)
1187
1196
  return await this.updateStatus(
1188
1197
  q.RoomChange,
1189
- G.RoomClose,
1198
+ H.RoomClose,
1190
1199
  {}
1191
1200
  );
1192
1201
  });
@@ -1202,23 +1211,23 @@ class vr extends ae {
1202
1211
  */
1203
1212
  o(this, "setSelfInfo", async (e) => await this.updateStatus(
1204
1213
  q.UserChange,
1205
- G.UserInfo,
1214
+ H.UserInfo,
1206
1215
  e
1207
1216
  ));
1208
1217
  // 仅用于用户自己的麦克风控制
1209
1218
  o(this, "toggleMicro", async (e) => {
1210
- var i, a, u;
1211
- if (!((a = (i = this.selfInfo) == null ? void 0 : i.permission) != null && a.control_own_micro))
1219
+ var n, c, u;
1220
+ if (!((c = (n = this.selfInfo) == null ? void 0 : n.permission) != null && c.control_own_micro))
1212
1221
  return !1;
1213
- const n = await ((u = this.$RTC) == null ? void 0 : u.toggleMicro(e));
1214
- return n && await this.updateStatus(
1222
+ const i = await ((u = this.$RTC) == null ? void 0 : u.toggleMicro(e));
1223
+ return i && await this.updateStatus(
1215
1224
  q.UserChange,
1216
- G.UserMicroStatus,
1225
+ H.UserMicroStatus,
1217
1226
  {
1218
1227
  status: e ? Z.OPEN : Z.CLOSE
1219
1228
  },
1220
1229
  []
1221
- ), n;
1230
+ ), i;
1222
1231
  });
1223
1232
  /**
1224
1233
  * 控制别人的麦
@@ -1226,15 +1235,15 @@ class vr extends ae {
1226
1235
  * @param toUserIds
1227
1236
  * @returns
1228
1237
  */
1229
- o(this, "forbidMicro", async (e, n) => {
1230
- var i, a;
1231
- return typeof this._options.canForbidUserMicro == "function" && !this._options.canForbidUserMicro(n) || !((a = (i = this.selfInfo) == null ? void 0 : i.permission) != null && a.control_other_micro) ? !1 : await this.updateStatus(
1238
+ o(this, "forbidMicro", async (e, i) => {
1239
+ var n, c;
1240
+ return typeof this._options.canForbidUserMicro == "function" && !this._options.canForbidUserMicro(i) || !((c = (n = this.selfInfo) == null ? void 0 : n.permission) != null && c.control_other_micro) ? !1 : await this.updateStatus(
1232
1241
  q.UserChange,
1233
- G.UserMicroStatus,
1242
+ H.UserMicroStatus,
1234
1243
  {
1235
1244
  status: e
1236
1245
  },
1237
- n
1246
+ i
1238
1247
  );
1239
1248
  });
1240
1249
  /**
@@ -1243,13 +1252,13 @@ class vr extends ae {
1243
1252
  * @param toUserIds
1244
1253
  * @returns
1245
1254
  */
1246
- o(this, "forbidSync", async (e, n) => {
1247
- var i, a;
1248
- return typeof this._options.canForbidUserSync == "function" && !this._options.canForbidUserSync(n) || !((a = (i = this.selfInfo) == null ? void 0 : i.permission) != null && a.control_other_sync) ? !1 : await this.updateStatus(
1255
+ o(this, "forbidSync", async (e, i) => {
1256
+ var n, c;
1257
+ return typeof this._options.canForbidUserSync == "function" && !this._options.canForbidUserSync(i) || !((c = (n = this.selfInfo) == null ? void 0 : n.permission) != null && c.control_other_sync) ? !1 : await this.updateStatus(
1249
1258
  q.UserChange,
1250
- G.UserPermission,
1259
+ H.UserPermission,
1251
1260
  { sync_frame: e },
1252
- n
1261
+ i
1253
1262
  );
1254
1263
  });
1255
1264
  /**
@@ -1258,10 +1267,10 @@ class vr extends ae {
1258
1267
  * @returns
1259
1268
  */
1260
1269
  o(this, "kick", async (e) => {
1261
- var n, i;
1262
- return typeof this._options.canForbidUserKick == "function" && !this._options.canForbidUserKick(e) || !((i = (n = this.selfInfo) == null ? void 0 : n.permission) != null && i.change_other_status) ? !1 : await this.updateStatus(
1270
+ var i, n;
1271
+ return typeof this._options.canForbidUserKick == "function" && !this._options.canForbidUserKick(e) || !((n = (i = this.selfInfo) == null ? void 0 : i.permission) != null && n.change_other_status) ? !1 : await this.updateStatus(
1263
1272
  q.UserChange,
1264
- G.UserStatus,
1273
+ H.UserStatus,
1265
1274
  {
1266
1275
  status: "KICK_OUT"
1267
1276
  },
@@ -1275,12 +1284,12 @@ class vr extends ae {
1275
1284
  if (e.jsBridge)
1276
1285
  return e.jsBridge;
1277
1286
  if (e.useBuiltInJsBridge)
1278
- return new Vt();
1279
- })(), this._options.getVoiceSign = (n = e.getVoiceSign) != null ? n : gr, this._options.autoPlayConfirm = e.autoPlayConfirm, this._options.rtc = (() => {
1287
+ return new xt();
1288
+ })(), this._options.getVoiceSign = (i = e.getVoiceSign) != null ? i : pr, this._options.autoPlayConfirm = e.autoPlayConfirm, this._options.rtc = (() => {
1280
1289
  if (e.rtc)
1281
1290
  return e.rtc;
1282
1291
  if (e.rtcType)
1283
- switch (e.getVoiceSign || L.error(
1292
+ switch (e.getVoiceSign || O.error(
1284
1293
  "GetVoiceSign method must be passed when using built-in RTC instances"
1285
1294
  ), e.rtcType) {
1286
1295
  case Q.RealseeVRWebViewRTC: {
@@ -1289,47 +1298,47 @@ class vr extends ae {
1289
1298
  jsBridge: this._options.jsBridge,
1290
1299
  getVoiceSign: this._options.getVoiceSign
1291
1300
  });
1292
- L.error(
1301
+ O.error(
1293
1302
  "JsBridge instance must be passed when using built-in VRWebViewRTC instances"
1294
1303
  );
1295
1304
  return;
1296
1305
  }
1297
1306
  case Q.RealseeBrowserChimeRTC:
1298
- return new rt({
1307
+ return new it({
1299
1308
  getVoiceSign: this._options.getVoiceSign,
1300
- logLevel: e.__debug__ ? it.DEBUG : it.INFO
1309
+ logLevel: e.__debug__ ? st.DEBUG : st.INFO
1301
1310
  });
1302
1311
  case Q.RealseeBrowserRTC:
1303
- return this._options.autoPlayConfirm || L.error(
1312
+ return this._options.autoPlayConfirm || O.error(
1304
1313
  "autoPlayConfirm method must be passed when using built-in RealseeBrowserRTC instances"
1305
- ), new tt({
1314
+ ), new rt({
1306
1315
  getVoiceSign: this._options.getVoiceSign,
1307
1316
  autoPlayConfirm: this._options.autoPlayConfirm
1308
1317
  });
1309
1318
  default: {
1310
- L.error("unknown built-in RTC type");
1319
+ O.error("unknown built-in RTC type");
1311
1320
  return;
1312
1321
  }
1313
1322
  }
1314
1323
  if (e.useBuiltInRTC) {
1315
- if (e.getVoiceSign || L.error(
1324
+ if (e.getVoiceSign || O.error(
1316
1325
  "GetVoiceSign method must be passed when using built-in RTC instances"
1317
1326
  ), this._options.jsBridge)
1318
- return ar && (ir || sr) || or ? new nt({
1327
+ return lr && (ar || cr) || ur ? new nt({
1319
1328
  jsBridge: this._options.jsBridge,
1320
1329
  getVoiceSign: this._options.getVoiceSign
1321
- }) : e.builtInRTCType === ut.RealseeXChimeRTC ? new rt({
1330
+ }) : e.builtInRTCType === ut.RealseeXChimeRTC ? new it({
1322
1331
  getVoiceSign: this._options.getVoiceSign
1323
- }) : new tt({
1332
+ }) : new rt({
1324
1333
  getVoiceSign: this._options.getVoiceSign,
1325
1334
  autoPlayConfirm: this._options.autoPlayConfirm
1326
1335
  });
1327
- L.error(
1336
+ O.error(
1328
1337
  "jsBridge instance must be passed when using built-in RTC instances"
1329
1338
  );
1330
1339
  return;
1331
1340
  }
1332
- })(), this._options.rtc || L.warn("unused rtc"), this._options.url && this._options.getTicket && this.connect(), this._options.__debug__ && Object.assign(window, { $liveController: this._controller, $live: this });
1341
+ })(), this._options.rtc || O.warn("unused rtc"), this._options.url && this._options.getTicket && this.connect(), this._options.__debug__ && Object.assign(window, { $liveController: this._controller, $live: this });
1333
1342
  }
1334
1343
  get options() {
1335
1344
  return Object.freeze(this._options || {});
@@ -1398,17 +1407,17 @@ class vr extends ae {
1398
1407
  * @param toUserIds
1399
1408
  * @returns
1400
1409
  */
1401
- async updateStatus(e, n, i, a) {
1410
+ async updateStatus(e, i, n, c) {
1402
1411
  if (this.state !== x.OPEN)
1403
1412
  return !1;
1404
1413
  const u = Object.assign(
1405
- { event_type: e, action: n },
1406
- { data: i }
1407
- ), f = Pe(W.BuiltinMsg, u, a);
1414
+ { event_type: e, action: i },
1415
+ { data: n }
1416
+ ), d = je(K.BuiltinMsg, u, c);
1408
1417
  try {
1409
- return this._controller.sendMessage(f), !0;
1410
- } catch (v) {
1411
- return L.error(v), !1;
1418
+ return this._controller.sendMessage(d), !0;
1419
+ } catch (g) {
1420
+ return O.error(g), !1;
1412
1421
  }
1413
1422
  }
1414
1423
  /**
@@ -1418,88 +1427,37 @@ class vr extends ae {
1418
1427
  * @param timeout
1419
1428
  * @returns
1420
1429
  */
1421
- broadcast(e, n, i) {
1422
- return this.state !== x.OPEN ? !1 : new Promise((a, u) => {
1423
- const f = Pe(
1424
- W.CustomEvent,
1430
+ broadcast(e, i, n) {
1431
+ return this.state !== x.OPEN ? !1 : new Promise((c, u) => {
1432
+ const d = je(
1433
+ K.CustomEvent,
1425
1434
  e,
1426
- n
1427
- ), v = f.front_request_id, h = i ? setTimeout(() => {
1428
- u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", _);
1429
- }, i) : void 0, _ = (E, w) => {
1430
- w === v && (h && clearTimeout(h), this.off("broadcast", _), a(E));
1435
+ i
1436
+ ), g = d.front_request_id, v = n ? setTimeout(() => {
1437
+ u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", E);
1438
+ }, n) : void 0, E = (y, I) => {
1439
+ I === g && (v && clearTimeout(v), this.off("broadcast", E), c(y));
1431
1440
  };
1432
- this.on("broadcast", _);
1441
+ this.on("broadcast", E);
1433
1442
  try {
1434
- this._controller.sendMessage(f);
1435
- } catch (E) {
1436
- u(E);
1443
+ this._controller.sendMessage(d);
1444
+ } catch (y) {
1445
+ u(y);
1437
1446
  }
1438
1447
  });
1439
1448
  }
1440
1449
  }
1441
- const pr = (t) => (mr(), new vr(t));
1442
- var Ae = {}, Er = {
1450
+ const br = (r) => (Er(), new yr(r));
1451
+ var Ae = {}, Sr = {
1443
1452
  get exports() {
1444
1453
  return Ae;
1445
1454
  },
1446
- set exports(t) {
1447
- Ae = t;
1448
- }
1449
- }, ie = {};
1450
- /*
1451
- object-assign
1452
- (c) Sindre Sorhus
1453
- @license MIT
1454
- */
1455
- var je, ot;
1456
- function dt() {
1457
- if (ot)
1458
- return je;
1459
- ot = 1;
1460
- var t = Object.getOwnPropertySymbols, s = Object.prototype.hasOwnProperty, e = Object.prototype.propertyIsEnumerable;
1461
- function n(a) {
1462
- if (a == null)
1463
- throw new TypeError("Object.assign cannot be called with null or undefined");
1464
- return Object(a);
1465
- }
1466
- function i() {
1467
- try {
1468
- if (!Object.assign)
1469
- return !1;
1470
- var a = new String("abc");
1471
- if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
1472
- return !1;
1473
- for (var u = {}, f = 0; f < 10; f++)
1474
- u["_" + String.fromCharCode(f)] = f;
1475
- var v = Object.getOwnPropertyNames(u).map(function(_) {
1476
- return u[_];
1477
- });
1478
- if (v.join("") !== "0123456789")
1479
- return !1;
1480
- var h = {};
1481
- return "abcdefghijklmnopqrst".split("").forEach(function(_) {
1482
- h[_] = _;
1483
- }), Object.keys(Object.assign({}, h)).join("") === "abcdefghijklmnopqrst";
1484
- } catch (_) {
1485
- return !1;
1486
- }
1455
+ set exports(r) {
1456
+ Ae = r;
1487
1457
  }
1488
- return je = i() ? Object.assign : function(a, u) {
1489
- for (var f, v = n(a), h, _ = 1; _ < arguments.length; _++) {
1490
- f = Object(arguments[_]);
1491
- for (var E in f)
1492
- s.call(f, E) && (v[E] = f[E]);
1493
- if (t) {
1494
- h = t(f);
1495
- for (var w = 0; w < h.length; w++)
1496
- e.call(f, h[w]) && (v[h[w]] = f[h[w]]);
1497
- }
1498
- }
1499
- return v;
1500
- }, je;
1501
- }
1502
- /** @license React v17.0.2
1458
+ }, oe = {};
1459
+ /**
1460
+ * @license React
1503
1461
  * react-jsx-runtime.production.min.js
1504
1462
  *
1505
1463
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1508,30 +1466,26 @@ function dt() {
1508
1466
  * LICENSE file in the root directory of this source tree.
1509
1467
  */
1510
1468
  var at;
1511
- function br() {
1469
+ function Cr() {
1512
1470
  if (at)
1513
- return ie;
1514
- at = 1, dt();
1515
- var t = V, s = 60103;
1516
- if (ie.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
1517
- var e = Symbol.for;
1518
- s = e("react.element"), ie.Fragment = e("react.fragment");
1519
- }
1520
- var n = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = Object.prototype.hasOwnProperty, a = { key: !0, ref: !0, __self: !0, __source: !0 };
1521
- function u(f, v, h) {
1522
- var _, E = {}, w = null, m = null;
1523
- h !== void 0 && (w = "" + h), v.key !== void 0 && (w = "" + v.key), v.ref !== void 0 && (m = v.ref);
1524
- for (_ in v)
1525
- i.call(v, _) && !a.hasOwnProperty(_) && (E[_] = v[_]);
1526
- if (f && f.defaultProps)
1527
- for (_ in v = f.defaultProps, v)
1528
- E[_] === void 0 && (E[_] = v[_]);
1529
- return { $$typeof: s, type: f, key: w, ref: m, props: E, _owner: n.current };
1530
- }
1531
- return ie.jsx = u, ie.jsxs = u, ie;
1471
+ return oe;
1472
+ at = 1;
1473
+ var r = D, s = Symbol.for("react.element"), e = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, n = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
1474
+ function u(d, g, v) {
1475
+ var E, y = {}, I = null, _ = null;
1476
+ v !== void 0 && (I = "" + v), g.key !== void 0 && (I = "" + g.key), g.ref !== void 0 && (_ = g.ref);
1477
+ for (E in g)
1478
+ i.call(g, E) && !c.hasOwnProperty(E) && (y[E] = g[E]);
1479
+ if (d && d.defaultProps)
1480
+ for (E in g = d.defaultProps, g)
1481
+ y[E] === void 0 && (y[E] = g[E]);
1482
+ return { $$typeof: s, type: d, key: I, ref: _, props: y, _owner: n.current };
1483
+ }
1484
+ return oe.Fragment = e, oe.jsx = u, oe.jsxs = u, oe;
1532
1485
  }
1533
- var Ne = {};
1534
- /** @license React v17.0.2
1486
+ var ae = {};
1487
+ /**
1488
+ * @license React
1535
1489
  * react-jsx-runtime.development.js
1536
1490
  *
1537
1491
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1540,706 +1494,726 @@ var Ne = {};
1540
1494
  * LICENSE file in the root directory of this source tree.
1541
1495
  */
1542
1496
  var ct;
1543
- function yr() {
1544
- return ct || (ct = 1, function(t) {
1545
- process.env.NODE_ENV !== "production" && function() {
1546
- var s = V, e = dt(), n = 60103, i = 60106;
1547
- t.Fragment = 60107;
1548
- var a = 60108, u = 60114, f = 60109, v = 60110, h = 60112, _ = 60113, E = 60120, w = 60115, m = 60116, A = 60121, M = 60122, k = 60117, H = 60129, J = 60131;
1549
- if (typeof Symbol == "function" && Symbol.for) {
1550
- var I = Symbol.for;
1551
- n = I("react.element"), i = I("react.portal"), t.Fragment = I("react.fragment"), a = I("react.strict_mode"), u = I("react.profiler"), f = I("react.provider"), v = I("react.context"), h = I("react.forward_ref"), _ = I("react.suspense"), E = I("react.suspense_list"), w = I("react.memo"), m = I("react.lazy"), A = I("react.block"), M = I("react.server.block"), k = I("react.fundamental"), I("react.scope"), I("react.opaque.id"), H = I("react.debug_trace_mode"), I("react.offscreen"), J = I("react.legacy_hidden");
1552
- }
1553
- var d = typeof Symbol == "function" && Symbol.iterator, S = "@@iterator";
1554
- function N(r) {
1555
- if (r === null || typeof r != "object")
1556
- return null;
1557
- var c = d && r[d] || r[S];
1558
- return typeof c == "function" ? c : null;
1559
- }
1560
- var b = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1561
- function y(r) {
1562
- {
1563
- for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0), g = 1; g < c; g++)
1564
- l[g - 1] = arguments[g];
1565
- D("error", r, l);
1566
- }
1567
- }
1568
- function D(r, c, l) {
1569
- {
1570
- var g = b.ReactDebugCurrentFrame, O = g.getStackAddendum();
1571
- O !== "" && (c += "%s", l = l.concat([O]));
1572
- var R = l.map(function(C) {
1573
- return "" + C;
1574
- });
1575
- R.unshift("Warning: " + c), Function.prototype.apply.call(console[r], console, R);
1576
- }
1577
- }
1578
- var U = !1;
1579
- function z(r) {
1580
- return !!(typeof r == "string" || typeof r == "function" || r === t.Fragment || r === u || r === H || r === a || r === _ || r === E || r === J || U || typeof r == "object" && r !== null && (r.$$typeof === m || r.$$typeof === w || r.$$typeof === f || r.$$typeof === v || r.$$typeof === h || r.$$typeof === k || r.$$typeof === A || r[0] === M));
1497
+ function wr() {
1498
+ return ct || (ct = 1, process.env.NODE_ENV !== "production" && function() {
1499
+ var r = D, s = Symbol.for("react.element"), e = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), d = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), V = Symbol.iterator, C = "@@iterator";
1500
+ function k(t) {
1501
+ if (t === null || typeof t != "object")
1502
+ return null;
1503
+ var a = V && t[V] || t[C];
1504
+ return typeof a == "function" ? a : null;
1505
+ }
1506
+ var U = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1507
+ function P(t) {
1508
+ {
1509
+ for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), h = 1; h < a; h++)
1510
+ l[h - 1] = arguments[h];
1511
+ fe("error", t, l);
1581
1512
  }
1582
- function ue(r, c, l) {
1583
- var g = c.displayName || c.name || "";
1584
- return r.displayName || (g !== "" ? l + "(" + g + ")" : l);
1513
+ }
1514
+ function fe(t, a, l) {
1515
+ {
1516
+ var h = U.ReactDebugCurrentFrame, b = h.getStackAddendum();
1517
+ b !== "" && (a += "%s", l = l.concat([b]));
1518
+ var R = l.map(function(p) {
1519
+ return String(p);
1520
+ });
1521
+ R.unshift("Warning: " + a), Function.prototype.apply.call(console[t], console, R);
1585
1522
  }
1586
- function be(r) {
1587
- return r.displayName || "Context";
1523
+ }
1524
+ var f = !1, w = !1, A = !1, S = !1, N = !1, M;
1525
+ M = Symbol.for("react.module.reference");
1526
+ function F(t) {
1527
+ return !!(typeof t == "string" || typeof t == "function" || t === i || t === c || N || t === n || t === v || t === E || S || t === _ || f || w || A || typeof t == "object" && t !== null && (t.$$typeof === I || t.$$typeof === y || t.$$typeof === u || t.$$typeof === d || t.$$typeof === g || // This needs to include all possible module reference object
1528
+ // types supported by any Flight configuration anywhere since
1529
+ // we don't know which Flight build this will end up being used
1530
+ // with.
1531
+ t.$$typeof === M || t.getModuleId !== void 0));
1532
+ }
1533
+ function J(t, a, l) {
1534
+ var h = t.displayName;
1535
+ if (h)
1536
+ return h;
1537
+ var b = a.displayName || a.name || "";
1538
+ return b !== "" ? l + "(" + b + ")" : l;
1539
+ }
1540
+ function ne(t) {
1541
+ return t.displayName || "Context";
1542
+ }
1543
+ function G(t) {
1544
+ if (t == null)
1545
+ return null;
1546
+ if (typeof t.tag == "number" && P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
1547
+ return t.displayName || t.name || null;
1548
+ if (typeof t == "string")
1549
+ return t;
1550
+ switch (t) {
1551
+ case i:
1552
+ return "Fragment";
1553
+ case e:
1554
+ return "Portal";
1555
+ case c:
1556
+ return "Profiler";
1557
+ case n:
1558
+ return "StrictMode";
1559
+ case v:
1560
+ return "Suspense";
1561
+ case E:
1562
+ return "SuspenseList";
1588
1563
  }
1589
- function F(r) {
1590
- if (r == null)
1591
- return null;
1592
- if (typeof r.tag == "number" && y("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof r == "function")
1593
- return r.displayName || r.name || null;
1594
- if (typeof r == "string")
1595
- return r;
1596
- switch (r) {
1597
- case t.Fragment:
1598
- return "Fragment";
1599
- case i:
1600
- return "Portal";
1564
+ if (typeof t == "object")
1565
+ switch (t.$$typeof) {
1566
+ case d:
1567
+ var a = t;
1568
+ return ne(a) + ".Consumer";
1601
1569
  case u:
1602
- return "Profiler";
1603
- case a:
1604
- return "StrictMode";
1605
- case _:
1606
- return "Suspense";
1607
- case E:
1608
- return "SuspenseList";
1609
- }
1610
- if (typeof r == "object")
1611
- switch (r.$$typeof) {
1612
- case v:
1613
- var c = r;
1614
- return be(c) + ".Consumer";
1615
- case f:
1616
- var l = r;
1617
- return be(l._context) + ".Provider";
1618
- case h:
1619
- return ue(r, r.render, "ForwardRef");
1620
- case w:
1621
- return F(r.type);
1622
- case A:
1623
- return F(r._render);
1624
- case m: {
1625
- var g = r, O = g._payload, R = g._init;
1626
- try {
1627
- return F(R(O));
1628
- } catch (C) {
1629
- return null;
1630
- }
1570
+ var l = t;
1571
+ return ne(l._context) + ".Provider";
1572
+ case g:
1573
+ return J(t, t.render, "ForwardRef");
1574
+ case y:
1575
+ var h = t.displayName || null;
1576
+ return h !== null ? h : G(t.type) || "Memo";
1577
+ case I: {
1578
+ var b = t, R = b._payload, p = b._init;
1579
+ try {
1580
+ return G(p(R));
1581
+ } catch (m) {
1582
+ return null;
1631
1583
  }
1632
1584
  }
1633
- return null;
1634
- }
1635
- var ee = 0, T, B, te, le, Me, $e, xe;
1636
- function Ue() {
1637
- }
1638
- Ue.__reactDisabledLog = !0;
1639
- function ht() {
1640
- {
1641
- if (ee === 0) {
1642
- T = console.log, B = console.info, te = console.warn, le = console.error, Me = console.group, $e = console.groupCollapsed, xe = console.groupEnd;
1643
- var r = {
1644
- configurable: !0,
1645
- enumerable: !0,
1646
- value: Ue,
1647
- writable: !0
1648
- };
1649
- Object.defineProperties(console, {
1650
- info: r,
1651
- log: r,
1652
- warn: r,
1653
- error: r,
1654
- group: r,
1655
- groupCollapsed: r,
1656
- groupEnd: r
1657
- });
1658
- }
1659
- ee++;
1660
1585
  }
1661
- }
1662
- function _t() {
1663
- {
1664
- if (ee--, ee === 0) {
1665
- var r = {
1666
- configurable: !0,
1667
- enumerable: !0,
1668
- writable: !0
1669
- };
1670
- Object.defineProperties(console, {
1671
- log: e({}, r, {
1672
- value: T
1673
- }),
1674
- info: e({}, r, {
1675
- value: B
1676
- }),
1677
- warn: e({}, r, {
1678
- value: te
1679
- }),
1680
- error: e({}, r, {
1681
- value: le
1682
- }),
1683
- group: e({}, r, {
1684
- value: Me
1685
- }),
1686
- groupCollapsed: e({}, r, {
1687
- value: $e
1688
- }),
1689
- groupEnd: e({}, r, {
1690
- value: xe
1691
- })
1692
- });
1693
- }
1694
- ee < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1586
+ return null;
1587
+ }
1588
+ var z = Object.assign, ee = 0, T, B, te, de, Ve, $e, xe;
1589
+ function Ue() {
1590
+ }
1591
+ Ue.__reactDisabledLog = !0;
1592
+ function dt() {
1593
+ {
1594
+ if (ee === 0) {
1595
+ T = console.log, B = console.info, te = console.warn, de = console.error, Ve = console.group, $e = console.groupCollapsed, xe = console.groupEnd;
1596
+ var t = {
1597
+ configurable: !0,
1598
+ enumerable: !0,
1599
+ value: Ue,
1600
+ writable: !0
1601
+ };
1602
+ Object.defineProperties(console, {
1603
+ info: t,
1604
+ log: t,
1605
+ warn: t,
1606
+ error: t,
1607
+ group: t,
1608
+ groupCollapsed: t,
1609
+ groupEnd: t
1610
+ });
1695
1611
  }
1612
+ ee++;
1696
1613
  }
1697
- var ye = b.ReactCurrentDispatcher, Ce;
1698
- function fe(r, c, l) {
1699
- {
1700
- if (Ce === void 0)
1701
- try {
1702
- throw Error();
1703
- } catch (O) {
1704
- var g = O.stack.trim().match(/\n( *(at )?)/);
1705
- Ce = g && g[1] || "";
1706
- }
1707
- return `
1708
- ` + Ce + r;
1614
+ }
1615
+ function ht() {
1616
+ {
1617
+ if (ee--, ee === 0) {
1618
+ var t = {
1619
+ configurable: !0,
1620
+ enumerable: !0,
1621
+ writable: !0
1622
+ };
1623
+ Object.defineProperties(console, {
1624
+ log: z({}, t, {
1625
+ value: T
1626
+ }),
1627
+ info: z({}, t, {
1628
+ value: B
1629
+ }),
1630
+ warn: z({}, t, {
1631
+ value: te
1632
+ }),
1633
+ error: z({}, t, {
1634
+ value: de
1635
+ }),
1636
+ group: z({}, t, {
1637
+ value: Ve
1638
+ }),
1639
+ groupCollapsed: z({}, t, {
1640
+ value: $e
1641
+ }),
1642
+ groupEnd: z({}, t, {
1643
+ value: xe
1644
+ })
1645
+ });
1709
1646
  }
1647
+ ee < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1710
1648
  }
1711
- var we = !1, de;
1649
+ }
1650
+ var Ce = U.ReactCurrentDispatcher, we;
1651
+ function he(t, a, l) {
1712
1652
  {
1713
- var gt = typeof WeakMap == "function" ? WeakMap : Map;
1714
- de = new gt();
1653
+ if (we === void 0)
1654
+ try {
1655
+ throw Error();
1656
+ } catch (b) {
1657
+ var h = b.stack.trim().match(/\n( *(at )?)/);
1658
+ we = h && h[1] || "";
1659
+ }
1660
+ return `
1661
+ ` + we + t;
1715
1662
  }
1716
- function Be(r, c) {
1717
- if (!r || we)
1718
- return "";
1719
- {
1720
- var l = de.get(r);
1721
- if (l !== void 0)
1722
- return l;
1723
- }
1724
- var g;
1725
- we = !0;
1726
- var O = Error.prepareStackTrace;
1727
- Error.prepareStackTrace = void 0;
1728
- var R;
1729
- R = ye.current, ye.current = null, ht();
1730
- try {
1731
- if (c) {
1732
- var C = function() {
1663
+ }
1664
+ var Re = !1, _e;
1665
+ {
1666
+ var _t = typeof WeakMap == "function" ? WeakMap : Map;
1667
+ _e = new _t();
1668
+ }
1669
+ function Fe(t, a) {
1670
+ if (!t || Re)
1671
+ return "";
1672
+ {
1673
+ var l = _e.get(t);
1674
+ if (l !== void 0)
1675
+ return l;
1676
+ }
1677
+ var h;
1678
+ Re = !0;
1679
+ var b = Error.prepareStackTrace;
1680
+ Error.prepareStackTrace = void 0;
1681
+ var R;
1682
+ R = Ce.current, Ce.current = null, dt();
1683
+ try {
1684
+ if (a) {
1685
+ var p = function() {
1686
+ throw Error();
1687
+ };
1688
+ if (Object.defineProperty(p.prototype, "props", {
1689
+ set: function() {
1733
1690
  throw Error();
1734
- };
1735
- if (Object.defineProperty(C.prototype, "props", {
1736
- set: function() {
1737
- throw Error();
1738
- }
1739
- }), typeof Reflect == "object" && Reflect.construct) {
1740
- try {
1741
- Reflect.construct(C, []);
1742
- } catch (Y) {
1743
- g = Y;
1744
- }
1745
- Reflect.construct(r, [], C);
1746
- } else {
1747
- try {
1748
- C.call();
1749
- } catch (Y) {
1750
- g = Y;
1751
- }
1752
- r.call(C.prototype);
1753
1691
  }
1692
+ }), typeof Reflect == "object" && Reflect.construct) {
1693
+ try {
1694
+ Reflect.construct(p, []);
1695
+ } catch (Y) {
1696
+ h = Y;
1697
+ }
1698
+ Reflect.construct(t, [], p);
1754
1699
  } else {
1755
1700
  try {
1756
- throw Error();
1701
+ p.call();
1757
1702
  } catch (Y) {
1758
- g = Y;
1703
+ h = Y;
1759
1704
  }
1760
- r();
1705
+ t.call(p.prototype);
1761
1706
  }
1762
- } catch (Y) {
1763
- if (Y && g && typeof Y.stack == "string") {
1764
- for (var p = Y.stack.split(`
1765
- `), $ = g.stack.split(`
1766
- `), P = p.length - 1, j = $.length - 1; P >= 1 && j >= 0 && p[P] !== $[j]; )
1767
- j--;
1768
- for (; P >= 1 && j >= 0; P--, j--)
1769
- if (p[P] !== $[j]) {
1770
- if (P !== 1 || j !== 1)
1771
- do
1772
- if (P--, j--, j < 0 || p[P] !== $[j]) {
1773
- var K = `
1774
- ` + p[P].replace(" at new ", " at ");
1775
- return typeof r == "function" && de.set(r, K), K;
1776
- }
1777
- while (P >= 1 && j >= 0);
1778
- break;
1779
- }
1707
+ } else {
1708
+ try {
1709
+ throw Error();
1710
+ } catch (Y) {
1711
+ h = Y;
1780
1712
  }
1781
- } finally {
1782
- we = !1, ye.current = R, _t(), Error.prepareStackTrace = O;
1713
+ t();
1783
1714
  }
1784
- var ne = r ? r.displayName || r.name : "", Qe = ne ? fe(ne) : "";
1785
- return typeof r == "function" && de.set(r, Qe), Qe;
1786
- }
1787
- function We(r, c, l) {
1788
- return Be(r, !1);
1715
+ } catch (Y) {
1716
+ if (Y && h && typeof Y.stack == "string") {
1717
+ for (var m = Y.stack.split(`
1718
+ `), $ = h.stack.split(`
1719
+ `), j = m.length - 1, L = $.length - 1; j >= 1 && L >= 0 && m[j] !== $[L]; )
1720
+ L--;
1721
+ for (; j >= 1 && L >= 0; j--, L--)
1722
+ if (m[j] !== $[L]) {
1723
+ if (j !== 1 || L !== 1)
1724
+ do
1725
+ if (j--, L--, L < 0 || m[j] !== $[L]) {
1726
+ var W = `
1727
+ ` + m[j].replace(" at new ", " at ");
1728
+ return t.displayName && W.includes("<anonymous>") && (W = W.replace("<anonymous>", t.displayName)), typeof t == "function" && _e.set(t, W), W;
1729
+ }
1730
+ while (j >= 1 && L >= 0);
1731
+ break;
1732
+ }
1733
+ }
1734
+ } finally {
1735
+ Re = !1, Ce.current = R, ht(), Error.prepareStackTrace = b;
1789
1736
  }
1790
- function mt(r) {
1791
- var c = r.prototype;
1792
- return !!(c && c.isReactComponent);
1737
+ var ie = t ? t.displayName || t.name : "", et = ie ? he(ie) : "";
1738
+ return typeof t == "function" && _e.set(t, et), et;
1739
+ }
1740
+ function gt(t, a, l) {
1741
+ return Fe(t, !1);
1742
+ }
1743
+ function mt(t) {
1744
+ var a = t.prototype;
1745
+ return !!(a && a.isReactComponent);
1746
+ }
1747
+ function ge(t, a, l) {
1748
+ if (t == null)
1749
+ return "";
1750
+ if (typeof t == "function")
1751
+ return Fe(t, mt(t));
1752
+ if (typeof t == "string")
1753
+ return he(t);
1754
+ switch (t) {
1755
+ case v:
1756
+ return he("Suspense");
1757
+ case E:
1758
+ return he("SuspenseList");
1793
1759
  }
1794
- function he(r, c, l) {
1795
- if (r == null)
1796
- return "";
1797
- if (typeof r == "function")
1798
- return Be(r, mt(r));
1799
- if (typeof r == "string")
1800
- return fe(r);
1801
- switch (r) {
1802
- case _:
1803
- return fe("Suspense");
1804
- case E:
1805
- return fe("SuspenseList");
1760
+ if (typeof t == "object")
1761
+ switch (t.$$typeof) {
1762
+ case g:
1763
+ return gt(t.render);
1764
+ case y:
1765
+ return ge(t.type, a, l);
1766
+ case I: {
1767
+ var h = t, b = h._payload, R = h._init;
1768
+ try {
1769
+ return ge(R(b), a, l);
1770
+ } catch (p) {
1771
+ }
1772
+ }
1806
1773
  }
1807
- if (typeof r == "object")
1808
- switch (r.$$typeof) {
1809
- case h:
1810
- return We(r.render);
1811
- case w:
1812
- return he(r.type, c, l);
1813
- case A:
1814
- return We(r._render);
1815
- case m: {
1816
- var g = r, O = g._payload, R = g._init;
1817
- try {
1818
- return he(R(O), c, l);
1819
- } catch (C) {
1774
+ return "";
1775
+ }
1776
+ var me = Object.prototype.hasOwnProperty, Be = {}, We = U.ReactDebugCurrentFrame;
1777
+ function ve(t) {
1778
+ if (t) {
1779
+ var a = t._owner, l = ge(t.type, t._source, a ? a.type : null);
1780
+ We.setExtraStackFrame(l);
1781
+ } else
1782
+ We.setExtraStackFrame(null);
1783
+ }
1784
+ function vt(t, a, l, h, b) {
1785
+ {
1786
+ var R = Function.call.bind(me);
1787
+ for (var p in t)
1788
+ if (R(t, p)) {
1789
+ var m = void 0;
1790
+ try {
1791
+ if (typeof t[p] != "function") {
1792
+ var $ = Error((h || "React class") + ": " + l + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1793
+ throw $.name = "Invariant Violation", $;
1820
1794
  }
1795
+ m = t[p](a, p, h, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1796
+ } catch (j) {
1797
+ m = j;
1821
1798
  }
1799
+ m && !(m instanceof Error) && (ve(b), P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", l, p, typeof m), ve(null)), m instanceof Error && !(m.message in Be) && (Be[m.message] = !0, ve(b), P("Failed %s type: %s", l, m.message), ve(null));
1822
1800
  }
1823
- return "";
1824
- }
1825
- var Fe = {}, qe = b.ReactDebugCurrentFrame;
1826
- function _e(r) {
1827
- if (r) {
1828
- var c = r._owner, l = he(r.type, r._source, c ? c.type : null);
1829
- qe.setExtraStackFrame(l);
1830
- } else
1831
- qe.setExtraStackFrame(null);
1832
1801
  }
1833
- function vt(r, c, l, g, O) {
1834
- {
1835
- var R = Function.call.bind(Object.prototype.hasOwnProperty);
1836
- for (var C in r)
1837
- if (R(r, C)) {
1838
- var p = void 0;
1839
- try {
1840
- if (typeof r[C] != "function") {
1841
- var $ = Error((g || "React class") + ": " + l + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1842
- throw $.name = "Invariant Violation", $;
1843
- }
1844
- p = r[C](c, C, g, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1845
- } catch (P) {
1846
- p = P;
1847
- }
1848
- p && !(p instanceof Error) && (_e(O), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", l, C, typeof p), _e(null)), p instanceof Error && !(p.message in Fe) && (Fe[p.message] = !0, _e(O), y("Failed %s type: %s", l, p.message), _e(null));
1849
- }
1850
- }
1802
+ }
1803
+ var pt = Array.isArray;
1804
+ function Oe(t) {
1805
+ return pt(t);
1806
+ }
1807
+ function Et(t) {
1808
+ {
1809
+ var a = typeof Symbol == "function" && Symbol.toStringTag, l = a && t[Symbol.toStringTag] || t.constructor.name || "Object";
1810
+ return l;
1851
1811
  }
1852
- var se = b.ReactCurrentOwner, Se = Object.prototype.hasOwnProperty, pt = {
1853
- key: !0,
1854
- ref: !0,
1855
- __self: !0,
1856
- __source: !0
1857
- }, Ke, Ye, Oe;
1858
- Oe = {};
1859
- function Et(r) {
1860
- if (Se.call(r, "ref")) {
1861
- var c = Object.getOwnPropertyDescriptor(r, "ref").get;
1862
- if (c && c.isReactWarning)
1863
- return !1;
1864
- }
1865
- return r.ref !== void 0;
1812
+ }
1813
+ function yt(t) {
1814
+ try {
1815
+ return Ke(t), !1;
1816
+ } catch (a) {
1817
+ return !0;
1866
1818
  }
1867
- function bt(r) {
1868
- if (Se.call(r, "key")) {
1869
- var c = Object.getOwnPropertyDescriptor(r, "key").get;
1870
- if (c && c.isReactWarning)
1871
- return !1;
1872
- }
1873
- return r.key !== void 0;
1819
+ }
1820
+ function Ke(t) {
1821
+ return "" + t;
1822
+ }
1823
+ function qe(t) {
1824
+ if (yt(t))
1825
+ return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Et(t)), Ke(t);
1826
+ }
1827
+ var se = U.ReactCurrentOwner, bt = {
1828
+ key: !0,
1829
+ ref: !0,
1830
+ __self: !0,
1831
+ __source: !0
1832
+ }, Ge, Ye, Ie;
1833
+ Ie = {};
1834
+ function St(t) {
1835
+ if (me.call(t, "ref")) {
1836
+ var a = Object.getOwnPropertyDescriptor(t, "ref").get;
1837
+ if (a && a.isReactWarning)
1838
+ return !1;
1874
1839
  }
1875
- function yt(r, c) {
1876
- if (typeof r.ref == "string" && se.current && c && se.current.stateNode !== c) {
1877
- var l = F(se.current.type);
1878
- Oe[l] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', F(se.current.type), r.ref), Oe[l] = !0);
1879
- }
1840
+ return t.ref !== void 0;
1841
+ }
1842
+ function Ct(t) {
1843
+ if (me.call(t, "key")) {
1844
+ var a = Object.getOwnPropertyDescriptor(t, "key").get;
1845
+ if (a && a.isReactWarning)
1846
+ return !1;
1880
1847
  }
1881
- function Ct(r, c) {
1882
- {
1883
- var l = function() {
1884
- Ke || (Ke = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
1885
- };
1886
- l.isReactWarning = !0, Object.defineProperty(r, "key", {
1887
- get: l,
1888
- configurable: !0
1889
- });
1890
- }
1848
+ return t.key !== void 0;
1849
+ }
1850
+ function wt(t, a) {
1851
+ if (typeof t.ref == "string" && se.current && a && se.current.stateNode !== a) {
1852
+ var l = G(se.current.type);
1853
+ Ie[l] || (P('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', G(se.current.type), t.ref), Ie[l] = !0);
1891
1854
  }
1892
- function wt(r, c) {
1893
- {
1894
- var l = function() {
1895
- Ye || (Ye = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
1896
- };
1897
- l.isReactWarning = !0, Object.defineProperty(r, "ref", {
1898
- get: l,
1899
- configurable: !0
1900
- });
1901
- }
1855
+ }
1856
+ function Rt(t, a) {
1857
+ {
1858
+ var l = function() {
1859
+ Ge || (Ge = !0, P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
1860
+ };
1861
+ l.isReactWarning = !0, Object.defineProperty(t, "key", {
1862
+ get: l,
1863
+ configurable: !0
1864
+ });
1902
1865
  }
1903
- var St = function(r, c, l, g, O, R, C) {
1904
- var p = {
1905
- // This tag allows us to uniquely identify this as a React Element
1906
- $$typeof: n,
1907
- // Built-in properties that belong on the element
1908
- type: r,
1909
- key: c,
1910
- ref: l,
1911
- props: C,
1912
- // Record the component responsible for creating this element.
1913
- _owner: R
1866
+ }
1867
+ function Ot(t, a) {
1868
+ {
1869
+ var l = function() {
1870
+ Ye || (Ye = !0, P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
1914
1871
  };
1915
- return p._store = {}, Object.defineProperty(p._store, "validated", {
1916
- configurable: !1,
1917
- enumerable: !1,
1918
- writable: !0,
1919
- value: !1
1920
- }), Object.defineProperty(p, "_self", {
1921
- configurable: !1,
1922
- enumerable: !1,
1923
- writable: !1,
1924
- value: g
1925
- }), Object.defineProperty(p, "_source", {
1926
- configurable: !1,
1927
- enumerable: !1,
1928
- writable: !1,
1929
- value: O
1930
- }), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
1872
+ l.isReactWarning = !0, Object.defineProperty(t, "ref", {
1873
+ get: l,
1874
+ configurable: !0
1875
+ });
1876
+ }
1877
+ }
1878
+ var It = function(t, a, l, h, b, R, p) {
1879
+ var m = {
1880
+ // This tag allows us to uniquely identify this as a React Element
1881
+ $$typeof: s,
1882
+ // Built-in properties that belong on the element
1883
+ type: t,
1884
+ key: a,
1885
+ ref: l,
1886
+ props: p,
1887
+ // Record the component responsible for creating this element.
1888
+ _owner: R
1931
1889
  };
1932
- function Ot(r, c, l, g, O) {
1933
- {
1934
- var R, C = {}, p = null, $ = null;
1935
- l !== void 0 && (p = "" + l), bt(c) && (p = "" + c.key), Et(c) && ($ = c.ref, yt(c, O));
1936
- for (R in c)
1937
- Se.call(c, R) && !pt.hasOwnProperty(R) && (C[R] = c[R]);
1938
- if (r && r.defaultProps) {
1939
- var P = r.defaultProps;
1940
- for (R in P)
1941
- C[R] === void 0 && (C[R] = P[R]);
1942
- }
1943
- if (p || $) {
1944
- var j = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1945
- p && Ct(C, j), $ && wt(C, j);
1946
- }
1947
- return St(r, p, $, O, g, se.current, C);
1890
+ return m._store = {}, Object.defineProperty(m._store, "validated", {
1891
+ configurable: !1,
1892
+ enumerable: !1,
1893
+ writable: !0,
1894
+ value: !1
1895
+ }), Object.defineProperty(m, "_self", {
1896
+ configurable: !1,
1897
+ enumerable: !1,
1898
+ writable: !1,
1899
+ value: h
1900
+ }), Object.defineProperty(m, "_source", {
1901
+ configurable: !1,
1902
+ enumerable: !1,
1903
+ writable: !1,
1904
+ value: b
1905
+ }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
1906
+ };
1907
+ function Tt(t, a, l, h, b) {
1908
+ {
1909
+ var R, p = {}, m = null, $ = null;
1910
+ l !== void 0 && (qe(l), m = "" + l), Ct(a) && (qe(a.key), m = "" + a.key), St(a) && ($ = a.ref, wt(a, b));
1911
+ for (R in a)
1912
+ me.call(a, R) && !bt.hasOwnProperty(R) && (p[R] = a[R]);
1913
+ if (t && t.defaultProps) {
1914
+ var j = t.defaultProps;
1915
+ for (R in j)
1916
+ p[R] === void 0 && (p[R] = j[R]);
1948
1917
  }
1918
+ if (m || $) {
1919
+ var L = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
1920
+ m && Rt(p, L), $ && Ot(p, L);
1921
+ }
1922
+ return It(t, m, $, b, h, se.current, p);
1949
1923
  }
1950
- var Re = b.ReactCurrentOwner, Ge = b.ReactDebugCurrentFrame;
1951
- function re(r) {
1952
- if (r) {
1953
- var c = r._owner, l = he(r.type, r._source, c ? c.type : null);
1954
- Ge.setExtraStackFrame(l);
1955
- } else
1956
- Ge.setExtraStackFrame(null);
1957
- }
1958
- var Ie;
1959
- Ie = !1;
1960
- function Te(r) {
1961
- return typeof r == "object" && r !== null && r.$$typeof === n;
1962
- }
1963
- function He() {
1964
- {
1965
- if (Re.current) {
1966
- var r = F(Re.current.type);
1967
- if (r)
1968
- return `
1924
+ }
1925
+ var Te = U.ReactCurrentOwner, He = U.ReactDebugCurrentFrame;
1926
+ function re(t) {
1927
+ if (t) {
1928
+ var a = t._owner, l = ge(t.type, t._source, a ? a.type : null);
1929
+ He.setExtraStackFrame(l);
1930
+ } else
1931
+ He.setExtraStackFrame(null);
1932
+ }
1933
+ var ke;
1934
+ ke = !1;
1935
+ function Pe(t) {
1936
+ return typeof t == "object" && t !== null && t.$$typeof === s;
1937
+ }
1938
+ function Je() {
1939
+ {
1940
+ if (Te.current) {
1941
+ var t = G(Te.current.type);
1942
+ if (t)
1943
+ return `
1969
1944
 
1970
- Check the render method of \`` + r + "`.";
1971
- }
1972
- return "";
1945
+ Check the render method of \`` + t + "`.";
1973
1946
  }
1947
+ return "";
1974
1948
  }
1975
- function Rt(r) {
1976
- {
1977
- if (r !== void 0) {
1978
- var c = r.fileName.replace(/^.*[\\\/]/, ""), l = r.lineNumber;
1979
- return `
1949
+ }
1950
+ function kt(t) {
1951
+ {
1952
+ if (t !== void 0) {
1953
+ var a = t.fileName.replace(/^.*[\\\/]/, ""), l = t.lineNumber;
1954
+ return `
1980
1955
 
1981
- Check your code at ` + c + ":" + l + ".";
1982
- }
1983
- return "";
1956
+ Check your code at ` + a + ":" + l + ".";
1984
1957
  }
1958
+ return "";
1985
1959
  }
1986
- var Je = {};
1987
- function It(r) {
1988
- {
1989
- var c = He();
1990
- if (!c) {
1991
- var l = typeof r == "string" ? r : r.displayName || r.name;
1992
- l && (c = `
1960
+ }
1961
+ var ze = {};
1962
+ function Pt(t) {
1963
+ {
1964
+ var a = Je();
1965
+ if (!a) {
1966
+ var l = typeof t == "string" ? t : t.displayName || t.name;
1967
+ l && (a = `
1993
1968
 
1994
1969
  Check the top-level render call using <` + l + ">.");
1995
- }
1996
- return c;
1997
1970
  }
1971
+ return a;
1998
1972
  }
1999
- function ze(r, c) {
2000
- {
2001
- if (!r._store || r._store.validated || r.key != null)
2002
- return;
2003
- r._store.validated = !0;
2004
- var l = It(c);
2005
- if (Je[l])
2006
- return;
2007
- Je[l] = !0;
2008
- var g = "";
2009
- r && r._owner && r._owner !== Re.current && (g = " It was passed a child from " + F(r._owner.type) + "."), re(r), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, g), re(null);
2010
- }
1973
+ }
1974
+ function Xe(t, a) {
1975
+ {
1976
+ if (!t._store || t._store.validated || t.key != null)
1977
+ return;
1978
+ t._store.validated = !0;
1979
+ var l = Pt(a);
1980
+ if (ze[l])
1981
+ return;
1982
+ ze[l] = !0;
1983
+ var h = "";
1984
+ t && t._owner && t._owner !== Te.current && (h = " It was passed a child from " + G(t._owner.type) + "."), re(t), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, h), re(null);
2011
1985
  }
2012
- function Xe(r, c) {
2013
- {
2014
- if (typeof r != "object")
2015
- return;
2016
- if (Array.isArray(r))
2017
- for (var l = 0; l < r.length; l++) {
2018
- var g = r[l];
2019
- Te(g) && ze(g, c);
2020
- }
2021
- else if (Te(r))
2022
- r._store && (r._store.validated = !0);
2023
- else if (r) {
2024
- var O = N(r);
2025
- if (typeof O == "function" && O !== r.entries)
2026
- for (var R = O.call(r), C; !(C = R.next()).done; )
2027
- Te(C.value) && ze(C.value, c);
1986
+ }
1987
+ function Ze(t, a) {
1988
+ {
1989
+ if (typeof t != "object")
1990
+ return;
1991
+ if (Oe(t))
1992
+ for (var l = 0; l < t.length; l++) {
1993
+ var h = t[l];
1994
+ Pe(h) && Xe(h, a);
2028
1995
  }
1996
+ else if (Pe(t))
1997
+ t._store && (t._store.validated = !0);
1998
+ else if (t) {
1999
+ var b = k(t);
2000
+ if (typeof b == "function" && b !== t.entries)
2001
+ for (var R = b.call(t), p; !(p = R.next()).done; )
2002
+ Pe(p.value) && Xe(p.value, a);
2029
2003
  }
2030
2004
  }
2031
- function Tt(r) {
2032
- {
2033
- var c = r.type;
2034
- if (c == null || typeof c == "string")
2035
- return;
2036
- var l;
2037
- if (typeof c == "function")
2038
- l = c.propTypes;
2039
- else if (typeof c == "object" && (c.$$typeof === h || // Note: Memo only checks outer props here.
2040
- // Inner props are checked in the reconciler.
2041
- c.$$typeof === w))
2042
- l = c.propTypes;
2043
- else
2044
- return;
2045
- if (l) {
2046
- var g = F(c);
2047
- vt(l, r.props, "prop", g, r);
2048
- } else if (c.PropTypes !== void 0 && !Ie) {
2049
- Ie = !0;
2050
- var O = F(c);
2051
- y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
2052
- }
2053
- typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2005
+ }
2006
+ function Nt(t) {
2007
+ {
2008
+ var a = t.type;
2009
+ if (a == null || typeof a == "string")
2010
+ return;
2011
+ var l;
2012
+ if (typeof a == "function")
2013
+ l = a.propTypes;
2014
+ else if (typeof a == "object" && (a.$$typeof === g || // Note: Memo only checks outer props here.
2015
+ // Inner props are checked in the reconciler.
2016
+ a.$$typeof === y))
2017
+ l = a.propTypes;
2018
+ else
2019
+ return;
2020
+ if (l) {
2021
+ var h = G(a);
2022
+ vt(l, t.props, "prop", h, t);
2023
+ } else if (a.PropTypes !== void 0 && !ke) {
2024
+ ke = !0;
2025
+ var b = G(a);
2026
+ P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
2054
2027
  }
2028
+ typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2055
2029
  }
2056
- function kt(r) {
2057
- {
2058
- for (var c = Object.keys(r.props), l = 0; l < c.length; l++) {
2059
- var g = c[l];
2060
- if (g !== "children" && g !== "key") {
2061
- re(r), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), re(null);
2062
- break;
2063
- }
2030
+ }
2031
+ function jt(t) {
2032
+ {
2033
+ for (var a = Object.keys(t.props), l = 0; l < a.length; l++) {
2034
+ var h = a[l];
2035
+ if (h !== "children" && h !== "key") {
2036
+ re(t), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), re(null);
2037
+ break;
2064
2038
  }
2065
- r.ref !== null && (re(r), y("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
2066
2039
  }
2040
+ t.ref !== null && (re(t), P("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
2067
2041
  }
2068
- function Ze(r, c, l, g, O, R) {
2069
- {
2070
- var C = z(r);
2071
- if (!C) {
2072
- var p = "";
2073
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (p += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2074
- var $ = Rt(O);
2075
- $ ? p += $ : p += He();
2076
- var P;
2077
- r === null ? P = "null" : Array.isArray(r) ? P = "array" : r !== void 0 && r.$$typeof === n ? (P = "<" + (F(r.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : P = typeof r, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, p);
2078
- }
2079
- var j = Ot(r, c, l, O, R);
2080
- if (j == null)
2081
- return j;
2082
- if (C) {
2083
- var K = c.children;
2084
- if (K !== void 0)
2085
- if (g)
2086
- if (Array.isArray(K)) {
2087
- for (var ne = 0; ne < K.length; ne++)
2088
- Xe(K[ne], r);
2089
- Object.freeze && Object.freeze(K);
2090
- } else
2091
- y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2092
- else
2093
- Xe(K, r);
2094
- }
2095
- return r === t.Fragment ? kt(j) : Tt(j), j;
2042
+ }
2043
+ function Qe(t, a, l, h, b, R) {
2044
+ {
2045
+ var p = F(t);
2046
+ if (!p) {
2047
+ var m = "";
2048
+ (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (m += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2049
+ var $ = kt(b);
2050
+ $ ? m += $ : m += Je();
2051
+ var j;
2052
+ t === null ? j = "null" : Oe(t) ? j = "array" : t !== void 0 && t.$$typeof === s ? (j = "<" + (G(t.type) || "Unknown") + " />", m = " Did you accidentally export a JSX literal instead of a component?") : j = typeof t, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", j, m);
2096
2053
  }
2054
+ var L = Tt(t, a, l, b, R);
2055
+ if (L == null)
2056
+ return L;
2057
+ if (p) {
2058
+ var W = a.children;
2059
+ if (W !== void 0)
2060
+ if (h)
2061
+ if (Oe(W)) {
2062
+ for (var ie = 0; ie < W.length; ie++)
2063
+ Ze(W[ie], t);
2064
+ Object.freeze && Object.freeze(W);
2065
+ } else
2066
+ P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2067
+ else
2068
+ Ze(W, t);
2069
+ }
2070
+ return t === i ? jt(L) : Nt(L), L;
2097
2071
  }
2098
- function Pt(r, c, l) {
2099
- return Ze(r, c, l, !0);
2100
- }
2101
- function jt(r, c, l) {
2102
- return Ze(r, c, l, !1);
2103
- }
2104
- var Nt = jt, Lt = Pt;
2105
- t.jsx = Nt, t.jsxs = Lt;
2106
- }();
2107
- }(Ne)), Ne;
2072
+ }
2073
+ function Lt(t, a, l) {
2074
+ return Qe(t, a, l, !0);
2075
+ }
2076
+ function At(t, a, l) {
2077
+ return Qe(t, a, l, !1);
2078
+ }
2079
+ var Mt = At, Dt = Lt;
2080
+ ae.Fragment = i, ae.jsx = Mt, ae.jsxs = Dt;
2081
+ }()), ae;
2108
2082
  }
2109
- (function(t) {
2110
- process.env.NODE_ENV === "production" ? t.exports = br() : t.exports = yr();
2111
- })(Er);
2112
- const Cr = Ae.jsx;
2113
- function kr(t) {
2114
- const s = Ft(null), e = pr(t), n = e.jsBridge, i = (d) => /* @__PURE__ */ Cr(s.Provider, { value: e, children: d.children }), a = () => {
2115
- const d = V.useContext(s);
2116
- if (!d)
2083
+ (function(r) {
2084
+ process.env.NODE_ENV === "production" ? r.exports = Cr() : r.exports = wr();
2085
+ })(Sr);
2086
+ const Rr = Ae.jsx;
2087
+ function jr(r) {
2088
+ const s = Gt(null), e = br(r), i = e.jsBridge, n = (f) => /* @__PURE__ */ Rr(s.Provider, { value: e, children: f.children }), c = () => {
2089
+ const f = D.useContext(s);
2090
+ if (!f)
2117
2091
  throw new Error("LiveProvider never found.");
2118
- return d;
2119
- }, u = () => e, f = () => e.$RTC, v = () => f(), h = () => async (d) => await e.connect(d);
2120
- function _(d, S, N = []) {
2121
- const b = a(), y = [b, name, ...N], D = () => b.keyframes.off(d, S);
2122
- return V.useEffect(() => (b.keyframes.on(d, S), D), y), D;
2123
- }
2124
- function E() {
2125
- const d = a();
2092
+ return f;
2093
+ }, u = () => e, d = () => e.$RTC, g = () => d(), v = () => async (f) => await e.connect(f);
2094
+ function E(f, w, A = []) {
2095
+ const S = c(), N = [S, name, ...A], M = () => S.keyframes.off(f, w);
2096
+ return D.useEffect(() => (S.keyframes.on(f, w), M), N), M;
2097
+ }
2098
+ function y() {
2099
+ const f = c();
2126
2100
  return {
2127
- connect: async (T) => await d.connect(T),
2128
- broadcast: async (T, B, te = 0) => await d.broadcast(T, B, te),
2129
- exit: async () => await d.exit(),
2130
- kick: async (T) => await d.kick(T),
2131
- toggleMicro: (T) => d.toggleMicro(T),
2132
- forbidMicro: async (T, B = []) => await d.forbidMicro(T, B),
2133
- forbidSync: (T, B = []) => d.forbidSync(T, B),
2134
- sendKeyframe: (T, B) => d.sendKeyframe(T, B),
2135
- getFramesByKey: (T) => d.getFramesByKey(T),
2136
- setSelfInfo: (T) => d.setSelfInfo(T),
2137
- updateStatus: (T, B, te, le) => d.updateStatus(T, B, te, le)
2101
+ connect: async (T) => await f.connect(T),
2102
+ broadcast: async (T, B, te = 0) => await f.broadcast(T, B, te),
2103
+ exit: async () => await f.exit(),
2104
+ kick: async (T) => await f.kick(T),
2105
+ toggleMicro: (T) => f.toggleMicro(T),
2106
+ forbidMicro: async (T, B = []) => await f.forbidMicro(T, B),
2107
+ forbidSync: (T, B = []) => f.forbidSync(T, B),
2108
+ sendKeyframe: (T, B) => f.sendKeyframe(T, B),
2109
+ getFramesByKey: (T) => f.getFramesByKey(T),
2110
+ setSelfInfo: (T) => f.setSelfInfo(T),
2111
+ updateStatus: (T, B, te, de) => f.updateStatus(T, B, te, de)
2138
2112
  };
2139
2113
  }
2140
- function w(d) {
2141
- const S = a(), [N, b] = V.useState(S.getFramesByKey(d));
2142
- V.useEffect(() => {
2143
- const D = (ue) => b(ue), U = d, z = D;
2144
- return S.keyframes.on(U, z), () => S.keyframes.off(U, z);
2145
- }, [S]);
2146
- const y = V.useCallback(
2147
- (D) => S.sendKeyframe(d, D),
2148
- [S]
2114
+ function I(f) {
2115
+ const w = c(), [A, S] = D.useState(w.getFramesByKey(f));
2116
+ D.useEffect(() => {
2117
+ const M = (ne) => S(ne), F = f, J = M;
2118
+ return w.keyframes.on(F, J), () => w.keyframes.off(F, J);
2119
+ }, [w]);
2120
+ const N = D.useCallback(
2121
+ (M) => w.sendKeyframe(f, M),
2122
+ [w]
2149
2123
  );
2150
- return [N, y];
2124
+ return [A, N];
2151
2125
  }
2152
- function m(d, S, N = []) {
2153
- const b = a(), y = () => b.off(d, S), D = [b, d, ...N];
2154
- return V.useEffect(() => (b.on(d, S), y), D), y;
2126
+ function _(f, w, A = []) {
2127
+ const S = c(), N = () => S.off(f, w), M = [S, f, ...A];
2128
+ return D.useEffect(() => (S.on(f, w), N), M), N;
2155
2129
  }
2156
- function A() {
2157
- const d = a(), [S, N] = V.useState(d.state);
2158
- return V.useEffect(() => {
2159
- const b = (y) => N(y);
2160
- return d.on("stateChange", b), () => d.off("stateChange", b);
2161
- }, [d]), S;
2130
+ function V() {
2131
+ const f = c(), [w, A] = D.useState(f.state);
2132
+ return D.useEffect(() => {
2133
+ const S = (N) => A(N);
2134
+ return f.on("stateChange", S), () => f.off("stateChange", S);
2135
+ }, [f]), w;
2162
2136
  }
2163
- function M() {
2164
- const d = a();
2137
+ function C() {
2138
+ const f = c();
2165
2139
  return {
2166
- join: (U) => d.$RTC.join(U),
2167
- quit: () => d.$RTC.quit(),
2140
+ join: (F) => f.$RTC.join(F),
2141
+ quit: () => f.$RTC.quit(),
2168
2142
  shock: () => {
2169
- var U, z;
2170
- return (z = (U = d.$RTC).shock) == null ? void 0 : z.call(U);
2143
+ var F, J;
2144
+ return (J = (F = f.$RTC).shock) == null ? void 0 : J.call(F);
2171
2145
  },
2172
- toggleMicro: (U) => d.$RTC.toggleMicro(U),
2173
- detectMicro: () => d.$RTC.detectMicro()
2146
+ toggleMicro: (F) => f.$RTC.toggleMicro(F),
2147
+ detectMicro: () => f.$RTC.detectMicro()
2174
2148
  };
2175
2149
  }
2176
- function k(d, S, N = []) {
2177
- const b = a(), y = () => b.$RTC.off(d, S), D = [b, d, ...N];
2178
- return V.useEffect(() => (b.$RTC.on(d, S), y), D), y;
2179
- }
2180
- function H() {
2181
- const d = a(), [S, N] = V.useState(
2182
- d.selfInfo || {}
2183
- ), b = (D) => N(D);
2184
- V.useEffect(() => (d.on("selfInfoUpdate", b), () => d.off("selfInfoUpdate", b)), [d]);
2185
- const y = V.useCallback(
2186
- async (D) => await d.setSelfInfo(D),
2187
- [d]
2150
+ function k(f, w, A = []) {
2151
+ const S = c(), N = () => S.$RTC.off(f, w), M = [S, f, ...A];
2152
+ return D.useEffect(() => (S.$RTC.on(f, w), N), M), N;
2153
+ }
2154
+ function U() {
2155
+ const f = c(), [w, A] = D.useState(
2156
+ f.selfInfo || {}
2157
+ ), S = (M) => A(M);
2158
+ D.useEffect(() => (f.on("selfInfoUpdate", S), () => f.off("selfInfoUpdate", S)), [f]);
2159
+ const N = D.useCallback(
2160
+ async (M) => await f.setSelfInfo(M),
2161
+ [f]
2188
2162
  );
2189
- return [S, y];
2163
+ return [w, N];
2190
2164
  }
2191
- function J() {
2192
- const d = a(), [S, N] = V.useState(
2193
- d.snapshot
2165
+ function P() {
2166
+ const f = c(), [w, A] = D.useState(
2167
+ f.snapshot
2194
2168
  );
2195
- return V.useEffect(() => {
2196
- const b = (y) => N(y);
2197
- return d.on("keyframes", b), () => d.off("keyframes", b);
2198
- }), S;
2169
+ return D.useEffect(() => {
2170
+ const S = (N) => A(N);
2171
+ return f.on("keyframes", S), () => f.off("keyframes", S);
2172
+ }), w;
2199
2173
  }
2200
- function I() {
2201
- const d = a(), [S, N] = V.useState(d.userList), b = (y) => N(y);
2202
- return V.useEffect(() => (d.on("userListUpdate", b), () => d.off("userListUpdate", b)), [d]), S;
2174
+ function fe() {
2175
+ const f = c(), [w, A] = D.useState(f.userList), S = (N) => A(N);
2176
+ return D.useEffect(() => (f.on("userListUpdate", S), () => f.off("userListUpdate", S)), [f]), w;
2203
2177
  }
2204
2178
  return {
2205
2179
  live: e,
2206
- jsBridge: n,
2207
- LiveProvider: i,
2180
+ jsBridge: i,
2181
+ LiveProvider: n,
2208
2182
  unsafe__useLiveInstance: u,
2209
- unsafe__useRTCInstance: v,
2210
- useConnect: h,
2211
- useKeyframe: w,
2212
- useKeyframeUpdateCallback: _,
2213
- useLiveAction: E,
2214
- useLiveEventCallback: m,
2215
- useLiveState: A,
2216
- useRTCAction: M,
2183
+ unsafe__useRTCInstance: g,
2184
+ useConnect: v,
2185
+ useKeyframe: I,
2186
+ useKeyframeUpdateCallback: E,
2187
+ useLiveAction: y,
2188
+ useLiveEventCallback: _,
2189
+ useLiveState: V,
2190
+ useRTCAction: C,
2217
2191
  useRTCEventCallback: k,
2218
- useSelfInfo: H,
2219
- useKeyframesSnapshot: J,
2220
- useUserList: I
2192
+ useSelfInfo: U,
2193
+ useKeyframesSnapshot: P,
2194
+ useUserList: fe
2221
2195
  };
2222
2196
  }
2223
2197
  export {
2224
- tt as BrowserRTC,
2225
- rt as BrowserRTC4Chime,
2198
+ rt as BrowserRTC,
2199
+ it as BrowserRTC4Chime,
2226
2200
  ut as BuiltInRTCType,
2227
- G as BuiltinActionType,
2201
+ H as BuiltinActionType,
2228
2202
  q as BuiltinEventType,
2229
- W as Command,
2230
- De as CoreRTC,
2203
+ K as Command,
2204
+ Me as CoreRTC,
2231
2205
  x as LiveState,
2232
- Zt as MemUserStatus,
2206
+ tr as MemUserStatus,
2233
2207
  Z as MicroStatus,
2234
2208
  lt as RTCJoinedInfoCodeEnum,
2235
2209
  Q as RTCType,
2236
- Xt as UserStatus,
2210
+ er as UserStatus,
2237
2211
  nt as VRWebViewRTC,
2238
- er as WebSocketCloseError,
2239
- Qt as WebSocketErrorType,
2212
+ ir as WebSocketCloseError,
2213
+ rr as WebSocketErrorType,
2240
2214
  Le as WebSocketState,
2241
- pr as createLive,
2242
- kr as createLiveReact,
2243
- Tr as parseLiveMsg,
2244
- tr as parseWSClsErr
2215
+ br as createLive,
2216
+ jr as createLiveReact,
2217
+ Nr as parseLiveMsg,
2218
+ nr as parseWSClsErr
2245
2219
  };