@snapcall/stream-ui 1.4.1 → 1.6.0

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.
@@ -1,19 +1,23 @@
1
1
  import {jsx as $3Sbms$jsx, jsxs as $3Sbms$jsxs, Fragment as $3Sbms$Fragment} from "react/jsx-runtime";
2
2
  import {render as $3Sbms$render, createPortal as $3Sbms$createPortal} from "react-dom";
3
+ import $3Sbms$hotjarbrowser from "@hotjar/browser";
3
4
  import $3Sbms$reacthottoast, {toast as $3Sbms$toast, Toaster as $3Sbms$Toaster, ToastBar as $3Sbms$ToastBar} from "react-hot-toast";
4
- import $3Sbms$styledcomponents, {keyframes as $3Sbms$keyframes, ThemeProvider as $3Sbms$ThemeProvider, css as $3Sbms$css, createGlobalStyle as $3Sbms$createGlobalStyle} from "styled-components";
5
+ import $3Sbms$styledcomponents, {keyframes as $3Sbms$keyframes, ThemeProvider as $3Sbms$ThemeProvider, css as $3Sbms$css, ThemeContext as $3Sbms$ThemeContext, createGlobalStyle as $3Sbms$createGlobalStyle} from "styled-components";
5
6
  import {useState as $3Sbms$useState, useRef as $3Sbms$useRef, useEffect as $3Sbms$useEffect, useContext as $3Sbms$useContext, useMemo as $3Sbms$useMemo, createContext as $3Sbms$createContext, useReducer as $3Sbms$useReducer, useLayoutEffect as $3Sbms$useLayoutEffect, useCallback as $3Sbms$useCallback} from "react";
6
7
  import "inobounce";
8
+ import $3Sbms$i18next from "i18next";
9
+ import {initReactI18next as $3Sbms$initReactI18next, useTranslation as $3Sbms$useTranslation} from "react-i18next";
7
10
  import {parse as $3Sbms$parse, getParser as $3Sbms$getParser} from "bowser";
8
11
  import {v4 as $3Sbms$v4} from "uuid";
9
12
  import {WebSocketTransport as $3Sbms$WebSocketTransport, Peer as $3Sbms$Peer} from "protoo-client";
10
- import {Device as $3Sbms$Device} from "mediasoup-client";
11
- import {setTag as $3Sbms$setTag, addBreadcrumb as $3Sbms$addBreadcrumb, captureException as $3Sbms$captureException} from "@sentry/browser";
13
+ import {captureException as $3Sbms$captureException, addBreadcrumb as $3Sbms$addBreadcrumb, setTag as $3Sbms$setTag} from "@sentry/browser";
12
14
  import {Producer as $3Sbms$Producer} from "mediasoup-client/lib/Producer";
15
+ import {Device as $3Sbms$Device} from "mediasoup-client";
13
16
  import {toCanvas as $3Sbms$toCanvas} from "qrcode";
14
17
 
15
18
 
16
19
 
20
+
17
21
  const $365e765f9890497b$var$isObject = (obj)=>{
18
22
  if (typeof obj === "object" && obj !== null) {
19
23
  if (typeof Object.getPrototypeOf === "function") {
@@ -305,10 +309,491 @@ const $a5146f9062d7bf28$export$3a57e165650c636f = (message, options = {})=>{
305
309
 
306
310
 
307
311
 
312
+ const $a3e657fb86ae23f3$export$604ba5624273df44 = ()=>{
313
+ try {
314
+ const storedTheme = localStorage.getItem("stream_ui_language");
315
+ if (storedTheme) return storedTheme;
316
+ return "en";
317
+ } catch (localStorageError) {
318
+ console.warn(localStorageError);
319
+ return "en";
320
+ }
321
+ };
322
+
323
+
324
+ const $18fb8799f38eb407$export$84584c2a98eb6753 = {
325
+ name: "English",
326
+ translation: {
327
+ notifications: {
328
+ screensharingError: "An error occured when trying to toggle screensharing",
329
+ microphoneError: "An error occured when trying to toggle the microphone",
330
+ cameraError: "An error occured when trying to toggle the camera",
331
+ cameraRotateError: "An error occured when trying to rotate the camera",
332
+ noCamera: "No camera available",
333
+ blockedMicrophonePopupTitle: "Camera and microphone are blocked",
334
+ blockedMicrophonePopup: "SnapCall requires access to your camera and microphone. Click the camera blocked icon in your browser's address bar.",
335
+ reload: "Reload",
336
+ criticalError: "A critical error has occurred (error {{code}}).",
337
+ agentJoinError: "An error occured while trying to join the room as an agent",
338
+ close: "Close",
339
+ connectedTo: "Connected to {{name}}"
340
+ },
341
+ endView: {
342
+ goBack: "Go back to call",
343
+ tooLate: "You arrived too late",
344
+ callIsOver: "The call is over or deleted",
345
+ callEnded: "The call is now ended",
346
+ callLeft: "You left the call",
347
+ full: "You can't join this call",
348
+ fullDescription: "The room is full. Please try to join the call later."
349
+ },
350
+ menu: {
351
+ title: "Menu",
352
+ new: "NEW",
353
+ openNewTab: "Open new tab",
354
+ quickConnect: "Quick Connect",
355
+ pictureInPicture: "Picture-in-Picture",
356
+ screenSharing: "Screen sharing"
357
+ },
358
+ copyLink: {
359
+ title: "Copy link",
360
+ error: "An error occured when trying to copy to clipboard",
361
+ copied: "Link copied to clipboard"
362
+ },
363
+ quickConnect: {
364
+ title: "Quick Connect",
365
+ scanTitle: "Scan QR Code",
366
+ scan: "Scan this QR code with your phone camera to open the call."
367
+ },
368
+ settings: {
369
+ title: "Settings",
370
+ preferences: "Preferences",
371
+ language: "Language",
372
+ devices: "Devices",
373
+ help: "Help",
374
+ helpCenter: "Go to help center"
375
+ },
376
+ audioMenu: {
377
+ title: "Audio",
378
+ blockedMicrophone: "Microphone is blocked.",
379
+ microphonePermissions: "Please accept microphone sharing before accessing these options."
380
+ },
381
+ videoMenu: {
382
+ title: "Video",
383
+ lowDef: "Low definition (240p)",
384
+ standardDef: "Standard definition (480p)",
385
+ highDef: "High definition (720p)",
386
+ blockedCamera: "Camera is blocked.",
387
+ cameraPermissions: "Please accept camera sharing before accessing these options.",
388
+ sendResolution: "Send Resolution (maximum)"
389
+ },
390
+ shareLink: {
391
+ title: "Create link",
392
+ title2: "Create a link",
393
+ invalid: "Invalid link",
394
+ sentToUsers: "Link sent to users",
395
+ sentToUser: "Link sent to {{user}}",
396
+ failed: "Failed to send link",
397
+ poweredBy: "Powered by",
398
+ invoice: "{{user}} sent you an invoice.",
399
+ pay: "Pay"
400
+ },
401
+ youtube: {
402
+ title: "Embed YouTube",
403
+ url: "YOUTUBE URL",
404
+ invalid: "Invalid YouTube URL",
405
+ share: "Share video"
406
+ },
407
+ sharedHistory: {
408
+ shared: "Shared with you"
409
+ },
410
+ snapshot: {
411
+ title: "Snapshot",
412
+ shared: "Snapshot shared.",
413
+ sentToUsers: "Snapshot sent to users.",
414
+ sentToUser: "Snapshot sent to {{user}}",
415
+ save: "Save photo",
416
+ error: "An error occured when trying to send the snapshot"
417
+ },
418
+ gdpr: {
419
+ recordedWarning: "To improve the quality of our service, this call will be recorded."
420
+ },
421
+ requestDevice: {
422
+ requestInput: "Request input devices",
423
+ request: "{{user}} would like you to share your {{device}}",
424
+ timedOut: "Your request has timed out.",
425
+ declined: "Your request has been declined.",
426
+ userDeclined: "{{user}} has declined your request."
427
+ },
428
+ leave: {
429
+ title: "Leave",
430
+ leaveCall: "Leave call",
431
+ endCall: "End call for all"
432
+ },
433
+ misc: {
434
+ someone: "Someone",
435
+ camera: "Camera",
436
+ microphone: "Microphone",
437
+ screen: "Screen",
438
+ speaker: "Speaker",
439
+ user: "User",
440
+ open: "Open",
441
+ from: "From",
442
+ accept: "Accept",
443
+ decline: "Decline",
444
+ you: "You"
445
+ }
446
+ }
447
+ };
448
+
449
+
450
+ const $c5472fb74fa04782$export$acb2a88f7d552ebf = {
451
+ name: "Fran\xe7ais",
452
+ translation: {
453
+ notifications: {
454
+ screensharingError: "Une erreur est survenue pendant l'activation du partage d'\xe9cran",
455
+ microphoneError: "Une erreur est survenue pendant l'activation du micro",
456
+ cameraError: "Une erreur est survenue pendant l'activation de la cam\xe9ra",
457
+ cameraRotateError: "Une erreur est survenue pendant la rotation de la cam\xe9ra",
458
+ noCamera: "Aucune cam\xe9ra disponible",
459
+ blockedMicrophonePopupTitle: "Votre cam\xe9ra et micro sont bloqu\xe9s",
460
+ blockedMicrophonePopup: "SnapCall a besoin d'acc\xe9der \xe0 votre cam\xe9ra et micro. Cliquez sur l'ic\xf4ne de cam\xe9ra bloqu\xe9e dans la barre d'adresse du navigateur.",
461
+ reload: "Recharger",
462
+ criticalError: "Une erreur critique est survenue (erreur {{code}}).",
463
+ agentJoinError: "Une erreur est survenue en essayant de rejoindre la salle en tant qu'agent",
464
+ close: "Fermer",
465
+ connectedTo: "Connect\xe9 \xe0 {{name}}"
466
+ },
467
+ endView: {
468
+ goBack: "Retourner dans l'appel",
469
+ tooLate: "Vous \xeates arrivez trop tard",
470
+ callIsOver: "Cet appel est termin\xe9 ou supprim\xe9",
471
+ callEnded: "Cet appel est termin\xe9",
472
+ callLeft: "Vous avez quitt\xe9 l'appel",
473
+ full: "Impossible de rejoindre l'appel",
474
+ fullDescription: "Limite d'utilisateurs atteinte. Merci de rejoindre l'appel ult\xe9rieurement."
475
+ },
476
+ menu: {
477
+ title: "Menu",
478
+ new: "NOUVEAU",
479
+ openNewTab: "Ouvrir un nouvel onglet",
480
+ quickConnect: "Quick Connect",
481
+ pictureInPicture: "Picture-in-Picture",
482
+ screenSharing: "Partage d'\xe9cran"
483
+ },
484
+ copyLink: {
485
+ title: "Copier le lien",
486
+ error: "Une erreur est survenue pendant la copie du lien dans le presse-papier",
487
+ copied: "Lien copi\xe9 dans le presse-papier"
488
+ },
489
+ quickConnect: {
490
+ title: "Quick Connect",
491
+ scanTitle: "Scannez le QR Code",
492
+ scan: "Scannez ce QR code avec votre t\xe9l\xe9phone pour ouvrir l'appel."
493
+ },
494
+ settings: {
495
+ title: "Param\xe8tres",
496
+ preferences: "Pr\xe9f\xe9rences",
497
+ language: "Langage",
498
+ devices: "Appareils",
499
+ help: "Aide",
500
+ helpCenter: "Acc\xe9der au centre d'aide"
501
+ },
502
+ audioMenu: {
503
+ title: "Audio",
504
+ blockedMicrophone: "Votre micro est bloqu\xe9.",
505
+ microphonePermissions: "Please accept microphone sharing before accessing these options."
506
+ },
507
+ videoMenu: {
508
+ title: "Video",
509
+ lowDef: "Basse d\xe9finition (240p)",
510
+ standardDef: "D\xe9finition standard (480p)",
511
+ highDef: "Haute d\xe9finition (720p)",
512
+ blockedCamera: "Votre cam\xe9ra est bloqu\xe9.",
513
+ cameraPermissions: "Please accept camera sharing before accessing these options.",
514
+ sendResolution: "R\xe9solution envoy\xe9e (max)"
515
+ },
516
+ shareLink: {
517
+ title: "Partager un lien",
518
+ title2: "Partager un lien",
519
+ invalid: "Lien invalide",
520
+ sentToUsers: "Lien envoy\xe9 aux participants",
521
+ sentToUser: "Lien envoy\xe9 \xe0 {{user}}",
522
+ failed: "Une erreur est survenue pendant l'envoi du lien",
523
+ poweredBy: "Propos\xe9 par",
524
+ invoice: "{{user}} vous a envoy\xe9 une facture.",
525
+ pay: "Payer"
526
+ },
527
+ youtube: {
528
+ title: "YouTube",
529
+ url: "URL YOUTUBE",
530
+ invalid: "URL YouTube invalide",
531
+ share: "Partager la vid\xe9o"
532
+ },
533
+ sharedHistory: {
534
+ shared: "Partag\xe9 avec vous"
535
+ },
536
+ snapshot: {
537
+ title: "Snapshot",
538
+ shared: "Snapshot envoy\xe9.",
539
+ sentToUsers: "Snapshot envoy\xe9 aux participants.",
540
+ sentToUser: "Snapshot envoy\xe9 \xe0 {{user}}",
541
+ save: "Sauvegarder l'image",
542
+ error: "Une erreur est survenue pendant l'envoi du snapshot"
543
+ },
544
+ gdpr: {
545
+ recordedWarning: "Pour am\xe9liorer la qualit\xe9 de notre service, cet appel va \xeatre enregistr\xe9."
546
+ },
547
+ requestDevice: {
548
+ requestInput: "Demander l'activation",
549
+ request: "{{user}} voudrait que vous partagiez votre {{device}}",
550
+ timedOut: "Votre requ\xeate n'a pas eu de r\xe9ponse",
551
+ declined: "Votre requ\xeate a \xe9t\xe9 refus\xe9.",
552
+ userDeclined: "{{user}} a d\xe9clin\xe9 votre requ\xeate."
553
+ },
554
+ leave: {
555
+ title: "Quitter",
556
+ leaveCall: "Quitter l'appel",
557
+ endCall: "Terminer l'appel pour tout le monde"
558
+ },
559
+ misc: {
560
+ someone: "Quelqu'un",
561
+ camera: "Cam\xe9ra",
562
+ microphone: "Micro",
563
+ screen: "\xc9cran",
564
+ speaker: "Haut-parleur",
565
+ user: "Utilisateur",
566
+ open: "Ouvrir",
567
+ from: "Depuis",
568
+ accept: "Accepter",
569
+ decline: "D\xe9cliner",
570
+ you: "Vous"
571
+ }
572
+ }
573
+ };
574
+
575
+
576
+ const $b7790fb9e48df5c4$export$3486a10f30cf1ee4 = {
577
+ name: "Italiano",
578
+ translation: {
579
+ notifications: {
580
+ screensharingError: "Si \xe8 verificato un errore durante l'attivazione della condivisione dello schermo",
581
+ microphoneError: "Si \xe8 verificato un errore durante l'attivazione del microfono",
582
+ cameraError: "Si \xe8 verificato un errore durante l'attivazione della fotocamera",
583
+ cameraRotateError: "Si \xe8 verificato un errore durante la rotazione della fotocamera",
584
+ noCamera: "Nessuna fotocamera disponibile",
585
+ blockedMicrophonePopupTitle: "La tua fotocamera e il tuo microfono sono bloccati",
586
+ blockedMicrophonePopup: "SnapCall ha bisogno di accedere alla fotocamera e al microfono. Fare clic sull'icona della fotocamera bloccata nella barra degli indirizzi del browser.",
587
+ reload: "Ricaricare",
588
+ criticalError: "Si \xe8 verificato un errore critico (errore {{code}}).",
589
+ agentJoinError: "Si \xe8 verificato un errore cercando di entrare nella conversazione come agente",
590
+ close: "Chiudere",
591
+ connectedTo: "Connesso a {{name}}"
592
+ },
593
+ endView: {
594
+ goBack: "Torna alla chiamata",
595
+ tooLate: "Sei arrivato troppo tardi",
596
+ callIsOver: "Questa chiamata \xe8 finita o \xe8 stata eliminata",
597
+ callEnded: "Questa chiamata \xe8 finita",
598
+ callLeft: "Hai lasciato la chiamata",
599
+ full: "Impossibile partecipare alla chiamata",
600
+ fullDescription: "Limite d'uso attenente."
601
+ },
602
+ menu: {
603
+ title: "Men\xf9",
604
+ new: "NUOVO",
605
+ openNewTab: "Apri una nuova scheda",
606
+ quickConnect: "Connessione Rapida",
607
+ pictureInPicture: "Immagine nell'immagine",
608
+ screenSharing: "Condivisione dello schermo"
609
+ },
610
+ copyLink: {
611
+ title: "Copia il link",
612
+ error: "Si \xe8 verificato un errore durante la copia negli Appunti",
613
+ copied: "Link copiato negli Appunti"
614
+ },
615
+ quickConnect: {
616
+ title: "Connessione Rapida",
617
+ scanTitle: "Scansiona il codice QR",
618
+ scan: "Scansiona questo codice QR con il telefono per aprire la chiamata."
619
+ },
620
+ settings: {
621
+ title: "Impostazioni",
622
+ preferences: "Preferenze",
623
+ language: "Linguaggio",
624
+ devices: "Dispositivi",
625
+ help: "Aiuto",
626
+ helpCenter: "Accedi all'Assistenza"
627
+ },
628
+ audioMenu: {
629
+ title: "Audio",
630
+ blockedMicrophone: "Il tuo microfono \xe8 bloccato.",
631
+ microphonePermissions: "Si prega di accettare la condivisione del microfono prima di accedere a queste opzioni."
632
+ },
633
+ videoMenu: {
634
+ title: "Video",
635
+ lowDef: "Definizione bassa (240p)",
636
+ standardDef: "Definizione standard (480p)",
637
+ highDef: "Alta definizione (720p)",
638
+ blockedCamera: "La fotocamera \xe8 bloccata.",
639
+ cameraPermissions: "Si prega di accettare la condivisione della fotocamera prima di accedere a queste opzioni.",
640
+ sendResolution: "Risoluzione inviata (max)"
641
+ },
642
+ shareLink: {
643
+ title: "Condividi un link",
644
+ title2: "Condividi un link",
645
+ invalid: "Collegamento non valido",
646
+ sentToUsers: "Link inviato ai partecipanti",
647
+ sentToUser: "Link inviato a {{user}}",
648
+ failed: "Si \xe8 verificato un errore durante l'invio del link",
649
+ poweredBy: "Proposto da",
650
+ invoice: "{{User}} ti ha inviato una fattura.",
651
+ pay: "Paga"
652
+ },
653
+ youtube: {
654
+ title: "YouTube",
655
+ url: "URL YOUTUBE",
656
+ invalid: "URL YouTube non valido",
657
+ share: "Condividi il video"
658
+ },
659
+ sharedHistory: {
660
+ shared: "Condiviso con te"
661
+ },
662
+ snapshot: {
663
+ title: "Schermata",
664
+ shared: "Schermata inviata",
665
+ sentToUsers: "Schermanta inviata ai partecipanti",
666
+ sentToUser: "Schermata inviata a {{user}}",
667
+ save: "Salva l'immagine",
668
+ error: "Si \xe8 verificato un errore durante l'invio della schermata"
669
+ },
670
+ gdpr: {
671
+ recordedWarning: "Per migliorare la qualit\xe0 del nostro servizio, questa chiamata verr\xe0 registrata."
672
+ },
673
+ requestDevice: {
674
+ requestInput: "Richiesta di attivazione",
675
+ request: "{{user}} vorrebbe condividere il tuo {{device}}",
676
+ timedOut: "La tua richiesta non ha ricevuto risposta",
677
+ declined: "La tua richiesta \xe8 stata rifiutata.",
678
+ userDeclined: "{{user}} ha rifiutato la tua richiesta"
679
+ },
680
+ leave: {
681
+ title: "Lasciare",
682
+ leaveCall: "Lascia la chiamata",
683
+ endCall: "Termina la chiamata per tutti"
684
+ },
685
+ misc: {
686
+ someone: "Qualcuno",
687
+ camera: "Telecamera",
688
+ microphone: "Microfono",
689
+ screen: "Schermo",
690
+ speaker: "Altoparlante",
691
+ user: "Utente",
692
+ open: "Aprire",
693
+ from: "Da",
694
+ accept: "Accettare",
695
+ decline: "Declinare",
696
+ you: "Voi"
697
+ }
698
+ }
699
+ };
700
+
701
+
702
+ const $384d985bb9605c35$export$150b732325d14d04 = {
703
+ en: $18fb8799f38eb407$export$84584c2a98eb6753,
704
+ fr: $c5472fb74fa04782$export$acb2a88f7d552ebf,
705
+ it: $b7790fb9e48df5c4$export$3486a10f30cf1ee4
706
+ };
707
+ (0, $3Sbms$i18next).use((0, $3Sbms$initReactI18next)).init({
708
+ lng: (0, $a3e657fb86ae23f3$export$604ba5624273df44)(),
709
+ fallbackLng: "en",
710
+ resources: $384d985bb9605c35$export$150b732325d14d04,
711
+ interpolation: {
712
+ escapeValue: false
713
+ }
714
+ });
715
+ var $384d985bb9605c35$export$2e2bcd8739ae039 = (0, $3Sbms$i18next);
716
+
717
+
718
+
719
+
720
+
721
+
722
+
723
+
724
+
308
725
 
309
726
 
727
+ const $0f65a9eaf4a1e910$var$LogLevel = {
728
+ error: 1,
729
+ warn: 2,
730
+ info: 3,
731
+ log: 4,
732
+ debug: 5
733
+ };
734
+ const $0f65a9eaf4a1e910$var$LevelDescription = {
735
+ 1: "error",
736
+ 2: "warn",
737
+ 3: "info",
738
+ 4: "verbose",
739
+ 5: "debug"
740
+ };
741
+ let $0f65a9eaf4a1e910$var$logLevel = Number(2);
742
+ const $0f65a9eaf4a1e910$var$dateFormat = new Intl.DateTimeFormat("en-GB", {
743
+ year: "numeric",
744
+ month: "numeric",
745
+ day: "numeric",
746
+ hour: "numeric",
747
+ minute: "numeric",
748
+ second: "numeric",
749
+ timeZone: "GMT"
750
+ });
751
+ class $0f65a9eaf4a1e910$export$2e2bcd8739ae039 {
752
+ constructor(filename, customLogLevel){
753
+ this.filename = filename;
754
+ this.customLogLevel = customLogLevel;
755
+ }
756
+ print(level, logger, scope, ...arg) {
757
+ const head = `[ ${$0f65a9eaf4a1e910$var$dateFormat.format(new Date())} ][ ${$0f65a9eaf4a1e910$var$LevelDescription[level]} ][ ${this.filename} - ${scope} ]`;
758
+ if (level <= (this.customLogLevel || $0f65a9eaf4a1e910$var$logLevel)) logger(head, ...arg);
759
+ else (0, $3Sbms$addBreadcrumb)({
760
+ type: "debug",
761
+ level: $0f65a9eaf4a1e910$var$LevelDescription[level],
762
+ category: "console",
763
+ data: {
764
+ head: head,
765
+ arguments: arg
766
+ }
767
+ });
768
+ }
769
+ debug(scope, ...arg) {
770
+ this.print($0f65a9eaf4a1e910$var$LogLevel.debug, console.debug, scope, ...arg);
771
+ }
772
+ error(scope, ...arg) {
773
+ this.print($0f65a9eaf4a1e910$var$LogLevel.error, console.error, scope, ...arg);
774
+ }
775
+ info(scope, ...arg) {
776
+ this.print($0f65a9eaf4a1e910$var$LogLevel.info, console.info, scope, ...arg);
777
+ }
778
+ log(scope, ...arg) {
779
+ this.print($0f65a9eaf4a1e910$var$LogLevel.log, console.log, scope, ...arg);
780
+ }
781
+ warn(scope, ...arg) {
782
+ this.print($0f65a9eaf4a1e910$var$LogLevel.warn, console.warn, scope, ...arg);
783
+ }
784
+ deprecated(...arg) {
785
+ console.warn("[ DEPRECATED ]", ...arg);
786
+ }
787
+ static setLogLevel(level) {
788
+ $0f65a9eaf4a1e910$var$logLevel = level;
789
+ }
790
+ setLogLevel(level) {
791
+ this.customLogLevel = level;
792
+ }
793
+ }
310
794
 
311
795
 
796
+ const $67e45b2e30dcc030$var$log = new (0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039)("AudioLevels.ts");
312
797
  const $67e45b2e30dcc030$var$audioContextConstructor = window.AudioContext || window.webkitAudioContext;
313
798
  const $67e45b2e30dcc030$var$AUDIO_MUTE_DETECTION_TIME = 2000;
314
799
  const $67e45b2e30dcc030$var$SPEAK_DETECTION_TIME = 500;
@@ -406,10 +891,10 @@ class $67e45b2e30dcc030$export$ea669869acd8f177 {
406
891
  try {
407
892
  this.audioStreamSource.disconnect(this.analyser);
408
893
  } catch (err1) {
409
- console.error("audioStreamSource failed to disconnect", err1);
894
+ $67e45b2e30dcc030$var$log.error("release", "audioStreamSource failed to disconnect", err1);
410
895
  }
411
896
  this.audioContext.close().catch((err)=>{
412
- console.error("audioContext failed to close", err);
897
+ $67e45b2e30dcc030$var$log.error("release", "audioContext failed to close", err);
413
898
  });
414
899
  this.audioLevels = [];
415
900
  }
@@ -419,6 +904,8 @@ class $67e45b2e30dcc030$export$ea669869acd8f177 {
419
904
  }
420
905
 
421
906
 
907
+
908
+ const $82e31ca38889c079$var$log = new (0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039)("AudioRenderer.ts");
422
909
  class $82e31ca38889c079$var$AudioRenderer {
423
910
  constructor({ consumerId: consumerId }){
424
911
  this.consumerId = consumerId;
@@ -438,9 +925,12 @@ class $82e31ca38889c079$var$AudioRenderer {
438
925
  async setSink(sinkId) {
439
926
  await this.audio.setSinkId?.(sinkId);
440
927
  }
928
+ getSink() {
929
+ return this.audio.sinkId;
930
+ }
441
931
  async play() {
442
932
  await this.audio.play().catch((err)=>{
443
- console.warn("failed to play");
933
+ $82e31ca38889c079$var$log.warn("play", "failed to play");
444
934
  setTimeout(()=>{
445
935
  this.play();
446
936
  }, 1000);
@@ -511,12 +1001,138 @@ const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src)=>{
511
1001
 
512
1002
 
513
1003
 
1004
+
1005
+
1006
+
1007
+
1008
+ const $a2f0e3c29b11c88e$var$log = new (0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039)("StreamerMediasoup");
1009
+ function $a2f0e3c29b11c88e$var$deviceAutoDetection() {
1010
+ try {
1011
+ const ua = navigator.userAgent;
1012
+ const browser = $3Sbms$getParser(ua);
1013
+ $3Sbms$setTag("DeviceDetectionForced", true);
1014
+ $3Sbms$addBreadcrumb({
1015
+ type: "debug",
1016
+ category: "browser",
1017
+ data: browser.getResult()
1018
+ });
1019
+ const browserOs = browser.getOS();
1020
+ if (browser.getBrowserName() === "Safari" && browserOs.name === "iOS" && Number(browserOs.version) >= 14.3) return new (0, $3Sbms$Device)({
1021
+ handlerName: "Safari12"
1022
+ });
1023
+ throw Error("failed to autoDetect browser, falling back to chrome 74");
1024
+ } catch (error) {
1025
+ $a2f0e3c29b11c88e$var$log.error("deviceAutoDetection", error);
1026
+ $3Sbms$captureException(error);
1027
+ }
1028
+ return new (0, $3Sbms$Device)({
1029
+ handlerName: "Chrome74"
1030
+ });
1031
+ }
1032
+ function $a2f0e3c29b11c88e$var$createDevice() {
1033
+ try {
1034
+ return new (0, $3Sbms$Device)();
1035
+ } catch (error) {
1036
+ $a2f0e3c29b11c88e$var$log.error("failed to detects device from mediasoup, fallback on auto detection", error);
1037
+ return $a2f0e3c29b11c88e$var$deviceAutoDetection();
1038
+ }
1039
+ }
1040
+ class $a2f0e3c29b11c88e$export$2e2bcd8739ae039 {
1041
+ constructor(device, config){
1042
+ this.mediasoupDevice = device;
1043
+ this.config = config;
1044
+ }
1045
+ static async create(server, config) {
1046
+ const routerRtpCapabilities = await server.request("getRouterRtpCapabilities");
1047
+ routerRtpCapabilities.headerExtensions = routerRtpCapabilities.headerExtensions?.filter((ext)=>{
1048
+ return ext.uri !== "urn:3gpp:video-orientation";
1049
+ });
1050
+ const device = $a2f0e3c29b11c88e$var$createDevice();
1051
+ device.load({
1052
+ routerRtpCapabilities: routerRtpCapabilities
1053
+ });
1054
+ return new $a2f0e3c29b11c88e$export$2e2bcd8739ae039(device, config);
1055
+ }
1056
+ getRtpCapabilities() {
1057
+ return this.mediasoupDevice.rtpCapabilities;
1058
+ }
1059
+ async createTransportConfig(server) {
1060
+ const transportInfo = await server.request("createWebRtcTransport");
1061
+ return {
1062
+ id: transportInfo.id,
1063
+ iceParameters: transportInfo.iceParameters,
1064
+ iceCandidates: transportInfo.iceCandidates,
1065
+ dtlsParameters: {
1066
+ ...transportInfo.dtlsParameters,
1067
+ role: "auto"
1068
+ },
1069
+ sctpParameters: transportInfo.sctpParameters,
1070
+ iceServers: this.config.iceServers,
1071
+ proprietaryConstraints: {
1072
+ optional: [
1073
+ {
1074
+ googDscp: true
1075
+ }
1076
+ ]
1077
+ },
1078
+ additionalSettings: {
1079
+ encodedInsertableStreams: false
1080
+ }
1081
+ };
1082
+ }
1083
+ async createSendTransport(server) {
1084
+ const sendTransport = this.mediasoupDevice.createSendTransport(await this.createTransportConfig(server));
1085
+ sendTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
1086
+ $a2f0e3c29b11c88e$var$log.log("dtlsParameters", sendTransport.id, dtlsParameters);
1087
+ server.request("connectWebRtcTransport", {
1088
+ transportId: sendTransport.id,
1089
+ dtlsParameters: dtlsParameters
1090
+ }).then(callback).catch(errback);
1091
+ });
1092
+ sendTransport.on("produce", async ({ kind: kind , rtpParameters: rtpParameters , appData: appData }, callback, errback)=>{
1093
+ try {
1094
+ const { id: id } = await server.request("produce", {
1095
+ transportId: sendTransport.id,
1096
+ kind: kind,
1097
+ rtpParameters: rtpParameters,
1098
+ appData: appData
1099
+ });
1100
+ callback({
1101
+ id: id
1102
+ });
1103
+ $a2f0e3c29b11c88e$var$log.log("producerTransport: ", sendTransport);
1104
+ } catch (error) {
1105
+ errback(error);
1106
+ }
1107
+ });
1108
+ return sendTransport;
1109
+ }
1110
+ async createRecvTransport(server) {
1111
+ const recvTransport = this.mediasoupDevice.createRecvTransport(await this.createTransportConfig(server));
1112
+ recvTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
1113
+ $a2f0e3c29b11c88e$var$log.log("dtls", recvTransport.id, dtlsParameters);
1114
+ server.request("connectWebRtcTransport", {
1115
+ transportId: recvTransport.id,
1116
+ dtlsParameters: dtlsParameters
1117
+ }).then(callback).catch(errback);
1118
+ });
1119
+ return recvTransport;
1120
+ }
1121
+ async createTransport(server, direction) {
1122
+ if (direction === "send") return await this.createSendTransport(server);
1123
+ else return await this.createRecvTransport(server);
1124
+ }
1125
+ }
1126
+
1127
+
1128
+ const $c31e3fb4360572af$var$log = new (0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039)("StreamerClient");
514
1129
  const $c31e3fb4360572af$export$818d60b2e626da0c = {
515
1130
  WEBRTC_FAILED: "WRTC1",
516
1131
  WEBRTC_RECOVER_ERROR: "WRTC2",
517
1132
  CREATE_TRANSPORT_FAILED: "TRANS1",
518
1133
  CONSUME_ERROR: "CONS1",
519
- SOCKET_LOST: "SOCK1"
1134
+ SOCKET_LOST: "SOCK1",
1135
+ USER_LIMIT: "USERLIMIT"
520
1136
  };
521
1137
  const $c31e3fb4360572af$export$d21ffcc5eb136bfa = {
522
1138
  qvga: {
@@ -579,6 +1195,7 @@ class $c31e3fb4360572af$var$SnapcallEvent extends CustomEvent {
579
1195
  }
580
1196
  const $c31e3fb4360572af$var$StreamerEventTargetType = EventTarget;
581
1197
  class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$StreamerEventTargetType {
1198
+ mediasoupTransport = {};
582
1199
  pendingDeviceRequest = {};
583
1200
  joinOptions = {};
584
1201
  devicesList = [];
@@ -733,17 +1350,19 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
733
1350
  this.joinRoom();
734
1351
  });
735
1352
  this.protoo.on("failed", ()=>{
736
- console.error("failed");
1353
+ $c31e3fb4360572af$var$log.error("protoo.on", "failed");
737
1354
  this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.SOCKET_LOST);
738
1355
  });
739
1356
  this.protoo.on("disconnected", ()=>{
740
- console.error("disconnected");
1357
+ $c31e3fb4360572af$var$log.error("protoo.on", "disconnected");
741
1358
  this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.SOCKET_LOST);
742
1359
  });
743
- this.protoo.on("close", ()=>console.log("close :("));
1360
+ this.protoo.on("close", ()=>$c31e3fb4360572af$var$log.log("protoo.on", "close :("));
744
1361
  this.protoo.on("notification", async (notification)=>{
745
- console.log("notification", notification);
746
- if (notification.method === "newPeer") {
1362
+ $c31e3fb4360572af$var$log.log("notification", notification);
1363
+ if (notification.method === "error") {
1364
+ if (notification.data?.reason === "reached user limit") this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.USER_LIMIT);
1365
+ } else if (notification.method === "newPeer") {
747
1366
  const { id: id , profile: profile } = notification.data;
748
1367
  this.peers.set(id, {
749
1368
  id: id,
@@ -878,158 +1497,63 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
878
1497
  }
879
1498
  });
880
1499
  }
881
- deviceAutoDetection() {
882
- try {
883
- const ua = navigator.userAgent;
884
- const browser = $3Sbms$getParser(ua);
885
- $3Sbms$setTag("DeviceDetectionForced", true);
886
- $3Sbms$addBreadcrumb({
887
- type: "debug",
888
- category: "browser",
889
- data: browser.getResult()
890
- });
891
- const browserOs = browser.getOS();
892
- if (browser.getBrowserName() === "Safari" && browserOs.name === "iOS" && Number(browserOs.version) >= 14.3) return new $3Sbms$Device({
893
- handlerName: "Safari12"
894
- });
895
- throw Error("failed to autoDetect browser, falling back to chrome 74");
896
- } catch (error) {
897
- console.error(error);
898
- $3Sbms$captureException(error);
899
- this.dispatchEvent(new CustomEvent("browserDetectionFailed"));
900
- }
901
- return new $3Sbms$Device({
902
- handlerName: "Chrome74"
903
- });
904
- }
905
- createDevice() {
906
- try {
907
- return new $3Sbms$Device();
908
- } catch (error) {
909
- console.error("failed to detects device from mediasoup, fallback on auto detection", error);
910
- return this.deviceAutoDetection();
1500
+ closeWebrtcTransport(key) {
1501
+ const transport = this.mediasoupTransport[key];
1502
+ if (transport) {
1503
+ transport?.transport?.close();
1504
+ clearTimeout(transport?.disconnectTimeout);
1505
+ delete this.mediasoupTransport[key];
911
1506
  }
912
1507
  }
913
- closeWebrtcTransport(transport) {
914
- transport?.transport.close();
915
- clearTimeout(transport?.disconnectTimeout);
916
- }
917
- async createTransportConfig() {
918
- const transportInfo = await this.protoo.request("createWebRtcTransport");
919
- return {
920
- id: transportInfo.id,
921
- iceParameters: transportInfo.iceParameters,
922
- iceCandidates: transportInfo.iceCandidates,
923
- dtlsParameters: {
924
- ...transportInfo.dtlsParameters,
925
- role: "auto"
926
- },
927
- sctpParameters: transportInfo.sctpParameters,
928
- iceServers: this.config.iceServers,
929
- proprietaryConstraints: {
930
- optional: [
931
- {
932
- googDscp: true
933
- }
934
- ]
935
- },
936
- additionalSettings: {
937
- encodedInsertableStreams: false
938
- }
939
- };
940
- }
941
- async createSendTransport(kind1) {
942
- const sendTransport = this.mediasoupDevice.createSendTransport(await this.createTransportConfig());
943
- sendTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
944
- console.log("dtlsParameters", sendTransport.id, dtlsParameters);
945
- this.protoo.request("connectWebRtcTransport", {
946
- transportId: sendTransport.id,
947
- dtlsParameters: dtlsParameters
948
- }).then(callback).catch(errback);
949
- });
950
- sendTransport.on("produce", async ({ kind: kind , rtpParameters: rtpParameters , appData: appData }, callback, errback)=>{
1508
+ async getTransport(kind, direction) {
1509
+ if (!this.streamerMediasoup) throw new Error("streamerMediasoup not initialized");
1510
+ let transport = this.mediasoupTransport[`${kind}-${direction}`];
1511
+ if (!transport) {
951
1512
  try {
952
- const { id: id } = await this.protoo.request("produce", {
953
- transportId: sendTransport.id,
1513
+ const promise = this.streamerMediasoup.createTransport(this.protoo, direction);
1514
+ transport = {
1515
+ disconnectTimeout: undefined,
954
1516
  kind: kind,
955
- rtpParameters: rtpParameters,
956
- appData: appData
957
- });
958
- callback({
959
- id: id
960
- });
961
- console.log("producerTransport: ", sendTransport);
962
- } catch (error) {
963
- errback(error);
1517
+ createPromise: promise
1518
+ };
1519
+ this.mediasoupTransport[`${kind}-${direction}`] = transport;
1520
+ transport.transport = await promise;
1521
+ if (transport.transport) this.listenWebRTCTransportStates(transport);
1522
+ } catch (err) {
1523
+ this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.CREATE_TRANSPORT_FAILED);
1524
+ throw err;
964
1525
  }
965
- });
966
- const result = {
967
- transport: sendTransport,
968
- disconnectTimeout: undefined,
969
- kind: kind1
970
- };
971
- this.listenWebRTCTransportStats(result);
972
- return result;
973
- }
974
- async createRecvTransport(kind) {
975
- const recvTransport = this.mediasoupDevice.createRecvTransport(await this.createTransportConfig());
976
- recvTransport.on("connect", ({ dtlsParameters: dtlsParameters }, callback, errback)=>{
977
- console.log("dtls", recvTransport.id, dtlsParameters);
978
- this.protoo.request("connectWebRtcTransport", {
979
- transportId: recvTransport.id,
980
- dtlsParameters: dtlsParameters
981
- }).then(callback).catch(errback);
982
- });
983
- const result = {
984
- transport: recvTransport,
985
- disconnectTimeout: undefined,
986
- kind: kind
987
- };
988
- this.listenWebRTCTransportStats(result);
989
- return result;
1526
+ return transport.transport;
1527
+ } else if (transport && transport.transport) return transport.transport;
1528
+ else return transport.createPromise;
990
1529
  }
991
- listenWebRTCTransportStats(transport) {
1530
+ listenWebRTCTransportStates(transport) {
1531
+ if (!transport.transport) throw new Error("can not listen states of undefined transport");
992
1532
  transport.transport.on("connectionstatechange", (event)=>{
993
- if (!transport.transport.closed) {
994
- console.log("recv connectionstatechange: ", event);
1533
+ if (transport.transport && !transport.transport.closed) {
1534
+ $c31e3fb4360572af$var$log.log("recv connectionstatechange: ", event);
995
1535
  if (event === "disconnected") transport.disconnectTimeout = setTimeout(()=>{
996
- console.log(`trying to restart transport for ${transport.kind}`);
997
- this.restartIce(transport.transport);
1536
+ $c31e3fb4360572af$var$log.log("listenWebRTCTransportStats", `trying to restart transport for ${transport.kind}`);
1537
+ if (transport.transport) this.restartIce(transport.transport);
998
1538
  }, 5000);
999
1539
  else if (event === "connected") clearTimeout(transport.disconnectTimeout);
1000
1540
  else if (event === "failed") {
1001
1541
  const err = new Error(`webRTC transport state failed for ${transport.kind}`);
1002
1542
  $3Sbms$captureException(err, {
1003
1543
  extra: {
1004
- direction: transport.transport.direction,
1005
- id: transport.transport.id,
1544
+ direction: transport.transport?.direction,
1545
+ id: transport.transport?.id,
1006
1546
  kind: transport.kind
1007
1547
  }
1008
1548
  });
1009
- console.error("webrtc stat failed", err);
1549
+ $c31e3fb4360572af$var$log.error("listenWebRTCTransportStats", "webrtc stat failed", err);
1010
1550
  this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.WEBRTC_FAILED);
1011
1551
  }
1012
1552
  }
1013
1553
  });
1014
1554
  }
1015
1555
  async joinRoom() {
1016
- this.mediasoupDevice = this.createDevice();
1017
- this.routerRtpCapabilities = await this.protoo.request("getRouterRtpCapabilities");
1018
- this.routerRtpCapabilities.headerExtensions = this.routerRtpCapabilities.headerExtensions?.filter((ext)=>{
1019
- return ext.uri !== "urn:3gpp:video-orientation";
1020
- });
1021
- await this.mediasoupDevice.load({
1022
- routerRtpCapabilities: this.routerRtpCapabilities
1023
- });
1024
- try {
1025
- this.recvAudioTransports = await this.createRecvTransport("audio");
1026
- this.sendAudioTransports = await this.createSendTransport("audio");
1027
- this.recvVideoTransports = await this.createRecvTransport("video");
1028
- this.sendVideoTransports = await this.createSendTransport("video");
1029
- } catch (err) {
1030
- this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.CREATE_TRANSPORT_FAILED);
1031
- throw err;
1032
- }
1556
+ this.streamerMediasoup = await (0, $a2f0e3c29b11c88e$export$2e2bcd8739ae039).create(this.protoo, this.config);
1033
1557
  // now we join
1034
1558
  if (this.joinOptions.apiKey && this.joinOptions.email) try {
1035
1559
  const agentInfo = await this.fetchAgentInfo({
@@ -1043,7 +1567,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1043
1567
  }
1044
1568
  }));
1045
1569
  } catch (agentInfoError) {
1046
- console.warn(agentInfoError);
1570
+ $c31e3fb4360572af$var$log.warn("joinRoom", agentInfoError);
1047
1571
  this.dispatchEvent(new $c31e3fb4360572af$var$SnapcallEvent("agentIdentity", {
1048
1572
  detail: {
1049
1573
  success: false
@@ -1074,7 +1598,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1074
1598
  callId: callId
1075
1599
  }
1076
1600
  }));
1077
- console.log("peers", peers);
1601
+ $c31e3fb4360572af$var$log.log("joinRoom", "peers", peers);
1078
1602
  if (this.joinOptions.displayName) await this.setDisplayName(this.joinOptions.displayName);
1079
1603
  if (this.joinOptions.profile) await this.setProfile(this.joinOptions.profile);
1080
1604
  // Consume Peers
@@ -1087,12 +1611,12 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1087
1611
  }
1088
1612
  async switchMicrophone(deviceId) {
1089
1613
  try {
1090
- console.log("switchMicrophone", "switching Microphone");
1614
+ $c31e3fb4360572af$var$log.log("switchMicrophone", "switching Microphone");
1091
1615
  this.audioLevel?.release();
1092
1616
  this.audioLevel = undefined;
1093
1617
  if (this.micProducer && this.micProducer.track) {
1094
1618
  this.micProducer?.track?.stop();
1095
- console.log("switchMicrophone", "stopping previous track");
1619
+ $c31e3fb4360572af$var$log.log("switchMicrophone", "stopping previous track");
1096
1620
  }
1097
1621
  const stream = await this.handleGetUserMediaError("microphone", navigator.mediaDevices.getUserMedia({
1098
1622
  audio: {
@@ -1102,14 +1626,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1102
1626
  }
1103
1627
  }));
1104
1628
  this.audioLevel = new (0, $67e45b2e30dcc030$export$ea669869acd8f177)(stream, this);
1105
- this.audioLevel.analyse();
1629
+ // this.audioLevel.analyse();
1106
1630
  const track = stream.getAudioTracks()[0];
1107
1631
  await this.micProducer?.replaceTrack({
1108
1632
  track: track
1109
1633
  });
1110
- console.log("switchMicrophone", "switched Microphone");
1634
+ $c31e3fb4360572af$var$log.log("switchMicrophone", "switched Microphone");
1111
1635
  } catch (error) {
1112
- console.error("switchMicrophone error", error);
1636
+ $c31e3fb4360572af$var$log.error("switchMicrophone error", error);
1113
1637
  await this.closeMicrophoneProducer();
1114
1638
  }
1115
1639
  }
@@ -1126,7 +1650,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1126
1650
  });
1127
1651
  }
1128
1652
  async onDeviceChange() {
1129
- console.log("detecting device change");
1653
+ $c31e3fb4360572af$var$log.log("onDeviceChange", "detecting device change");
1130
1654
  const deviceListChangeEvent = new $c31e3fb4360572af$var$SnapcallEvent("devicesListChange", {
1131
1655
  detail: {}
1132
1656
  });
@@ -1136,7 +1660,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1136
1660
  const inputs = lists.filter((media)=>media.kind === "audioinput");
1137
1661
  // chrome default device
1138
1662
  if (inputs.length === 0) {
1139
- console.warn("no audio input device");
1663
+ $c31e3fb4360572af$var$log.warn("onDeviceChange", "no audio input device");
1140
1664
  await this.closeMicrophoneProducer();
1141
1665
  return;
1142
1666
  }
@@ -1147,21 +1671,21 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1147
1671
  const change = lists.filter((elements)=>{
1148
1672
  return !Boolean(this.devicesList.find((device)=>device.deviceId === elements.deviceId && device.label === elements.label));
1149
1673
  });
1150
- console.log(change);
1674
+ $c31e3fb4360572af$var$log.log("onDeviceChange", change);
1151
1675
  this.devicesList = lists;
1152
1676
  const hasAudioInputChange = Boolean(change.find((device)=>device.kind === "audioinput"));
1153
1677
  if (change.length !== 0 && hasAudioInputChange === false) {
1154
- console.log("no audio input change");
1678
+ $c31e3fb4360572af$var$log.warn("onDeviceChange", "no audio input change");
1155
1679
  return;
1156
1680
  }
1157
- console.log("detecting audio input change");
1681
+ $c31e3fb4360572af$var$log.log("onDeviceChange", "detecting audio input change");
1158
1682
  if (!this.audioInputDefaultDevice || this.audioInputDefaultDevice.label !== defaultDevice.label) {
1159
1683
  const event = new $c31e3fb4360572af$var$SnapcallEvent("defaultAudioDeviceChange", {
1160
1684
  detail: defaultDevice
1161
1685
  });
1162
1686
  this.audioInputDefaultDevice = defaultDevice;
1163
1687
  this.dispatchEvent(event);
1164
- console.log("new default audio input trying to switch new :", defaultDevice.deviceId, defaultDevice.label);
1688
+ $c31e3fb4360572af$var$log.log("onDeviceChange", "new default audio input trying to switch new :", defaultDevice.deviceId, defaultDevice.label);
1165
1689
  }
1166
1690
  this.switchMicrophone("default");
1167
1691
  }
@@ -1176,12 +1700,12 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1176
1700
  }
1177
1701
  }));
1178
1702
  this.devicesList = await navigator.mediaDevices.enumerateDevices();
1179
- if (!this.sendAudioTransports) throw new Error("audio transport not found");
1703
+ const transport = await this.getTransport("audio", "send");
1180
1704
  this.audioLevel = new (0, $67e45b2e30dcc030$export$ea669869acd8f177)(stream, this);
1181
- this.audioLevel.analyse();
1705
+ // this.audioLevel.analyse();
1182
1706
  const track = stream.getAudioTracks()[0];
1183
1707
  const deviceType = "microphone";
1184
- const micProducer = await this.sendAudioTransports?.transport.produce({
1708
+ const micProducer = await transport.produce({
1185
1709
  track: track,
1186
1710
  codecOptions: {
1187
1711
  opusStereo: true,
@@ -1192,13 +1716,13 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1192
1716
  }
1193
1717
  });
1194
1718
  micProducer.on("transportclose", ()=>{
1195
- console.log("micproducer transportclose");
1719
+ $c31e3fb4360572af$var$log.log("enableMicrophone", "micproducer transportclose");
1196
1720
  });
1197
1721
  track.addEventListener("ended", ()=>{
1198
- console.log("track ended!");
1722
+ $c31e3fb4360572af$var$log.log("enableMicrophone", "track ended!");
1199
1723
  });
1200
1724
  micProducer.on("trackended", async ()=>{
1201
- console.log("microphone disconnected!");
1725
+ $c31e3fb4360572af$var$log.log("enableMicrophone", "microphone disconnected!");
1202
1726
  if (navigator.mediaDevices.ondevicechange === undefined) this.closeMicrophoneProducer();
1203
1727
  });
1204
1728
  this.micProducer = micProducer;
@@ -1251,11 +1775,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1251
1775
  }
1252
1776
  }
1253
1777
  release() {
1254
- console.log("release");
1255
- this.closeWebrtcTransport(this.sendAudioTransports);
1256
- this.closeWebrtcTransport(this.recvAudioTransports);
1257
- this.closeWebrtcTransport(this.sendVideoTransports);
1258
- this.closeWebrtcTransport(this.recvVideoTransports);
1778
+ $c31e3fb4360572af$var$log.log("release");
1779
+ for(let key in this.mediasoupTransport)this.closeWebrtcTransport(key);
1259
1780
  this.webcamTrack?.stop();
1260
1781
  this.webcamTrack = null;
1261
1782
  this.protooTransport.close();
@@ -1327,18 +1848,18 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1327
1848
  }
1328
1849
  }
1329
1850
  async restartIce(transport) {
1330
- console.log("restartIce", transport.connectionState, transport.closed);
1851
+ $c31e3fb4360572af$var$log.log("restartIce", transport.connectionState, transport.closed);
1331
1852
  if (transport.connectionState === "disconnected" && !transport.closed) try {
1332
1853
  const iceParameters = await this.protoo.request("restartIce", {
1333
1854
  transportId: transport.id
1334
1855
  });
1335
- console.log(iceParameters);
1856
+ $c31e3fb4360572af$var$log.log("restartIce", iceParameters);
1336
1857
  await transport.restartIce({
1337
1858
  iceParameters: iceParameters
1338
1859
  });
1339
1860
  } catch (err) {
1340
1861
  this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.WEBRTC_RECOVER_ERROR);
1341
- console.log("restartIceFailed", err);
1862
+ $c31e3fb4360572af$var$log.log("restartIce", "restartIceFailed", err);
1342
1863
  $3Sbms$captureException(err, {
1343
1864
  extra: {
1344
1865
  direction: transport.direction,
@@ -1352,7 +1873,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1352
1873
  if (scale === 2) videoResolution = $c31e3fb4360572af$export$d21ffcc5eb136bfa["vga"];
1353
1874
  else if (scale > 2) videoResolution = $c31e3fb4360572af$export$d21ffcc5eb136bfa["qvga"];
1354
1875
  if (!this.webcam.resolution || $c31e3fb4360572af$export$d21ffcc5eb136bfa[this.webcam.resolution].qualityIndex >= videoResolution.qualityIndex) {
1355
- console.log(`scaling video by ${scale}`, videoResolution);
1876
+ $c31e3fb4360572af$var$log.log("scaleVideoMediasConstraintsParameter", `scaling video by ${scale}`, videoResolution);
1356
1877
  this.webcamProducer?.track?.applyConstraints(videoResolution);
1357
1878
  }
1358
1879
  }
@@ -1374,14 +1895,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1374
1895
  };
1375
1896
  if (!(0, $3Sbms$Producer).prototype.setRtpEncodingParameters) return this.scaleVideoMediasConstraintsParameter(scale.scaleResolutionDownBy);
1376
1897
  if (this.webcamProducer && !this.webcamProducer.closed) {
1377
- console.log(`scaling video by ${scale.scaleResolutionDownBy}`);
1898
+ $c31e3fb4360572af$var$log.log("scaleVideoEncodingsParameter", `scaling video by ${scale.scaleResolutionDownBy}`);
1378
1899
  this.webcamProducer?.setRtpEncodingParameters?.(scale).catch((err)=>{
1379
- console.error("scaleResolutionDownBy not supported", err);
1900
+ $c31e3fb4360572af$var$log.error("scaleVideoEncodingsParameter", "scaleResolutionDownBy not supported", err);
1380
1901
  this.scaleVideoMediasConstraintsParameter(scale.scaleResolutionDownBy);
1381
1902
  });
1382
1903
  }
1383
1904
  } catch (error) {
1384
- console.error("scaleVideo error", error);
1905
+ $c31e3fb4360572af$var$log.error("scaleVideoEncodingsParameter", "scaleVideo error", error);
1385
1906
  }
1386
1907
  }
1387
1908
  async switchWebcam({ device: device , resolution: resolution , rotate: rotate }) {
@@ -1408,7 +1929,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1408
1929
  ...$c31e3fb4360572af$export$d21ffcc5eb136bfa[resolution || this.webcam.resolution]
1409
1930
  }
1410
1931
  }));
1411
- if (!this.sendVideoTransports) throw new Error("video transport not found");
1932
+ const transport = await this.getTransport("video", "send");
1933
+ if (!transport) throw new Error("video transport not found, can not switch");
1412
1934
  const track = stream.getVideoTracks()[0];
1413
1935
  this.webcamTrack = track;
1414
1936
  await this.webcamProducer?.replaceTrack?.({
@@ -1439,7 +1961,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1439
1961
  ...$c31e3fb4360572af$export$d21ffcc5eb136bfa[config?.resolution || this.webcam.resolution]
1440
1962
  }
1441
1963
  }));
1442
- if (!this.sendVideoTransports) throw new Error("video transport not found");
1964
+ await this.updateWebcams();
1965
+ const transport = await this.getTransport("video", "send");
1443
1966
  const track = stream.getVideoTracks()[0];
1444
1967
  this.webcamTrack = track;
1445
1968
  const capabilities = await track.getCapabilities?.() || navigator.mediaDevices.getSupportedConstraints?.();
@@ -1453,7 +1976,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1453
1976
  videoGoogleStartBitrate: 1000
1454
1977
  };
1455
1978
  const deviceType = "webcam";
1456
- this.webcamProducer = await this.sendVideoTransports.transport.produce({
1979
+ this.webcamProducer = await transport.produce({
1457
1980
  track: track,
1458
1981
  encodings: encodings,
1459
1982
  codecOptions: codecOptions,
@@ -1533,14 +2056,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1533
2056
  }
1534
2057
  }));
1535
2058
  if (!stream) return;
1536
- if (!this.sendVideoTransports) throw new Error("video screen transport not found");
2059
+ const transport = await this.getTransport("video", "send");
1537
2060
  const track = stream.getVideoTracks()[0];
1538
2061
  const encodings = undefined;
1539
2062
  const codecOptions = {
1540
2063
  videoGoogleStartBitrate: 1000
1541
2064
  };
1542
2065
  let deviceType = "screen";
1543
- this.screenshareProducer = await this.sendVideoTransports.transport.produce({
2066
+ this.screenshareProducer = await transport.produce({
1544
2067
  track: track,
1545
2068
  encodings: encodings,
1546
2069
  codecOptions: codecOptions,
@@ -1600,11 +2123,11 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1600
2123
  const consumer = this.consumers.get(mediaId);
1601
2124
  if (consumer) {
1602
2125
  const mediaStream = new MediaStream();
1603
- mediaStream.onremovetrack = ()=>console.log("Remove Track");
1604
- consumer.mediaSoupConsumer.track.onended = ()=>console.log("Track Ended");
2126
+ mediaStream.onremovetrack = ()=>$c31e3fb4360572af$var$log.log("requestVideo", "Remove Track");
2127
+ consumer.mediaSoupConsumer.track.onended = ()=>$c31e3fb4360572af$var$log.log("requestVideo", "Track Ended");
1605
2128
  mediaStream.addTrack(consumer.mediaSoupConsumer.track);
1606
2129
  element.srcObject = mediaStream;
1607
- } else console.error(`Video consumer ${consumer} not found`);
2130
+ } else $c31e3fb4360572af$var$log.error("requestVideo", `Video consumer ${consumer} not found`);
1608
2131
  }
1609
2132
  async captureVideo(videoElement) {
1610
2133
  let image;
@@ -1629,7 +2152,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1629
2152
  const mediaStream = new MediaStream();
1630
2153
  mediaStream.addTrack(this.screenshareProducer.track);
1631
2154
  element.srcObject = mediaStream;
1632
- } else console.log("screenshare producer not available yet");
2155
+ } else $c31e3fb4360572af$var$log.log("requestLocalScreenshare", "screenshare producer not available yet");
1633
2156
  }
1634
2157
  consumePeer({ peerId: peerId , producersData: producersData }) {
1635
2158
  producersData.forEach((producerData)=>{
@@ -1641,18 +2164,14 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1641
2164
  });
1642
2165
  });
1643
2166
  }
1644
- getRecvTransport(deviceType) {
1645
- if (deviceType === "microphone") return this.recvAudioTransports;
1646
- else return this.recvVideoTransports;
1647
- }
1648
2167
  async consumeProducer({ peerId: peerId , producerId: producerId , deviceType: deviceType , paused: paused }) {
1649
- const transport = this.getRecvTransport(deviceType);
1650
- if (!transport) throw new Error(`transport for ${deviceType} not found`);
2168
+ const mediaKind = deviceType === "microphone" ? "audio" : "video";
2169
+ const transport = await this.getTransport(mediaKind, "recv");
1651
2170
  const data = await this.protoo.request("consume", {
1652
2171
  peerId: peerId,
1653
2172
  producerId: producerId,
1654
- transportId: transport.transport.id,
1655
- rtpCapabilities: this.mediasoupDevice.rtpCapabilities
2173
+ transportId: transport.id,
2174
+ rtpCapabilities: this.streamerMediasoup.getRtpCapabilities()
1656
2175
  });
1657
2176
  const peer = this.peers.get(peerId);
1658
2177
  if (peer) peer.producersData.push({
@@ -1661,9 +2180,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1661
2180
  paused: paused
1662
2181
  });
1663
2182
  const { producerId: resolvedProducerId , id: id , kind: kind , rtpParameters: rtpParameters , appData: appData } = data;
1664
- console.log("Data: ", data);
2183
+ $c31e3fb4360572af$var$log.log("consumeProducer", "Data: ", data);
1665
2184
  try {
1666
- const consumer = await transport.transport.consume({
2185
+ const consumer = await transport.consume({
1667
2186
  id: id,
1668
2187
  producerId: resolvedProducerId,
1669
2188
  kind: kind,
@@ -1673,8 +2192,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1673
2192
  peerId: peerId
1674
2193
  }
1675
2194
  });
1676
- console.log("transport", transport.transport);
1677
- console.log("consumer", consumer);
2195
+ $c31e3fb4360572af$var$log.log("transport", transport);
2196
+ $c31e3fb4360572af$var$log.log("consumer", consumer);
1678
2197
  this.consumers.set(consumer.id, {
1679
2198
  mediaSoupConsumer: consumer,
1680
2199
  deviceType: deviceType
@@ -1701,7 +2220,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1701
2220
  });
1702
2221
  } catch (error) {
1703
2222
  this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.CONSUME_ERROR);
1704
- console.error("newConsumer request failed", error);
2223
+ $c31e3fb4360572af$var$log.error("consumeProducer", "newConsumer request failed", error);
1705
2224
  throw error;
1706
2225
  }
1707
2226
  }
@@ -1745,7 +2264,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1745
2264
  const { callId: callId } = await this.protoo.request("getCallId");
1746
2265
  return callId;
1747
2266
  } catch (err) {
1748
- console.error("Failed to get callId");
2267
+ $c31e3fb4360572af$var$log.error("getCallId", "Failed to get callId");
1749
2268
  throw err;
1750
2269
  }
1751
2270
  }
@@ -1819,6 +2338,18 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1819
2338
  getCurrentWebcam() {
1820
2339
  return this.webcam;
1821
2340
  }
2341
+ getCurrentMicrophoneId() {
2342
+ return this.micProducer?.track?.getSettings().deviceId;
2343
+ }
2344
+ getCurrentSpeakerId() {
2345
+ const audioRendererKeys = Object.keys(this.audioRenderers);
2346
+ const firstRenderer = this.audioRenderers[audioRendererKeys[0]];
2347
+ if (firstRenderer) {
2348
+ const sinkId = firstRenderer.getSink();
2349
+ if (sinkId) return sinkId;
2350
+ }
2351
+ return "default";
2352
+ }
1822
2353
  async setWebcamResolution(resolution) {
1823
2354
  if (this.webcam.device) await this.switchWebcam({
1824
2355
  resolution: resolution
@@ -1848,7 +2379,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1848
2379
  await this.audioRenderers[consumerId]?.play();
1849
2380
  }
1850
2381
  async setAudioSink(sinkId) {
1851
- const promises = Object.keys(this.audioRenderers).map((consumerId)=>this.audioRenderers[consumerId].setSink(sinkId).catch((err)=>console.warn("Failed to setSinkId on renderer (consumerId: %s): ", consumerId, err)));
2382
+ const promises = Object.keys(this.audioRenderers).map((consumerId)=>this.audioRenderers[consumerId].setSink(sinkId).catch((err)=>$c31e3fb4360572af$var$log.warn("setAudioSink", "Failed to setSinkId on renderer (consumerId: %s): ", consumerId, err)));
1852
2383
  await Promise.allSettled(promises);
1853
2384
  }
1854
2385
  dispatchEvent(event) {
@@ -1856,12 +2387,6 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1856
2387
  window.dispatchEvent(event);
1857
2388
  return result;
1858
2389
  }
1859
- async getShareLinkData(url) {
1860
- const data = await this.protoo.request("shareLink", {
1861
- url: url
1862
- });
1863
- return data;
1864
- }
1865
2390
  async fetchAgentInfo({ apiKey: apiKey , email: email }) {
1866
2391
  const apiURL = this.config.apiUrl;
1867
2392
  const agent = await fetch(`${apiURL}/agents/${email}`, {
@@ -2210,6 +2735,7 @@ const $2da9626742e3560b$export$5170987d58ae338d = ()=>/*#__PURE__*/ (0, $3Sbms$j
2210
2735
 
2211
2736
 
2212
2737
 
2738
+
2213
2739
  const $e1413aacdaa5a03e$export$71b2224f1ce5e08e = (ref, action)=>{
2214
2740
  (0, $3Sbms$useEffect)(()=>{
2215
2741
  const onWindowClick = (event)=>{
@@ -2230,6 +2756,7 @@ const $e1413aacdaa5a03e$export$71b2224f1ce5e08e = (ref, action)=>{
2230
2756
 
2231
2757
 
2232
2758
 
2759
+
2233
2760
  const $4ee077ee5e6fe3e7$export$d00c23c5e97ada8 = (0, $3Sbms$styledcomponents).div`
2234
2761
  display: flex;
2235
2762
  flex-direction: column;
@@ -2293,6 +2820,7 @@ const $4ee077ee5e6fe3e7$export$6755b81a599fadda = (0, $3Sbms$styledcomponents).s
2293
2820
 
2294
2821
 
2295
2822
  const $59d1053cd71d481a$var$Menu = ({ categories: categories })=>{
2823
+ const { t: t } = (0, $3Sbms$useTranslation)();
2296
2824
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4ee077ee5e6fe3e7$export$b286f91cddfedb5a), {
2297
2825
  children: categories.map((category)=>/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $4ee077ee5e6fe3e7$export$d00c23c5e97ada8), {
2298
2826
  children: [
@@ -2314,7 +2842,7 @@ const $59d1053cd71d481a$var$Menu = ({ categories: categories })=>{
2314
2842
  }),
2315
2843
  item.title,
2316
2844
  item.isNew && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4ee077ee5e6fe3e7$export$6755b81a599fadda), {
2317
- children: "NEW"
2845
+ children: t("menu.new")
2318
2846
  })
2319
2847
  ]
2320
2848
  }, item.id))
@@ -2406,6 +2934,7 @@ const $ab29487ffcc05855$export$c4e460d5c7d83bc3 = (0, $3Sbms$styledcomponents).d
2406
2934
 
2407
2935
 
2408
2936
  const $ae6e25be45301335$var$HeaderSettings = ({ baseCategories: baseCategories , extraCategories: extraCategories })=>{
2937
+ const { t: t } = (0, $3Sbms$useTranslation)();
2409
2938
  const settingsOptionsContainerRef = (0, $3Sbms$useRef)(null);
2410
2939
  const [displaySettingsOptions, setDisplaySettingsOptions] = (0, $3Sbms$useState)(false);
2411
2940
  const [menuCategories, setMenuCategories] = (0, $3Sbms$useState)(baseCategories);
@@ -2498,7 +3027,7 @@ const $ae6e25be45301335$var$HeaderSettings = ({ baseCategories: baseCategories ,
2498
3027
  children: [
2499
3028
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab29487ffcc05855$export$e2457e1974c298c3), {
2500
3029
  onClick: onSettingsButtonClick,
2501
- children: "Menu"
3030
+ children: t("menu.title")
2502
3031
  }),
2503
3032
  displaySettingsOptions && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab29487ffcc05855$export$c4e460d5c7d83bc3), {
2504
3033
  ref: settingsOptionsContainerRef,
@@ -2515,6 +3044,7 @@ var $ae6e25be45301335$export$2e2bcd8739ae039 = $ae6e25be45301335$var$HeaderSetti
2515
3044
 
2516
3045
 
2517
3046
 
3047
+
2518
3048
  const $e96d119a19ed0c6c$var$computeLayout = ({ width: width , height: height , tileCount: tileCount })=>{
2519
3049
  const tilesPerRow = Math.min(tileCount, 12);
2520
3050
  let n = 0;
@@ -2610,7 +3140,7 @@ class $e96d119a19ed0c6c$export$45fabd1ce5e673de {
2610
3140
  await this.video.play();
2611
3141
  await this.video.requestPictureInPicture();
2612
3142
  this.draw();
2613
- } else (0, $3Sbms$toast)("No camera available", {
3143
+ } else (0, $3Sbms$toast)((0, $384d985bb9605c35$export$2e2bcd8739ae039).t("notifications.noCamera"), {
2614
3144
  className: "error"
2615
3145
  });
2616
3146
  }
@@ -2692,6 +3222,7 @@ class $e96d119a19ed0c6c$export$45fabd1ce5e673de {
2692
3222
  const $f235befa4cdc42d6$var$multiPiP = new (0, $e96d119a19ed0c6c$export$45fabd1ce5e673de)();
2693
3223
  const $f235befa4cdc42d6$var$browser = $3Sbms$parse(window.navigator.userAgent);
2694
3224
  const $f235befa4cdc42d6$var$Header = ()=>{
3225
+ const { t: t } = (0, $3Sbms$useTranslation)();
2695
3226
  const { setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , options: options , muted: muted , streaming: streaming } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
2696
3227
  const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
2697
3228
  const [extraOptions, setExtraOptions] = (0, $3Sbms$useState)(options.extraSettingsOptions || []);
@@ -2720,12 +3251,12 @@ const $f235befa4cdc42d6$var$Header = ()=>{
2720
3251
  const onCopyCallLinkClick = async ()=>{
2721
3252
  try {
2722
3253
  await (0, $57162bcada7d6f66$export$2e2bcd8739ae039)(options.sharedURL || window.location.href);
2723
- (0, $3Sbms$reacthottoast)("Link copied to clipboard", {
3254
+ (0, $3Sbms$reacthottoast)(t("copyLink.copied"), {
2724
3255
  duration: 2000
2725
3256
  });
2726
3257
  } catch (copyError) {
2727
3258
  console.warn(copyError);
2728
- (0, $3Sbms$reacthottoast)("An error occured when trying to copy to clipboard", {
3259
+ (0, $3Sbms$reacthottoast)(t("copyLink.error"), {
2729
3260
  className: "error"
2730
3261
  });
2731
3262
  }
@@ -2741,6 +3272,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
2741
3272
  };
2742
3273
  const onScanQuickConnectClick = ()=>{
2743
3274
  setIsQuickConnectPopupVisible(true);
3275
+ (0, $3Sbms$hotjarbrowser).event("quickConnectClick");
2744
3276
  };
2745
3277
  const onSettingsMenuClick = ()=>{
2746
3278
  setIsSettingsMenuVisible(true);
@@ -2751,7 +3283,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
2751
3283
  items: [
2752
3284
  {
2753
3285
  id: "openNewTab",
2754
- title: "Open new tab",
3286
+ title: t("menu.openNewTab"),
2755
3287
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$6546b255bd3a2004), {}),
2756
3288
  action: onOpenInNewTabClick
2757
3289
  },
@@ -2762,13 +3294,13 @@ const $f235befa4cdc42d6$var$Header = ()=>{
2762
3294
  items: [
2763
3295
  {
2764
3296
  id: "copyLink",
2765
- title: "Copy link",
3297
+ title: t("copyLink.title"),
2766
3298
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$92ce62e1201c4fc0), {}),
2767
3299
  action: onCopyCallLinkClick
2768
3300
  },
2769
3301
  {
2770
3302
  id: "quickConnect",
2771
- title: "Quick Connect",
3303
+ title: t("quickConnect.title"),
2772
3304
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$6470d09a29d34d08), {}),
2773
3305
  action: onScanQuickConnectClick
2774
3306
  },
@@ -2779,7 +3311,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
2779
3311
  items: [
2780
3312
  {
2781
3313
  id: "settings",
2782
- title: "Settings",
3314
+ title: t("settings.title"),
2783
3315
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$1095c93890fce526), {}),
2784
3316
  action: onSettingsMenuClick
2785
3317
  },
@@ -2788,7 +3320,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
2788
3320
  ];
2789
3321
  if (document.pictureInPictureEnabled && $f235befa4cdc42d6$var$browser.platform.type === "desktop") computedCategories[0].items.push({
2790
3322
  id: "pip",
2791
- title: "Picture-in-Picture",
3323
+ title: t("menu.pictureInPicture"),
2792
3324
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$5170987d58ae338d), {}),
2793
3325
  action: onPipClick
2794
3326
  });
@@ -2798,7 +3330,8 @@ const $f235befa4cdc42d6$var$Header = ()=>{
2798
3330
  streaming,
2799
3331
  options.sharedURL,
2800
3332
  setIsQuickConnectPopupVisible,
2801
- setIsSettingsMenuVisible,
3333
+ setIsSettingsMenuVisible,
3334
+ t,
2802
3335
  ]);
2803
3336
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab29487ffcc05855$export$1e86fd0e1db89578), {
2804
3337
  children: [
@@ -2856,6 +3389,7 @@ const $af23c74942bdcae7$export$2b86bedf890eab8 = (element)=>{
2856
3389
 
2857
3390
 
2858
3391
 
3392
+
2859
3393
  const $6043ae1b48c5aa97$var$Microphone = ({ slash: slash , redSlash: redSlash , status: status , deviceRequest: deviceRequest })=>{
2860
3394
  if (slash) return /*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
2861
3395
  width: "24",
@@ -3618,6 +4152,7 @@ const $a53a1c6f62ad0fcc$var$getRequestButtonSize = (containerWidth)=>{
3618
4152
  return "large";
3619
4153
  };
3620
4154
  const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 , height: height = 0 })=>{
4155
+ const { t: t } = (0, $3Sbms$useTranslation)();
3621
4156
  const videoElementRef = (0, $3Sbms$useRef)(null);
3622
4157
  const [hover, setHover] = (0, $3Sbms$useState)(false);
3623
4158
  const [requestingDevice, setRequestingDevice] = (0, $3Sbms$useState)(null);
@@ -3661,7 +4196,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
3661
4196
  if (requestingDeviceTimeoutRef.current) clearTimeout(requestingDeviceTimeoutRef.current);
3662
4197
  requestingDeviceTimeoutRef.current = setTimeout(()=>{
3663
4198
  setRequestingDevice(null);
3664
- (0, $3Sbms$reacthottoast)("Your request has timed out.", {
4199
+ (0, $3Sbms$reacthottoast)(t("requestDevice.timedOut"), {
3665
4200
  className: "error"
3666
4201
  });
3667
4202
  }, 20000);
@@ -3670,7 +4205,8 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
3670
4205
  };
3671
4206
  } else setHover(false);
3672
4207
  }, [
3673
- requestingDevice
4208
+ requestingDevice,
4209
+ t
3674
4210
  ]);
3675
4211
  (0, $3Sbms$useEffect)(()=>{
3676
4212
  const onRequestDeviceResult = (event)=>{
@@ -3679,8 +4215,10 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
3679
4215
  if (requestingDeviceTimeoutRef.current) clearTimeout(requestingDeviceTimeoutRef.current);
3680
4216
  setRequestingDevice(null);
3681
4217
  if (result !== true) {
3682
- let message = "Your request has been declined.";
3683
- if (stream.profile.name) message = `${stream.profile.name} has declined your request.`;
4218
+ let message = t("requestDevice.declined");
4219
+ if (stream.profile.name) message = t("requestDevice.userDeclined", {
4220
+ user: stream.profile.name
4221
+ });
3684
4222
  (0, $3Sbms$reacthottoast)(message, {
3685
4223
  className: "error"
3686
4224
  });
@@ -3693,7 +4231,8 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
3693
4231
  };
3694
4232
  }, [
3695
4233
  stream.id,
3696
- stream.profile
4234
+ stream.profile,
4235
+ t
3697
4236
  ]);
3698
4237
  (0, $3Sbms$useEffect)(()=>{
3699
4238
  const onCustomMessage = async (event)=>{
@@ -3755,7 +4294,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
3755
4294
  children: [
3756
4295
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$df42e007689062b0), {
3757
4296
  size: requestButtonSize,
3758
- children: "Request input devices"
4297
+ children: t("requestDevice.requestInput")
3759
4298
  }),
3760
4299
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $7ec04c1818c68245$export$81d5557f9199e44d), {
3761
4300
  size: requestButtonSize,
@@ -3804,7 +4343,7 @@ const $a53a1c6f62ad0fcc$var$StreamTile = ({ stream: stream , width: width = 0 ,
3804
4343
  }) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57da43088f4a416a$export$2e2bcd8739ae039), {})
3805
4344
  }),
3806
4345
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7ec04c1818c68245$export$b430fec6b171ceb5), {
3807
- children: stream.profile.name || "User"
4346
+ children: stream.profile.name || t("misc.user")
3808
4347
  })
3809
4348
  ]
3810
4349
  })
@@ -3905,6 +4444,7 @@ var $21c8ac858b8a352e$export$2e2bcd8739ae039 = $21c8ac858b8a352e$var$AudioTile;
3905
4444
 
3906
4445
 
3907
4446
 
4447
+
3908
4448
  const $f260365f66cb6a6f$var$Reduce = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
3909
4449
  width: "22",
3910
4450
  height: "22",
@@ -4018,11 +4558,7 @@ const $b8e10de7c6dba8c4$export$a6112fefa8de799d = ({ containerWidth: containerWi
4018
4558
 
4019
4559
 
4020
4560
 
4021
- const $7c705c3f08c6d4ca$var$deviceNames = {
4022
- microphone: "microphone",
4023
- webcam: "camera",
4024
- screen: "screen"
4025
- };
4561
+
4026
4562
  const $7c705c3f08c6d4ca$var$getIcon = (device)=>{
4027
4563
  if (device === "microphone") return 0, $6043ae1b48c5aa97$export$2e2bcd8739ae039;
4028
4564
  if (device === "webcam") return 0, $04e57b1f07a8e9f4$export$2e2bcd8739ae039;
@@ -4030,10 +4566,16 @@ const $7c705c3f08c6d4ca$var$getIcon = (device)=>{
4030
4566
  return 0, $6043ae1b48c5aa97$export$2e2bcd8739ae039;
4031
4567
  };
4032
4568
  const $7c705c3f08c6d4ca$var$DeviceRequest = ({ device: device , requesterId: requesterId , setExtended: setExtended , setDeviceRequest: setDeviceRequest })=>{
4569
+ const { t: t } = (0, $3Sbms$useTranslation)();
4033
4570
  const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
4034
4571
  const [pending, setPending] = (0, $3Sbms$useState)(false);
4035
4572
  const requesterStream = streams.find((stream)=>stream.id === requesterId);
4036
4573
  const Icon = $7c705c3f08c6d4ca$var$getIcon(device);
4574
+ const deviceNames = {
4575
+ microphone: t("misc.microphone"),
4576
+ webcam: t("misc.camera"),
4577
+ screen: t("misc.screen")
4578
+ };
4037
4579
  const onAccept = async ()=>{
4038
4580
  setExtended(false);
4039
4581
  setPending(true);
@@ -4068,24 +4610,22 @@ const $7c705c3f08c6d4ca$var$DeviceRequest = ({ device: device , requesterId: req
4068
4610
  deviceRequest: true
4069
4611
  })
4070
4612
  }),
4071
- /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6efc75079651494a$export$517ec31e58d61d2e), {
4072
- children: [
4073
- requesterStream?.profile?.name || "Someone",
4074
- " would like you to share your",
4075
- " ",
4076
- $7c705c3f08c6d4ca$var$deviceNames[device]
4077
- ]
4613
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$517ec31e58d61d2e), {
4614
+ children: t("requestDevice.request", {
4615
+ user: requesterStream?.profile?.name || t("misc.someone"),
4616
+ device: deviceNames[device]
4617
+ })
4078
4618
  }),
4079
4619
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6efc75079651494a$export$dfd6aceefcfce0c9), {
4080
4620
  children: [
4081
4621
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$a85169f132f25a9d), {
4082
4622
  onClick: onAccept,
4083
4623
  active: true,
4084
- children: "Accept"
4624
+ children: t("misc.accept")
4085
4625
  }),
4086
4626
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$a85169f132f25a9d), {
4087
4627
  onClick: onDecline,
4088
- children: "Decline"
4628
+ children: t("misc.decline")
4089
4629
  })
4090
4630
  ]
4091
4631
  })
@@ -4201,7 +4741,9 @@ const $d02c24b66b4606fd$export$ab7d69e250642927 = ({ element: element })=>{
4201
4741
 
4202
4742
 
4203
4743
 
4744
+
4204
4745
  const $1c906a2b66e07e70$var$MediaSession = ()=>{
4746
+ const { t: t } = (0, $3Sbms$useTranslation)();
4205
4747
  const { muted: muted , streaming: streaming } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
4206
4748
  (0, $3Sbms$useEffect)(()=>{
4207
4749
  navigator.mediaSession?.setMicrophoneActive?.(!muted);
@@ -4219,7 +4761,7 @@ const $1c906a2b66e07e70$var$MediaSession = ()=>{
4219
4761
  else await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
4220
4762
  } catch (microphoneToggleError) {
4221
4763
  console.warn(microphoneToggleError);
4222
- (0, $3Sbms$reacthottoast)("An error occured when trying to toggle the microphone (PiP)", {
4764
+ (0, $3Sbms$reacthottoast)(`${t("notifications.microphoneError")} (PiP)`, {
4223
4765
  className: "error"
4224
4766
  });
4225
4767
  }
@@ -4235,7 +4777,7 @@ const $1c906a2b66e07e70$var$MediaSession = ()=>{
4235
4777
  else await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo();
4236
4778
  } catch (cameraError) {
4237
4779
  console.warn(cameraError);
4238
- (0, $3Sbms$reacthottoast)("An error occured when trying to toggle the camera (PiP)", {
4780
+ (0, $3Sbms$reacthottoast)(`${t("notifications.cameraError")} (PiP)`, {
4239
4781
  className: "error"
4240
4782
  });
4241
4783
  }
@@ -4250,7 +4792,9 @@ const $1c906a2b66e07e70$var$MediaSession = ()=>{
4250
4792
  } catch (hangupHandlerError) {
4251
4793
  console.warn("MediaSession hangup action is not available");
4252
4794
  }
4253
- }, []);
4795
+ }, [
4796
+ t
4797
+ ]);
4254
4798
  return null;
4255
4799
  };
4256
4800
  var $1c906a2b66e07e70$export$2e2bcd8739ae039 = $1c906a2b66e07e70$var$MediaSession;
@@ -4262,6 +4806,7 @@ var $1c906a2b66e07e70$export$2e2bcd8739ae039 = $1c906a2b66e07e70$var$MediaSessio
4262
4806
  const $5939a59dc7c96d41$var$minimumTileWidth = 126;
4263
4807
  const $5939a59dc7c96d41$var$maximumTileWidth = 150;
4264
4808
  const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePresenting , width: width , height: height })=>{
4809
+ const { t: t } = (0, $3Sbms$useTranslation)();
4265
4810
  const [extended, setExtended] = (0, $3Sbms$useState)(false);
4266
4811
  const [zoom, setZoom] = (0, $3Sbms$useState)(false);
4267
4812
  const [zoomAvailable, setZoomAvailable] = (0, $3Sbms$useState)(false);
@@ -4334,8 +4879,13 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
4334
4879
  type: "snapshot",
4335
4880
  imageSrc: objectUrl
4336
4881
  });
4337
- let notificationMessage = "Snapshot sent to users.";
4338
- if (streams.length === 1) notificationMessage = `Snapshot sent to ${streams[0].profile.name || "user"}.`;
4882
+ let notificationMessage = t("snapshot.sentToUsers");
4883
+ if (streams.length === 1) {
4884
+ const userName = streams[0].profile.name || t("misc.user");
4885
+ notificationMessage = t("snapshot.sentToUser", {
4886
+ user: userName
4887
+ });
4888
+ }
4339
4889
  (0, $a5146f9062d7bf28$export$3a57e165650c636f)(notificationMessage, {
4340
4890
  icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$26fe7ec9351ff761), {
4341
4891
  src: base64Image
@@ -4343,7 +4893,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
4343
4893
  duration: 2500
4344
4894
  });
4345
4895
  } catch (sendMessageError) {
4346
- (0, $3Sbms$reacthottoast)("An error occured when trying to send the snapshot", {
4896
+ (0, $3Sbms$reacthottoast)(t("snapshot.error"), {
4347
4897
  className: "error"
4348
4898
  });
4349
4899
  console.error(sendMessageError);
@@ -4461,7 +5011,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
4461
5011
  }),
4462
5012
  !extended && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$500c3c5544c37412), {
4463
5013
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
4464
- children: "You"
5014
+ children: t("misc.you")
4465
5015
  })
4466
5016
  }),
4467
5017
  extended && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6efc75079651494a$export$a7365e2302f8d10a), {
@@ -4627,6 +5177,7 @@ const $04dc495b2c5350ca$export$2cb99e4be0dc4646 = (url)=>new Promise((resolve, r
4627
5177
 
4628
5178
 
4629
5179
 
5180
+
4630
5181
  const $6a95863cd4ef501c$export$eb5bbbfc393ab8ac = (0, $3Sbms$styledcomponents).div`
4631
5182
  max-width: 100%;
4632
5183
  margin-top: 60px;
@@ -4696,6 +5247,7 @@ const $f81bfa56534026c2$export$e9785ae652b3a722 = (item)=>{
4696
5247
  } else console.warn("Undefined room ID");
4697
5248
  };
4698
5249
  const $f81bfa56534026c2$export$ad5f39c592532e2d = ()=>{
5250
+ const { t: t } = (0, $3Sbms$useTranslation)();
4699
5251
  const [history, setHistory] = (0, $3Sbms$useState)([]);
4700
5252
  (0, $3Sbms$useEffect)(()=>{
4701
5253
  try {
@@ -4713,7 +5265,7 @@ const $f81bfa56534026c2$export$ad5f39c592532e2d = ()=>{
4713
5265
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6a95863cd4ef501c$export$eb5bbbfc393ab8ac), {
4714
5266
  children: [
4715
5267
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6a95863cd4ef501c$export$ebce8992dc3bd82), {
4716
- children: "Shared with you"
5268
+ children: t("sharedHistory.shared")
4717
5269
  }),
4718
5270
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6a95863cd4ef501c$export$e6c0b06d6e2dd9e3), {
4719
5271
  children: history.map((item)=>{
@@ -4913,6 +5465,7 @@ var $5e2ac34f2c3f1b42$export$2e2bcd8739ae039 = $5e2ac34f2c3f1b42$var$YoutubeTile
4913
5465
 
4914
5466
 
4915
5467
 
5468
+
4916
5469
  const $ab48431cd035ee30$export$e19cf0169f1019bf = (0, $3Sbms$styledcomponents).div`
4917
5470
  display: flex;
4918
5471
  position: relative;
@@ -5003,6 +5556,7 @@ const $ab48431cd035ee30$export$49ac927a2aaad85 = (0, $3Sbms$styledcomponents).di
5003
5556
 
5004
5557
 
5005
5558
  const $1671f9473ff0a07a$var$SnapshotTile = (tile)=>{
5559
+ const { t: t } = (0, $3Sbms$useTranslation)();
5006
5560
  const { dispatch: dispatch } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
5007
5561
  const snapshotImageRef = (0, $3Sbms$useRef)(null);
5008
5562
  const [downloadURL, setDownloadURL] = (0, $3Sbms$useState)(tile.data.url);
@@ -5070,7 +5624,8 @@ const $1671f9473ff0a07a$var$SnapshotTile = (tile)=>{
5070
5624
  children: [
5071
5625
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab48431cd035ee30$export$7c309220fd1fb205), {
5072
5626
  children: [
5073
- "Snapshot \xb7 ",
5627
+ t("snapshot.title"),
5628
+ " \xb7 ",
5074
5629
  formattedTime
5075
5630
  ]
5076
5631
  }),
@@ -5078,7 +5633,7 @@ const $1671f9473ff0a07a$var$SnapshotTile = (tile)=>{
5078
5633
  href: downloadURL,
5079
5634
  target: "_blank",
5080
5635
  download: filename,
5081
- children: "Save photo"
5636
+ children: t("snapshot.save")
5082
5637
  })
5083
5638
  ]
5084
5639
  }),
@@ -5208,7 +5763,9 @@ var $e4ddb9f41b4a5cba$export$2e2bcd8739ae039 = $e4ddb9f41b4a5cba$var$YoutubeEven
5208
5763
 
5209
5764
 
5210
5765
 
5766
+
5211
5767
  const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
5768
+ const { t: t } = (0, $3Sbms$useTranslation)();
5212
5769
  const { dispatch: dispatch , streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
5213
5770
  (0, $3Sbms$useEffect)(()=>{
5214
5771
  const onCustomMessage = async (event)=>{
@@ -5224,11 +5781,11 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
5224
5781
  });
5225
5782
  const createdAtDate = new Date();
5226
5783
  const notificationStatus = {
5227
- text: "From",
5228
- boldText: sender.profile.name || "User",
5784
+ text: t("misc.from"),
5785
+ boldText: sender.profile.name || t("misc.user"),
5229
5786
  icon: statusIcon
5230
5787
  };
5231
- (0, $a5146f9062d7bf28$export$3a57e165650c636f)("Snapshot shared.", {
5788
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("snapshot.shared"), {
5232
5789
  width: "290px",
5233
5790
  icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ab48431cd035ee30$export$26fe7ec9351ff761), {
5234
5791
  src: imageSrc,
@@ -5239,7 +5796,7 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
5239
5796
  fontSize: "16px"
5240
5797
  },
5241
5798
  button: {
5242
- text: "Open",
5799
+ text: t("misc.open"),
5243
5800
  action: ({ close: close })=>{
5244
5801
  dispatch({
5245
5802
  type: (0, $2884da8a64948e35$export$96a9662a3eda31f6).SET_HIGHLIGHTED_TILE,
@@ -5264,7 +5821,7 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
5264
5821
  minute: "2-digit"
5265
5822
  });
5266
5823
  (0, $f81bfa56534026c2$export$e9785ae652b3a722)({
5267
- title: `Snapshot · ${formattedTime}`,
5824
+ title: `${t("snapshot.title")} · ${formattedTime}`,
5268
5825
  url: imageSrc,
5269
5826
  iconUrl: imageSrc,
5270
5827
  iconStyle: {
@@ -5283,7 +5840,8 @@ const $75c30c42d3b87293$var$SnapshotEvents = ()=>{
5283
5840
  };
5284
5841
  }, [
5285
5842
  streams,
5286
- dispatch
5843
+ dispatch,
5844
+ t
5287
5845
  ]);
5288
5846
  return null;
5289
5847
  };
@@ -5670,6 +6228,8 @@ var $cdab47bb8796991e$export$2e2bcd8739ae039 = $cdab47bb8796991e$var$Video;
5670
6228
 
5671
6229
 
5672
6230
 
6231
+
6232
+
5673
6233
  const $f0e90fb231c59fab$var$HangUp = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
5674
6234
  width: "25",
5675
6235
  height: "24",
@@ -5765,6 +6325,8 @@ var $8b7bd174d29d9a1f$export$2e2bcd8739ae039 = $8b7bd174d29d9a1f$var$Spinner;
5765
6325
 
5766
6326
 
5767
6327
 
6328
+
6329
+
5768
6330
  const $a2d206a438475087$var$YoutubeIcon = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
5769
6331
  width: "24",
5770
6332
  height: "25",
@@ -5780,7 +6342,7 @@ var $a2d206a438475087$export$2e2bcd8739ae039 = $a2d206a438475087$var$YoutubeIcon
5780
6342
 
5781
6343
 
5782
6344
 
5783
- const $1ec1d06e0a21fdaa$var$Link = ()=>{
6345
+ const $1ec1d06e0a21fdaa$var$Link = ({ color: color })=>{
5784
6346
  return /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
5785
6347
  width: "24",
5786
6348
  height: "24",
@@ -5789,7 +6351,7 @@ const $1ec1d06e0a21fdaa$var$Link = ()=>{
5789
6351
  xmlns: "http://www.w3.org/2000/svg",
5790
6352
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
5791
6353
  d: "m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1.004 1.004 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1.004 1.004 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1.004 1.004 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.471 2.471 0 0 1 0 3.5l-3.88 3.88a1.002 1.002 0 0 0 .325 1.639.999.999 0 0 0 1.095-.219l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1.004 1.004 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z",
5792
- fill: "#fff"
6354
+ fill: color || "#fff"
5793
6355
  })
5794
6356
  });
5795
6357
  };
@@ -5878,6 +6440,7 @@ const $ae07ea3548d561ea$export$d5bc2acf69f5bdaf = (0, $3Sbms$styledcomponents).d
5878
6440
 
5879
6441
  const $db92fac48417791a$var$isScreenshareSupported = Boolean(navigator.mediaDevices.getDisplayMedia);
5880
6442
  const $db92fac48417791a$var$HighlightButton = ()=>{
6443
+ const { t: t } = (0, $3Sbms$useTranslation)();
5881
6444
  const highlightMenuRef = (0, $3Sbms$useRef)(null);
5882
6445
  const [isHighlightMenuOpen, setIsHighlightMenuOpen] = (0, $3Sbms$useState)(false);
5883
6446
  const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
@@ -5893,10 +6456,13 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
5893
6456
  const onScreenshareClick = async ()=>{
5894
6457
  setIsHighlightMenuOpen(false);
5895
6458
  try {
6459
+ (0, $3Sbms$hotjarbrowser).event("screenshareClick");
5896
6460
  await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableScreenshare();
6461
+ (0, $3Sbms$hotjarbrowser).event("enableScreenshare");
5897
6462
  } catch (screenshareError) {
5898
6463
  console.warn(screenshareError);
5899
- (0, $3Sbms$reacthottoast)("An error occured when trying to toggle screensharing", {
6464
+ (0, $3Sbms$hotjarbrowser).event("screenshareCancel");
6465
+ (0, $3Sbms$reacthottoast)(t("notifications.screensharingError"), {
5900
6466
  className: "error"
5901
6467
  });
5902
6468
  }
@@ -5904,10 +6470,12 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
5904
6470
  const onYoutubeClick = ()=>{
5905
6471
  setIsHighlightMenuOpen(false);
5906
6472
  setIsYoutubePopupVisible(true);
6473
+ (0, $3Sbms$hotjarbrowser).event("youtubeClick");
5907
6474
  };
5908
6475
  const onLinkshareClick = ()=>{
5909
6476
  setIsHighlightMenuOpen(false);
5910
6477
  setIsLinksharePopupVisible(true);
6478
+ (0, $3Sbms$hotjarbrowser).event("linkshareClick");
5911
6479
  };
5912
6480
  const menuCategories = [
5913
6481
  {
@@ -5915,7 +6483,7 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
5915
6483
  items: [
5916
6484
  {
5917
6485
  id: "linksharing",
5918
- title: "Share Link",
6486
+ title: t("shareLink.title"),
5919
6487
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ec1d06e0a21fdaa$export$2e2bcd8739ae039), {}),
5920
6488
  action: onLinkshareClick
5921
6489
  },
@@ -5933,7 +6501,7 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
5933
6501
  items: [
5934
6502
  {
5935
6503
  id: "screensharing",
5936
- title: "Screen Sharing",
6504
+ title: t("menu.screenSharing"),
5937
6505
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ca024917df8f7bc$export$2e2bcd8739ae039), {}),
5938
6506
  action: onScreenshareClick
5939
6507
  },
@@ -5965,6 +6533,7 @@ var $db92fac48417791a$export$2e2bcd8739ae039 = $db92fac48417791a$var$HighlightBu
5965
6533
 
5966
6534
 
5967
6535
  const $69a9c49ece80e773$var$ControlBar = ()=>{
6536
+ const { t: t } = (0, $3Sbms$useTranslation)();
5968
6537
  const leaveMenuRef = (0, $3Sbms$useRef)(null);
5969
6538
  const [webcamCount, setWebcamCount] = (0, $3Sbms$useState)(0);
5970
6539
  const [isLeaveMenuOpen, setIsLeaveMenuOpen] = (0, $3Sbms$useState)(false);
@@ -5974,25 +6543,33 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
5974
6543
  const onMicrophoneClick = async ()=>{
5975
6544
  try {
5976
6545
  const devicesState = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getDevicesState();
5977
- if (devicesState.microphone.enabled) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).toggleMute();
5978
- else await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
6546
+ if (devicesState.microphone.enabled) {
6547
+ (0, $3Sbms$hotjarbrowser).event("toggleMicrophone");
6548
+ await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).toggleMute();
6549
+ } else {
6550
+ (0, $3Sbms$hotjarbrowser).event("enableMicrophone");
6551
+ await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
6552
+ }
5979
6553
  } catch (muteError) {
5980
6554
  console.warn(muteError);
5981
- (0, $3Sbms$reacthottoast)("An error occured when trying to toggle the microphone", {
6555
+ (0, $3Sbms$reacthottoast)(t("notifications.microphoneError"), {
5982
6556
  className: "error"
5983
6557
  });
5984
6558
  }
5985
6559
  };
5986
6560
  const onCameraClick = async ()=>{
5987
6561
  try {
5988
- if (streaming) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).disableVideo();
5989
- else {
6562
+ if (streaming) {
6563
+ (0, $3Sbms$hotjarbrowser).event("disableCamera");
6564
+ await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).disableVideo();
6565
+ } else {
5990
6566
  setIsCameraLoading(true);
6567
+ (0, $3Sbms$hotjarbrowser).event("enableCamera");
5991
6568
  await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo();
5992
6569
  }
5993
6570
  } catch (cameraError) {
5994
6571
  console.warn(cameraError);
5995
- (0, $3Sbms$reacthottoast)("An error occured when trying to toggle the camera", {
6572
+ (0, $3Sbms$reacthottoast)(t("notifications.cameraError"), {
5996
6573
  className: "error"
5997
6574
  });
5998
6575
  } finally{
@@ -6001,10 +6578,11 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
6001
6578
  };
6002
6579
  const onRotateClick = async ()=>{
6003
6580
  try {
6581
+ (0, $3Sbms$hotjarbrowser).event("rotateCamera");
6004
6582
  await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).rotateVideo();
6005
6583
  } catch (rotateError) {
6006
6584
  console.warn(rotateError);
6007
- (0, $3Sbms$reacthottoast)("An error occured when trying to rotate the camera", {
6585
+ (0, $3Sbms$reacthottoast)(t("notifications.cameraRotateError"), {
6008
6586
  className: "error"
6009
6587
  });
6010
6588
  }
@@ -6061,13 +6639,13 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
6061
6639
  items: [
6062
6640
  {
6063
6641
  id: "leaveCall",
6064
- title: "Leave call",
6642
+ title: t("leave.leaveCall"),
6065
6643
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$56fe02ef449b2606), {}),
6066
6644
  action: leaveCall
6067
6645
  },
6068
6646
  {
6069
6647
  id: "terminateCall",
6070
- title: "End call for all",
6648
+ title: t("leave.endCall"),
6071
6649
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$e57aa6aff2e1f414), {}),
6072
6650
  action: terminateCall,
6073
6651
  danger: true
@@ -6083,7 +6661,7 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
6083
6661
  children: [
6084
6662
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f0e90fb231c59fab$export$2e2bcd8739ae039), {}),
6085
6663
  /*#__PURE__*/ (0, $3Sbms$jsx)("p", {
6086
- children: "Leave"
6664
+ children: t("leave.title")
6087
6665
  })
6088
6666
  ]
6089
6667
  })
@@ -6106,6 +6684,7 @@ var $69a9c49ece80e773$export$2e2bcd8739ae039 = $69a9c49ece80e773$var$ControlBar;
6106
6684
 
6107
6685
 
6108
6686
 
6687
+
6109
6688
  const $8d3d0e80c56cde5c$export$9d03e7b857083c37 = (0, $3Sbms$styledcomponents).div`
6110
6689
  position: absolute;
6111
6690
  width: 100%;
@@ -6184,6 +6763,7 @@ const $8d3d0e80c56cde5c$export$51760c3b0f5567d2 = (0, $3Sbms$styledcomponents).p
6184
6763
 
6185
6764
 
6186
6765
  const $5b80b81d7b095f89$var$QuickConnect = ()=>{
6766
+ const { t: t } = (0, $3Sbms$useTranslation)();
6187
6767
  const QuickConnectContainerRef = (0, $3Sbms$useRef)(null);
6188
6768
  const QuickConnectRef = (0, $3Sbms$useRef)(null);
6189
6769
  const { selfPeerId: selfPeerId , profile: profile , isQuickConnectPopupVisible: isQuickConnectPopupVisible , setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , options: options , orientation: orientation , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
@@ -6258,7 +6838,7 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
6258
6838
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $8d3d0e80c56cde5c$export$f8e80e2c9abbb7eb), {
6259
6839
  children: [
6260
6840
  /*#__PURE__*/ (0, $3Sbms$jsx)("h4", {
6261
- children: "Scan QR Code"
6841
+ children: t("quickConnect.scanTitle")
6262
6842
  }),
6263
6843
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $8d3d0e80c56cde5c$export$b421c25a8e0ea22e), {
6264
6844
  onClick: onQuickConnectPopupCloseClick,
@@ -6272,7 +6852,7 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
6272
6852
  })
6273
6853
  }),
6274
6854
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $8d3d0e80c56cde5c$export$51760c3b0f5567d2), {
6275
- children: "Scan this QR code with your phone camera to open the call."
6855
+ children: t("quickConnect.scan")
6276
6856
  })
6277
6857
  ]
6278
6858
  })
@@ -6284,10 +6864,6 @@ var $5b80b81d7b095f89$export$2e2bcd8739ae039 = $5b80b81d7b095f89$var$QuickConnec
6284
6864
 
6285
6865
 
6286
6866
 
6287
- const $b26ed507544ea00c$var$capitalizeFirstLetter = (string)=>{
6288
- return string.charAt(0).toUpperCase() + string.slice(1);
6289
- };
6290
- var $b26ed507544ea00c$export$2e2bcd8739ae039 = $b26ed507544ea00c$var$capitalizeFirstLetter;
6291
6867
 
6292
6868
 
6293
6869
 
@@ -6354,6 +6930,8 @@ var $c45f2504881e174b$export$2e2bcd8739ae039 = $c45f2504881e174b$var$Speaker;
6354
6930
 
6355
6931
 
6356
6932
 
6933
+
6934
+
6357
6935
  const $910dd7d7d872a463$var$Checkmark = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
6358
6936
  width: "20",
6359
6937
  height: "20",
@@ -6371,7 +6949,6 @@ var $910dd7d7d872a463$export$2e2bcd8739ae039 = $910dd7d7d872a463$var$Checkmark;
6371
6949
 
6372
6950
 
6373
6951
 
6374
-
6375
6952
  const $658749b7ab14b607$export$304c350e86a38cee = (0, $3Sbms$styledcomponents).div`
6376
6953
  display: flex;
6377
6954
  flex-direction: column;
@@ -6533,27 +7110,16 @@ const $658749b7ab14b607$export$73afb47ae3e10bf1 = (0, $3Sbms$styledcomponents).p
6533
7110
  `;
6534
7111
 
6535
7112
 
6536
- const $1694791461215de9$var$languagesList = [
6537
- "english"
6538
- ];
6539
- const $1694791461215de9$export$604ba5624273df44 = ()=>{
6540
- try {
6541
- const storedTheme = localStorage.getItem("stream_ui_language");
6542
- if (storedTheme) return storedTheme;
6543
- return "english";
6544
- } catch (localStorageError) {
6545
- console.warn(localStorageError);
6546
- return "english";
6547
- }
6548
- };
7113
+ const $1694791461215de9$var$languages = Object.keys((0, $384d985bb9605c35$export$150b732325d14d04));
6549
7114
  const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
7115
+ const { t: t } = (0, $3Sbms$useTranslation)();
6550
7116
  const { language: language , setLanguage: setLanguage } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
6551
7117
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
6552
7118
  children: [
6553
7119
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
6554
7120
  children: [
6555
7121
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
6556
- children: "Languages"
7122
+ children: t("settings.language")
6557
7123
  }),
6558
7124
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
6559
7125
  onClick: back,
@@ -6567,9 +7133,9 @@ const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
6567
7133
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6568
7134
  children: [
6569
7135
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6570
- children: "Language"
7136
+ children: t("settings.language")
6571
7137
  }),
6572
- $1694791461215de9$var$languagesList.map((lang)=>{
7138
+ $1694791461215de9$var$languages.map((lang)=>{
6573
7139
  const checked = language === lang;
6574
7140
  const onLanguageClick = ()=>{
6575
7141
  setLanguage(lang);
@@ -6578,7 +7144,7 @@ const $1694791461215de9$var$LanguageSubMenu = ({ back: back })=>{
6578
7144
  onClick: onLanguageClick,
6579
7145
  children: [
6580
7146
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$f132d77f01dce0a3), {
6581
- children: (0, $b26ed507544ea00c$export$2e2bcd8739ae039)(lang)
7147
+ children: (0, $384d985bb9605c35$export$150b732325d14d04)[lang].name
6582
7148
  }),
6583
7149
  /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
6584
7150
  children: checked && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {})
@@ -6605,10 +7171,12 @@ var $1694791461215de9$export$2e2bcd8739ae039 = $1694791461215de9$var$LanguageSub
6605
7171
 
6606
7172
 
6607
7173
 
7174
+
6608
7175
  const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
7176
+ const { t: t } = (0, $3Sbms$useTranslation)();
6609
7177
  const [audioDevices, setAudioDevices] = (0, $3Sbms$useState)([]);
6610
- const [currentMic, setCurrentMic] = (0, $3Sbms$useState)();
6611
- const [currentSpeaker, setCurrentSpeaker] = (0, $3Sbms$useState)();
7178
+ const [currentMicrophoneId, setCurrentMicrophoneId] = (0, $3Sbms$useState)((0, $c9e496369b59be7a$export$2f377c2162fd02b2).getCurrentMicrophoneId());
7179
+ const [currentSpeakerId, setCurrentSpeakerId] = (0, $3Sbms$useState)((0, $c9e496369b59be7a$export$2f377c2162fd02b2).getCurrentSpeakerId());
6612
7180
  const microphoneDevices = audioDevices.filter((device)=>device.kind === "audioinput");
6613
7181
  const speakerDevices = audioDevices.filter((device)=>device.kind === "audiooutput");
6614
7182
  const isMicrophoneAccessBlocked = microphoneDevices.length && audioDevices.every((device)=>device.deviceId === "");
@@ -6616,16 +7184,14 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
6616
7184
  const listDevices = async ()=>{
6617
7185
  const audioDevicesList = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).listAudioDevices();
6618
7186
  setAudioDevices(audioDevicesList);
6619
- const speaker = audioDevicesList.find((device)=>device.kind === "audiooutput" && device.deviceId === "default");
6620
- const mic = audioDevicesList.find((device)=>device.kind === "audioinput" && device.deviceId === "default");
6621
- setCurrentMic(mic);
6622
- setCurrentSpeaker(speaker);
6623
7187
  };
6624
7188
  const onMicClick = async (mic)=>{
6625
- if (currentMic?.deviceId === mic.deviceId) return;
7189
+ if (currentMicrophoneId === mic.deviceId) return;
6626
7190
  await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).switchMicrophone(mic.deviceId);
6627
- setCurrentMic(mic);
6628
- (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`Connected to ${mic.label}`, {
7191
+ setCurrentMicrophoneId(mic.deviceId);
7192
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("notifications.connectedTo", {
7193
+ name: mic.label
7194
+ }), {
6629
7195
  duration: 3000,
6630
7196
  icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6043ae1b48c5aa97$export$2e2bcd8739ae039), {}),
6631
7197
  messageStyle: {
@@ -6634,10 +7200,12 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
6634
7200
  });
6635
7201
  };
6636
7202
  const onSpeakerClick = (speaker)=>{
6637
- if (currentSpeaker?.deviceId === speaker.deviceId) return;
7203
+ if (currentSpeakerId === speaker.deviceId) return;
6638
7204
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setAudioSink(speaker.deviceId);
6639
- setCurrentSpeaker(speaker);
6640
- (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`Connected to ${speaker.label}`, {
7205
+ setCurrentSpeakerId(speaker.deviceId);
7206
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("notifications.connectedTo", {
7207
+ name: speaker.label
7208
+ }), {
6641
7209
  duration: 3000,
6642
7210
  icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c45f2504881e174b$export$2e2bcd8739ae039), {}),
6643
7211
  messageStyle: {
@@ -6655,7 +7223,7 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
6655
7223
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
6656
7224
  children: [
6657
7225
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
6658
- children: "Audio"
7226
+ children: t("audioMenu.title")
6659
7227
  }),
6660
7228
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
6661
7229
  onClick: back,
@@ -6670,10 +7238,10 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
6670
7238
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$87d6be27a51dc3c4), {
6671
7239
  children: [
6672
7240
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$30ccd51431e4a7b0), {
6673
- children: "Microphone is blocked."
7241
+ children: t("audioMenu.blockedMicrophone")
6674
7242
  }),
6675
7243
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$73afb47ae3e10bf1), {
6676
- children: "Please accept microphone sharing before accessing these options."
7244
+ children: t("audioMenu.microphonePermissions")
6677
7245
  })
6678
7246
  ]
6679
7247
  })
@@ -6682,10 +7250,10 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
6682
7250
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6683
7251
  children: [
6684
7252
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6685
- children: "Microphone"
7253
+ children: t("misc.microphone")
6686
7254
  }),
6687
7255
  microphoneDevices.map((microphone)=>{
6688
- const checked = microphone.deviceId === currentMic?.deviceId;
7256
+ const checked = microphone.deviceId === currentMicrophoneId;
6689
7257
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6690
7258
  onClick: ()=>onMicClick(microphone),
6691
7259
  children: [
@@ -6703,10 +7271,10 @@ const $b7a5d5760b390f40$var$AudioSubMenu = ({ back: back })=>{
6703
7271
  canChangeSpeakers && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6704
7272
  children: [
6705
7273
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6706
- children: "Speakers"
7274
+ children: t("misc.speaker")
6707
7275
  }),
6708
7276
  speakerDevices.map((speaker)=>{
6709
- const checked = speaker.deviceId === currentSpeaker?.deviceId;
7277
+ const checked = speaker.deviceId === currentSpeakerId;
6710
7278
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6711
7279
  onClick: ()=>onSpeakerClick(speaker),
6712
7280
  children: [
@@ -6739,35 +7307,39 @@ var $b7a5d5760b390f40$export$2e2bcd8739ae039 = $b7a5d5760b390f40$var$AudioSubMen
6739
7307
 
6740
7308
 
6741
7309
 
6742
- const $57896f163f7e1230$var$resolutions = Object.keys((0, $c31e3fb4360572af$export$d21ffcc5eb136bfa)).map((key)=>{
6743
- const constraints = (0, $c31e3fb4360572af$export$d21ffcc5eb136bfa);
6744
- switch(constraints[key].height.ideal){
6745
- case 240:
6746
- return {
6747
- name: "Low definition (240p)",
6748
- key: key
6749
- };
6750
- case 480:
6751
- return {
6752
- name: "Standard definition (480p)",
6753
- key: key
6754
- };
6755
- case 720:
6756
- return {
6757
- name: "High definition (720p)",
6758
- key: key
6759
- };
6760
- default:
6761
- return {
6762
- name: "",
6763
- key: key
6764
- };
6765
- }
6766
- }).filter((def)=>def.name !== "");
7310
+
6767
7311
  const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
7312
+ const { t: t } = (0, $3Sbms$useTranslation)();
6768
7313
  const [cameraDevices, setCameraDevices] = (0, $3Sbms$useState)([]);
6769
7314
  const [currentCamera, setCurrentCamera] = (0, $3Sbms$useState)((0, $c9e496369b59be7a$export$2f377c2162fd02b2).getCurrentWebcam());
6770
7315
  const isCameraAccessBlocked = cameraDevices.length && cameraDevices.every((device)=>device.deviceId === "");
7316
+ const resolutions = (0, $3Sbms$useMemo)(()=>Object.keys((0, $c31e3fb4360572af$export$d21ffcc5eb136bfa)).map((key)=>{
7317
+ const constraints = (0, $c31e3fb4360572af$export$d21ffcc5eb136bfa);
7318
+ switch(constraints[key].height.ideal){
7319
+ case 240:
7320
+ return {
7321
+ name: t("videoMenu.lowDef"),
7322
+ key: key
7323
+ };
7324
+ case 480:
7325
+ return {
7326
+ name: t("videoMenu.standardDef"),
7327
+ key: key
7328
+ };
7329
+ case 720:
7330
+ return {
7331
+ name: t("videoMenu.highDef"),
7332
+ key: key
7333
+ };
7334
+ default:
7335
+ return {
7336
+ name: "",
7337
+ key: key
7338
+ };
7339
+ }
7340
+ }).filter((def)=>def.name !== ""), [
7341
+ t
7342
+ ]);
6771
7343
  const listDevices = async ()=>{
6772
7344
  const videoDevices = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).listVideoDevices();
6773
7345
  setCameraDevices(videoDevices);
@@ -6781,7 +7353,9 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
6781
7353
  device: camera,
6782
7354
  resolution: currentCamera.resolution
6783
7355
  });
6784
- (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`Connected to ${camera.label}`, {
7356
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(t("notifications.connectedTo", {
7357
+ name: camera.label
7358
+ }), {
6785
7359
  duration: 3000,
6786
7360
  icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $04e57b1f07a8e9f4$export$2e2bcd8739ae039), {}),
6787
7361
  messageStyle: {
@@ -6817,7 +7391,7 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
6817
7391
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
6818
7392
  children: [
6819
7393
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
6820
- children: "Video"
7394
+ children: t("videoMenu.title")
6821
7395
  }),
6822
7396
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
6823
7397
  onClick: back,
@@ -6832,10 +7406,10 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
6832
7406
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$87d6be27a51dc3c4), {
6833
7407
  children: [
6834
7408
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$30ccd51431e4a7b0), {
6835
- children: "Camera is blocked."
7409
+ children: t("videoMenu.blockedCamera")
6836
7410
  }),
6837
7411
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$73afb47ae3e10bf1), {
6838
- children: "Please accept camera sharing before accessing these options."
7412
+ children: t("videoMenu.cameraPermissions")
6839
7413
  })
6840
7414
  ]
6841
7415
  })
@@ -6844,7 +7418,7 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
6844
7418
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6845
7419
  children: [
6846
7420
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6847
- children: "Camera"
7421
+ children: t("misc.camera")
6848
7422
  }),
6849
7423
  cameraDevices.map((camera)=>{
6850
7424
  const checked = camera.deviceId === currentCamera.device?.deviceId;
@@ -6865,9 +7439,9 @@ const $57896f163f7e1230$var$VideoSubMenu = ({ back: back })=>{
6865
7439
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6866
7440
  children: [
6867
7441
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6868
- children: "Send Resolution (maximum)"
7442
+ children: t("videoMenu.sendResolution")
6869
7443
  }),
6870
- $57896f163f7e1230$var$resolutions.map((resolution)=>{
7444
+ resolutions.map((resolution)=>{
6871
7445
  const checked = resolution.key === currentCamera.resolution;
6872
7446
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6873
7447
  onClick: ()=>onSendResolutionClick(resolution),
@@ -6894,6 +7468,7 @@ var $57896f163f7e1230$export$2e2bcd8739ae039 = $57896f163f7e1230$var$VideoSubMen
6894
7468
 
6895
7469
 
6896
7470
  const $c11e4c21ca692a16$var$Menu = ()=>{
7471
+ const { t: t } = (0, $3Sbms$useTranslation)();
6897
7472
  const [currentMenu, setCurrentMenu] = (0, $3Sbms$useState)("base");
6898
7473
  const menuPopupRef = (0, $3Sbms$useRef)(null);
6899
7474
  const { isSettingsMenuVisible: isSettingsMenuVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , language: language , options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
@@ -6936,7 +7511,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
6936
7511
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$ba6f0acf5af923bd), {
6937
7512
  children: [
6938
7513
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$edb76fdb8665f52), {
6939
- children: "Settings"
7514
+ children: t("settings.title")
6940
7515
  }),
6941
7516
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$b16d2ed9d0485f06), {
6942
7517
  onClick: onCloseClick,
@@ -6949,17 +7524,17 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
6949
7524
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6950
7525
  children: [
6951
7526
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6952
- children: "Preferences"
7527
+ children: t("settings.preferences")
6953
7528
  }),
6954
7529
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6955
7530
  onClick: onLanguageMenuClick,
6956
7531
  children: [
6957
7532
  /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
6958
- children: "Language"
7533
+ children: t("settings.language")
6959
7534
  }),
6960
7535
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$4f015f15aa624b3d), {
6961
7536
  children: [
6962
- (0, $b26ed507544ea00c$export$2e2bcd8739ae039)(language),
7537
+ (0, $384d985bb9605c35$export$150b732325d14d04)[language]?.name,
6963
7538
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $781ad5a3ab7061c2$export$2e2bcd8739ae039), {
6964
7539
  direction: "right"
6965
7540
  })
@@ -6972,7 +7547,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
6972
7547
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
6973
7548
  children: [
6974
7549
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
6975
- children: "Devices"
7550
+ children: t("settings.devices")
6976
7551
  }),
6977
7552
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).isListDevicesSupported() && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
6978
7553
  onClick: onAudioClick,
@@ -6982,7 +7557,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
6982
7557
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$bb67e2c42c95a3ae), {
6983
7558
  children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c45f2504881e174b$export$2e2bcd8739ae039), {})
6984
7559
  }),
6985
- "Audio"
7560
+ t("audioMenu.title")
6986
7561
  ]
6987
7562
  }),
6988
7563
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$4f015f15aa624b3d), {
@@ -7000,7 +7575,7 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
7000
7575
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$bb67e2c42c95a3ae), {
7001
7576
  children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $04e57b1f07a8e9f4$export$2e2bcd8739ae039), {})
7002
7577
  }),
7003
- "Video"
7578
+ t("videoMenu.title")
7004
7579
  ]
7005
7580
  }),
7006
7581
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$4f015f15aa624b3d), {
@@ -7015,13 +7590,13 @@ const $c11e4c21ca692a16$var$Menu = ()=>{
7015
7590
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$38050e761cbb2b1d), {
7016
7591
  children: [
7017
7592
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $658749b7ab14b607$export$5caf84ac7a22e7b5), {
7018
- children: "Help"
7593
+ children: t("settings.help")
7019
7594
  }),
7020
7595
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $658749b7ab14b607$export$db1aade9877208c7), {
7021
7596
  onClick: onHelpCenterClick,
7022
7597
  children: [
7023
7598
  /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
7024
- children: "Go to help center"
7599
+ children: t("settings.helpCenter")
7025
7600
  }),
7026
7601
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $b93bcb828d5c97d8$export$2e2bcd8739ae039), {})
7027
7602
  ]
@@ -7054,6 +7629,8 @@ var $c11e4c21ca692a16$export$2e2bcd8739ae039 = $c11e4c21ca692a16$var$Menu;
7054
7629
 
7055
7630
 
7056
7631
 
7632
+
7633
+
7057
7634
  const $d677836e2f373a45$export$b679a9a7caefa4b1 = (0, $3Sbms$styledcomponents).div`
7058
7635
  position: absolute;
7059
7636
  width: 100%;
@@ -7179,6 +7756,7 @@ const $d677836e2f373a45$export$3711c5e6a7ba3fdc = (0, $3Sbms$styledcomponents).b
7179
7756
 
7180
7757
  const $49372cd9190da903$var$youtubeIDRegExp = /.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#&?]*).*/;
7181
7758
  const $49372cd9190da903$var$YoutubePopup = ()=>{
7759
+ const { t: t } = (0, $3Sbms$useTranslation)();
7182
7760
  const youtubePopupRef = (0, $3Sbms$useRef)(null);
7183
7761
  const [youtubeInputValue, setYoutubeInputValue] = (0, $3Sbms$useState)("");
7184
7762
  const [errorMessage, setErrorMessage] = (0, $3Sbms$useState)(null);
@@ -7191,6 +7769,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
7191
7769
  const onShareClick = (event)=>{
7192
7770
  event.preventDefault();
7193
7771
  setErrorMessage(null);
7772
+ (0, $3Sbms$hotjarbrowser).event("youtubeShare");
7194
7773
  const [, videoId] = youtubeInputValue.match($49372cd9190da903$var$youtubeIDRegExp) || [];
7195
7774
  if (videoId) {
7196
7775
  dispatch({
@@ -7205,7 +7784,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
7205
7784
  }
7206
7785
  });
7207
7786
  setIsYoutubePopupVisible(false);
7208
- } else setErrorMessage("Invalid YouTube URL");
7787
+ } else setErrorMessage(t("youtube.invalid"));
7209
7788
  };
7210
7789
  const onCloseClick = ()=>setIsYoutubePopupVisible(false);
7211
7790
  (0, $3Sbms$useEffect)(()=>{
@@ -7227,7 +7806,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
7227
7806
  children: [
7228
7807
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a2d206a438475087$export$2e2bcd8739ae039), {}),
7229
7808
  /*#__PURE__*/ (0, $3Sbms$jsx)("h4", {
7230
- children: "Embed YouTube"
7809
+ children: t("youtube.title")
7231
7810
  })
7232
7811
  ]
7233
7812
  }),
@@ -7245,7 +7824,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
7245
7824
  children: [
7246
7825
  /*#__PURE__*/ (0, $3Sbms$jsx)("label", {
7247
7826
  htmlFor: "youtube-popup-input",
7248
- children: "YOUTUBE URL"
7827
+ children: t("youtube.url")
7249
7828
  }),
7250
7829
  /*#__PURE__*/ (0, $3Sbms$jsx)("input", {
7251
7830
  id: "youtube-popup-input",
@@ -7263,7 +7842,7 @@ const $49372cd9190da903$var$YoutubePopup = ()=>{
7263
7842
  }),
7264
7843
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $d677836e2f373a45$export$3711c5e6a7ba3fdc), {
7265
7844
  type: "submit",
7266
- children: "Share video"
7845
+ children: t("youtube.share")
7267
7846
  })
7268
7847
  ]
7269
7848
  })
@@ -7283,6 +7862,24 @@ var $49372cd9190da903$export$2e2bcd8739ae039 = $49372cd9190da903$var$YoutubePopu
7283
7862
 
7284
7863
 
7285
7864
 
7865
+ const $5dd22e058f46af7f$var$CircledTopArrow = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
7866
+ width: "21",
7867
+ height: "20",
7868
+ viewBox: "0 0 21 20",
7869
+ fill: "none",
7870
+ xmlns: "http://www.w3.org/2000/svg",
7871
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
7872
+ d: "M11.091 6.908a.833.833 0 0 0-.275-.175.833.833 0 0 0-.633 0 .833.833 0 0 0-.275.175l-2.5 2.5a.837.837 0 1 0 1.183 1.184l1.075-1.084V12.5a.833.833 0 1 0 1.667 0V9.508l1.075 1.084a.833.833 0 0 0 1.183 0 .833.833 0 0 0 0-1.184l-2.5-2.5Zm-.592-5.242a8.333 8.333 0 1 0 0 16.667 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.334Z",
7873
+ fill: "#fff"
7874
+ })
7875
+ });
7876
+ var $5dd22e058f46af7f$export$2e2bcd8739ae039 = $5dd22e058f46af7f$var$CircledTopArrow;
7877
+
7878
+
7879
+
7880
+
7881
+
7882
+
7286
7883
  const $dc26e7b014ddcf8c$var$PaypalWhite = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
7287
7884
  width: "24",
7288
7885
  height: "24",
@@ -7342,15 +7939,16 @@ var $dc26e7b014ddcf8c$export$2e2bcd8739ae039 = $dc26e7b014ddcf8c$var$Paypal;
7342
7939
 
7343
7940
 
7344
7941
 
7942
+ const $554f3984e3212196$var$modalHeight = (desktop)=>desktop ? "215px" : "227px";
7345
7943
  const $554f3984e3212196$export$ed0d510542cc4e55 = (0, $3Sbms$styledcomponents).div`
7346
7944
  position: absolute;
7347
7945
  width: 100%;
7348
- bottom: ${(props)=>props.open ? 0 : "-220px"};
7946
+ bottom: ${(props)=>props.open ? 0 : `-${$554f3984e3212196$var$modalHeight(props.desktop)}`};
7349
7947
  transition: all 0.4s;
7350
7948
 
7351
7949
  ${(props)=>{
7352
7950
  if (props.desktop) return (0, $3Sbms$css)`
7353
- bottom: ${props.open ? 0 : "calc(-220px - (100vh / 2))"};
7951
+ bottom: ${props.open ? 0 : `calc(-${$554f3984e3212196$var$modalHeight(props.desktop)} - (100vh / 2))`};
7354
7952
  height: 100%;
7355
7953
  display: flex;
7356
7954
  justify-content: center;
@@ -7362,12 +7960,12 @@ const $554f3984e3212196$export$93c2cc854b34757d = (0, $3Sbms$styledcomponents).d
7362
7960
  display: flex;
7363
7961
  flex-direction: column;
7364
7962
  width: ${(props)=>props.desktop ? "375px" : "100%"};
7365
- height: 220px;
7963
+ height: ${({ desktop: desktop })=>$554f3984e3212196$var$modalHeight(desktop)};
7366
7964
  max-height: 100vh;
7367
- background-color: ${(props)=>props.theme.settingsBackgroundColor};
7368
- color: ${(props)=>props.theme.settingsTextColor};
7965
+ background-color: ${(props)=>props.theme.popupBackgroundPrimaryColor};
7966
+ color: ${(props)=>props.theme.popupTitleColor};
7369
7967
  border-radius: ${(props)=>props.desktop ? "20px" : "20px 20px 0 0"};
7370
- padding: 12px 14px 30px;
7968
+ padding: ${({ desktop: desktop })=>desktop ? "16px 14px" : "16px 14px 28px"};
7371
7969
  box-sizing: border-box;
7372
7970
  `;
7373
7971
  const $554f3984e3212196$export$f0162ebc287dd01 = (0, $3Sbms$styledcomponents).div`
@@ -7396,7 +7994,7 @@ const $554f3984e3212196$export$fcade06574a60ff0 = (0, $3Sbms$styledcomponents).b
7396
7994
  justify-content: center;
7397
7995
  align-items: center;
7398
7996
  border: none;
7399
- background-color: ${(props)=>props.theme.settingsCloseBackgroundColor};
7997
+ background-color: ${(props)=>props.theme.popupBackgroundSecondaryColor};
7400
7998
  border-radius: 50%;
7401
7999
  height: 24px;
7402
8000
  width: 24px;
@@ -7420,20 +8018,12 @@ const $554f3984e3212196$export$dcb32b2b413109d8 = (0, $3Sbms$styledcomponents).d
7420
8018
  flex-direction: column;
7421
8019
  position: relative;
7422
8020
 
7423
- label {
7424
- font-size: 10px;
7425
- font-weight: 700;
7426
- line-height: 10px;
7427
- color: #fff;
7428
- margin-bottom: 10px;
7429
- }
7430
-
7431
8021
  input {
7432
8022
  padding: 16px 10px 16px 20px;
7433
8023
  border-radius: 15px;
7434
- background-color: #4e4e4e;
7435
- border: 1px solid ${(props)=>props.errored ? "#d84949" : "transparent"};
7436
- color: #fff;
8024
+ background-color: ${({ theme: theme })=>theme.popupBackgroundSecondaryColor};
8025
+ border: 1px solid ${(props)=>props.errored ? "#d84949" : props.theme.popupBorderColor};
8026
+ color: #878787;
7437
8027
 
7438
8028
  &:focus {
7439
8029
  outline: none;
@@ -7453,14 +8043,25 @@ const $554f3984e3212196$export$711a92c06f80c3bd = (0, $3Sbms$styledcomponents).s
7453
8043
  `;
7454
8044
  const $554f3984e3212196$export$aec21c9a4da7a1b7 = (0, $3Sbms$styledcomponents).button`
7455
8045
  background-color: ${({ theme: theme })=>theme.primaryColor};
7456
- padding: 8px 18px;
7457
- border-radius: 50px;
8046
+ padding: ${({ status: status })=>status !== "waiting" ? "auto" : "8px 18px"};
8047
+ width: ${({ status: status })=>status !== "waiting" ? "46px" : "100%"};
8048
+ height: 46px;
8049
+ border-radius: ${({ status: status })=>status !== "waiting" ? "50%" : "15px"};
7458
8050
  margin: 30px auto 0;
7459
8051
  border: none;
7460
8052
  color: #fff;
7461
8053
  font-size: 16px;
7462
8054
  font-weight: 700;
7463
8055
  line-height: 18px;
8056
+ transition: border-radius 0.3s ease-in, width 0.3s;
8057
+
8058
+ span {
8059
+ display: flex;
8060
+ flex-direction: row;
8061
+ gap: 5px;
8062
+ align-items: center;
8063
+ justify-content: center;
8064
+ }
7464
8065
  `;
7465
8066
  const $554f3984e3212196$export$9e155375d8fb1f67 = (0, $3Sbms$styledcomponents).img`
7466
8067
  width: 36px;
@@ -7469,14 +8070,15 @@ const $554f3984e3212196$export$9e155375d8fb1f67 = (0, $3Sbms$styledcomponents).i
7469
8070
  `;
7470
8071
  const $554f3984e3212196$export$5e3f251c730829 = (0, $3Sbms$styledcomponents).div`
7471
8072
  display: flex;
7472
- gap: 5px;
8073
+ align-items: center;
8074
+ justify-content: center;
7473
8075
  `;
7474
8076
 
7475
8077
 
7476
8078
 
7477
8079
 
7478
8080
  const $98933bbc579a3e66$export$a1eac7fdbc2db4af = "linkshare_sent";
7479
- const $98933bbc579a3e66$var$sendLinkNotification = (data)=>{
8081
+ const $98933bbc579a3e66$var$sendLinkNotification = (data, t)=>{
7480
8082
  let notificationStatusText = new URL(data.url).hostname;
7481
8083
  if (notificationStatusText.startsWith("www.")) notificationStatusText = notificationStatusText.slice(4);
7482
8084
  const notificationIcon = data.ogImage ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $554f3984e3212196$export$9e155375d8fb1f67), {
@@ -7487,11 +8089,11 @@ const $98933bbc579a3e66$var$sendLinkNotification = (data)=>{
7487
8089
  icon: notificationIcon,
7488
8090
  status: {
7489
8091
  icon: data.favicon,
7490
- text: "From",
8092
+ text: t("misc.from"),
7491
8093
  boldText: notificationStatusText
7492
8094
  },
7493
8095
  button: {
7494
- text: "Open",
8096
+ text: t("misc.open"),
7495
8097
  action: ({ close: close })=>{
7496
8098
  window.open(data.url, "_blank");
7497
8099
  close();
@@ -7508,19 +8110,22 @@ const $98933bbc579a3e66$var$sendLinkNotification = (data)=>{
7508
8110
  statusText: notificationStatusText
7509
8111
  });
7510
8112
  };
7511
- const $98933bbc579a3e66$var$sendPaypalInvoiceNotification = (senderName, url)=>{
7512
- const title = `${senderName || "User"} sent you an invoice.`;
8113
+ const $98933bbc579a3e66$var$sendPaypalInvoiceNotification = (senderName, url, t)=>{
8114
+ const userName = senderName || t("misc.user");
8115
+ const title = t("shareLink.invoice", {
8116
+ user: userName
8117
+ });
7513
8118
  (0, $a5146f9062d7bf28$export$3a57e165650c636f)(title, {
7514
8119
  button: {
7515
8120
  icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $dc26e7b014ddcf8c$export$2e2bcd8739ae039), {}),
7516
- text: "Pay",
8121
+ text: t("shareLink.pay"),
7517
8122
  action: ()=>window.open(url, "_blank")
7518
8123
  },
7519
8124
  status: {
7520
8125
  icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $dc26e7b014ddcf8c$export$2e2bcd8739ae039), {
7521
8126
  colored: true
7522
8127
  }),
7523
- text: "Powered by",
8128
+ text: t("shareLink.poweredBy"),
7524
8129
  boldText: "PayPal"
7525
8130
  },
7526
8131
  duration: 10000
@@ -7533,35 +8138,39 @@ const $98933bbc579a3e66$var$sendPaypalInvoiceNotification = (senderName, url)=>{
7533
8138
  });
7534
8139
  };
7535
8140
  const $98933bbc579a3e66$var$LinksharePopup = ()=>{
8141
+ const { t: t } = (0, $3Sbms$useTranslation)();
8142
+ const themeContext = (0, $3Sbms$useContext)((0, $3Sbms$ThemeContext));
7536
8143
  const linksharePopupRef = (0, $3Sbms$useRef)(null);
7537
8144
  const linkshareInputRef = (0, $3Sbms$useRef)(null);
7538
8145
  const [linkshareInputValue, setLinkshareInputValue] = (0, $3Sbms$useState)("");
7539
8146
  const [errorMessage, setErrorMessage] = (0, $3Sbms$useState)(null);
7540
- const [isLoading, setIsLoading] = (0, $3Sbms$useState)(false);
7541
- const { isLinksharePopupVisible: isLinksharePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
8147
+ const [status, setStatus] = (0, $3Sbms$useState)("waiting");
8148
+ const { isLinksharePopupVisible: isLinksharePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , orientation: orientation , options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
7542
8149
  const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
7543
8150
  const desktop = orientation === "landscape";
7544
8151
  const onCustomMessage = (0, $3Sbms$useCallback)((event)=>{
7545
8152
  const { type: type , data: data } = event.detail.event;
7546
- if (type === $98933bbc579a3e66$export$a1eac7fdbc2db4af) $98933bbc579a3e66$var$sendLinkNotification(data);
8153
+ if (type === $98933bbc579a3e66$export$a1eac7fdbc2db4af) $98933bbc579a3e66$var$sendLinkNotification(data, t);
7547
8154
  else if (type === "paypal_invoice") {
7548
8155
  const sender = streams.find((stream)=>stream.id === event.detail.peerId);
7549
- $98933bbc579a3e66$var$sendPaypalInvoiceNotification(sender?.profile?.name, data.url);
8156
+ $98933bbc579a3e66$var$sendPaypalInvoiceNotification(sender?.profile?.name, data.url, t);
7550
8157
  }
7551
8158
  }, [
7552
- streams
8159
+ streams,
8160
+ t
7553
8161
  ]);
7554
8162
  const onShareClick = async (event)=>{
7555
8163
  event.preventDefault();
7556
8164
  if (!linkshareInputValue) return;
7557
8165
  setErrorMessage(null);
7558
- setIsLoading(true);
8166
+ setStatus("loading");
8167
+ (0, $3Sbms$hotjarbrowser).event("linkshareShare");
7559
8168
  let url;
7560
8169
  try {
7561
8170
  url = new URL(linkshareInputValue);
7562
8171
  if (url.protocol === "http") url.protocol = "https";
7563
8172
  } catch (err) {
7564
- setErrorMessage("Invalid link");
8173
+ setErrorMessage(t("shareLink.invalid"));
7565
8174
  console.error(err);
7566
8175
  }
7567
8176
  if (url) {
@@ -7573,24 +8182,33 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
7573
8182
  }
7574
8183
  });
7575
8184
  else {
7576
- const data = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getShareLinkData(url.href);
8185
+ const { linkData: data } = await fetch(`${options.streamApiURL}/shareLink`, {
8186
+ method: "POST",
8187
+ body: JSON.stringify({
8188
+ url: url.href
8189
+ })
8190
+ }).then((rawResponse)=>rawResponse.json());
7577
8191
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessageToAll({
7578
8192
  type: $98933bbc579a3e66$export$a1eac7fdbc2db4af,
7579
8193
  data: data
7580
8194
  });
7581
8195
  }
7582
- if (streams.length < 2) (0, $3Sbms$reacthottoast)(`Link sent to ${streams[0]?.profile?.name || "User"}`);
7583
- else (0, $3Sbms$reacthottoast)("Link sent to users");
8196
+ if (streams.length < 2) {
8197
+ const userName = streams[0]?.profile?.name || t("misc.user");
8198
+ (0, $3Sbms$reacthottoast)(t("shareLink.sentToUser", {
8199
+ user: userName
8200
+ }));
8201
+ } else (0, $3Sbms$reacthottoast)(t("shareLink.sentToUsers"));
7584
8202
  setIsLinksharePopupVisible(false);
7585
8203
  } catch (err) {
7586
8204
  console.error(err);
7587
- (0, $3Sbms$reacthottoast)("Failed to send link", {
8205
+ (0, $3Sbms$reacthottoast)(t("shareLink.failed"), {
7588
8206
  className: "error"
7589
8207
  });
7590
8208
  }
7591
8209
  setLinkshareInputValue("");
7592
8210
  }
7593
- setIsLoading(false);
8211
+ setStatus("done");
7594
8212
  };
7595
8213
  const onCloseClick = ()=>setIsLinksharePopupVisible(false);
7596
8214
  (0, $3Sbms$useEffect)(()=>{
@@ -7603,6 +8221,7 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
7603
8221
  ]);
7604
8222
  const onPopupTransitionEnd = ()=>{
7605
8223
  if (isLinksharePopupVisible) linkshareInputRef.current?.focus();
8224
+ if (status === "done") setStatus("waiting");
7606
8225
  };
7607
8226
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $554f3984e3212196$export$ed0d510542cc4e55), {
7608
8227
  open: isLinksharePopupVisible,
@@ -7616,9 +8235,11 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
7616
8235
  children: [
7617
8236
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $554f3984e3212196$export$7563f0d47f114601), {
7618
8237
  children: [
7619
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ec1d06e0a21fdaa$export$2e2bcd8739ae039), {}),
8238
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ec1d06e0a21fdaa$export$2e2bcd8739ae039), {
8239
+ color: themeContext.popupTitleColor
8240
+ }),
7620
8241
  /*#__PURE__*/ (0, $3Sbms$jsx)("h4", {
7621
- children: "Share a link"
8242
+ children: t("shareLink.title2")
7622
8243
  })
7623
8244
  ]
7624
8245
  }),
@@ -7634,10 +8255,6 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
7634
8255
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $554f3984e3212196$export$dcb32b2b413109d8), {
7635
8256
  errored: Boolean(errorMessage),
7636
8257
  children: [
7637
- /*#__PURE__*/ (0, $3Sbms$jsx)("label", {
7638
- htmlFor: "linkshare-popup-input",
7639
- children: "LINK URL"
7640
- }),
7641
8258
  /*#__PURE__*/ (0, $3Sbms$jsx)("input", {
7642
8259
  id: "linkshare-popup-input",
7643
8260
  ref: linkshareInputRef,
@@ -7655,17 +8272,18 @@ const $98933bbc579a3e66$var$LinksharePopup = ()=>{
7655
8272
  }),
7656
8273
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $554f3984e3212196$export$aec21c9a4da7a1b7), {
7657
8274
  type: "submit",
7658
- disabled: isLoading,
7659
- children: isLoading ? /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $554f3984e3212196$export$5e3f251c730829), {
8275
+ disabled: status !== "waiting",
8276
+ status: status,
8277
+ children: status !== "waiting" ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $554f3984e3212196$export$5e3f251c730829), {
8278
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $8b7bd174d29d9a1f$export$2e2bcd8739ae039), {
8279
+ size: "18px"
8280
+ })
8281
+ }) : /*#__PURE__*/ (0, $3Sbms$jsxs)("span", {
7660
8282
  children: [
7661
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $8b7bd174d29d9a1f$export$2e2bcd8739ae039), {
7662
- size: "18px"
7663
- }),
7664
- /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
7665
- children: "Link is creating..."
7666
- })
8283
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5dd22e058f46af7f$export$2e2bcd8739ae039), {}),
8284
+ t("shareLink.title")
7667
8285
  ]
7668
- }) : "Share Link"
8286
+ })
7669
8287
  })
7670
8288
  ]
7671
8289
  })
@@ -7710,6 +8328,7 @@ var $01986a58bfba8001$export$2e2bcd8739ae039 = $01986a58bfba8001$var$Settings;
7710
8328
 
7711
8329
 
7712
8330
 
8331
+
7713
8332
  const $61b9018279e658f9$export$104f28dc79f055f4 = (0, $3Sbms$styledcomponents).div`
7714
8333
  display: flex;
7715
8334
  flex: 1;
@@ -7748,10 +8367,12 @@ const $61b9018279e658f9$export$3a4deda42b6182b7 = (0, $3Sbms$styledcomponents).b
7748
8367
 
7749
8368
 
7750
8369
  const $df41bfe6da05853a$var$EndView = ()=>{
8370
+ const { t: t } = (0, $3Sbms$useTranslation)();
7751
8371
  const { streamState: streamState , setStreamState: setStreamState } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
7752
8372
  const ended = streamState === "ended";
7753
8373
  const terminated = streamState === "terminated";
7754
8374
  const expired = streamState === "expired";
8375
+ const full = streamState === "full";
7755
8376
  const onGoBackClick = ()=>{
7756
8377
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).init();
7757
8378
  setStreamState("streaming");
@@ -7764,24 +8385,28 @@ const $df41bfe6da05853a$var$EndView = ()=>{
7764
8385
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $61b9018279e658f9$export$51071a7ce784448), {
7765
8386
  children: [
7766
8387
  (ended || terminated) && "\uD83D\uDC4B",
7767
- expired && "\uD83E\uDD7A"
8388
+ (expired || full) && "\uD83E\uDD7A"
7768
8389
  ]
7769
8390
  }),
7770
8391
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $61b9018279e658f9$export$eebc018855fb0cb6), {
7771
8392
  children: [
7772
- ended && "You left the call",
7773
- terminated && "The call is now ended",
7774
- expired && "You arrived too late"
8393
+ ended && t("endView.callLeft"),
8394
+ terminated && t("endView.callEnded"),
8395
+ expired && t("endView.tooLate"),
8396
+ full && t("endView.full")
7775
8397
  ]
7776
8398
  }),
7777
8399
  expired && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $61b9018279e658f9$export$f4e7b895a81715e9), {
7778
- children: "The call is over or deleted"
8400
+ children: t("endView.callIsOver")
7779
8401
  }),
7780
- ended && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $61b9018279e658f9$export$3a4deda42b6182b7), {
8402
+ full && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $61b9018279e658f9$export$f4e7b895a81715e9), {
8403
+ children: t("endView.fullDescription")
8404
+ }),
8405
+ (ended || full) && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $61b9018279e658f9$export$3a4deda42b6182b7), {
7781
8406
  onClick: onGoBackClick,
7782
- children: "Go back to call"
8407
+ children: t("endView.goBack")
7783
8408
  }),
7784
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f81bfa56534026c2$export$ad5f39c592532e2d), {})
8409
+ !full && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f81bfa56534026c2$export$ad5f39c592532e2d), {})
7785
8410
  ]
7786
8411
  });
7787
8412
  };
@@ -7966,7 +8591,11 @@ const $52580db2e49cdd90$export$f30cb9bc4f736419 = {
7966
8591
  settingsBackgroundColor: "#fff",
7967
8592
  settingsHeaderTextColor: "#000",
7968
8593
  settingsTextColor: "#000",
7969
- settingsCloseBackgroundColor: "#eaebec"
8594
+ settingsCloseBackgroundColor: "#eaebec",
8595
+ popupBackgroundPrimaryColor: "#fff",
8596
+ popupBackgroundSecondaryColor: "#f3f3f3",
8597
+ popupBorderColor: "#d4d4d4",
8598
+ popupTitleColor: "#2d2d2d"
7970
8599
  };
7971
8600
  const $52580db2e49cdd90$export$3e936a8db52a10a0 = {
7972
8601
  primaryColor: "#268AFA",
@@ -7982,7 +8611,11 @@ const $52580db2e49cdd90$export$3e936a8db52a10a0 = {
7982
8611
  settingsBackgroundColor: "#242324",
7983
8612
  settingsHeaderTextColor: "#f9f9f9",
7984
8613
  settingsTextColor: "#fff",
7985
- settingsCloseBackgroundColor: "#7b7c7e"
8614
+ settingsCloseBackgroundColor: "#7b7c7e",
8615
+ popupBackgroundPrimaryColor: "#fff",
8616
+ popupBackgroundSecondaryColor: "#f3f3f3",
8617
+ popupBorderColor: "#d4d4d4",
8618
+ popupTitleColor: "#2d2d2d"
7986
8619
  };
7987
8620
 
7988
8621
 
@@ -8138,6 +8771,7 @@ var $d6008ea114507578$export$2e2bcd8739ae039 = $d6008ea114507578$var$SvgDefiniti
8138
8771
 
8139
8772
 
8140
8773
 
8774
+
8141
8775
  const $fdbe2be8571dfcd7$export$8bac64dfa46a096a = (0, $3Sbms$styledcomponents).div`
8142
8776
  display: flex;
8143
8777
  justify-content: center;
@@ -8190,14 +8824,15 @@ const $fdbe2be8571dfcd7$export$d39b0d24481757e7 = (0, $3Sbms$styledcomponents).b
8190
8824
 
8191
8825
 
8192
8826
  const $6aca0f707e80bf63$var$BlockedDevicesPopup = ({ close: close })=>{
8827
+ const { t: t } = (0, $3Sbms$useTranslation)();
8193
8828
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$8bac64dfa46a096a), {
8194
8829
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $fdbe2be8571dfcd7$export$f2f6e48f0181f95d), {
8195
8830
  children: [
8196
8831
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$b834616c6081368f), {
8197
- children: "Camera and microphone are blocked"
8832
+ children: t("notifications.blockedMicrophonePopupTitle")
8198
8833
  }),
8199
8834
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$12ed2ca69ff6905b), {
8200
- children: "SnapCall requires access to your camera and microphone. Click the camera blocked icon in your browser's address bar."
8835
+ children: t("notifications.blockedMicrophonePopup")
8201
8836
  }),
8202
8837
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $fdbe2be8571dfcd7$export$d39b0d24481757e7), {
8203
8838
  onClick: close,
@@ -8523,7 +9158,7 @@ const $4fb4815baa04b470$export$914ddf2021ea8ee6 = (0, $3Sbms$styledcomponents).d
8523
9158
 
8524
9159
 
8525
9160
  const $26ed036cbc17809a$var$currentTheme = (0, $52580db2e49cdd90$export$3bfd0d5209a8006a)();
8526
- const $26ed036cbc17809a$var$currentLanguage = (0, $1694791461215de9$export$604ba5624273df44)();
9161
+ const $26ed036cbc17809a$var$currentLanguage = (0, $a3e657fb86ae23f3$export$604ba5624273df44)();
8527
9162
  let $26ed036cbc17809a$var$timestampCriticalError = -1;
8528
9163
  const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
8529
9164
  const [selfPeerId, setSelfPeerId] = (0, $3Sbms$useState)(undefined);
@@ -8536,7 +9171,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
8536
9171
  const [isYoutubePopupVisible, setIsYoutubePopupVisible] = (0, $3Sbms$useState)(false);
8537
9172
  const [isLinksharePopupVisible, setIsLinksharePopupVisible] = (0, $3Sbms$useState)(false);
8538
9173
  const [theme, setTheme] = (0, $3Sbms$useState)($26ed036cbc17809a$var$currentTheme);
8539
- const [language, setLanguage] = (0, $3Sbms$useState)($26ed036cbc17809a$var$currentLanguage);
9174
+ const [language, setLanguage] = (0, $3Sbms$useState)(options.language || $26ed036cbc17809a$var$currentLanguage);
8540
9175
  const [profile1, setProfile] = (0, $3Sbms$useState)({});
8541
9176
  const [muted, setMuted] = (0, $3Sbms$useState)(true);
8542
9177
  const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
@@ -8600,15 +9235,23 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
8600
9235
  setStreamState("expired");
8601
9236
  };
8602
9237
  const onAgentIdentity = (event)=>{
8603
- const { success: success } = event.detail;
8604
- if (success) setIsAgent(true);
8605
- else (0, $3Sbms$reacthottoast)("An error occured while trying to join the room as an agent", {
9238
+ const { success: success , email: email } = event.detail;
9239
+ if (success) {
9240
+ setIsAgent(true);
9241
+ if (email) (0, $3Sbms$hotjarbrowser).identify(null, {
9242
+ email: email
9243
+ });
9244
+ } else (0, $3Sbms$reacthottoast)("An error occured while trying to join the room as an agent", {
8606
9245
  className: "error"
8607
9246
  });
8608
9247
  };
8609
9248
  const onCriticalError = (event)=>{
8610
9249
  const duration = 20000;
8611
9250
  const now = Date.now();
9251
+ if (event.detail.code === "USERLIMIT") {
9252
+ setStreamState("full");
9253
+ return;
9254
+ }
8612
9255
  if ($26ed036cbc17809a$var$timestampCriticalError !== -1 && $26ed036cbc17809a$var$timestampCriticalError + duration > now) return;
8613
9256
  $26ed036cbc17809a$var$timestampCriticalError = now;
8614
9257
  (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`A critical error has occurred (error ${event.detail.code}).`, {
@@ -8634,6 +9277,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
8634
9277
  (0, $3Sbms$useEffect)(()=>{
8635
9278
  try {
8636
9279
  localStorage.setItem("stream_ui_language", language);
9280
+ (0, $384d985bb9605c35$export$2e2bcd8739ae039).changeLanguage(language);
8637
9281
  } catch (localStorageError) {
8638
9282
  console.warn(localStorageError);
8639
9283
  }
@@ -8729,7 +9373,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
8729
9373
  ]
8730
9374
  })
8731
9375
  }),
8732
- (streamState === "ended" || streamState === "terminated" || streamState === "expired") && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $df41bfe6da05853a$export$2e2bcd8739ae039), {})
9376
+ (streamState === "ended" || streamState === "terminated" || streamState === "full" || streamState === "expired") && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $df41bfe6da05853a$export$2e2bcd8739ae039), {})
8733
9377
  ]
8734
9378
  })
8735
9379
  ]
@@ -8740,6 +9384,15 @@ var $26ed036cbc17809a$export$2e2bcd8739ae039 = $26ed036cbc17809a$var$StreamUI;
8740
9384
 
8741
9385
 
8742
9386
 
9387
+ // https://help.hotjar.com/hc/en-us/articles/360033640653-Identify-API-Reference#01G2A279ZXW4JT60NKXKX69G49
9388
+ // prettier-ignore
9389
+ // @ts-ignore
9390
+ window.hj = window.hj || function() {
9391
+ (hj.q = hj.q || []).push(arguments);
9392
+ };
9393
+
9394
+
9395
+
8743
9396
  const $24075a5d702d64b3$var$currentURL = new URL(window.location.href);
8744
9397
  const $24075a5d702d64b3$var$microphoneEnabled = $24075a5d702d64b3$var$currentURL.searchParams.get("microphone-enabled") !== "0";
8745
9398
  const $24075a5d702d64b3$var$cameraEnabled = $24075a5d702d64b3$var$currentURL.searchParams.get("camera-enabled") === "1";
@@ -8759,7 +9412,8 @@ const $24075a5d702d64b3$var$defaultOptions = {
8759
9412
  available: true
8760
9413
  }
8761
9414
  },
8762
- streamApiURL: String("https://apistream.snapcall.io")
9415
+ streamApiURL: String("https://apistream.snapcall.io"),
9416
+ tracking: false
8763
9417
  };
8764
9418
  const $24075a5d702d64b3$export$3f94917203ab7078 = {
8765
9419
  init: ({ element: element , ...options })=>{
@@ -8768,6 +9422,7 @@ const $24075a5d702d64b3$export$3f94917203ab7078 = {
8768
9422
  (0, $3Sbms$render)(/*#__PURE__*/ (0, $3Sbms$jsx)((0, $26ed036cbc17809a$export$2e2bcd8739ae039), {
8769
9423
  options: mergedOptions
8770
9424
  }), element);
9425
+ if (mergedOptions.tracking) (0, $3Sbms$hotjarbrowser).init(3111933, 6);
8771
9426
  },
8772
9427
  setExtraSettingsOptions: (extraOptions)=>{
8773
9428
  const event = new CustomEvent("streamUISetExtraSettingsOptions", {
@@ -8786,7 +9441,8 @@ const $24075a5d702d64b3$export$3f94917203ab7078 = {
8786
9441
  dispatchEvent: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).dispatchEvent.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
8787
9442
  getState: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
8788
9443
  setProfile: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setProfile.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
8789
- /* Should not be documented */ setConfig: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setConfig.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2))
9444
+ /* Should not be documented */ setConfig: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setConfig.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
9445
+ setLogLevel: (level)=>(0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039).setLogLevel(level)
8790
9446
  };
8791
9447
  window.streamUI = $24075a5d702d64b3$export$3f94917203ab7078;
8792
9448
  // Backward compatibility