@snapcall/stream-ui 1.10.1 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stream-ui.js CHANGED
@@ -16,6 +16,14 @@ var $jQDcL$mediasoupclient = require("mediasoup-client");
16
16
  var $jQDcL$mediapipeselfie_segmentation = require("@mediapipe/selfie_segmentation");
17
17
  var $jQDcL$reactdom = require("react-dom");
18
18
  var $jQDcL$qrcode = require("qrcode");
19
+ var $jQDcL$reactstately = require("react-stately");
20
+ var $jQDcL$classnames = require("classnames");
21
+ var $jQDcL$reactaria = require("react-aria");
22
+ var $jQDcL$reactariaoverlays = require("@react-aria/overlays");
23
+ var $jQDcL$reactariautils = require("@react-aria/utils");
24
+ var $jQDcL$reacttransitiongroup = require("react-transition-group");
25
+ var $jQDcL$reactariainteractions = require("@react-aria/interactions");
26
+ var $jQDcL$reactcontentloader = require("react-content-loader");
19
27
 
20
28
  function $parcel$interopDefault(a) {
21
29
  return a && a.__esModule ? a.default : a;
@@ -28,6 +36,7 @@ $parcel$export(module.exports, "streamUI", () => $e68207026aca356b$export$3f9491
28
36
 
29
37
 
30
38
 
39
+ // https://github.com/voodoocreation/ts-deepmerge/blob/master/src/index.ts
31
40
  const $6b4cf4c12c735fdf$var$isObject = (obj)=>{
32
41
  if (typeof obj === "object" && obj !== null) {
33
42
  if (typeof Object.getPrototypeOf === "function") {
@@ -337,6 +346,9 @@ const $91fcbf58e59aae79$export$84584c2a98eb6753 = {
337
346
  header: {
338
347
  free: "Free version"
339
348
  },
349
+ loader: {
350
+ connection: "Connecting..."
351
+ },
340
352
  notifications: {
341
353
  screensharingError: "An error occured when trying to toggle screensharing",
342
354
  microphoneError: "An error occured when trying to toggle the microphone",
@@ -488,6 +500,9 @@ const $e52ca91c2b296e41$export$acb2a88f7d552ebf = {
488
500
  header: {
489
501
  free: "Version gratuite"
490
502
  },
503
+ loader: {
504
+ connection: "Connexion..."
505
+ },
491
506
  notifications: {
492
507
  screensharingError: "Une erreur est survenue pendant l'activation du partage d'\xe9cran",
493
508
  microphoneError: "Une erreur est survenue pendant l'activation du micro",
@@ -639,6 +654,9 @@ const $e0ae3d23c2381da3$export$3486a10f30cf1ee4 = {
639
654
  header: {
640
655
  free: "Versione gratuita"
641
656
  },
657
+ loader: {
658
+ connection: "Connessione..."
659
+ },
642
660
  notifications: {
643
661
  screensharingError: "Si \xe8 verificato un errore durante l'attivazione della condivisione dello schermo",
644
662
  microphoneError: "Si \xe8 verificato un errore durante l'attivazione del microfono",
@@ -814,7 +832,7 @@ var $b45c0bcc142f0b5e$export$2e2bcd8739ae039 = (0, ($parcel$interopDefault($jQDc
814
832
 
815
833
 
816
834
 
817
-
835
+ /* eslint-disable no-console */
818
836
  const $d0c6baf97675ab49$var$LogLevel = {
819
837
  error: 1,
820
838
  warn: 2,
@@ -981,8 +999,8 @@ class $6a90fae7e584afd4$export$ea669869acd8f177 {
981
999
  });
982
1000
  try {
983
1001
  this.audioStreamSource.disconnect(this.analyser);
984
- } catch (err1) {
985
- $6a90fae7e584afd4$var$log.error("release", "audioStreamSource failed to disconnect", err1);
1002
+ } catch (err) {
1003
+ $6a90fae7e584afd4$var$log.error("release", "audioStreamSource failed to disconnect", err);
986
1004
  }
987
1005
  this.audioContext.close().catch((err)=>{
988
1006
  $6a90fae7e584afd4$var$log.error("release", "audioContext failed to close", err);
@@ -1236,7 +1254,7 @@ class $cb913ea078a876a6$export$2e2bcd8739ae039 {
1236
1254
  live = false;
1237
1255
  fps = 24;
1238
1256
  blurLevel = 10;
1239
- timerWorker = new Worker(new URL("timer.7690fc0b.js", "file:" + __filename), {
1257
+ timerWorker = new Worker(new URL("timer.d0b8fda2.js", "file:" + __filename), {
1240
1258
  name: "VirtualBackgroundTimerWorker"
1241
1259
  });
1242
1260
  constructor(stream, options){
@@ -1368,7 +1386,7 @@ class $cb913ea078a876a6$export$2e2bcd8739ae039 {
1368
1386
 
1369
1387
 
1370
1388
  const $1dedebd5ff3002eb$var$log = new (0, $d0c6baf97675ab49$export$2e2bcd8739ae039)("StreamerClient");
1371
- const $1dedebd5ff3002eb$export$818d60b2e626da0c = {
1389
+ const $1dedebd5ff3002eb$export$103bedf43ba882db = {
1372
1390
  WEBRTC_FAILED: "WRTC1",
1373
1391
  WEBRTC_RECOVER_ERROR: "WRTC2",
1374
1392
  CREATE_TRANSPORT_FAILED: "TRANS1",
@@ -1417,7 +1435,7 @@ const $1dedebd5ff3002eb$var$WEBCAM_SIMULCAST_ENCODINGS = [
1417
1435
  {
1418
1436
  scaleResolutionDownBy: 1,
1419
1437
  maxBitrate: 5000000
1420
- },
1438
+ }
1421
1439
  ];
1422
1440
  const $1dedebd5ff3002eb$var$SCREEN_SHARING_SIMULCAST_ENCODINGS = [
1423
1441
  {
@@ -1427,7 +1445,7 @@ const $1dedebd5ff3002eb$var$SCREEN_SHARING_SIMULCAST_ENCODINGS = [
1427
1445
  {
1428
1446
  dtx: true,
1429
1447
  maxBitrate: 6000000
1430
- },
1448
+ }
1431
1449
  ];
1432
1450
  class $1dedebd5ff3002eb$var$SnapcallEvent extends CustomEvent {
1433
1451
  // eslint-disable-next-line @typescript-eslint/no-useless-constructor
@@ -1455,6 +1473,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1455
1473
  super();
1456
1474
  navigator.mediaDevices.addEventListener("devicechange", ()=>this.onDeviceChange());
1457
1475
  this.config = {
1476
+ streamApiURL: String("https://apistream.snapcall.io"),
1458
1477
  apiUrl: String("https://api.snapcall.io/v2"),
1459
1478
  streamerServer: String("wss://g.snapcall.io/stream"),
1460
1479
  streamerApi: String("https://g.snapcall.io/stream"),
@@ -1464,7 +1483,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1464
1483
  username: "test",
1465
1484
  credential: "test",
1466
1485
  credentialType: "password"
1467
- },
1486
+ }
1468
1487
  ]
1469
1488
  };
1470
1489
  this.peers = new Map();
@@ -1572,7 +1591,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1572
1591
  if (!this.peerId) this.peerId = (0, $jQDcL$uuid.v4)();
1573
1592
  let url;
1574
1593
  try {
1575
- const { streamer_instance: instanceId , plan: { permissions: permissions , name: name } , } = await fetch(`${this.config.apiUrl}/streams/${room}/info`, {
1594
+ const { streamer_instance: instanceId , plan: { permissions: permissions , name: name } } = await fetch(`${this.config.apiUrl}/streams/${room}/info`, {
1576
1595
  method: "get",
1577
1596
  headers: {
1578
1597
  "Content-Type": "application/json"
@@ -1583,7 +1602,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1583
1602
  });
1584
1603
  this.permissions = permissions;
1585
1604
  this.plan = name;
1586
- url = `${this.config.streamerServer}/${instanceId}/?roomId=${room}&peerId=${this.peerId}`;
1605
+ url = `${this.config.streamerServer}/${instanceId}${this.joinOptions.recorder ? "/recorder" : ""}?roomId=${room}&peerId=${this.peerId}`;
1587
1606
  } catch (roomError) {
1588
1607
  const event = new $1dedebd5ff3002eb$var$SnapcallEvent("invalidRoom", {
1589
1608
  detail: {}
@@ -1599,21 +1618,25 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1599
1618
  });
1600
1619
  this.protoo = new $jQDcL$protooclient.Peer(this.protooTransport);
1601
1620
  this.protoo.on("open", ()=>{
1621
+ if (this.joinOptions.recorder) {
1622
+ this.joinRecorder();
1623
+ return;
1624
+ }
1602
1625
  this.joinRoom();
1603
1626
  });
1604
1627
  this.protoo.on("failed", ()=>{
1605
1628
  $1dedebd5ff3002eb$var$log.error("protoo.on", "failed");
1606
- this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.SOCKET_LOST);
1629
+ this.onCriticalError($1dedebd5ff3002eb$export$103bedf43ba882db.SOCKET_LOST);
1607
1630
  });
1608
1631
  this.protoo.on("disconnected", ()=>{
1609
1632
  $1dedebd5ff3002eb$var$log.error("protoo.on", "disconnected");
1610
- this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.SOCKET_LOST);
1633
+ this.onCriticalError($1dedebd5ff3002eb$export$103bedf43ba882db.SOCKET_LOST);
1611
1634
  });
1612
1635
  this.protoo.on("close", ()=>$1dedebd5ff3002eb$var$log.log("protoo.on", "close :("));
1613
1636
  this.protoo.on("notification", async (notification)=>{
1614
1637
  $1dedebd5ff3002eb$var$log.log("notification", notification);
1615
1638
  if (notification.method === "error") {
1616
- if (notification.data?.reason === "reached user limit") this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.USER_LIMIT);
1639
+ if (notification.data?.reason === "reached user limit") this.onCriticalError($1dedebd5ff3002eb$export$103bedf43ba882db.USER_LIMIT);
1617
1640
  } else if (notification.method === "newPeer") {
1618
1641
  const { id: id , profile: profile , muted: muted } = notification.data;
1619
1642
  this.peers.set(id, {
@@ -1659,7 +1682,10 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1659
1682
  this.onConsumerClose({
1660
1683
  consumerId: consumerId
1661
1684
  });
1662
- } else if (notification.method === "displayName") {
1685
+ } else if (notification.method === "recordStopped") this.dispatchEvent(new $1dedebd5ff3002eb$var$SnapcallEvent("recordStopped", {
1686
+ detail: notification.data
1687
+ }));
1688
+ else if (notification.method === "displayName") {
1663
1689
  const { peerId: peerId , displayName: displayName } = notification.data;
1664
1690
  const event = new $1dedebd5ff3002eb$var$SnapcallEvent("displayName", {
1665
1691
  detail: {
@@ -1739,17 +1765,17 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1739
1765
  });
1740
1766
  this.dispatchEvent(event);
1741
1767
  } else if (notification.method === "customMessage") {
1742
- const { messageId: messageId , chunk: chunk1 , chunkIndex: chunkIndex , totalChunks: totalChunks } = notification.data.event;
1768
+ const { messageId: messageId , chunk: chunk , chunkIndex: chunkIndex , totalChunks: totalChunks } = notification.data.event;
1743
1769
  const existingMessage = this.customMessages.get(messageId);
1744
1770
  if (existingMessage) existingMessage.chunks.push({
1745
1771
  index: chunkIndex,
1746
- data: chunk1
1772
+ data: chunk
1747
1773
  });
1748
1774
  else this.customMessages.set(messageId, {
1749
1775
  chunks: [
1750
1776
  {
1751
1777
  index: chunkIndex,
1752
- data: chunk1
1778
+ data: chunk
1753
1779
  }
1754
1780
  ],
1755
1781
  totalChunks: totalChunks
@@ -1794,7 +1820,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1794
1820
  transport.transport = await promise;
1795
1821
  if (transport.transport) this.listenWebRTCTransportStates(transport);
1796
1822
  } catch (err) {
1797
- this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.CREATE_TRANSPORT_FAILED);
1823
+ this.onCriticalError($1dedebd5ff3002eb$export$103bedf43ba882db.CREATE_TRANSPORT_FAILED);
1798
1824
  throw err;
1799
1825
  }
1800
1826
  return transport.transport;
@@ -1821,7 +1847,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1821
1847
  }
1822
1848
  });
1823
1849
  $1dedebd5ff3002eb$var$log.error("listenWebRTCTransportStats", "webrtc stat failed", err);
1824
- this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.WEBRTC_FAILED);
1850
+ this.onCriticalError($1dedebd5ff3002eb$export$103bedf43ba882db.WEBRTC_FAILED);
1825
1851
  }
1826
1852
  }
1827
1853
  });
@@ -1862,7 +1888,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1862
1888
  {
1863
1889
  ...peer,
1864
1890
  peerId: peer.id || peer.peerId
1865
- },
1891
+ }
1866
1892
  ]));
1867
1893
  const callId = await this.getCallId();
1868
1894
  this.dispatchEvent(new $1dedebd5ff3002eb$var$SnapcallEvent("enterRoom", {
@@ -1890,6 +1916,19 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
1890
1916
  });
1891
1917
  });
1892
1918
  }
1919
+ async joinRecorder() {
1920
+ this.streamerMediasoup = await (0, $a62e7f17be5cf3a0$export$2e2bcd8739ae039).create(this.protoo, this.config);
1921
+ const callId = await this.getCallId();
1922
+ this.dispatchEvent(new $1dedebd5ff3002eb$var$SnapcallEvent("enterRoom", {
1923
+ detail: {
1924
+ peerId: this.peerId,
1925
+ peers: [],
1926
+ callId: callId,
1927
+ plan: this.plan,
1928
+ permissions: this.permissions
1929
+ }
1930
+ }));
1931
+ }
1893
1932
  async switchMicrophone(deviceId) {
1894
1933
  try {
1895
1934
  $1dedebd5ff3002eb$var$log.log("switchMicrophone", "switching Microphone");
@@ -2145,7 +2184,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
2145
2184
  iceParameters: iceParameters
2146
2185
  });
2147
2186
  } catch (err) {
2148
- this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.WEBRTC_RECOVER_ERROR);
2187
+ this.onCriticalError($1dedebd5ff3002eb$export$103bedf43ba882db.WEBRTC_RECOVER_ERROR);
2149
2188
  $1dedebd5ff3002eb$var$log.log("restartIce", "restartIceFailed", err);
2150
2189
  $jQDcL$sentrybrowser.captureException(err, {
2151
2190
  extra: {
@@ -2212,20 +2251,39 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
2212
2251
  if (!this.webcamProducer || this.webcamProducer.closed) return;
2213
2252
  await this.switchWebcam({});
2214
2253
  }
2215
- async switchWebcam({ device: device , resolution: resolution , rotate: rotate }) {
2254
+ async switchWebcam({ device: device , resolution: resolution , rotate: rotate , frameRate: frameRate , facingMode: facingMode }) {
2216
2255
  if (!this.webcam.device) throw new Error("no webcam devices");
2256
+ const optionalParam = {};
2217
2257
  if (rotate) {
2218
- const webcams = Array.from(this.webcams.keys());
2219
- const deviceId = this.webcam?.device?.deviceId || "unknow";
2220
- let newWebcamIndex = webcams.indexOf(deviceId);
2221
- if (newWebcamIndex < webcams.length - 1) newWebcamIndex++;
2222
- else newWebcamIndex = 0;
2223
- const newWebcamDevice = this.webcams.get(webcams[newWebcamIndex]);
2224
- if (!newWebcamDevice) throw new Error("no webcam device");
2225
- this.webcam.device = newWebcamDevice;
2226
- this.webcam.resolution = "hd";
2258
+ if (this.webcam.facingMode) {
2259
+ console.log("switch by facing mod");
2260
+ this.webcam.facingMode = this.webcam.facingMode === "user" ? "environment" : "user";
2261
+ optionalParam.facingMode = this.webcam.facingMode;
2262
+ } else {
2263
+ const webcams = Array.from(this.webcams.keys());
2264
+ const deviceId = this.webcam?.device?.deviceId || "unknow";
2265
+ let newWebcamIndex = webcams.indexOf(deviceId);
2266
+ if (newWebcamIndex < webcams.length - 1) newWebcamIndex++;
2267
+ else newWebcamIndex = 0;
2268
+ const newWebcamDevice = this.webcams.get(webcams[newWebcamIndex]);
2269
+ if (!newWebcamDevice) throw new Error("no webcam device");
2270
+ this.webcam.device = newWebcamDevice;
2271
+ this.webcam.resolution = "hd";
2272
+ optionalParam.deviceId = {
2273
+ ideal: this.webcam.device?.deviceId
2274
+ };
2275
+ }
2227
2276
  } else {
2228
- if (device) this.webcam.device = device;
2277
+ if (facingMode) {
2278
+ this.webcam.facingMode = facingMode;
2279
+ optionalParam.facingMode = this.webcam.facingMode;
2280
+ } else if (device) {
2281
+ this.webcam.device = device;
2282
+ this.webcam.facingMode = undefined;
2283
+ optionalParam.deviceId = {
2284
+ ideal: this.webcam.device.deviceId
2285
+ };
2286
+ }
2229
2287
  if (resolution) this.webcam.resolution = resolution;
2230
2288
  }
2231
2289
  let usedResolution = $1dedebd5ff3002eb$export$d21ffcc5eb136bfa[resolution || this.webcam.resolution];
@@ -2245,9 +2303,8 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
2245
2303
  });
2246
2304
  const mediaStream = await this.handleGetUserMediaError("webcam", navigator.mediaDevices.getUserMedia({
2247
2305
  video: {
2248
- deviceId: {
2249
- ideal: this.webcam.device.deviceId
2250
- },
2306
+ frameRate: frameRate,
2307
+ ...optionalParam,
2251
2308
  ...usedResolution
2252
2309
  }
2253
2310
  }));
@@ -2277,7 +2334,16 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
2277
2334
  }
2278
2335
  async enableVideo(config) {
2279
2336
  await this.updateWebcams();
2280
- if (config?.device) this.webcam.device = config.device;
2337
+ const optionalParam = {};
2338
+ if (config?.facingMode) {
2339
+ optionalParam.facingMode = config.facingMode;
2340
+ this.webcam.facingMode = config.facingMode;
2341
+ } else {
2342
+ if (config?.device) this.webcam.device = config.device;
2343
+ optionalParam.deviceId = {
2344
+ ideal: this.webcam.device?.deviceId
2345
+ };
2346
+ }
2281
2347
  if (!this.webcam.device) throw new Error("no webcam devices");
2282
2348
  let usedResolution = $1dedebd5ff3002eb$export$d21ffcc5eb136bfa[config?.resolution || this.webcam.resolution];
2283
2349
  if (this.useVideoBackground) usedResolution = {
@@ -2291,12 +2357,18 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
2291
2357
  };
2292
2358
  const mediaStream = await this.handleGetUserMediaError("webcam", navigator.mediaDevices.getUserMedia({
2293
2359
  video: {
2294
- deviceId: {
2295
- ideal: this.webcam.device.deviceId
2296
- },
2360
+ frameRate: config?.frameRate,
2361
+ ...optionalParam,
2297
2362
  ...usedResolution
2298
2363
  }
2299
2364
  }));
2365
+ if (config?.facingMode) try {
2366
+ const capabilities = mediaStream.getVideoTracks()[0].getCapabilities();
2367
+ if (!capabilities?.facingMode || capabilities.facingMode.length === 0) throw new Error("no facing mod");
2368
+ } catch {
2369
+ this.webcam.device = this.webcams.values().next().value;
2370
+ this.webcam.facingMode = undefined;
2371
+ }
2300
2372
  if (this.useVideoBackground) {
2301
2373
  if (this.mediaPipe) await this.mediaPipe.clean();
2302
2374
  this.mediaPipe = new (0, $cb913ea078a876a6$export$2e2bcd8739ae039)(mediaStream, this.mediaPipeOption);
@@ -2352,7 +2424,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
2352
2424
  advanced: [
2353
2425
  {
2354
2426
  zoom: this.webcamZoom.min * 2
2355
- },
2427
+ }
2356
2428
  ]
2357
2429
  });
2358
2430
  }
@@ -2363,7 +2435,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
2363
2435
  advanced: [
2364
2436
  {
2365
2437
  zoom: this.webcamZoom.min
2366
- },
2438
+ }
2367
2439
  ]
2368
2440
  });
2369
2441
  }
@@ -2472,6 +2544,27 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
2472
2544
  element.srcObject = mediaStream;
2473
2545
  } else $1dedebd5ff3002eb$var$log.error("requestVideo", `Video consumer ${consumer} not found`);
2474
2546
  }
2547
+ async saveCapture(base64Image) {
2548
+ const { objectUrl: objectUrl } = await fetch(`${this.config.streamApiURL}/uploadSnapshot`, {
2549
+ method: "POST",
2550
+ body: JSON.stringify({
2551
+ file: base64Image
2552
+ })
2553
+ }).then((rawResponse)=>rawResponse.json());
2554
+ const res = await this.protoo.request("addCapture", {
2555
+ url: objectUrl
2556
+ });
2557
+ return {
2558
+ url: objectUrl,
2559
+ assetId: res.assetId
2560
+ };
2561
+ }
2562
+ async deleteCapture(assetId) {
2563
+ const res = await this.protoo.request("deleteCapture", {
2564
+ assetId: assetId
2565
+ });
2566
+ return res;
2567
+ }
2475
2568
  async captureVideo(videoElement) {
2476
2569
  if (this.permissions.find((permission)=>permission === "instant_picture")) {
2477
2570
  let image;
@@ -2566,7 +2659,7 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
2566
2659
  consumerId: consumer.id
2567
2660
  });
2568
2661
  } catch (error) {
2569
- this.onCriticalError($1dedebd5ff3002eb$export$818d60b2e626da0c.CONSUME_ERROR);
2662
+ this.onCriticalError($1dedebd5ff3002eb$export$103bedf43ba882db.CONSUME_ERROR);
2570
2663
  $1dedebd5ff3002eb$var$log.error("consumeProducer", "newConsumer request failed", error);
2571
2664
  throw error;
2572
2665
  }
@@ -2770,6 +2863,12 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
2770
2863
  getPermissions() {
2771
2864
  return this.permissions;
2772
2865
  }
2866
+ async startRecord() {
2867
+ await this.protoo.request("startRecord");
2868
+ }
2869
+ async stopRecord() {
2870
+ await this.protoo.request("stopRecord");
2871
+ }
2773
2872
  }
2774
2873
 
2775
2874
 
@@ -2784,17 +2883,17 @@ var $8b39f32976a7698a$export$2e2bcd8739ae039 = $8b39f32976a7698a$var$StreamUICon
2784
2883
 
2785
2884
 
2786
2885
  let $a4027a5418fcd07a$export$96a9662a3eda31f6;
2787
- (function(StreamsReducerActionTypes1) {
2788
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["SET_STREAMS"] = 0] = "SET_STREAMS";
2789
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["ADD_STREAM"] = 1] = "ADD_STREAM";
2790
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["REMOVE_STREAM"] = 2] = "REMOVE_STREAM";
2791
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["DEVICE_UPDATE"] = 3] = "DEVICE_UPDATE";
2792
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["MUTE"] = 4] = "MUTE";
2793
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["UNMUTE"] = 5] = "UNMUTE";
2794
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["SET_HIGHLIGHTED_TILE"] = 6] = "SET_HIGHLIGHTED_TILE";
2795
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["UNSET_HIGHLIGHTED_TILE"] = 7] = "UNSET_HIGHLIGHTED_TILE";
2796
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["SET_STREAM_PROFILE"] = 8] = "SET_STREAM_PROFILE";
2797
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["SET_STREAM_SPEAKING"] = 9] = "SET_STREAM_SPEAKING";
2886
+ (function(StreamsReducerActionTypes) {
2887
+ StreamsReducerActionTypes[StreamsReducerActionTypes["SET_STREAMS"] = 0] = "SET_STREAMS";
2888
+ StreamsReducerActionTypes[StreamsReducerActionTypes["ADD_STREAM"] = 1] = "ADD_STREAM";
2889
+ StreamsReducerActionTypes[StreamsReducerActionTypes["REMOVE_STREAM"] = 2] = "REMOVE_STREAM";
2890
+ StreamsReducerActionTypes[StreamsReducerActionTypes["DEVICE_UPDATE"] = 3] = "DEVICE_UPDATE";
2891
+ StreamsReducerActionTypes[StreamsReducerActionTypes["MUTE"] = 4] = "MUTE";
2892
+ StreamsReducerActionTypes[StreamsReducerActionTypes["UNMUTE"] = 5] = "UNMUTE";
2893
+ StreamsReducerActionTypes[StreamsReducerActionTypes["SET_HIGHLIGHTED_TILE"] = 6] = "SET_HIGHLIGHTED_TILE";
2894
+ StreamsReducerActionTypes[StreamsReducerActionTypes["UNSET_HIGHLIGHTED_TILE"] = 7] = "UNSET_HIGHLIGHTED_TILE";
2895
+ StreamsReducerActionTypes[StreamsReducerActionTypes["SET_STREAM_PROFILE"] = 8] = "SET_STREAM_PROFILE";
2896
+ StreamsReducerActionTypes[StreamsReducerActionTypes["SET_STREAM_SPEAKING"] = 9] = "SET_STREAM_SPEAKING";
2798
2897
  })($a4027a5418fcd07a$export$96a9662a3eda31f6 || ($a4027a5418fcd07a$export$96a9662a3eda31f6 = {}));
2799
2898
  const $a4027a5418fcd07a$export$7fc21eab2c971c9c = {
2800
2899
  streams: [],
@@ -3005,6 +3104,52 @@ const $6d8b37b4bd2444ef$var$SnapcallLogoMedium = ()=>{
3005
3104
  })
3006
3105
  });
3007
3106
  };
3107
+ const $6d8b37b4bd2444ef$export$3741e4ac43f04ca2 = ()=>{
3108
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("svg", {
3109
+ width: "48",
3110
+ height: "48",
3111
+ viewBox: "0 0 48 48",
3112
+ fill: "none",
3113
+ xmlns: "http://www.w3.org/2000/svg",
3114
+ children: [
3115
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("g", {
3116
+ clipPath: "url(#clip0_243_300)",
3117
+ children: [
3118
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
3119
+ d: "M0 24C0 4.236 4.236 0 24 0C43.764 0 48 4.236 48 24C48 43.764 43.764 48 24 48C4.236 48 0 43.764 0 24Z",
3120
+ fill: "black"
3121
+ }),
3122
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
3123
+ d: "M24.15 38.2856C25.7279 38.2856 27.0502 36.9758 26.5626 35.4753C26.1419 34.1801 25.4321 32.9898 24.4746 32.0064C22.853 30.341 20.6537 29.4053 18.3605 29.4053C16.0673 29.4053 13.8679 30.341 12.2464 32.0064C11.2888 32.9898 10.5791 34.1801 10.1583 35.4753C9.67078 36.9758 10.9931 38.2856 12.571 38.2856H24.15Z",
3124
+ fill: "white"
3125
+ }),
3126
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
3127
+ d: "M23.8494 9.71436C22.2714 9.71436 20.9491 11.0242 21.4367 12.5249C21.8574 13.8199 22.5672 15.0102 23.5248 15.9937C25.1463 17.6591 27.3456 18.5947 29.6389 18.5947C31.932 18.5947 34.1314 17.6591 35.7529 15.9937C36.7106 15.0102 37.4203 13.8199 37.8409 12.5249C38.3286 11.0242 37.0063 9.71436 35.4283 9.71436H23.8494Z",
3128
+ fill: "white"
3129
+ }),
3130
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
3131
+ d: "M29.6387 35.4287C29.6387 37.0067 30.953 38.3301 32.4415 37.8064C33.6767 37.3715 34.8118 36.6509 35.7527 35.6847C37.3744 34.0195 38.2852 31.7606 38.2852 29.4055C38.2852 27.0502 37.3744 24.7915 35.7527 23.1261C34.8118 22.1599 33.6767 21.4393 32.4415 21.0046C30.953 20.4807 29.6387 21.8043 29.6387 23.3823V35.4287Z",
3132
+ fill: "white"
3133
+ }),
3134
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
3135
+ d: "M18.3605 12.5712C18.3605 10.9933 17.0461 9.66972 15.5576 10.1936C14.3224 10.6283 13.1872 11.3489 12.2464 12.3151C10.6248 13.9804 9.71387 16.2392 9.71387 18.5944C9.71387 20.9496 10.6248 23.2083 12.2464 24.8737C13.1872 25.8399 14.3224 26.5605 15.5576 26.9952C17.0461 27.5191 18.3605 26.1955 18.3605 24.6176V12.5712Z",
3136
+ fill: "white"
3137
+ })
3138
+ ]
3139
+ }),
3140
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("defs", {
3141
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("clipPath", {
3142
+ id: "clip0_243_300",
3143
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("rect", {
3144
+ width: "48",
3145
+ height: "48",
3146
+ fill: "white"
3147
+ })
3148
+ })
3149
+ })
3150
+ ]
3151
+ });
3152
+ };
3008
3153
  var $6d8b37b4bd2444ef$export$2e2bcd8739ae039 = $6d8b37b4bd2444ef$var$SnapcallLogo;
3009
3154
 
3010
3155
 
@@ -3365,7 +3510,7 @@ const $7eae5c8ece2c75ff$var$HeaderSettings = ({ baseCategories: baseCategories ,
3365
3510
  items: [
3366
3511
  ...baseCategory.items
3367
3512
  ]
3368
- })),
3513
+ }))
3369
3514
  ];
3370
3515
  extraCategories?.forEach((extraCategory)=>{
3371
3516
  const existingCategory = mergedCategories.find((category)=>category.id === extraCategory.id);
@@ -3505,7 +3650,7 @@ const $21395e477f83709c$var$getLayout = ({ width: width , cellAspectRatio: cellA
3505
3650
  width: roundedWidth,
3506
3651
  height: height
3507
3652
  }
3508
- },
3653
+ }
3509
3654
  ],
3510
3655
  tileCount: tileCount
3511
3656
  };
@@ -3627,7 +3772,7 @@ const $e1930b467e7d8845$var$multiPiP = new (0, $21395e477f83709c$export$45fabd1c
3627
3772
  const $e1930b467e7d8845$var$browser = $jQDcL$bowser.parse(window.navigator.userAgent);
3628
3773
  const $e1930b467e7d8845$var$Header = ()=>{
3629
3774
  const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
3630
- const { setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , setIsVirtualBackgroundPopupVisible: setIsVirtualBackgroundPopupVisible , options: options , muted: muted , streaming: streaming , permissions: permissions , plan: plan , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen , } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
3775
+ const { setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , setIsVirtualBackgroundPopupVisible: setIsVirtualBackgroundPopupVisible , options: options , muted: muted , streaming: streaming , permissions: permissions , plan: plan , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
3631
3776
  const { streams: streams } = (0, $3f6e908c45fcc5b3$export$b5633a7cfbe42d9f)();
3632
3777
  const [extraOptions, setExtraOptions] = (0, $jQDcL$react.useState)(options.extraSettingsOptions || []);
3633
3778
  const onSetExtraSettingsOptions = (event)=>{
@@ -3696,7 +3841,7 @@ const $e1930b467e7d8845$var$Header = ()=>{
3696
3841
  title: t("menu.openNewTab"),
3697
3842
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $cce7f1c9e9c29503$export$6546b255bd3a2004), {}),
3698
3843
  action: onOpenInNewTabClick
3699
- },
3844
+ }
3700
3845
  ]
3701
3846
  },
3702
3847
  {
@@ -3713,7 +3858,7 @@ const $e1930b467e7d8845$var$Header = ()=>{
3713
3858
  title: t("quickConnect.title"),
3714
3859
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $cce7f1c9e9c29503$export$6470d09a29d34d08), {}),
3715
3860
  action: onScanQuickConnectClick
3716
- },
3861
+ }
3717
3862
  ]
3718
3863
  },
3719
3864
  {
@@ -3724,9 +3869,9 @@ const $e1930b467e7d8845$var$Header = ()=>{
3724
3869
  title: t("settings.title"),
3725
3870
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $cce7f1c9e9c29503$export$1095c93890fce526), {}),
3726
3871
  action: onSettingsMenuClick
3727
- },
3872
+ }
3728
3873
  ]
3729
- },
3874
+ }
3730
3875
  ];
3731
3876
  if ($e1930b467e7d8845$var$browser.platform.type === "desktop" && $e1930b467e7d8845$var$browser.engine.name === "Blink") computedCategories[2].items.unshift({
3732
3877
  id: "virtualBackground",
@@ -3750,7 +3895,7 @@ const $e1930b467e7d8845$var$Header = ()=>{
3750
3895
  setIsQuickConnectPopupVisible,
3751
3896
  setBlockedFeaturePopupOpen,
3752
3897
  setIsSettingsMenuVisible,
3753
- setIsVirtualBackgroundPopupVisible,
3898
+ setIsVirtualBackgroundPopupVisible
3754
3899
  ]);
3755
3900
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $1949f8f101c8cf77$export$1e86fd0e1db89578), {
3756
3901
  children: [
@@ -4548,9 +4693,9 @@ const $2c45d365ee8aa1ab$export$2b501aee548bae06 = (0, ($parcel$interopDefault($j
4548
4693
  width: 100%;
4549
4694
  height: 100%;
4550
4695
  background-color: #fff;
4551
- border-radius: 20px;
4696
+ border-radius: inherit;
4552
4697
  z-index: 20;
4553
- animation: ${$2c45d365ee8aa1ab$var$Flash} 0.8s;
4698
+ animation: ${$2c45d365ee8aa1ab$var$Flash} 0.8s forwards;
4554
4699
  `;
4555
4700
  const $2c45d365ee8aa1ab$export$75b79d6244558c9c = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).img`
4556
4701
  width: 88px;
@@ -4907,7 +5052,7 @@ var $c19f00532fd0c23c$export$2e2bcd8739ae039 = $c19f00532fd0c23c$var$Reduce;
4907
5052
 
4908
5053
 
4909
5054
 
4910
- const $6f36db3b1217f099$var$Cross = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
5055
+ const $6f36db3b1217f099$var$Cross = ({ color: color = "#fff" })=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
4911
5056
  width: "24",
4912
5057
  height: "24",
4913
5058
  viewBox: "0 0 24 24",
@@ -4915,7 +5060,7 @@ const $6f36db3b1217f099$var$Cross = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime
4915
5060
  xmlns: "http://www.w3.org/2000/svg",
4916
5061
  children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
4917
5062
  d: "m13.41 12 6.3-6.29a1.004 1.004 0 0 0-1.42-1.42L12 10.59l-6.29-6.3a1.004 1.004 0 1 0-1.42 1.42l6.3 6.29-6.3 6.29a.999.999 0 0 0 0 1.42 1 1 0 0 0 1.42 0l6.29-6.3 6.29 6.3a1.001 1.001 0 0 0 1.639-.325 1 1 0 0 0-.22-1.095L13.41 12Z",
4918
- fill: "#fff"
5063
+ fill: color
4919
5064
  })
4920
5065
  });
4921
5066
  var $6f36db3b1217f099$export$2e2bcd8739ae039 = $6f36db3b1217f099$var$Cross;
@@ -5264,7 +5409,7 @@ const $8393b5c887e16c8c$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
5264
5409
  const videoElementRef = (0, $jQDcL$react.useRef)(null);
5265
5410
  const videoMediaProviderRef = (0, $jQDcL$react.useRef)(null);
5266
5411
  const SelfTileRef = (0, $jQDcL$react.useRef)(null);
5267
- const { videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , profile: profile , muted: muted , streaming: streaming , orientation: orientation , options: options , permissions: permissions , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen , } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
5412
+ const { videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , profile: profile , muted: muted , streaming: streaming , orientation: orientation , options: options , permissions: permissions , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
5268
5413
  const { streams: streams } = (0, $3f6e908c45fcc5b3$export$b5633a7cfbe42d9f)();
5269
5414
  const [containerWidth, containerHeight] = (0, $56e1e7a85d8bf4bb$export$2b86bedf890eab8)(videosContainerRef.current);
5270
5415
  const cursor = streaming && !extended ? "pointer" : "default";
@@ -5509,7 +5654,7 @@ const $8393b5c887e16c8c$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
5509
5654
  }), remoteTilesContainerRef.current);
5510
5655
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $jQDcL$reactjsxruntime.Fragment), {
5511
5656
  children: [
5512
- /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $2c45d365ee8aa1ab$export$98d9314e6a208b24), {
5657
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2c45d365ee8aa1ab$export$98d9314e6a208b24), {
5513
5658
  ref: SelfTileRef,
5514
5659
  style: {
5515
5660
  width: tileWidth,
@@ -5519,16 +5664,16 @@ const $8393b5c887e16c8c$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
5519
5664
  onClick: onSelfTileClick,
5520
5665
  onMouseDown: onSelfTileMouseDown,
5521
5666
  onTouchStart: onSelfTileMouseDown,
5522
- children: [
5523
- snapshotAnimation && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2c45d365ee8aa1ab$export$2b501aee548bae06), {
5524
- onAnimationEnd: ()=>setSnapshotAnimation(false)
5525
- }),
5526
- /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2c45d365ee8aa1ab$export$ba5a75b023bcdce2), {
5527
- orientation: orientation,
5528
- border: !streaming && !deviceRequest,
5529
- children: content
5530
- })
5531
- ]
5667
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $2c45d365ee8aa1ab$export$ba5a75b023bcdce2), {
5668
+ orientation: orientation,
5669
+ border: !streaming && !deviceRequest,
5670
+ children: [
5671
+ snapshotAnimation && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2c45d365ee8aa1ab$export$2b501aee548bae06), {
5672
+ onAnimationEnd: ()=>setSnapshotAnimation(false)
5673
+ }),
5674
+ content
5675
+ ]
5676
+ })
5532
5677
  }),
5533
5678
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2c45d365ee8aa1ab$export$9e533c08c30af08), {
5534
5679
  show: extended
@@ -5678,7 +5823,7 @@ const $65bf10a117819168$export$e9785ae652b3a722 = (item)=>{
5678
5823
  {
5679
5824
  ...item,
5680
5825
  id: 0
5681
- },
5826
+ }
5682
5827
  ]);
5683
5828
  localStorage.setItem(key, stringifiedHistory);
5684
5829
  }
@@ -5786,7 +5931,7 @@ const $c378a92744dc7f32$export$405a29439cf92237 = "youtube_pause";
5786
5931
  const $c378a92744dc7f32$export$649698d6e35b1ef3 = "youtube_stop";
5787
5932
  const $c378a92744dc7f32$var$YoutubeTile = (tile)=>{
5788
5933
  const { selfPeerId: selfPeerId } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
5789
- const [player1, setPlayer] = (0, $jQDcL$react.useState)(null);
5934
+ const [player, setPlayer] = (0, $jQDcL$react.useState)(null);
5790
5935
  const isSelf = tile.peerId === selfPeerId;
5791
5936
  const onVideoStateChange = (event)=>{
5792
5937
  const time = event.target.getCurrentTime();
@@ -5854,15 +5999,15 @@ const $c378a92744dc7f32$var$YoutubeTile = (tile)=>{
5854
5999
  isSelf
5855
6000
  ]);
5856
6001
  (0, $jQDcL$react.useEffect)(()=>{
5857
- if (!isSelf && player1) {
6002
+ if (!isSelf && player) {
5858
6003
  const onCustomMessage = (event)=>{
5859
6004
  const { type: type , time: time } = event.detail.event;
5860
6005
  if (type === $c378a92744dc7f32$export$405a29439cf92237) {
5861
- player1.pauseVideo();
5862
- player1.seekTo(time, true);
6006
+ player.pauseVideo();
6007
+ player.seekTo(time, true);
5863
6008
  } else if (type === $c378a92744dc7f32$export$1712c056f28ddd33) {
5864
- player1.playVideo();
5865
- player1.seekTo(time, true);
6009
+ player.playVideo();
6010
+ player.seekTo(time, true);
5866
6011
  }
5867
6012
  };
5868
6013
  (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).addEventListener("customMessage", onCustomMessage);
@@ -5870,10 +6015,10 @@ const $c378a92744dc7f32$var$YoutubeTile = (tile)=>{
5870
6015
  (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).removeEventListener("customMessage", onCustomMessage);
5871
6016
  };
5872
6017
  }
5873
- if (isSelf && player1) {
6018
+ if (isSelf && player) {
5874
6019
  const onNewPeer = (event)=>{
5875
6020
  const { peerId: peerId } = event.detail;
5876
- const time = player1.getCurrentTime();
6021
+ const time = player.getCurrentTime();
5877
6022
  (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).sendCustomMessage(peerId, {
5878
6023
  type: $c378a92744dc7f32$export$8bd7ff36223ef5c1,
5879
6024
  videoId: tile.data.videoId,
@@ -5888,7 +6033,7 @@ const $c378a92744dc7f32$var$YoutubeTile = (tile)=>{
5888
6033
  }, [
5889
6034
  tile.data,
5890
6035
  isSelf,
5891
- player1
6036
+ player
5892
6037
  ]);
5893
6038
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $b1a83827308c567d$export$f4a8a05247f8d4c), {
5894
6039
  children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $b1a83827308c567d$export$b0da35797f3be127), {
@@ -6462,7 +6607,7 @@ var $537dcc6df507dc4a$export$2e2bcd8739ae039 = $537dcc6df507dc4a$var$tooltip;
6462
6607
 
6463
6608
 
6464
6609
  const $88b23a8428e67b66$var$Video = ()=>{
6465
- const { selfPeerId: selfPeerId , videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , options: options , muted: selfMuted , profile: profile1 , orientation: orientation , userInteractionTriggered: userInteractionTriggered , } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
6610
+ const { selfPeerId: selfPeerId , videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , options: options , muted: selfMuted , profile: profile , orientation: orientation , userInteractionTriggered: userInteractionTriggered } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
6466
6611
  const [tileSize, setTileSize] = (0, $jQDcL$react.useState)({
6467
6612
  width: 0,
6468
6613
  height: 0
@@ -6642,7 +6787,7 @@ const $88b23a8428e67b66$var$Video = ()=>{
6642
6787
  stream: {
6643
6788
  id: String(selfPeerId),
6644
6789
  muted: selfMuted,
6645
- profile: profile1
6790
+ profile: profile
6646
6791
  }
6647
6792
  }),
6648
6793
  streams.map((stream)=>{
@@ -6703,6 +6848,18 @@ const $ec8eb252693ca260$var$Rotate = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntim
6703
6848
  fill: "#F7F7F7"
6704
6849
  })
6705
6850
  });
6851
+ const $ec8eb252693ca260$export$aefffb14595958fe = ()=>{
6852
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
6853
+ xmlns: "http://www.w3.org/2000/svg",
6854
+ width: "32",
6855
+ height: "32",
6856
+ fill: "none",
6857
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
6858
+ fill: "#fff",
6859
+ d: "M26.547 20.68h-6.04a1.333 1.333 0 1 0 0 2.666h3.2A10.667 10.667 0 0 1 5.334 16a1.333 1.333 0 0 0-2.667 0 13.333 13.333 0 0 0 22.507 9.64V28a1.333 1.333 0 1 0 2.666 0v-6a1.333 1.333 0 0 0-1.293-1.32ZM16 2.666A13.333 13.333 0 0 0 6.827 6.36V4A1.333 1.333 0 1 0 4.16 4v6a1.333 1.333 0 0 0 1.334 1.333h6a1.333 1.333 0 0 0 0-2.667h-3.2A10.667 10.667 0 0 1 26.667 16a1.333 1.333 0 1 0 2.667 0A13.333 13.333 0 0 0 16 2.666Z"
6860
+ })
6861
+ });
6862
+ };
6706
6863
  var $ec8eb252693ca260$export$2e2bcd8739ae039 = $ec8eb252693ca260$var$Rotate;
6707
6864
 
6708
6865
 
@@ -6886,7 +7043,7 @@ const $9dfd9e2286cffa66$var$HighlightButton = ()=>{
6886
7043
  const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
6887
7044
  const highlightMenuRef = (0, $jQDcL$react.useRef)(null);
6888
7045
  const [isHighlightMenuOpen, setIsHighlightMenuOpen] = (0, $jQDcL$react.useState)(false);
6889
- const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , selfPeerId: selfPeerId , permissions: permissions , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen , } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
7046
+ const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , selfPeerId: selfPeerId , permissions: permissions , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
6890
7047
  const { highlightedTile: highlightedTile , dispatch: dispatch } = (0, $3f6e908c45fcc5b3$export$b5633a7cfbe42d9f)();
6891
7048
  const isPresenting = Boolean(highlightedTile?.isGlobal && highlightedTile?.peerId === selfPeerId);
6892
7049
  (0, $326cea7dbbcb019a$export$71b2224f1ce5e08e)(highlightMenuRef, ()=>setIsHighlightMenuOpen(false));
@@ -6939,9 +7096,9 @@ const $9dfd9e2286cffa66$var$HighlightButton = ()=>{
6939
7096
  title: t("youtube.title"),
6940
7097
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $3b6953f72db3bb17$export$2e2bcd8739ae039), {}),
6941
7098
  action: onYoutubeClick
6942
- },
7099
+ }
6943
7100
  ]
6944
- },
7101
+ }
6945
7102
  ];
6946
7103
  if ($9dfd9e2286cffa66$var$isScreenshareSupported) menuCategories.push({
6947
7104
  id: "2",
@@ -6951,7 +7108,7 @@ const $9dfd9e2286cffa66$var$HighlightButton = ()=>{
6951
7108
  title: t("menu.screenSharing"),
6952
7109
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $f2ca2ee422d05e6e$export$2e2bcd8739ae039), {}),
6953
7110
  action: onScreenshareClick
6954
- },
7111
+ }
6955
7112
  ]
6956
7113
  });
6957
7114
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $jQDcL$reactjsxruntime.Fragment), {
@@ -7096,9 +7253,9 @@ const $a21b2aa064cb6c32$var$ControlBar = ()=>{
7096
7253
  jsxIcon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $cce7f1c9e9c29503$export$e57aa6aff2e1f414), {}),
7097
7254
  action: terminateCall,
7098
7255
  danger: true
7099
- },
7256
+ }
7100
7257
  ]
7101
- },
7258
+ }
7102
7259
  ]
7103
7260
  })
7104
7261
  }),
@@ -7279,7 +7436,7 @@ const $681806ce8015ae4d$var$QuickConnect = ()=>{
7279
7436
  const themeContext = (0, $jQDcL$react.useContext)((0, $jQDcL$styledcomponents.ThemeContext));
7280
7437
  const QuickConnectContainerRef = (0, $jQDcL$react.useRef)(null);
7281
7438
  const QuickConnectRef = (0, $jQDcL$react.useRef)(null);
7282
- const { selfPeerId: selfPeerId , profile: profile , isQuickConnectPopupVisible: isQuickConnectPopupVisible , setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , options: options , orientation: orientation , } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
7439
+ const { selfPeerId: selfPeerId , profile: profile , isQuickConnectPopupVisible: isQuickConnectPopupVisible , setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , options: options , orientation: orientation } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
7283
7440
  (0, $326cea7dbbcb019a$export$71b2224f1ce5e08e)(QuickConnectContainerRef, ()=>{
7284
7441
  if (isQuickConnectPopupVisible) setIsQuickConnectPopupVisible(false);
7285
7442
  });
@@ -9133,7 +9290,7 @@ const $8a52c9358bc52b86$var$backgroundOptions = [
9133
9290
  title: "Blurred",
9134
9291
  value: "blurred",
9135
9292
  id: "background-blurred"
9136
- },
9293
+ }
9137
9294
  ];
9138
9295
  const $8a52c9358bc52b86$var$VirtualBackgroundPopup = ()=>{
9139
9296
  const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
@@ -9406,7 +9563,7 @@ const $e6950939129bcd4b$export$8376625f8bb18347 = (0, ($parcel$interopDefault($j
9406
9563
 
9407
9564
 
9408
9565
  const $5f509eaff0d9c05a$var$Settings = ()=>{
9409
- const { isQuickConnectPopupVisible: isQuickConnectPopupVisible , isSettingsMenuVisible: isSettingsMenuVisible , isYoutubePopupVisible: isYoutubePopupVisible , isLinksharePopupVisible: isLinksharePopupVisible , isVirtualBackgroundPopupVisible: isVirtualBackgroundPopupVisible , isBlockedFeaturePopupOpen: isBlockedFeaturePopupOpen , } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
9566
+ const { isQuickConnectPopupVisible: isQuickConnectPopupVisible , isSettingsMenuVisible: isSettingsMenuVisible , isYoutubePopupVisible: isYoutubePopupVisible , isLinksharePopupVisible: isLinksharePopupVisible , isVirtualBackgroundPopupVisible: isVirtualBackgroundPopupVisible , isBlockedFeaturePopupOpen: isBlockedFeaturePopupOpen } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
9410
9567
  const open = isQuickConnectPopupVisible || isSettingsMenuVisible || isYoutubePopupVisible || isBlockedFeaturePopupOpen || isLinksharePopupVisible || isVirtualBackgroundPopupVisible;
9411
9568
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $e6950939129bcd4b$export$8376625f8bb18347), {
9412
9569
  open: open,
@@ -10184,8 +10341,8 @@ const $c3d5253d9d597eb5$var$audioSource = new Blob([
10184
10341
  170,
10185
10342
  170,
10186
10343
  170,
10187
- 170,
10188
- ]),
10344
+ 170
10345
+ ])
10189
10346
  ], {
10190
10347
  type: "audio/mpeg"
10191
10348
  });
@@ -10286,120 +10443,1480 @@ const $e3bb2c5d0e5b45b5$export$914ddf2021ea8ee6 = (0, ($parcel$interopDefault($j
10286
10443
 
10287
10444
 
10288
10445
 
10289
- const $ee8cb448c2c74888$var$currentTheme = (0, $9295e87e6b93e693$export$3bfd0d5209a8006a)();
10290
- const $ee8cb448c2c74888$var$currentLanguage = (0, $393bda1b33846dfc$export$604ba5624273df44)();
10291
- let $ee8cb448c2c74888$var$timestampCriticalError = -1;
10292
- const $ee8cb448c2c74888$var$StreamUI = ({ options: options })=>{
10293
- const [selfPeerId, setSelfPeerId] = (0, $jQDcL$react.useState)(undefined);
10294
- const streamUIContainerRef = (0, $jQDcL$react.useRef)(null);
10295
- const videosContainerRef = (0, $jQDcL$react.useRef)(null);
10296
- const remoteTilesContainerRef = (0, $jQDcL$react.useRef)(null);
10297
- const [streamState, setStreamState] = (0, $jQDcL$react.useState)("streaming");
10298
- const [isQuickConnectPopupVisible, setIsQuickConnectPopupVisible] = (0, $jQDcL$react.useState)(false);
10299
- const [isSettingsMenuVisible, setIsSettingsMenuVisible] = (0, $jQDcL$react.useState)(false);
10300
- const [isYoutubePopupVisible, setIsYoutubePopupVisible] = (0, $jQDcL$react.useState)(false);
10301
- const [isLinksharePopupVisible, setIsLinksharePopupVisible] = (0, $jQDcL$react.useState)(false);
10302
- const [isVirtualBackgroundPopupVisible, setIsVirtualBackgroundPopupVisible] = (0, $jQDcL$react.useState)(false);
10303
- const [theme, setTheme] = (0, $jQDcL$react.useState)($ee8cb448c2c74888$var$currentTheme);
10304
- const [language, setLanguage] = (0, $jQDcL$react.useState)(options.language || $ee8cb448c2c74888$var$currentLanguage);
10305
- const [profile1, setProfile] = (0, $jQDcL$react.useState)({});
10306
- const [muted, setMuted] = (0, $jQDcL$react.useState)(true);
10307
- const [streaming, setStreaming] = (0, $jQDcL$react.useState)(false);
10308
- const [screensharing, setScreensharing] = (0, $jQDcL$react.useState)(false);
10309
- const [isAgent, setIsAgent] = (0, $jQDcL$react.useState)(false);
10310
- const [userInteractionTriggered, setUserInteractionTriggered] = (0, $jQDcL$react.useState)(false);
10311
- const [containerWidth, containerHeight] = (0, $56e1e7a85d8bf4bb$export$2b86bedf890eab8)(streamUIContainerRef.current);
10312
- const [isBlockedDevicesPopupOpen, setBlockedDevicesPopupOpen] = (0, $jQDcL$react.useState)(false);
10313
- const [isBlockedFeaturePopupOpen, setBlockedFeaturePopupOpen] = (0, $jQDcL$react.useState)(false);
10314
- const [permissions, setPermissions] = (0, $jQDcL$react.useState)([]);
10315
- const [plan, setPlan] = (0, $jQDcL$react.useState)(undefined);
10316
- const orientation = (containerWidth || window.screen.width) > (containerHeight || window.screen.height) ? "landscape" : "portrait";
10317
- const styledTheme = theme === "dark" ? (0, $9295e87e6b93e693$export$3e936a8db52a10a0) : (0, $9295e87e6b93e693$export$f30cb9bc4f736419);
10318
- const onWebcamUpdate = (event)=>{
10319
- if (event.type === "localVideoAvailable") setStreaming(true);
10320
- else setStreaming(false);
10321
- };
10322
- const onScreenshareUpdate = (event)=>{
10323
- if (event.type === "screenshareEnabled") setScreensharing(true);
10324
- else setScreensharing(false);
10325
- };
10326
- const onMicrophoneUpdate = (event)=>{
10327
- if (event.type === "microphoneMute") setMuted(true);
10328
- else setMuted(false);
10329
- };
10330
- const onDefaultAudioDeviceChange = (event)=>{
10331
- const micro = event.detail.label;
10332
- (0, $84c6cbcbb594d072$export$3a57e165650c636f)(`Connected to ${micro}`, {
10333
- duration: 3000,
10334
- icon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $0ac48791ff0bcc8e$export$2e2bcd8739ae039), {}),
10335
- messageStyle: {
10336
- fontWeight: 600
10337
- }
10338
- });
10339
- };
10340
- const onSelfProfileUpdate = (event)=>{
10341
- const { profile: profile } = event.detail;
10342
- setProfile(profile);
10343
- };
10344
- const onCallEnd = ()=>{
10345
- (0, $c3d5253d9d597eb5$export$716eeec86fd18da7)();
10346
- setStreamState("ended");
10347
- setMuted(true);
10348
- setStreaming(false);
10349
- setScreensharing(false);
10350
- setUserInteractionTriggered(false);
10351
- };
10352
- const onCallTerminated = ()=>{
10353
- (0, $c3d5253d9d597eb5$export$716eeec86fd18da7)();
10354
- setStreamState("terminated");
10446
+
10447
+
10448
+
10449
+
10450
+
10451
+
10452
+
10453
+
10454
+
10455
+
10456
+
10457
+
10458
+
10459
+
10460
+
10461
+ function $6e29654b44f114e1$export$61dc559f8a0b9bcf(ref) {
10462
+ const innerRef = (0, $jQDcL$react.useRef)(null);
10463
+ (0, $jQDcL$react.useEffect)(()=>{
10464
+ if (!ref) return;
10465
+ if (typeof ref === "function") ref(innerRef.current);
10466
+ else ref.current = innerRef.current;
10467
+ });
10468
+ return innerRef;
10469
+ }
10470
+ const $6e29654b44f114e1$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $jQDcL$react.forwardRef)(function Button({ children: children , ...otherProps }, forwardedRef) {
10471
+ const ref = $6e29654b44f114e1$export$61dc559f8a0b9bcf(forwardedRef);
10472
+ let state = (0, $jQDcL$reactstately.useToggleState)(otherProps);
10473
+ const { buttonProps: buttonProps } = (0, $jQDcL$reactaria.useToggleButton)(otherProps, state, ref);
10474
+ const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $jQDcL$reactaria.useFocusRing)();
10475
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("button", {
10476
+ className: (0, ($parcel$interopDefault($jQDcL$classnames)))("w-[76px] h-[40px]", otherProps.isSelected ? "bg-[#FFFFFF]" : "bg-[#FFFFFF] opacity-[0.4]", "rounded-full", "text-black", "flex items-center justify-center gap-[5px]", "text-base font-medium", "transition-colors ease-in-out", "focus:outline-none", {
10477
+ "ring-[3px] ring-cta": isFocusVisible,
10478
+ "cursor-not-allowed": buttonProps.disabled
10479
+ }),
10480
+ ...buttonProps,
10481
+ ...focusProps,
10482
+ ref: ref,
10483
+ children: children
10484
+ });
10485
+ });
10486
+
10487
+
10488
+
10489
+
10490
+
10491
+
10492
+
10493
+
10494
+
10495
+
10496
+
10497
+
10498
+
10499
+
10500
+
10501
+
10502
+
10503
+
10504
+
10505
+
10506
+ const $f98f91fb267f52c8$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $jQDcL$react.forwardRef)(function Button({ children: children , variant: variant = "primary" , size: size = "medium" , fullWidth: fullWidth = false , form: form , className: className , ...otherProps }, forwardedRef) {
10507
+ const ref = (0, $6e29654b44f114e1$export$61dc559f8a0b9bcf)(forwardedRef);
10508
+ const { buttonProps: buttonProps , isPressed: isPressed } = (0, $jQDcL$reactaria.useButton)(otherProps, ref);
10509
+ const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $jQDcL$reactaria.useFocusRing)();
10510
+ const { hoverProps: hoverProps , isHovered: isHovered } = (0, $jQDcL$reactariainteractions.useHover)({
10511
+ isDisabled: buttonProps.disabled
10512
+ });
10513
+ const isActive = isHovered || isFocusVisible || isPressed;
10514
+ const variantStyle = {
10515
+ primary: (0, ($parcel$interopDefault($jQDcL$classnames)))(isActive ? "bg-primaryLight" : "bg-primary", "text-white disabled:bg-secondaryLight"),
10516
+ secondary: (0, ($parcel$interopDefault($jQDcL$classnames)))(isActive ? "bg-graySelected" : "bg-transparent", "text-primary border border-secondaryLight disabled:text-secondaryLight disabled:bg-graySelected"),
10517
+ basic: (0, ($parcel$interopDefault($jQDcL$classnames)))(isActive ? "bg-graySelected" : "bg-white", "text-primary disabled:text-secondaryLight disabled:bg-graySelected"),
10518
+ custom: ""
10355
10519
  };
10356
- const onInvalidRoom = ()=>{
10357
- setStreamState("expired");
10520
+ const sizeStyle = {
10521
+ large: "py-3 px-4 text-base rounded-lg",
10522
+ medium: "py-[9px] px-3.5 text-base rounded-lg",
10523
+ small: "py-2 px-3 text-sm rounded-lg",
10524
+ extraSmall: "py-1.5 px-2.5 text-xs rounded-md",
10525
+ custom: ""
10358
10526
  };
10359
- const onAgentIdentity = (event)=>{
10360
- const { success: success , email: email } = event.detail;
10361
- if (success) {
10362
- setIsAgent(true);
10363
- if (email) (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).identify(null, {
10364
- email: email
10365
- });
10366
- } else (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured while trying to join the room as an agent", {
10367
- className: "error"
10368
- });
10527
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("button", {
10528
+ className: (0, ($parcel$interopDefault($jQDcL$classnames)))(sizeStyle[size], variantStyle[variant], "flex items-center justify-center gap-[5px] font-medium", "transition-colors ease-in-out", "focus:outline-none", {
10529
+ "ring-[3px] ring-cta": isFocusVisible,
10530
+ "cursor-not-allowed": buttonProps.disabled,
10531
+ "w-full": fullWidth
10532
+ }, className),
10533
+ ...buttonProps,
10534
+ ...focusProps,
10535
+ ...hoverProps,
10536
+ form: form,
10537
+ ref: ref,
10538
+ children: children
10539
+ });
10540
+ });
10541
+
10542
+
10543
+ function $48c2553f62767e40$export$2b77a92f1a5ad772(props) {
10544
+ const { children: children , state: state , size: size = "small" , title: title , description: description , primaryAction: primaryAction , secondaryAction: secondaryAction , centered: centered = false } = props;
10545
+ const ref = (0, ($parcel$interopDefault($jQDcL$react))).useRef(null);
10546
+ const { modalProps: modalProps , underlayProps: underlayProps } = (0, $jQDcL$reactariaoverlays.useModalOverlay)({
10547
+ isDismissable: true,
10548
+ ...props
10549
+ }, state, ref);
10550
+ const [exited, setExited] = (0, $jQDcL$react.useState)(!state.isOpen);
10551
+ const viewport = (0, $jQDcL$reactariautils.useViewportSize)();
10552
+ const maxHeight = viewport.height - 64;
10553
+ const modalSize = {
10554
+ small: "max-w-[400px] mx-[20px]",
10555
+ medium: "max-w-[600px]",
10556
+ large: "max-w-[800px]"
10369
10557
  };
10370
- const onCriticalError = (event)=>{
10371
- const duration = 20000;
10372
- const now = Date.now();
10373
- if (event.detail.code === "USERLIMIT") {
10374
- setStreamState("full");
10375
- return;
10376
- }
10377
- if ($ee8cb448c2c74888$var$timestampCriticalError !== -1 && $ee8cb448c2c74888$var$timestampCriticalError + duration > now) return;
10378
- $ee8cb448c2c74888$var$timestampCriticalError = now;
10379
- (0, $84c6cbcbb594d072$export$3a57e165650c636f)(`A critical error has occurred (error ${event.detail.code}).`, {
10380
- icon: (0, $e8ac63718934c648$export$c7df1b15b59b1df2),
10381
- button: {
10382
- text: "Reload",
10383
- action: ()=>{
10384
- window.location.reload();
10385
- }
10558
+ // Don't render anything if the modal is not open and we're not animating out.
10559
+ if (!(state.isOpen || !exited)) return null;
10560
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $jQDcL$reactariaoverlays.Overlay), {
10561
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $jQDcL$reacttransitiongroup.CSSTransition), {
10562
+ in: state.isOpen,
10563
+ appear: true,
10564
+ onEntered: ()=>setExited(false),
10565
+ onExited: ()=>setExited(true),
10566
+ timeout: {
10567
+ enter: 0,
10568
+ exit: 300
10386
10569
  },
10387
- duration: duration
10388
- });
10389
- };
10390
- (0, $jQDcL$react.useEffect)(()=>{
10391
- try {
10392
- localStorage.setItem("stream_ui_theme", theme);
10393
- } catch (localStorageError) {
10394
- console.warn(localStorageError);
10395
- }
10396
- }, [
10397
- theme
10398
- ]);
10399
- (0, $jQDcL$react.useEffect)(()=>{
10400
- try {
10401
- localStorage.setItem("stream_ui_language", language);
10402
- (0, $b45c0bcc142f0b5e$export$2e2bcd8739ae039).changeLanguage(language);
10570
+ classNames: {
10571
+ enter: "opacity-0",
10572
+ enterDone: "opacity-1 transition ease-in",
10573
+ exit: "opacity-0 transition ease-out"
10574
+ },
10575
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
10576
+ className: "fixed z-[100] inset-0 bg-black bg-opacity-90 flex justify-center items-center inter",
10577
+ ...underlayProps,
10578
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $jQDcL$reacttransitiongroup.CSSTransition), {
10579
+ in: state.isOpen,
10580
+ appear: true,
10581
+ nodeRef: ref,
10582
+ timeout: {
10583
+ enter: 0,
10584
+ exit: 300
10585
+ },
10586
+ classNames: {
10587
+ appear: "translate-y-2",
10588
+ appearDone: "translate-y-0 transition ease-in",
10589
+ exit: "translate-y-2 transition ease-out"
10590
+ },
10591
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
10592
+ ...modalProps,
10593
+ ref: ref,
10594
+ className: (0, ($parcel$interopDefault($jQDcL$classnames)))("bg-white rounded-[10px] z-[1] overflow-auto focus:outline-none", modalSize[size]),
10595
+ style: {
10596
+ maxHeight: `${maxHeight}px`
10597
+ },
10598
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
10599
+ className: "flex flex-col gap-5 px-5 py-[25px]",
10600
+ children: [
10601
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
10602
+ className: (0, ($parcel$interopDefault($jQDcL$classnames)))("flex flex-col gap-[5px]", {
10603
+ "text-center": centered
10604
+ }),
10605
+ children: [
10606
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("h2", {
10607
+ className: "text-xl font-medium",
10608
+ children: title
10609
+ }),
10610
+ description && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("p", {
10611
+ className: "text-sm text-secondary",
10612
+ children: description
10613
+ })
10614
+ ]
10615
+ }),
10616
+ children,
10617
+ (primaryAction || secondaryAction) && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
10618
+ className: (0, ($parcel$interopDefault($jQDcL$classnames)))("flex justify-end gap-2.5", centered ? "justify-center" : "justify-end"),
10619
+ children: [
10620
+ typeof secondaryAction === "string" && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $f98f91fb267f52c8$export$353f5b6fc5456de1), {
10621
+ variant: "secondary",
10622
+ onPress: state.close,
10623
+ fullWidth: centered,
10624
+ children: secondaryAction
10625
+ }),
10626
+ typeof secondaryAction === "function" && secondaryAction({
10627
+ close: state.close
10628
+ }),
10629
+ typeof primaryAction === "string" && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $f98f91fb267f52c8$export$353f5b6fc5456de1), {
10630
+ onPress: state.close,
10631
+ fullWidth: centered,
10632
+ children: primaryAction
10633
+ }),
10634
+ typeof primaryAction === "function" && primaryAction({
10635
+ close: state.close
10636
+ })
10637
+ ]
10638
+ })
10639
+ ]
10640
+ })
10641
+ })
10642
+ })
10643
+ })
10644
+ })
10645
+ });
10646
+ }
10647
+
10648
+
10649
+
10650
+
10651
+ const $bec7bca3a7448591$export$f9da3144ae2525a3 = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("svg", {
10652
+ width: "20",
10653
+ height: "21",
10654
+ viewBox: "0 0 20 21",
10655
+ fill: "none",
10656
+ xmlns: "http://www.w3.org/2000/svg",
10657
+ style: {
10658
+ display: "inline"
10659
+ },
10660
+ transform: "translate(0 -1)",
10661
+ children: [
10662
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
10663
+ d: "M10 2.167a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",
10664
+ fill: "#1D1C20"
10665
+ }),
10666
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
10667
+ d: "M6.76 5.65a5.833 5.833 0 1 1 6.481 9.7 5.833 5.833 0 0 1-6.481-9.7Z",
10668
+ fill: "#F12828"
10669
+ })
10670
+ ]
10671
+ });
10672
+ const $bec7bca3a7448591$export$c6a849fd9d9d93a2 = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("svg", {
10673
+ width: "20",
10674
+ height: "20",
10675
+ viewBox: "0 0 20 20",
10676
+ fill: "none",
10677
+ xmlns: "http://www.w3.org/2000/svg",
10678
+ style: {
10679
+ display: "inline"
10680
+ },
10681
+ transform: "translate(0 -1)",
10682
+ children: [
10683
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
10684
+ d: "M10 1.667a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",
10685
+ fill: "#1D1C20"
10686
+ }),
10687
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
10688
+ d: "M7.5 6.667h5a.833.833 0 0 1 .833.833v5a.833.833 0 0 1-.834.834h-5a.833.833 0 0 1-.833-.834v-5a.833.833 0 0 1 .833-.833Z",
10689
+ fill: "#F12828"
10690
+ })
10691
+ ]
10692
+ });
10693
+ const $bec7bca3a7448591$export$dce36e07153365d = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("svg", {
10694
+ width: "20",
10695
+ height: "20",
10696
+ viewBox: "0 0 20 20",
10697
+ fill: "none",
10698
+ xmlns: "http://www.w3.org/2000/svg",
10699
+ style: {
10700
+ display: "inline"
10701
+ },
10702
+ transform: "translate(0 -1)",
10703
+ children: [
10704
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
10705
+ d: "M10 1.667a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.666 6.666 0 1 1 0-13.333 6.666 6.666 0 0 1 0 13.333Z",
10706
+ fill: "#1D1C20"
10707
+ }),
10708
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
10709
+ d: "M6.76 5.15a5.833 5.833 0 1 1 6.481 9.7 5.833 5.833 0 0 1-6.481-9.7Z",
10710
+ fill: "#1D1C20"
10711
+ })
10712
+ ]
10713
+ });
10714
+
10715
+
10716
+
10717
+
10718
+
10719
+ const $b46da51ab7ae33e7$var$Text = ({ children: children })=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("span", {
10720
+ className: "w-full text-base text-primaryLight font-normal leading-[20px]",
10721
+ children: children
10722
+ });
10723
+ const $b46da51ab7ae33e7$var$Bold = ({ children: children })=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("span", {
10724
+ className: "text-primary font-medium",
10725
+ children: children
10726
+ });
10727
+ const $b46da51ab7ae33e7$var$InstructionRow = ({ children: children , index: index })=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
10728
+ className: "flex flex-row justify-center gap-[5px]",
10729
+ children: [
10730
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
10731
+ className: "flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-secondaryVLight",
10732
+ children: index
10733
+ }),
10734
+ children
10735
+ ]
10736
+ });
10737
+ const $b46da51ab7ae33e7$export$788cb893d96254c8 = ({ state: state , type: type })=>{
10738
+ const [permissionsState, setPermissionsState] = (0, $jQDcL$react.useState)("idle");
10739
+ const [isRoomReady, setRoomReady] = (0, $jQDcL$react.useState)(false);
10740
+ const { orientation: orientation } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
10741
+ const device = orientation === "landscape" ? "desktop" : "mobile";
10742
+ const videoLength = permissionsState === "granted" ? "short" : "full";
10743
+ const videoType = type === "picture" ? "photo" : "video";
10744
+ const onDeviceEnabled = ()=>setPermissionsState("granted");
10745
+ const onEnterRoom = ()=>setRoomReady(true);
10746
+ const onLeaveRoom = ()=>setRoomReady(false);
10747
+ const ref = (0, $jQDcL$react.useRef)(null);
10748
+ const title = (0, $jQDcL$react.useMemo)(()=>{
10749
+ if (permissionsState === "refused") return "Something went wrong!";
10750
+ if (type === "picture") return "Ready to take a shot?";
10751
+ return "Ready to record a video?";
10752
+ }, [
10753
+ permissionsState,
10754
+ type
10755
+ ]);
10756
+ (0, $jQDcL$react.useEffect)(()=>{
10757
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).addEventListener("localVideoAvailable", onDeviceEnabled);
10758
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).addEventListener("microphoneEnabled", onDeviceEnabled);
10759
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).addEventListener("enterRoom", onEnterRoom);
10760
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).addEventListener("leaveRoom", onLeaveRoom);
10761
+ return ()=>{
10762
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).removeEventListener("localVideoAvailable", onDeviceEnabled);
10763
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).removeEventListener("microphoneEnabled", onDeviceEnabled);
10764
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).removeEventListener("enterRoom", onEnterRoom);
10765
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).removeEventListener("leaveRoom", onLeaveRoom);
10766
+ };
10767
+ }, []);
10768
+ const permissionsInstructionIndex = Number(permissionsState !== "granted");
10769
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $48c2553f62767e40$export$2b77a92f1a5ad772), {
10770
+ title: title,
10771
+ state: state,
10772
+ centered: permissionsState !== "refused",
10773
+ isDismissable: false,
10774
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
10775
+ className: "flex flex-col gap-[20px]",
10776
+ children: [
10777
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
10778
+ className: "flex flex-col gap-[10px]",
10779
+ ref: ref,
10780
+ children: permissionsState === "refused" ? /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$Text, {
10781
+ children: "Without camera and microphone access, you can't take photos or videos to share with the support team. Please grant access in your browser settings."
10782
+ }) : /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $jQDcL$reactjsxruntime.Fragment), {
10783
+ children: [
10784
+ permissionsState !== "granted" && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$InstructionRow, {
10785
+ index: 1,
10786
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)($b46da51ab7ae33e7$var$Text, {
10787
+ children: [
10788
+ "When prompted, ",
10789
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$Bold, {
10790
+ children: "allow access"
10791
+ }),
10792
+ " to camera and microphone."
10793
+ ]
10794
+ })
10795
+ }),
10796
+ type === "picture" && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $jQDcL$reactjsxruntime.Fragment), {
10797
+ children: [
10798
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$InstructionRow, {
10799
+ index: 1 + permissionsInstructionIndex,
10800
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)($b46da51ab7ae33e7$var$Text, {
10801
+ children: [
10802
+ "Tap the ",
10803
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $bec7bca3a7448591$export$dce36e07153365d), {}),
10804
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$Bold, {
10805
+ children: " Camera button"
10806
+ }),
10807
+ " to take a photo."
10808
+ ]
10809
+ })
10810
+ }),
10811
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$InstructionRow, {
10812
+ index: 2 + permissionsInstructionIndex,
10813
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$Text, {
10814
+ children: "Don't hesitate to take multiple photos for more detail."
10815
+ })
10816
+ }),
10817
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$InstructionRow, {
10818
+ index: 3 + permissionsInstructionIndex,
10819
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)($b46da51ab7ae33e7$var$Text, {
10820
+ children: [
10821
+ "You can review your photo and then ",
10822
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$Bold, {
10823
+ children: "send it when you're done."
10824
+ })
10825
+ ]
10826
+ })
10827
+ })
10828
+ ]
10829
+ }),
10830
+ type === "video" && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $jQDcL$reactjsxruntime.Fragment), {
10831
+ children: [
10832
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$InstructionRow, {
10833
+ index: 1 + permissionsInstructionIndex,
10834
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)($b46da51ab7ae33e7$var$Text, {
10835
+ children: [
10836
+ "Tap the ",
10837
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $bec7bca3a7448591$export$f9da3144ae2525a3), {}),
10838
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$Bold, {
10839
+ children: " Record button"
10840
+ }),
10841
+ " to start a recording."
10842
+ ]
10843
+ })
10844
+ }),
10845
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$InstructionRow, {
10846
+ index: 2 + permissionsInstructionIndex,
10847
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)($b46da51ab7ae33e7$var$Text, {
10848
+ children: [
10849
+ "You can ",
10850
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$Bold, {
10851
+ children: "speak during"
10852
+ }),
10853
+ " the recording for added detail."
10854
+ ]
10855
+ })
10856
+ }),
10857
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$InstructionRow, {
10858
+ index: 3 + permissionsInstructionIndex,
10859
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)($b46da51ab7ae33e7$var$Text, {
10860
+ children: [
10861
+ "When you're finished, tap the ",
10862
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $bec7bca3a7448591$export$c6a849fd9d9d93a2), {}),
10863
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$Bold, {
10864
+ children: " Stop button"
10865
+ }),
10866
+ "."
10867
+ ]
10868
+ })
10869
+ }),
10870
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$InstructionRow, {
10871
+ index: 4 + permissionsInstructionIndex,
10872
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)($b46da51ab7ae33e7$var$Text, {
10873
+ children: [
10874
+ "You can review your video and then ",
10875
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)($b46da51ab7ae33e7$var$Bold, {
10876
+ children: "send it when you're done"
10877
+ }),
10878
+ "."
10879
+ ]
10880
+ })
10881
+ })
10882
+ ]
10883
+ })
10884
+ ]
10885
+ })
10886
+ }),
10887
+ permissionsState !== "refused" && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
10888
+ className: "flex items-center justify-center rounded-[8px] overflow-hidden",
10889
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("video", {
10890
+ src: `${"https://stream-assets.snapcall.io"}/animations/${device}-assist-onboarding-${videoType}-${videoLength}.mp4`,
10891
+ playsInline: true,
10892
+ autoPlay: true,
10893
+ muted: true,
10894
+ loop: true
10895
+ })
10896
+ }),
10897
+ permissionsState === "refused" ? /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $f98f91fb267f52c8$export$353f5b6fc5456de1), {
10898
+ onPress: ()=>window.location.reload(),
10899
+ children: "Allow access"
10900
+ }) : /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $jQDcL$reactjsxruntime.Fragment), {
10901
+ children: permissionsState === "granted" ? /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $f98f91fb267f52c8$export$353f5b6fc5456de1), {
10902
+ onPress: state.close,
10903
+ children: "Okay"
10904
+ }) : /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $f98f91fb267f52c8$export$353f5b6fc5456de1), {
10905
+ isDisabled: permissionsState === "requesting" || isRoomReady === false,
10906
+ onPress: async ()=>{
10907
+ setPermissionsState("requesting");
10908
+ try {
10909
+ const mediaResult = await navigator.mediaDevices.getUserMedia({
10910
+ audio: true,
10911
+ video: true
10912
+ });
10913
+ mediaResult.getTracks().forEach((track)=>track.stop());
10914
+ await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).enableMicrophone();
10915
+ await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).enableVideo({
10916
+ resolution: "vga",
10917
+ frameRate: 20,
10918
+ facingMode: "environment"
10919
+ });
10920
+ } catch {
10921
+ setPermissionsState("refused");
10922
+ }
10923
+ },
10924
+ children: [
10925
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $41e530447f5fd995$export$2e2bcd8739ae039), {}),
10926
+ "Allow access to cam/mic"
10927
+ ]
10928
+ })
10929
+ })
10930
+ ]
10931
+ })
10932
+ });
10933
+ };
10934
+
10935
+
10936
+
10937
+
10938
+
10939
+
10940
+
10941
+
10942
+ const $4dac51e936eb334f$export$f9d8408fefd786da = ({ state: state , setReady: setReady })=>{
10943
+ const QRCodeRef = (0, $jQDcL$react.useRef)(null);
10944
+ (0, $jQDcL$react.useEffect)(()=>{
10945
+ $jQDcL$qrcode.toCanvas(QRCodeRef.current, window.location.href, {
10946
+ errorCorrectionLevel: "M"
10947
+ });
10948
+ }, []);
10949
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $48c2553f62767e40$export$2b77a92f1a5ad772), {
10950
+ centered: true,
10951
+ title: "Switch to your mobile",
10952
+ description: "Enjoy an even more convenient experience by using your phone to take photos and record videos.",
10953
+ state: state,
10954
+ children: [
10955
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
10956
+ className: "pb-[20px]",
10957
+ children: [
10958
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
10959
+ className: "flex flex-1 items-center justify-center relative",
10960
+ children: [
10961
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
10962
+ className: "absolute w-[70px] h-[70px]",
10963
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $8745dbdbe55f5ff3$export$2e2bcd8739ae039), {})
10964
+ }),
10965
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("canvas", {
10966
+ ref: QRCodeRef
10967
+ })
10968
+ ]
10969
+ }),
10970
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("p", {
10971
+ className: "flex items-center justify-center text-xs text-primaryLight",
10972
+ children: "Scan this QR code with a compatible device."
10973
+ })
10974
+ ]
10975
+ }),
10976
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $f98f91fb267f52c8$export$353f5b6fc5456de1), {
10977
+ onPress: ()=>{
10978
+ setReady(true);
10979
+ state.close();
10980
+ },
10981
+ children: "Use desktop version"
10982
+ })
10983
+ ]
10984
+ });
10985
+ };
10986
+
10987
+
10988
+ function $d7eacc710221ffb1$export$fc3bf4634b488af8({ mode: mode }) {
10989
+ const { orientation: orientation } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
10990
+ const desktop = orientation === "landscape";
10991
+ const [ready, setReady] = (0, $jQDcL$react.useState)(!desktop);
10992
+ (0, $jQDcL$react.useEffect)(()=>{
10993
+ if (ready) {
10994
+ setIsPhotoInstructionsModalOpen(mode === "photo" && ready);
10995
+ setIsVideoInstructionsModalOpen(mode === "video" && ready);
10996
+ }
10997
+ }, [
10998
+ ready,
10999
+ mode
11000
+ ]);
11001
+ const [isPhotoInstructionsModalOpen, setIsPhotoInstructionsModalOpen] = (0, $jQDcL$react.useState)(mode === "photo" && ready);
11002
+ const [isVideoInstructionsModalOpen, setIsVideoInstructionsModalOpen] = (0, $jQDcL$react.useState)(mode === "video" && ready);
11003
+ const photoInstructionsModalState = (0, $jQDcL$reactstately.useOverlayTriggerState)({
11004
+ isOpen: isPhotoInstructionsModalOpen,
11005
+ onOpenChange: setIsPhotoInstructionsModalOpen
11006
+ });
11007
+ const videoInstructionsModalState = (0, $jQDcL$reactstately.useOverlayTriggerState)({
11008
+ isOpen: isVideoInstructionsModalOpen,
11009
+ onOpenChange: setIsVideoInstructionsModalOpen
11010
+ });
11011
+ return {
11012
+ photoInstructionsModalState: photoInstructionsModalState,
11013
+ videoInstructionsModalState: videoInstructionsModalState,
11014
+ ready: ready,
11015
+ setReady: setReady
11016
+ };
11017
+ }
11018
+ const $d7eacc710221ffb1$export$bee10e8ab511933f = ({ state: state })=>{
11019
+ const [isSwitchToMobileModalOpen, setIsSwitchToMobileOpen] = (0, $jQDcL$react.useState)(!state.ready);
11020
+ const switchToMobileModalState = (0, $jQDcL$reactstately.useOverlayTriggerState)({
11021
+ isOpen: isSwitchToMobileModalOpen,
11022
+ onOpenChange: setIsSwitchToMobileOpen
11023
+ });
11024
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $jQDcL$reactjsxruntime.Fragment), {
11025
+ children: [
11026
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $b46da51ab7ae33e7$export$788cb893d96254c8), {
11027
+ state: state.photoInstructionsModalState,
11028
+ type: "picture"
11029
+ }),
11030
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $b46da51ab7ae33e7$export$788cb893d96254c8), {
11031
+ state: state.videoInstructionsModalState,
11032
+ type: "video"
11033
+ }),
11034
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $4dac51e936eb334f$export$f9d8408fefd786da), {
11035
+ state: switchToMobileModalState,
11036
+ setReady: state.setReady
11037
+ })
11038
+ ]
11039
+ });
11040
+ };
11041
+
11042
+
11043
+ function $6f223c293b335d40$export$bd7b6af6aa16550c({ photo: photo = true }) {
11044
+ const [isPhoto, setPhoto] = (0, $jQDcL$react.useState)(photo);
11045
+ const [streaming, setStreaming] = (0, $jQDcL$react.useState)(false);
11046
+ return {
11047
+ photo: isPhoto,
11048
+ setPhoto: setPhoto,
11049
+ streaming: streaming,
11050
+ setStreaming: setStreaming
11051
+ };
11052
+ }
11053
+ const $6f223c293b335d40$export$11a6fe490bbc4873 = (props)=>{
11054
+ const setupModalsState = (0, $d7eacc710221ffb1$export$fc3bf4634b488af8)({
11055
+ mode: props.state.photo ? "photo" : "video"
11056
+ });
11057
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11058
+ className: "flex flex-col bg-primary h-[150px] w-full max-w-[400px] rounded-[15px] p-2.5 gap-2.5",
11059
+ children: [
11060
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $d7eacc710221ffb1$export$bee10e8ab511933f), {
11061
+ state: setupModalsState
11062
+ }),
11063
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11064
+ className: "flex flex-1 flex-row px-[10px] w-full",
11065
+ children: [
11066
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11067
+ className: "flex flex-row flex-auto items-center gap-[10px]",
11068
+ children: [
11069
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $6d8b37b4bd2444ef$export$3741e4ac43f04ca2), {}),
11070
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11071
+ className: " text-white text-base font-medium",
11072
+ children: "SnapCall"
11073
+ })
11074
+ ]
11075
+ }),
11076
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11077
+ className: "flex flex-row justify-end flex-auto items-center gap-[10px] ",
11078
+ children: [
11079
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $6e29654b44f114e1$export$d2b052e7b4be1756), {
11080
+ onPress: ()=>{
11081
+ if (!props.state.streaming) {
11082
+ props.state.setPhoto(true);
11083
+ setupModalsState.photoInstructionsModalState.open();
11084
+ }
11085
+ },
11086
+ isSelected: props.state.photo,
11087
+ children: "Photo"
11088
+ }),
11089
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $6e29654b44f114e1$export$d2b052e7b4be1756), {
11090
+ onPress: ()=>{
11091
+ if (!props.state.streaming) {
11092
+ props.state.setPhoto(false);
11093
+ setupModalsState.videoInstructionsModalState.open();
11094
+ }
11095
+ },
11096
+ isSelected: !props.state.photo,
11097
+ children: "Video"
11098
+ })
11099
+ ]
11100
+ })
11101
+ ]
11102
+ }),
11103
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11104
+ className: "flex flex-row flex-1 items-center justify-between w-full ",
11105
+ children: [
11106
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11107
+ className: "w-[60px] h-[60px]",
11108
+ children: props.thumbnail
11109
+ }),
11110
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11111
+ className: "bg-white rounded-full w-[72px] h-[72px] p-[3px]",
11112
+ onClick: ()=>props.onCapturePress(),
11113
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11114
+ className: "bg-primary rounded-full w-full h-full p-[3px] flex items-center justify-center cursor-pointer",
11115
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11116
+ className: (0, ($parcel$interopDefault($jQDcL$classnames)))("w-full h-full transition-[transform,border-radius] duration-300", props.state.photo ? "bg-white" : "bg-[#f12828]", props.state.streaming ? "rounded-[5px] scale-[0.4]" : "rounded-[60px]")
11117
+ })
11118
+ })
11119
+ }),
11120
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11121
+ onClick: props.onSwitch,
11122
+ className: "bg-[#565656] rounded-full w-[56px] h-[56px] flex items-center justify-center cursor-pointer",
11123
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $ec8eb252693ca260$export$aefffb14595958fe), {})
11124
+ })
11125
+ ]
11126
+ })
11127
+ ]
11128
+ });
11129
+ };
11130
+
11131
+
11132
+
11133
+
11134
+
11135
+
11136
+
11137
+
11138
+
11139
+
11140
+
11141
+
11142
+
11143
+ function $14fb55a0ce44e022$export$4589ed81930b555c(props) {
11144
+ const { children: children , state: state } = props;
11145
+ const ref = (0, ($parcel$interopDefault($jQDcL$react))).useRef(null);
11146
+ const { orientation: orientation } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
11147
+ const { modalProps: modalProps , underlayProps: underlayProps } = (0, $jQDcL$reactariaoverlays.useModalOverlay)(props, state, ref);
11148
+ const [exited, setExited] = (0, $jQDcL$react.useState)(!state.isOpen);
11149
+ const viewport = (0, $jQDcL$reactariautils.useViewportSize)();
11150
+ const maxHeight = viewport.height - 64;
11151
+ const desktop = orientation === "landscape";
11152
+ // Don't render anything if the modal is not open and we're not animating out.
11153
+ if (!(state.isOpen || !exited)) return null;
11154
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $jQDcL$reactariaoverlays.Overlay), {
11155
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $jQDcL$reacttransitiongroup.CSSTransition), {
11156
+ in: state.isOpen,
11157
+ appear: true,
11158
+ onEntered: ()=>setExited(false),
11159
+ onExited: ()=>setExited(true),
11160
+ timeout: {
11161
+ enter: 0,
11162
+ exit: 300
11163
+ },
11164
+ classNames: {
11165
+ enter: "opacity-0",
11166
+ enterDone: "opacity-1 transition ease-in",
11167
+ exit: "opacity-0 transition ease-out"
11168
+ },
11169
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11170
+ className: (0, ($parcel$interopDefault($jQDcL$classnames)))("fixed z-[100] inset-0 bg-underlay flex justify-center inter", desktop ? "items-center" : "items-end"),
11171
+ ...underlayProps,
11172
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $jQDcL$reacttransitiongroup.CSSTransition), {
11173
+ in: state.isOpen,
11174
+ appear: true,
11175
+ nodeRef: ref,
11176
+ timeout: {
11177
+ enter: 0,
11178
+ exit: 300
11179
+ },
11180
+ classNames: {
11181
+ appear: desktop ? "translate-y-[200%]" : "translate-y-full",
11182
+ appearDone: "translate-y-0 transition duration-300 ease-out",
11183
+ exit: (0, ($parcel$interopDefault($jQDcL$classnames)))("transition ease-out", desktop ? "translate-y-[200%]" : "translate-y-full")
11184
+ },
11185
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11186
+ ...modalProps,
11187
+ ref: ref,
11188
+ className: (0, ($parcel$interopDefault($jQDcL$classnames)))("bg-white z-[1] overflow-auto focus:outline-none", desktop ? "translate-y-[200%] rounded-[15px]" : "translate-y-full rounded-t-[15px]"),
11189
+ style: {
11190
+ maxHeight: `${maxHeight}px`
11191
+ },
11192
+ children: children
11193
+ })
11194
+ })
11195
+ })
11196
+ })
11197
+ });
11198
+ }
11199
+
11200
+
11201
+
11202
+
11203
+
11204
+
11205
+
11206
+
11207
+
11208
+
11209
+
11210
+ const $f4dfc8739f142557$export$480db61f4dcd7727 = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
11211
+ width: "12",
11212
+ height: "15",
11213
+ viewBox: "0 0 12 15",
11214
+ fill: "none",
11215
+ xmlns: "http://www.w3.org/2000/svg",
11216
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
11217
+ d: "M11.103 5.747 2.677.272A1.614 1.614 0 0 0 1.773 0a1.62 1.62 0 0 0-.9.288 1.886 1.886 0 0 0-.64.733A2.235 2.235 0 0 0 0 2.025v10.95c0 .352.08.699.233 1.004.154.305.375.558.64.733.273.186.584.285.9.288.317.003.63-.091.904-.272l8.426-5.475c.272-.173.498-.427.656-.736.158-.308.241-.66.241-1.017a2.24 2.24 0 0 0-.24-1.017 1.884 1.884 0 0 0-.657-.736Z",
11218
+ fill: "#fff"
11219
+ })
11220
+ });
11221
+
11222
+
11223
+ const $dc46069ab394f8fc$export$1cd1efc78cb52ca5 = ({ asset: asset , onClick: onClick })=>{
11224
+ if (!asset) return null;
11225
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11226
+ className: "flex items-center justify-center w-[60px] h-[60px] rounded-[8px] cursor-pointer bg-white relative overflow-hidden",
11227
+ onClick: onClick,
11228
+ children: [
11229
+ asset?.type === "picture" && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("img", {
11230
+ className: "cursor-pointer bg-white",
11231
+ src: asset.objectUrl,
11232
+ alt: "last shot"
11233
+ }),
11234
+ asset?.type === "video" && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $jQDcL$reactjsxruntime.Fragment), {
11235
+ children: [
11236
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("video", {
11237
+ src: asset.objectUrl,
11238
+ className: "min-w-[100%] min-h-[100%] object-cover"
11239
+ }),
11240
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11241
+ className: "absolute left-0 top-0 flex items-center justify-center w-[60px] h-[60px] bg-primary opacity-50",
11242
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $f4dfc8739f142557$export$480db61f4dcd7727), {})
11243
+ })
11244
+ ]
11245
+ })
11246
+ ]
11247
+ });
11248
+ };
11249
+
11250
+
11251
+
11252
+
11253
+ const $b0f41bfff6a6128d$export$28e1ba20e0688eb7 = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("svg", {
11254
+ width: "18",
11255
+ height: "19",
11256
+ viewBox: "0 0 18 19",
11257
+ fill: "none",
11258
+ xmlns: "http://www.w3.org/2000/svg",
11259
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("path", {
11260
+ d: "M7.5 14a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM15 5h-3v-.75A2.25 2.25 0 0 0 9.75 2h-1.5A2.25 2.25 0 0 0 6 4.25V5H3a.75.75 0 0 0 0 1.5h.75v8.25A2.25 2.25 0 0 0 6 17h6a2.25 2.25 0 0 0 2.25-2.25V6.5H15A.75.75 0 1 0 15 5Zm-7.5-.75a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 .75.75V5h-3v-.75Zm5.25 10.5a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75V6.5h7.5v8.25ZM10.5 14a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z",
11261
+ fill: "#fff"
11262
+ })
11263
+ });
11264
+
11265
+
11266
+ const $1571ff3dce984dbd$var$dateFormat = new Intl.DateTimeFormat("default", {
11267
+ dateStyle: "short"
11268
+ });
11269
+ const $1571ff3dce984dbd$var$timeFormat = new Intl.DateTimeFormat("default", {
11270
+ hour: "numeric",
11271
+ minute: "2-digit"
11272
+ });
11273
+ function $1571ff3dce984dbd$var$formatDate(date) {
11274
+ const ampm = date.getHours() % 12 >= 12 ? "PM" : "AM";
11275
+ return `${$1571ff3dce984dbd$var$dateFormat.format(date)} at ${$1571ff3dce984dbd$var$timeFormat.format(date)} ${ampm}`;
11276
+ }
11277
+ const $1571ff3dce984dbd$export$c9169049516d8bcf = ({ asset: asset , index: index , removeAsset: removeAsset })=>{
11278
+ const confirmRemovalModalState = (0, $jQDcL$reactstately.useOverlayTriggerState)({});
11279
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11280
+ className: "flex flex-row justify-between items-center",
11281
+ children: [
11282
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $48c2553f62767e40$export$2b77a92f1a5ad772), {
11283
+ title: "Confirm removal",
11284
+ state: confirmRemovalModalState,
11285
+ description: "Are you sure you want to remove this photo/video? This action cannot be undone.",
11286
+ primaryAction: ({ close: close })=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $f98f91fb267f52c8$export$353f5b6fc5456de1), {
11287
+ onPress: async ()=>{
11288
+ await removeAsset(asset);
11289
+ close();
11290
+ },
11291
+ children: [
11292
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $b0f41bfff6a6128d$export$28e1ba20e0688eb7), {}),
11293
+ "Confirm"
11294
+ ]
11295
+ }),
11296
+ secondaryAction: "Cancel"
11297
+ }),
11298
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11299
+ className: "flex flex-row gap-[10px] items-center",
11300
+ children: [
11301
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $dc46069ab394f8fc$export$1cd1efc78cb52ca5), {
11302
+ asset: asset
11303
+ }),
11304
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("span", {
11305
+ className: "text-sm",
11306
+ style: {
11307
+ hyphens: "manual"
11308
+ },
11309
+ children: [
11310
+ asset.type === "picture" ? "Photo" : "Video",
11311
+ " ",
11312
+ index + 1,
11313
+ " \xb7",
11314
+ " ",
11315
+ $1571ff3dce984dbd$var$formatDate(new Date(asset.timestamp))
11316
+ ]
11317
+ })
11318
+ ]
11319
+ }),
11320
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("span", {
11321
+ className: "text-xs font-bold underline cursor-pointer ml-[10px]",
11322
+ onClick: confirmRemovalModalState.open,
11323
+ children: "Remove"
11324
+ })
11325
+ ]
11326
+ }, asset.assetId);
11327
+ };
11328
+
11329
+
11330
+
11331
+
11332
+ const $aaab1e39040d455b$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11333
+ className: "w-screen max-w-[400px] h-[235px] px-[20px] py-[25px] gap-[10px]",
11334
+ children: [
11335
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11336
+ className: "w-[360px] h-[93px]",
11337
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, ($parcel$interopDefault($jQDcL$reactcontentloader))), {
11338
+ width: 360,
11339
+ height: 93,
11340
+ foregroundColor: "#EBEBEB",
11341
+ children: [
11342
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("rect", {
11343
+ x: 0,
11344
+ y: 0,
11345
+ rx: 8,
11346
+ ry: 8,
11347
+ width: 230,
11348
+ height: 16
11349
+ }),
11350
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("rect", {
11351
+ x: 0,
11352
+ y: 33,
11353
+ rx: 8,
11354
+ ry: 8,
11355
+ width: 60,
11356
+ height: 60
11357
+ }),
11358
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("rect", {
11359
+ x: 70,
11360
+ y: 56,
11361
+ rx: 7,
11362
+ ry: 7,
11363
+ width: 180,
11364
+ height: 14
11365
+ })
11366
+ ]
11367
+ })
11368
+ }),
11369
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11370
+ className: "flex items-center justify-center w-full h-[40px] rounded-[8px] border border-primaryLight mt-[10px]",
11371
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, ($parcel$interopDefault($jQDcL$reactcontentloader))), {
11372
+ width: 120,
11373
+ height: 14,
11374
+ foregroundColor: "#EBEBEB",
11375
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("rect", {
11376
+ x: 0,
11377
+ y: 0,
11378
+ rx: 7,
11379
+ ry: 7,
11380
+ width: 120,
11381
+ height: 14
11382
+ })
11383
+ })
11384
+ }),
11385
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11386
+ className: "flex items-center justify-center w-full h-[40px] rounded-[8px] bg-primary mt-[10px]",
11387
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, ($parcel$interopDefault($jQDcL$reactcontentloader))), {
11388
+ width: 120,
11389
+ height: 14,
11390
+ foregroundColor: "#EBEBEB",
11391
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("rect", {
11392
+ x: 0,
11393
+ y: 0,
11394
+ rx: 7,
11395
+ ry: 7,
11396
+ width: 120,
11397
+ height: 14
11398
+ })
11399
+ })
11400
+ })
11401
+ ]
11402
+ });
11403
+
11404
+
11405
+ const $0bca8bbbf74ddff9$export$5c334f209b1aa661 = ({ assets: assets , state: state , onSendAssets: onSendAssets , removeAsset: removeAsset , loading: loading })=>{
11406
+ const ref = (0, $jQDcL$react.useRef)(null);
11407
+ const [assetKind, setAssetKind] = (0, $jQDcL$react.useState)(assets[assets.length - 1]?.type === "picture" ? "photo" : "video");
11408
+ const { orientation: orientation } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
11409
+ const desktop = orientation === "landscape";
11410
+ (0, $jQDcL$react.useEffect)(()=>{
11411
+ if (assets.length < 1) return;
11412
+ setAssetKind(assets[assets.length - 1]?.type === "picture" ? "photo" : "video");
11413
+ }, [
11414
+ assets
11415
+ ]);
11416
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $jQDcL$reactjsxruntime.Fragment), {
11417
+ children: [
11418
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $jQDcL$reacttransitiongroup.CSSTransition), {
11419
+ in: state.isOpen,
11420
+ appear: true,
11421
+ timeout: {
11422
+ enter: 0,
11423
+ exit: 300
11424
+ },
11425
+ classNames: {
11426
+ enter: "opacity-0",
11427
+ enterDone: "opacity-90 transition ease-in",
11428
+ exit: "opacity-0 transition ease-out"
11429
+ },
11430
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11431
+ className: (0, ($parcel$interopDefault($jQDcL$classnames)))("fixed justify-center w-screen h-screen top-0 left-0 bg-black z-[1]", state.isOpen ? "flex" : "hidden"),
11432
+ children: loading && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11433
+ className: (0, ($parcel$interopDefault($jQDcL$classnames)))("flex mt-[50px] h-fit opacity-1", desktop ? "flex-row items-center w-[400px]" : "flex-col items-center text-center w-[320px]"),
11434
+ children: [
11435
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11436
+ className: "w-[24px] h-[24px] m-[10px]",
11437
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $39ceb925b3865754$export$2e2bcd8739ae039), {})
11438
+ }),
11439
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("span", {
11440
+ className: "text-sm text-white",
11441
+ children: [
11442
+ "Please wait a moment while your ",
11443
+ loading,
11444
+ " is being processed...",
11445
+ loading === "video" ? " It may take up to 15 seconds for a video to be ready." : ""
11446
+ ]
11447
+ })
11448
+ ]
11449
+ })
11450
+ })
11451
+ }),
11452
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $14fb55a0ce44e022$export$4589ed81930b555c), {
11453
+ state: {
11454
+ ...state,
11455
+ close: loading ? ()=>{} : state.close
11456
+ },
11457
+ children: loading ? /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $aaab1e39040d455b$export$4fa52f68b1c78fbf), {}) : /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11458
+ ref: ref,
11459
+ className: "flex flex-col w-screen max-w-[400px] text-primary",
11460
+ children: [
11461
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11462
+ className: "flex flex-row justify-between p-[12px]",
11463
+ children: [
11464
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("h1", {
11465
+ className: "text-lg first-letter:capitalize",
11466
+ children: [
11467
+ assetKind,
11468
+ " successfully captured"
11469
+ ]
11470
+ }),
11471
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11472
+ className: "flex justify-center items-center rounded-full bg-[#f3f3f3] h-[30px] w-[30px] cursor-pointer",
11473
+ onClick: state.close,
11474
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $6f36db3b1217f099$export$2e2bcd8739ae039), {
11475
+ color: "#565656"
11476
+ })
11477
+ })
11478
+ ]
11479
+ }),
11480
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11481
+ className: "flex flex-col px-[20px] pb-[25px] gap-[10px]",
11482
+ children: [
11483
+ assets.map((asset, index)=>/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $1571ff3dce984dbd$export$c9169049516d8bcf), {
11484
+ asset: asset,
11485
+ index: index,
11486
+ removeAsset: removeAsset
11487
+ }, asset.assetId)),
11488
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $f98f91fb267f52c8$export$353f5b6fc5456de1), {
11489
+ variant: "secondary",
11490
+ onPress: state.close,
11491
+ children: [
11492
+ "Take new ",
11493
+ assetKind
11494
+ ]
11495
+ }),
11496
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $f98f91fb267f52c8$export$353f5b6fc5456de1), {
11497
+ onPress: ()=>{
11498
+ onSendAssets();
11499
+ state.close();
11500
+ },
11501
+ children: [
11502
+ "Send ",
11503
+ assets.length > 1 ? `${assets.length} elements` : assetKind
11504
+ ]
11505
+ })
11506
+ ]
11507
+ })
11508
+ ]
11509
+ })
11510
+ })
11511
+ ]
11512
+ });
11513
+ };
11514
+
11515
+
11516
+
11517
+
11518
+
11519
+
11520
+
11521
+ const $47dee8347993fb81$export$53819c0e58f98d49 = (props)=>{
11522
+ const [countdown, setCountdown] = (0, $jQDcL$react.useState)(props.initialValue);
11523
+ (0, $jQDcL$react.useEffect)(()=>{
11524
+ if (countdown === undefined) return;
11525
+ const t = setTimeout(()=>{
11526
+ if (countdown === 1) props.onFinish();
11527
+ setCountdown(countdown - 1);
11528
+ }, 1000);
11529
+ return ()=>clearTimeout(t);
11530
+ }, [
11531
+ countdown,
11532
+ props
11533
+ ]);
11534
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11535
+ className: "absolute w-full h-full flex justify-center items-center bg-black/[.6] z-50",
11536
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("span", {
11537
+ className: "text-white/80 text-[112px] font-medium",
11538
+ children: countdown
11539
+ })
11540
+ });
11541
+ };
11542
+
11543
+
11544
+ const $7925c01e7577d264$var$timerText = (delta)=>{
11545
+ const d = [
11546
+ Math.floor(delta / 60),
11547
+ Math.round(delta % 60)
11548
+ ].map((n)=>`${n < 10 ? "0" : ""}${n}`);
11549
+ return d.join(":");
11550
+ };
11551
+ const $7925c01e7577d264$export$336a011955157f9a = ()=>{
11552
+ const [startRecordTime, setStartRecordTime] = (0, $jQDcL$react.useState)(undefined);
11553
+ const [timer, setTimer] = (0, $jQDcL$react.useState)(0);
11554
+ const [countdownVisible, setCountdownVisible] = (0, $jQDcL$react.useState)(false);
11555
+ const videoElementRef = (0, $jQDcL$react.useRef)(null);
11556
+ const [assets, setAssets] = (0, $jQDcL$react.useState)([]);
11557
+ const [assetLoading, setAssetLoading] = (0, $jQDcL$react.useState)(null);
11558
+ const [isAssetsPopupStateOpen, setIsAssetsPopupStateOpen] = (0, $jQDcL$react.useState)(false);
11559
+ const [facingMode, setFacingMode] = (0, $jQDcL$react.useState)("user");
11560
+ const assetsPopupState = (0, $jQDcL$reactstately.useOverlayTriggerState)({
11561
+ isOpen: isAssetsPopupStateOpen,
11562
+ onOpenChange: setIsAssetsPopupStateOpen
11563
+ });
11564
+ const sendAssetsModalState = (0, $jQDcL$reactstately.useOverlayTriggerState)({});
11565
+ const [flashAnimation, setFlashAnimation] = (0, $jQDcL$react.useState)(false);
11566
+ const menuBarState = (0, $6f223c293b335d40$export$bd7b6af6aa16550c)({});
11567
+ const exitStreaming = (0, $jQDcL$react.useCallback)(()=>{
11568
+ menuBarState.setStreaming(false);
11569
+ setStartRecordTime(undefined);
11570
+ setCountdownVisible(false);
11571
+ setTimer(0);
11572
+ }, [
11573
+ menuBarState
11574
+ ]);
11575
+ const onLocalVideoChange = (event)=>{
11576
+ if (!event.detail?.camera?.device || !videoElementRef.current) return;
11577
+ const { facingMode: newFacingMode } = (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).requestLocalVideo(videoElementRef?.current);
11578
+ setFacingMode(newFacingMode);
11579
+ };
11580
+ const onStopRecord = (0, $jQDcL$react.useCallback)((event)=>{
11581
+ const { url: url , assetId: assetId } = event.detail;
11582
+ exitStreaming();
11583
+ setAssetLoading(null);
11584
+ setAssets([
11585
+ ...assets,
11586
+ {
11587
+ type: "video",
11588
+ timestamp: Date.now(),
11589
+ objectUrl: url,
11590
+ assetId: assetId
11591
+ }
11592
+ ]);
11593
+ }, [
11594
+ assets,
11595
+ exitStreaming
11596
+ ]);
11597
+ const onPhotoCapture = async (videoElement)=>{
11598
+ const timestamp = Date.now();
11599
+ setAssetLoading("picture");
11600
+ const image = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).captureVideo(videoElement);
11601
+ const { url: url , assetId: assetId } = await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).saveCapture(image);
11602
+ setAssetLoading(null);
11603
+ setAssets([
11604
+ ...assets,
11605
+ {
11606
+ type: "picture",
11607
+ timestamp: timestamp,
11608
+ objectUrl: url,
11609
+ assetId: assetId
11610
+ }
11611
+ ]);
11612
+ };
11613
+ const removeAsset = (0, $jQDcL$react.useCallback)(async (asset)=>{
11614
+ if (!asset.assetId) return;
11615
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).deleteCapture(asset.assetId);
11616
+ const newAssets = assets.filter((item)=>item.assetId !== asset.assetId);
11617
+ setAssets(newAssets);
11618
+ if (newAssets.length < 1) setIsAssetsPopupStateOpen(false);
11619
+ }, [
11620
+ assets
11621
+ ]);
11622
+ (0, $jQDcL$react.useEffect)(()=>{
11623
+ if (startRecordTime === undefined) return;
11624
+ const interval = setInterval(()=>{
11625
+ const delta = (Date.now() - startRecordTime) / 1000;
11626
+ setTimer(delta);
11627
+ }, 1000);
11628
+ return ()=>clearInterval(interval);
11629
+ }, [
11630
+ startRecordTime
11631
+ ]);
11632
+ (0, $jQDcL$react.useEffect)(()=>{
11633
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).addEventListener("localVideoAvailable", onLocalVideoChange);
11634
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).addEventListener("localVideoChange", onLocalVideoChange);
11635
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).addEventListener("recordStopped", onStopRecord);
11636
+ return ()=>{
11637
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).removeEventListener("localVideoChange", onLocalVideoChange);
11638
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).removeEventListener("localVideoAvailable", onLocalVideoChange);
11639
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).removeEventListener("recordStopped", onStopRecord);
11640
+ };
11641
+ }, [
11642
+ onStopRecord
11643
+ ]);
11644
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11645
+ className: "bg-[#000] w-full h-full justify-center flex flex-col antialiased inter",
11646
+ children: [
11647
+ !menuBarState.photo && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11648
+ className: "text-base text-white text-center font-medium pt-2.5",
11649
+ children: $7925c01e7577d264$var$timerText(timer)
11650
+ }),
11651
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11652
+ className: "flex-1 min-h-0 p-2.5",
11653
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
11654
+ className: "relative w-full h-full rounded-[10px]",
11655
+ children: [
11656
+ countdownVisible && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $47dee8347993fb81$export$53819c0e58f98d49), {
11657
+ initialValue: 3,
11658
+ onFinish: ()=>{
11659
+ setCountdownVisible(false);
11660
+ setStartRecordTime(Date.now());
11661
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).startRecord();
11662
+ }
11663
+ }),
11664
+ flashAnimation && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $2c45d365ee8aa1ab$export$2b501aee548bae06), {
11665
+ onAnimationEnd: ()=>{
11666
+ setFlashAnimation(false);
11667
+ assetsPopupState.open();
11668
+ }
11669
+ }),
11670
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("video", {
11671
+ autoPlay: true,
11672
+ muted: true,
11673
+ playsInline: true,
11674
+ ref: videoElementRef,
11675
+ className: (0, ($parcel$interopDefault($jQDcL$classnames)))("w-full h-full object-cover rounded-[inherit]", {
11676
+ "scale-x-[-1]": facingMode === "user"
11677
+ })
11678
+ })
11679
+ ]
11680
+ })
11681
+ }),
11682
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("div", {
11683
+ className: "flex justify-center px-2.5 pb-2.5",
11684
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $6f223c293b335d40$export$11a6fe490bbc4873), {
11685
+ state: menuBarState,
11686
+ thumbnail: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $dc46069ab394f8fc$export$1cd1efc78cb52ca5), {
11687
+ asset: assets[assets.length - 1],
11688
+ onClick: assetsPopupState.open
11689
+ }),
11690
+ onSwitch: ()=>{
11691
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).rotateVideo();
11692
+ },
11693
+ onCapturePress: ()=>{
11694
+ if (menuBarState.photo && videoElementRef.current) {
11695
+ onPhotoCapture(videoElementRef.current);
11696
+ setFlashAnimation(true);
11697
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).captureVideo(videoElementRef.current);
11698
+ }
11699
+ if (!menuBarState.photo && !menuBarState.streaming) {
11700
+ menuBarState.setStreaming(true);
11701
+ setTimer(0);
11702
+ setCountdownVisible(true);
11703
+ }
11704
+ if (!menuBarState.photo && menuBarState.streaming) {
11705
+ exitStreaming();
11706
+ if (startRecordTime) {
11707
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).stopRecord();
11708
+ setAssetLoading("video");
11709
+ assetsPopupState.open();
11710
+ }
11711
+ }
11712
+ }
11713
+ })
11714
+ }),
11715
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $0bca8bbbf74ddff9$export$5c334f209b1aa661), {
11716
+ assets: assets,
11717
+ state: assetsPopupState,
11718
+ onSendAssets: ()=>{
11719
+ (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).release();
11720
+ sendAssetsModalState.open();
11721
+ },
11722
+ removeAsset: removeAsset,
11723
+ loading: assetLoading
11724
+ }),
11725
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $48c2553f62767e40$export$2b77a92f1a5ad772), {
11726
+ title: "Thank you for your submission!",
11727
+ state: sendAssetsModalState,
11728
+ isDismissable: false,
11729
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("span", {
11730
+ className: "text-base text-primaryLight",
11731
+ children: "Your photo/video has been successfully sent. We will review it and get back to you soon."
11732
+ })
11733
+ })
11734
+ ]
11735
+ });
11736
+ };
11737
+
11738
+
11739
+
11740
+
11741
+
11742
+ const $c5be709b60f6ba50$export$7f7cbe89f1eacd2 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
11743
+ border: 2px solid #ffffff;
11744
+ border-top: 2px solid #000000;
11745
+ border-radius: 50%;
11746
+ width: 24px;
11747
+ height: 24px;
11748
+ animation: spin 1s linear infinite;
11749
+ @keyframes spin {
11750
+ 0% {
11751
+ transform: rotate(0deg);
11752
+ }
11753
+ 100% {
11754
+ transform: rotate(360deg);
11755
+ }
11756
+ }
11757
+ `;
11758
+ const $c5be709b60f6ba50$export$3b0d6d7590275603 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
11759
+ position: absolute;
11760
+ background-color: #000000;
11761
+ opacity: 0.9;
11762
+ z-index: 999999;
11763
+ display: flex;
11764
+ vertical-align: middle;
11765
+ align-items: center;
11766
+ top: 0px;
11767
+ right: 0px;
11768
+ bottom: 0px;
11769
+ left: 0px;
11770
+ gap: 0.25rem;
11771
+ `;
11772
+ const $c5be709b60f6ba50$export$42a852a2b6b56249 = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
11773
+ display: flex;
11774
+ gap: 25px;
11775
+ width: 100%;
11776
+ margin-left: auto;
11777
+ margin-right: auto;
11778
+ justify-content: center;
11779
+ align-items: center;
11780
+ vertical-align: middle;
11781
+ `;
11782
+ const $c5be709b60f6ba50$export$52e284bf30d0364a = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).h2`
11783
+ color: #ffffff;
11784
+ font-weight: 500;
11785
+ font-size: 14px;
11786
+ font-family: 'Lato';
11787
+ `;
11788
+
11789
+
11790
+ const $7ce296d839195d38$export$669f6ea7d267feaf = ()=>{
11791
+ const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
11792
+ return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $c5be709b60f6ba50$export$3b0d6d7590275603), {
11793
+ children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $c5be709b60f6ba50$export$42a852a2b6b56249), {
11794
+ children: [
11795
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $c5be709b60f6ba50$export$7f7cbe89f1eacd2), {}),
11796
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $c5be709b60f6ba50$export$52e284bf30d0364a), {
11797
+ children: t("loader.connection")
11798
+ })
11799
+ ]
11800
+ })
11801
+ });
11802
+ };
11803
+
11804
+
11805
+ const $ee8cb448c2c74888$var$currentTheme = (0, $9295e87e6b93e693$export$3bfd0d5209a8006a)();
11806
+ const $ee8cb448c2c74888$var$currentLanguage = (0, $393bda1b33846dfc$export$604ba5624273df44)();
11807
+ let $ee8cb448c2c74888$var$timestampCriticalError = -1;
11808
+ const $ee8cb448c2c74888$var$StreamUI = ({ options: options })=>{
11809
+ const [selfPeerId, setSelfPeerId] = (0, $jQDcL$react.useState)(undefined);
11810
+ const streamUIContainerRef = (0, $jQDcL$react.useRef)(null);
11811
+ const videosContainerRef = (0, $jQDcL$react.useRef)(null);
11812
+ const remoteTilesContainerRef = (0, $jQDcL$react.useRef)(null);
11813
+ const [streamState, setStreamState] = (0, $jQDcL$react.useState)(options.recorder ? "recorder" : "streaming");
11814
+ const [isQuickConnectPopupVisible, setIsQuickConnectPopupVisible] = (0, $jQDcL$react.useState)(false);
11815
+ const [isSettingsMenuVisible, setIsSettingsMenuVisible] = (0, $jQDcL$react.useState)(false);
11816
+ const [isYoutubePopupVisible, setIsYoutubePopupVisible] = (0, $jQDcL$react.useState)(false);
11817
+ const [isLinksharePopupVisible, setIsLinksharePopupVisible] = (0, $jQDcL$react.useState)(false);
11818
+ const [isVirtualBackgroundPopupVisible, setIsVirtualBackgroundPopupVisible] = (0, $jQDcL$react.useState)(false);
11819
+ const [theme, setTheme] = (0, $jQDcL$react.useState)($ee8cb448c2c74888$var$currentTheme);
11820
+ const [language, setLanguage] = (0, $jQDcL$react.useState)(options.language || $ee8cb448c2c74888$var$currentLanguage);
11821
+ const [profile, setProfile] = (0, $jQDcL$react.useState)({});
11822
+ const [muted, setMuted] = (0, $jQDcL$react.useState)(true);
11823
+ const [streaming, setStreaming] = (0, $jQDcL$react.useState)(false);
11824
+ const [isLoading, setLoading] = (0, $jQDcL$react.useState)(!options.recorder);
11825
+ const [screensharing, setScreensharing] = (0, $jQDcL$react.useState)(false);
11826
+ const [isAgent, setIsAgent] = (0, $jQDcL$react.useState)(false);
11827
+ const [userInteractionTriggered, setUserInteractionTriggered] = (0, $jQDcL$react.useState)(false);
11828
+ const [containerWidth, containerHeight] = (0, $56e1e7a85d8bf4bb$export$2b86bedf890eab8)(streamUIContainerRef.current);
11829
+ const [isBlockedDevicesPopupOpen, setBlockedDevicesPopupOpen] = (0, $jQDcL$react.useState)(false);
11830
+ const [isBlockedFeaturePopupOpen, setBlockedFeaturePopupOpen] = (0, $jQDcL$react.useState)(false);
11831
+ const [permissions, setPermissions] = (0, $jQDcL$react.useState)([]);
11832
+ const [plan, setPlan] = (0, $jQDcL$react.useState)(undefined);
11833
+ const orientation = (containerWidth || window.screen.width) > (containerHeight || window.screen.height) ? "landscape" : "portrait";
11834
+ const styledTheme = theme === "dark" ? (0, $9295e87e6b93e693$export$3e936a8db52a10a0) : (0, $9295e87e6b93e693$export$f30cb9bc4f736419);
11835
+ const onWebcamUpdate = (event)=>{
11836
+ if (event.type === "localVideoAvailable") setStreaming(true);
11837
+ else setStreaming(false);
11838
+ };
11839
+ const onScreenshareUpdate = (event)=>{
11840
+ if (event.type === "screenshareEnabled") setScreensharing(true);
11841
+ else setScreensharing(false);
11842
+ };
11843
+ const onMicrophoneUpdate = (event)=>{
11844
+ if (event.type === "microphoneMute") setMuted(true);
11845
+ else setMuted(false);
11846
+ };
11847
+ const onDefaultAudioDeviceChange = (event)=>{
11848
+ const micro = event.detail.label;
11849
+ (0, $84c6cbcbb594d072$export$3a57e165650c636f)(`Connected to ${micro}`, {
11850
+ duration: 3000,
11851
+ icon: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $0ac48791ff0bcc8e$export$2e2bcd8739ae039), {}),
11852
+ messageStyle: {
11853
+ fontWeight: 600
11854
+ }
11855
+ });
11856
+ };
11857
+ const onSelfProfileUpdate = (event)=>{
11858
+ const { profile: profile } = event.detail;
11859
+ setProfile(profile);
11860
+ };
11861
+ const onCallEnd = ()=>{
11862
+ (0, $c3d5253d9d597eb5$export$716eeec86fd18da7)();
11863
+ setStreamState("ended");
11864
+ setMuted(true);
11865
+ setStreaming(false);
11866
+ setScreensharing(false);
11867
+ setUserInteractionTriggered(false);
11868
+ };
11869
+ const onCallTerminated = ()=>{
11870
+ (0, $c3d5253d9d597eb5$export$716eeec86fd18da7)();
11871
+ setStreamState("terminated");
11872
+ };
11873
+ const onInvalidRoom = ()=>{
11874
+ setStreamState("expired");
11875
+ };
11876
+ const onAgentIdentity = (event)=>{
11877
+ const { success: success , email: email } = event.detail;
11878
+ if (success) {
11879
+ setIsAgent(true);
11880
+ if (email) (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).identify(null, {
11881
+ email: email
11882
+ });
11883
+ } else (0, ($parcel$interopDefault($jQDcL$reacthottoast)))("An error occured while trying to join the room as an agent", {
11884
+ className: "error"
11885
+ });
11886
+ };
11887
+ const onCriticalError = (event)=>{
11888
+ const duration = 20000;
11889
+ const now = Date.now();
11890
+ if (event.detail.code === "USERLIMIT") {
11891
+ setStreamState("full");
11892
+ return;
11893
+ }
11894
+ if ($ee8cb448c2c74888$var$timestampCriticalError !== -1 && $ee8cb448c2c74888$var$timestampCriticalError + duration > now) return;
11895
+ $ee8cb448c2c74888$var$timestampCriticalError = now;
11896
+ (0, $84c6cbcbb594d072$export$3a57e165650c636f)(`A critical error has occurred (error ${event.detail.code}).`, {
11897
+ icon: (0, $e8ac63718934c648$export$c7df1b15b59b1df2),
11898
+ button: {
11899
+ text: "Reload",
11900
+ action: ()=>{
11901
+ window.location.reload();
11902
+ }
11903
+ },
11904
+ duration: duration
11905
+ });
11906
+ };
11907
+ (0, $jQDcL$react.useEffect)(()=>{
11908
+ try {
11909
+ localStorage.setItem("stream_ui_theme", theme);
11910
+ } catch (localStorageError) {
11911
+ console.warn(localStorageError);
11912
+ }
11913
+ }, [
11914
+ theme
11915
+ ]);
11916
+ (0, $jQDcL$react.useEffect)(()=>{
11917
+ try {
11918
+ localStorage.setItem("stream_ui_language", language);
11919
+ (0, $b45c0bcc142f0b5e$export$2e2bcd8739ae039).changeLanguage(language);
10403
11920
  } catch (localStorageError) {
10404
11921
  console.warn(localStorageError);
10405
11922
  }
@@ -10445,12 +11962,14 @@ const $ee8cb448c2c74888$var$StreamUI = ({ options: options })=>{
10445
11962
  setPermissions(event.detail.permissions);
10446
11963
  console.log(event.detail.permissions);
10447
11964
  setSelfPeerId(peerId);
10448
- try {
11965
+ if (!options.recorder) try {
10449
11966
  await (0, $c3d5253d9d597eb5$export$494039379563c94d)(options);
10450
11967
  setUserInteractionTriggered(true);
10451
11968
  } catch (userInteractionError) {
10452
11969
  setBlockedDevicesPopupOpen(true);
10453
11970
  console.error("User interaction trigger failed", userInteractionError);
11971
+ } finally{
11972
+ setLoading(false);
10454
11973
  }
10455
11974
  };
10456
11975
  (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).addEventListener("enterRoom", onEnterRoom);
@@ -10487,7 +12006,7 @@ const $ee8cb448c2c74888$var$StreamUI = ({ options: options })=>{
10487
12006
  language: language,
10488
12007
  setLanguage: setLanguage,
10489
12008
  options: options,
10490
- profile: profile1,
12009
+ profile: profile,
10491
12010
  muted: muted,
10492
12011
  streaming: streaming,
10493
12012
  screensharing: screensharing,
@@ -10503,6 +12022,7 @@ const $ee8cb448c2c74888$var$StreamUI = ({ options: options })=>{
10503
12022
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $e3bb2c5d0e5b45b5$export$914ddf2021ea8ee6), {
10504
12023
  ref: streamUIContainerRef,
10505
12024
  children: [
12025
+ isLoading && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $7ce296d839195d38$export$669f6ea7d267feaf), {}),
10506
12026
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $e66cc5db58913155$export$2e2bcd8739ae039), {}),
10507
12027
  /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $5dcd9e6925c7037c$export$2e2bcd8739ae039), {}),
10508
12028
  isBlockedDevicesPopupOpen && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $77862aeb490f36a3$export$2e2bcd8739ae039), {
@@ -10511,6 +12031,7 @@ const $ee8cb448c2c74888$var$StreamUI = ({ options: options })=>{
10511
12031
  setBlockedDevicesPopupOpen(false);
10512
12032
  }
10513
12033
  }),
12034
+ streamState === "recorder" && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $7925c01e7577d264$export$336a011955157f9a), {}),
10514
12035
  streamState === "streaming" && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $jQDcL$reactjsxruntime.Fragment), {
10515
12036
  children: /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $3f6e908c45fcc5b3$export$74636703cfe1eecf), {
10516
12037
  children: [
@@ -10622,6 +12143,7 @@ const $5fd6e456b33aeaa7$export$ae01dedf5c052bb = (0, ($parcel$interopDefault($jQ
10622
12143
  background-color: black;
10623
12144
  border-radius: 15px;
10624
12145
  object-fit: cover;
12146
+ transform: scale(-1, 1);
10625
12147
  `;
10626
12148
  const $5fd6e456b33aeaa7$export$778ed67917f5eacf = (0, ($parcel$interopDefault($jQDcL$styledcomponents))).div`
10627
12149
  display: flex;
@@ -10782,14 +12304,14 @@ const $3305ca02e86dabd1$var$GreetingView = ({ onGreetingDone: onGreetingDone })
10782
12304
  const [mainContainerRef, { width: width , height: height }] = (0, $56e1e7a85d8bf4bb$export$e295b0c537d32d7d)();
10783
12305
  const inputRef = (0, $jQDcL$react.useRef)(null);
10784
12306
  const videoRef = (0, $jQDcL$react.useRef)(null);
10785
- const [videoTrack1, setVideoTrack] = (0, $jQDcL$react.useState)(undefined);
12307
+ const [videoTrack, setVideoTrack] = (0, $jQDcL$react.useState)(undefined);
10786
12308
  const [micEnabled, setMicEnabled] = (0, $jQDcL$react.useState)(false);
10787
12309
  const [joining, setJoining] = (0, $jQDcL$react.useState)(false);
10788
12310
  const desktop = width >= height;
10789
12311
  const onSubmit = ()=>{
10790
12312
  const displayName = inputRef.current?.value;
10791
- const cameraEnabled = Boolean(videoTrack1);
10792
- videoTrack1?.stop();
12313
+ const cameraEnabled = Boolean(videoTrack);
12314
+ videoTrack?.stop();
10793
12315
  setJoining(true);
10794
12316
  setTimeout(()=>{
10795
12317
  onGreetingDone({
@@ -10812,15 +12334,15 @@ const $3305ca02e86dabd1$var$GreetingView = ({ onGreetingDone: onGreetingDone })
10812
12334
  }
10813
12335
  };
10814
12336
  const onCameraClick = (0, $jQDcL$react.useCallback)(async ()=>{
10815
- if (!videoTrack1) await getUserMedia({
12337
+ if (!videoTrack) await getUserMedia({
10816
12338
  video: true
10817
12339
  });
10818
12340
  else {
10819
- videoTrack1.stop();
12341
+ videoTrack.stop();
10820
12342
  setVideoTrack(undefined);
10821
12343
  }
10822
12344
  }, [
10823
- videoTrack1
12345
+ videoTrack
10824
12346
  ]);
10825
12347
  const onMicrophoneClick = (0, $jQDcL$react.useCallback)(async ()=>{
10826
12348
  if (!micEnabled) await getUserMedia({
@@ -10832,14 +12354,14 @@ const $3305ca02e86dabd1$var$GreetingView = ({ onGreetingDone: onGreetingDone })
10832
12354
  ]);
10833
12355
  (0, $jQDcL$react.useEffect)(()=>{
10834
12356
  if (videoRef.current) {
10835
- if (videoTrack1) videoRef.current.srcObject = new MediaStream([
10836
- videoTrack1
12357
+ if (videoTrack) videoRef.current.srcObject = new MediaStream([
12358
+ videoTrack
10837
12359
  ]);
10838
12360
  else videoRef.current.srcObject = null;
10839
12361
  }
10840
12362
  }, [
10841
12363
  videoRef,
10842
- videoTrack1,
12364
+ videoTrack,
10843
12365
  width,
10844
12366
  height
10845
12367
  ]);
@@ -10856,7 +12378,7 @@ const $3305ca02e86dabd1$var$GreetingView = ({ onGreetingDone: onGreetingDone })
10856
12378
  height: 40
10857
12379
  })
10858
12380
  });
10859
- const webcamEnabled = Boolean(videoTrack1);
12381
+ const webcamEnabled = Boolean(videoTrack);
10860
12382
  return /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $5fd6e456b33aeaa7$export$d653589df987fd93), {
10861
12383
  ref: mainContainerRef,
10862
12384
  children: [
@@ -10955,10 +12477,19 @@ const $3305ca02e86dabd1$var$GreetingView = ({ onGreetingDone: onGreetingDone })
10955
12477
  var $3305ca02e86dabd1$export$2e2bcd8739ae039 = $3305ca02e86dabd1$var$GreetingView;
10956
12478
 
10957
12479
 
12480
+ var $54541b0286afc2de$exports = {};
12481
+ $54541b0286afc2de$exports = "*, :before, :after, ::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #3b82f680;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n.visible {\n visibility: visible;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.inset-0 {\n inset: 0;\n}\n\n.left-0 {\n left: 0;\n}\n\n.top-0 {\n top: 0;\n}\n\n.z-50 {\n z-index: 50;\n}\n\n.z-\\[100\\] {\n z-index: 100;\n}\n\n.z-\\[1\\] {\n z-index: 1;\n}\n\n.m-\\[10px\\] {\n margin: 10px;\n}\n\n.mx-\\[20px\\] {\n margin-left: 20px;\n margin-right: 20px;\n}\n\n.ml-\\[10px\\] {\n margin-left: 10px;\n}\n\n.mt-\\[10px\\] {\n margin-top: 10px;\n}\n\n.mt-\\[50px\\] {\n margin-top: 50px;\n}\n\n.block {\n display: block;\n}\n\n.inline {\n display: inline;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.hidden {\n display: none;\n}\n\n.h-full {\n height: 100%;\n}\n\n.h-\\[150px\\] {\n height: 150px;\n}\n\n.h-\\[60px\\] {\n height: 60px;\n}\n\n.h-\\[72px\\] {\n height: 72px;\n}\n\n.h-\\[56px\\] {\n height: 56px;\n}\n\n.h-\\[40px\\] {\n height: 40px;\n}\n\n.h-\\[235px\\] {\n height: 235px;\n}\n\n.h-\\[93px\\] {\n height: 93px;\n}\n\n.h-screen {\n height: 100vh;\n}\n\n.h-fit {\n height: -moz-fit-content;\n height: fit-content;\n}\n\n.h-\\[24px\\] {\n height: 24px;\n}\n\n.h-\\[30px\\] {\n height: 30px;\n}\n\n.h-\\[70px\\] {\n height: 70px;\n}\n\n.min-h-0 {\n min-height: 0;\n}\n\n.min-h-\\[100\\%\\] {\n min-height: 100%;\n}\n\n.w-full {\n width: 100%;\n}\n\n.w-\\[60px\\] {\n width: 60px;\n}\n\n.w-\\[72px\\] {\n width: 72px;\n}\n\n.w-\\[56px\\] {\n width: 56px;\n}\n\n.w-\\[76px\\] {\n width: 76px;\n}\n\n.w-screen {\n width: 100vw;\n}\n\n.w-\\[360px\\] {\n width: 360px;\n}\n\n.w-\\[400px\\] {\n width: 400px;\n}\n\n.w-\\[320px\\] {\n width: 320px;\n}\n\n.w-\\[24px\\] {\n width: 24px;\n}\n\n.w-\\[30px\\] {\n width: 30px;\n}\n\n.w-\\[70px\\] {\n width: 70px;\n}\n\n.min-w-\\[100\\%\\] {\n min-width: 100%;\n}\n\n.min-w-\\[24px\\] {\n min-width: 24px;\n}\n\n.max-w-\\[400px\\] {\n max-width: 400px;\n}\n\n.max-w-\\[600px\\] {\n max-width: 600px;\n}\n\n.max-w-\\[800px\\] {\n max-width: 800px;\n}\n\n.flex-1 {\n flex: 1;\n}\n\n.flex-auto {\n flex: auto;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.translate-y-2 {\n --tw-translate-y: .5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-\\[200\\%\\] {\n --tw-translate-y: 200%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-full {\n --tw-translate-y: 100%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-\\[0\\.4\\] {\n --tw-scale-x: .4;\n --tw-scale-y: .4;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-x-\\[-1\\] {\n --tw-scale-x: -1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.resize {\n resize: both;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.items-end {\n align-items: flex-end;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-\\[5px\\] {\n gap: 5px;\n}\n\n.gap-2\\.5 {\n gap: .625rem;\n}\n\n.gap-2 {\n gap: .5rem;\n}\n\n.gap-\\[10px\\] {\n gap: 10px;\n}\n\n.gap-5 {\n gap: 1.25rem;\n}\n\n.gap-\\[20px\\] {\n gap: 20px;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.rounded-lg {\n border-radius: .5rem;\n}\n\n.rounded-md {\n border-radius: .375rem;\n}\n\n.rounded-\\[15px\\] {\n border-radius: 15px;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.rounded-\\[5px\\] {\n border-radius: 5px;\n}\n\n.rounded-\\[60px\\] {\n border-radius: 60px;\n}\n\n.rounded-\\[10px\\] {\n border-radius: 10px;\n}\n\n.rounded-\\[inherit\\] {\n border-radius: inherit;\n}\n\n.rounded-\\[8px\\] {\n border-radius: 8px;\n}\n\n.rounded-\\[50\\%\\] {\n border-radius: 50%;\n}\n\n.rounded-t-\\[15px\\] {\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-secondaryLight {\n --tw-border-opacity: 1;\n border-color: rgb(179 179 179 / var(--tw-border-opacity));\n}\n\n.border-primaryLight {\n --tw-border-opacity: 1;\n border-color: rgb(86 86 86 / var(--tw-border-opacity));\n}\n\n.bg-primaryLight {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-primary {\n --tw-bg-opacity: 1;\n background-color: rgb(29 28 32 / var(--tw-bg-opacity));\n}\n\n.bg-graySelected {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-transparent {\n background-color: #0000;\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-black\\/\\[\\.6\\] {\n background-color: #0009;\n}\n\n.bg-\\[\\#f12828\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(241 40 40 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#565656\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-black, .bg-\\[\\#000\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#FFFFFF\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-underlay {\n background-color: #00000040;\n}\n\n.bg-\\[\\#f3f3f3\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(243 243 243 / var(--tw-bg-opacity));\n}\n\n.bg-secondaryVLight {\n --tw-bg-opacity: 1;\n background-color: rgb(235 235 235 / var(--tw-bg-opacity));\n}\n\n.bg-opacity-90 {\n --tw-bg-opacity: .9;\n}\n\n.object-cover {\n object-fit: cover;\n}\n\n.p-2\\.5 {\n padding: .625rem;\n}\n\n.p-2 {\n padding: .5rem;\n}\n\n.p-\\[3px\\] {\n padding: 3px;\n}\n\n.p-\\[12px\\] {\n padding: 12px;\n}\n\n.py-3 {\n padding-top: .75rem;\n padding-bottom: .75rem;\n}\n\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n.py-\\[9px\\] {\n padding-top: 9px;\n padding-bottom: 9px;\n}\n\n.px-3\\.5 {\n padding-left: .875rem;\n padding-right: .875rem;\n}\n\n.px-3 {\n padding-left: .75rem;\n padding-right: .75rem;\n}\n\n.py-2 {\n padding-top: .5rem;\n padding-bottom: .5rem;\n}\n\n.py-1\\.5 {\n padding-top: .375rem;\n padding-bottom: .375rem;\n}\n\n.px-2\\.5 {\n padding-left: .625rem;\n padding-right: .625rem;\n}\n\n.py-1 {\n padding-top: .25rem;\n padding-bottom: .25rem;\n}\n\n.px-2 {\n padding-left: .5rem;\n padding-right: .5rem;\n}\n\n.px-\\[10px\\] {\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n\n.py-\\[25px\\] {\n padding-top: 25px;\n padding-bottom: 25px;\n}\n\n.px-\\[20px\\] {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.pt-2\\.5 {\n padding-top: .625rem;\n}\n\n.pt-2 {\n padding-top: .5rem;\n}\n\n.pb-2\\.5 {\n padding-bottom: .625rem;\n}\n\n.pb-2 {\n padding-bottom: .5rem;\n}\n\n.pb-\\[25px\\] {\n padding-bottom: 25px;\n}\n\n.pb-\\[20px\\] {\n padding-bottom: 20px;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-base {\n letter-spacing: -.02em;\n font-size: 16px;\n line-height: 19px;\n}\n\n.text-sm {\n letter-spacing: -.02em;\n font-size: 14px;\n line-height: 17px;\n}\n\n.text-xs {\n letter-spacing: -.02em;\n font-size: 12px;\n line-height: 14px;\n}\n\n.text-\\[112px\\] {\n font-size: 112px;\n}\n\n.text-xl {\n letter-spacing: -.02em;\n font-size: 20px;\n line-height: 24px;\n}\n\n.text-lg {\n letter-spacing: -.02em;\n font-size: 18px;\n line-height: 22px;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.font-normal {\n font-weight: 400;\n}\n\n.leading-\\[20px\\] {\n line-height: 20px;\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.text-primary {\n --tw-text-opacity: 1;\n color: rgb(29 28 32 / var(--tw-text-opacity));\n}\n\n.text-white\\/80 {\n color: #fffc;\n}\n\n.text-secondary {\n --tw-text-opacity: 1;\n color: rgb(134 134 134 / var(--tw-text-opacity));\n}\n\n.text-primaryLight {\n --tw-text-opacity: 1;\n color: rgb(86 86 86 / var(--tw-text-opacity));\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.underline {\n text-decoration-line: underline;\n}\n\n.antialiased {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-50 {\n opacity: .5;\n}\n\n.opacity-\\[0\\.4\\] {\n opacity: .4;\n}\n\n.opacity-90 {\n opacity: .9;\n}\n\n.outline {\n outline-style: solid;\n}\n\n.ring-\\[3px\\] {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-cta {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(38 138 250 / var(--tw-ring-opacity));\n}\n\n.blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter, backdrop-filter;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-\\[transform\\,border-radius\\] {\n transition-property: transform, border-radius;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.duration-300 {\n transition-duration: .3s;\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.ease-in {\n transition-timing-function: cubic-bezier(.4, 0, 1, 1);\n}\n\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, .2, 1);\n}\n\n.inter {\n font-family: Inter, sans-serif;\n}\n\n@supports (font-variation-settings: normal) {\n .inter {\n font-family: Inter var, sans-serif;\n }\n}\n\n.first-letter\\:capitalize:first-letter {\n text-transform: capitalize;\n}\n\n.focus\\:outline-none:focus {\n outline-offset: 2px;\n outline: 2px solid #0000;\n}\n\n.disabled\\:bg-secondaryLight:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(179 179 179 / var(--tw-bg-opacity));\n}\n\n.disabled\\:bg-graySelected:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.disabled\\:text-secondaryLight:disabled {\n --tw-text-opacity: 1;\n color: rgb(179 179 179 / var(--tw-text-opacity));\n}\n\n";
12482
+
12483
+
12484
+ var $9833f4335ab609cd$exports = {};
12485
+ $9833f4335ab609cd$exports = "*, :before, :after {\n box-sizing: border-box;\n border: 0 solid #e5e7eb;\n}\n\n:before, :after {\n --tw-content: \"\";\n}\n\nhtml {\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-feature-settings: normal;\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;\n line-height: 1.5;\n}\n\nbody {\n line-height: inherit;\n margin: 0;\n}\n\nhr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n}\n\nabbr:where([title]) {\n text-decoration: underline dotted;\n}\n\nh1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\nb, strong {\n font-weight: bolder;\n}\n\ncode, kbd, samp, pre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;\n font-size: 1em;\n}\n\nsmall {\n font-size: 80%;\n}\n\nsub, sup {\n vertical-align: baseline;\n font-size: 75%;\n line-height: 0;\n position: relative;\n}\n\nsub {\n bottom: -.25em;\n}\n\nsup {\n top: -.5em;\n}\n\ntable {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n}\n\nbutton, input, optgroup, select, textarea {\n font-family: inherit;\n font-size: 100%;\n font-weight: inherit;\n line-height: inherit;\n color: inherit;\n margin: 0;\n padding: 0;\n}\n\nbutton, select {\n text-transform: none;\n}\n\nbutton, [type=\"button\"], [type=\"reset\"], [type=\"submit\"] {\n -webkit-appearance: button;\n background-color: #0000;\n background-image: none;\n}\n\n:-moz-focusring {\n outline: auto;\n}\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\nprogress {\n vertical-align: baseline;\n}\n\n::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n}\n\n[type=\"search\"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n\nsummary {\n display: list-item;\n}\n\nblockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol, ul, menu {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::placeholder, textarea::placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n\nbutton, [role=\"button\"] {\n cursor: pointer;\n}\n\n:disabled {\n cursor: default;\n}\n\nimg, svg, video, canvas, audio, iframe, embed, object {\n vertical-align: middle;\n display: block;\n}\n\nimg, video {\n max-width: 100%;\n height: auto;\n}\n\n[hidden] {\n display: none;\n}\n\n";
12486
+
12487
+
10958
12488
  const $e68207026aca356b$var$currentURL = new URL(window.location.href);
10959
12489
  const $e68207026aca356b$var$microphoneEnabled = $e68207026aca356b$var$currentURL.searchParams.get("microphone-enabled") !== "0";
10960
12490
  const $e68207026aca356b$var$cameraEnabled = $e68207026aca356b$var$currentURL.searchParams.get("camera-enabled") === "1";
10961
12491
  const $e68207026aca356b$var$defaultOptions = {
12492
+ recorder: false,
10962
12493
  sharedURL: window.location.href,
10963
12494
  showMenuButton: true,
10964
12495
  settingsShortcuts: [
@@ -10988,8 +12519,32 @@ const $e68207026aca356b$export$3f94917203ab7078 = {
10988
12519
  if (element?.nodeType !== window.Node.ELEMENT_NODE) throw new Error('The "element" property must be a valid element!');
10989
12520
  const mergedOptions = (0, $6b4cf4c12c735fdf$export$6969335ea1e4e77c)($e68207026aca356b$var$defaultOptions, options);
10990
12521
  const rootElement = (0, $jQDcL$reactdomclient.createRoot)(element);
10991
- rootElement.render(/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $ee8cb448c2c74888$export$2e2bcd8739ae039), {
10992
- options: mergedOptions
12522
+ let styleElement = null;
12523
+ styleElement = /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $jQDcL$reactjsxruntime.Fragment), {
12524
+ children: [
12525
+ options.recorder && /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("style", {
12526
+ children: (0, (/*@__PURE__*/$parcel$interopDefault($9833f4335ab609cd$exports)))
12527
+ }),
12528
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("style", {
12529
+ children: (0, (/*@__PURE__*/$parcel$interopDefault($54541b0286afc2de$exports)))
12530
+ })
12531
+ ]
12532
+ });
12533
+ rootElement.render(/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)((0, $jQDcL$reactjsxruntime.Fragment), {
12534
+ children: [
12535
+ styleElement,
12536
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("link", {
12537
+ rel: "preconnect",
12538
+ href: "https://rsms.me/"
12539
+ }),
12540
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("link", {
12541
+ rel: "stylesheet",
12542
+ href: "https://rsms.me/inter/inter.css"
12543
+ }),
12544
+ /*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $ee8cb448c2c74888$export$2e2bcd8739ae039), {
12545
+ options: mergedOptions
12546
+ })
12547
+ ]
10993
12548
  }));
10994
12549
  if (mergedOptions.tracking) (0, ($parcel$interopDefault($jQDcL$hotjarbrowser))).init(3111933, 6);
10995
12550
  },
@@ -11007,6 +12562,8 @@ const $e68207026aca356b$export$3f94917203ab7078 = {
11007
12562
  });
11008
12563
  window.dispatchEvent(event);
11009
12564
  },
12565
+ startRecord: (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).startRecord.bind((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2)),
12566
+ stopRecord: (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).stopRecord.bind((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2)),
11010
12567
  sendNotification: $84c6cbcbb594d072$export$3a57e165650c636f,
11011
12568
  joinRoom: (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).init.bind((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2)),
11012
12569
  leaveRoom: (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).endCall.bind((0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2)),