@snapcall/stream-ui 1.12.1 → 1.13.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.
@@ -5,9 +5,10 @@ import $3Sbms$reacthottoast, {toast as $3Sbms$toast, Toaster as $3Sbms$Toaster,
5
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";
6
6
  import $3Sbms$react, {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, forwardRef as $3Sbms$forwardRef} from "react";
7
7
  import "inobounce";
8
+ import {QueryClient as $3Sbms$QueryClient, QueryClientProvider as $3Sbms$QueryClientProvider, useMutation as $3Sbms$useMutation} from "react-query";
8
9
  import $3Sbms$i18next from "i18next";
9
10
  import {initReactI18next as $3Sbms$initReactI18next, useTranslation as $3Sbms$useTranslation, Trans as $3Sbms$Trans} from "react-i18next";
10
- import {parse as $3Sbms$parse, getParser as $3Sbms$getParser} from "bowser";
11
+ import $3Sbms$bowser, {parse as $3Sbms$parse, getParser as $3Sbms$getParser} from "bowser";
11
12
  import {v4 as $3Sbms$v4} from "uuid";
12
13
  import {WebSocketTransport as $3Sbms$WebSocketTransport, Peer as $3Sbms$Peer} from "protoo-client";
13
14
  import {captureException as $3Sbms$captureException, addBreadcrumb as $3Sbms$addBreadcrumb, setTag as $3Sbms$setTag} from "@sentry/browser";
@@ -18,10 +19,10 @@ import {createPortal as $3Sbms$createPortal} from "react-dom";
18
19
  import {toCanvas as $3Sbms$toCanvas} from "qrcode";
19
20
  import {useOverlayTriggerState as $3Sbms$useOverlayTriggerState, useToggleState as $3Sbms$useToggleState} from "react-stately";
20
21
  import $3Sbms$classnames from "classnames";
21
- import {useToggleButton as $3Sbms$useToggleButton, useFocusRing as $3Sbms$useFocusRing, useModalOverlay as $3Sbms$useModalOverlay, Overlay as $3Sbms$Overlay, useButton as $3Sbms$useButton} from "react-aria";
22
+ import {useToggleButton as $3Sbms$useToggleButton, useFocusRing as $3Sbms$useFocusRing, useButton as $3Sbms$useButton, useModalOverlay as $3Sbms$useModalOverlay, Overlay as $3Sbms$Overlay} from "react-aria";
23
+ import {useHover as $3Sbms$useHover} from "@react-aria/interactions";
22
24
  import {useViewportSize as $3Sbms$useViewportSize} from "@react-aria/utils";
23
25
  import {CSSTransition as $3Sbms$CSSTransition} from "react-transition-group";
24
- import {useHover as $3Sbms$useHover} from "@react-aria/interactions";
25
26
  import {useModalOverlay as $3Sbms$useModalOverlay1, Overlay as $3Sbms$Overlay1} from "@react-aria/overlays";
26
27
  import $3Sbms$reactcontentloader from "react-content-loader";
27
28
 
@@ -509,6 +510,7 @@ const $18fb8799f38eb407$export$84584c2a98eb6753 = {
509
510
  footerDescription: "Meet SnapCall, the easiest way to add real-time video to platform, product or service."
510
511
  },
511
512
  recorder: {
513
+ limit: "Video recording limited to 5 min.",
512
514
  submissionTitle: "Thank you for your submission!",
513
515
  submissionDescription: "Your photo/video has been successfully submitted. We will review it and get back to you shortly.",
514
516
  confirmRemovalTitle: "Confirm deletion",
@@ -539,14 +541,16 @@ const $18fb8799f38eb407$export$84584c2a98eb6753 = {
539
541
  tapStopVideoButton: "When you're done, tap the <1 /><2>Stop button</2>.",
540
542
  reviewAndSendVideos: "Review your video and <1>send it when you're satisfied</1>.",
541
543
  tapScreenShareButton: "Tap <1>Record my screen</1> to begin recording.",
542
- tapStopScreenShareButton: "When you're done, tap <1>Stop recording</1>."
544
+ tapStopScreenShareButton: "When you're done, tap <1>Stop recording</1>.",
545
+ screenShareInstruction: "Select the screen or window you wish to record."
543
546
  },
544
547
  switchToMobileTitle: "Switch to your mobile device",
545
548
  switchToMobileDescription: "Experience greater convenience by using your phone to take photos and record videos.",
546
549
  useDesktopVersion: "Use the desktop version",
547
550
  scanQRCode: "Scan this QR code with a compatible device.",
548
551
  startScreenShareButton: "Record my screen",
549
- stopScreenShareButton: "Stop recording"
552
+ stopScreenShareButton: "Stop recording",
553
+ screenTitle: "Ready to capture your screen?"
550
554
  }
551
555
  }
552
556
  };
@@ -708,6 +712,7 @@ const $c5472fb74fa04782$export$acb2a88f7d552ebf = {
708
712
  footerDescription: "D\xe9couvrez SnapCall, ajoutez de la vid\xe9o en temps r\xe9el \xe0 n'importe quelle plateforme, produit ou service."
709
713
  },
710
714
  recorder: {
715
+ limit: "Enregistrement vid\xe9o limit\xe9 \xe0 5 min.",
711
716
  submissionTitle: "Merci pour votre soumission !",
712
717
  submissionDescription: "Votre photo/vid\xe9o a \xe9t\xe9 envoy\xe9e avec succ\xe8s. Nous l'examinerons et reviendrons vers vous bient\xf4t.",
713
718
  confirmRemovalTitle: "Confirmer la suppression",
@@ -738,14 +743,16 @@ const $c5472fb74fa04782$export$acb2a88f7d552ebf = {
738
743
  reviewAndSendVideos: "Vous pouvez revoir votre vid\xe9o, puis <1>l'envoyer lorsque vous avez termin\xe9</2>.",
739
744
  tapScreenShareButton: "Appuyez sur <1>Enregistrer \xe9cran</1> pour d\xe9marrer un enregistrement.",
740
745
  tapStopScreenShareButton: "Lorsque vous avez termin\xe9, appuyez sur <1>Stop enregistrement</1>.",
741
- reviewAndSendScreenShare: "Vous pouvez revoir votre vid\xe9o, puis <1>l'envoyer lorsque vous avez termin\xe9.</1>"
746
+ reviewAndSendScreenShare: "Vous pouvez revoir votre vid\xe9o, puis <1>l'envoyer lorsque vous avez termin\xe9.</1>",
747
+ screenShareInstruction: "S\xe9lectionnez l'\xe9cran ou la fen\xeatre que vous souhaitez enregistrer."
742
748
  },
743
749
  switchToMobileTitle: "Passez sur votre mobile",
744
750
  switchToMobileDescription: "Profitez d'une exp\xe9rience encore plus pratique en utilisant votre t\xe9l\xe9phone pour prendre des photos et enregistrer des vid\xe9os.",
745
751
  useDesktopVersion: "Continuer",
746
752
  scanQRCode: "Scannez ce code QR avec un appareil compatible.",
747
753
  startScreenShareButton: "Enregistrer \xe9cran",
748
- stopScreenShareButton: "Stop enregistrement"
754
+ stopScreenShareButton: "Stop enregistrement",
755
+ screenTitle: "Pr\xeat \xe0 capturer votre \xe9cran ?"
749
756
  }
750
757
  }
751
758
  };
@@ -911,6 +918,7 @@ const $b7790fb9e48df5c4$export$3486a10f30cf1ee4 = {
911
918
  footerDescription: "Incontrare SnapCall, il modo pi\xf9 semplice per aggiungere video in tempo reale a piattaforma, prodotto o servizio."
912
919
  },
913
920
  recorder: {
921
+ limit: "Registrazione video limitata a 5 min.",
914
922
  submissionTitle: "Grazie per il tuo invio!",
915
923
  submissionDescription: "La tua foto/video \xe8 stata inviata con successo. La esamineremo e ti risponderemo al pi\xf9 presto.",
916
924
  confirmRemovalTitle: "Conferma rimozione",
@@ -941,14 +949,16 @@ const $b7790fb9e48df5c4$export$3486a10f30cf1ee4 = {
941
949
  reviewAndSendVideos: "Puoi rivedere il tuo video e poi <1>inviarlo quando hai finito</1>.",
942
950
  tapScreenShareButton: "Tocca <1>Registra il mio schermo</1> per avviare una registrazione.",
943
951
  tapStopScreenShareButton: "Quando hai finito, tocca <1>Ferma registrazione</1>.",
944
- reviewAndSendScreenShare: "Puoi rivedere il tuo video e poi <1>inviarlo quando hai finito.</1>"
952
+ reviewAndSendScreenShare: "Puoi rivedere il tuo video e poi <1>inviarlo quando hai finito.</1>",
953
+ screenShareInstruction: "Seleziona lo schermo o la finestra che desideri registrare."
945
954
  },
946
955
  switchToMobileTitle: "Passa al tuo dispositivo mobile",
947
956
  switchToMobileDescription: "Goditi un'esperienza ancora pi\xf9 pratica utilizzando il tuo telefono per scattare foto e registrare video.",
948
957
  useDesktopVersion: "Usa la versione desktop",
949
958
  scanQRCode: "Scansiona questo codice QR con un dispositivo compatibile.",
950
959
  startScreenShareButton: "Registra il mio schermo",
951
- stopScreenShareButton: "Ferma registrazione"
960
+ stopScreenShareButton: "Ferma registrazione",
961
+ screenTitle: "Pronto a catturare il tuo schermo?"
952
962
  }
953
963
  }
954
964
  };
@@ -1237,6 +1247,11 @@ const $15ddac3121cc3a5d$var$addVideoPlayerWatermarkedCanvas = (canvas, dpr = 1)=
1237
1247
  resolve(canvas);
1238
1248
  };
1239
1249
  watermarkImage.src = blobUrl;
1250
+ if (context) {
1251
+ context.fillStyle = "#00000064";
1252
+ context.fillRect(0, 0, canvas.width, canvas.height);
1253
+ context.restore();
1254
+ }
1240
1255
  });
1241
1256
  const $15ddac3121cc3a5d$export$674c90a250a8b2c5 = async (video, options = {
1242
1257
  addPlayWatermark: false
@@ -1247,15 +1262,15 @@ const $15ddac3121cc3a5d$export$674c90a250a8b2c5 = async (video, options = {
1247
1262
  const sourceHeight = orientation === "landscape" ? videoHeight : videoWidth;
1248
1263
  const sourceX = orientation === "landscape" ? (videoWidth - sourceWidth) / 2 : 0;
1249
1264
  const sourceY = orientation === "portrait" ? (videoHeight - sourceHeight) / 2 : 0;
1250
- const canvas = document.createElement("canvas");
1265
+ let canvas = document.createElement("canvas");
1251
1266
  const ctx = canvas.getContext("2d");
1252
1267
  const dpr = window.devicePixelRatio || 1;
1253
1268
  canvas.width = sourceWidth * dpr;
1254
1269
  canvas.height = sourceHeight * dpr;
1255
1270
  ctx?.scale(dpr, dpr);
1256
1271
  ctx?.drawImage(video, sourceX, sourceY, sourceWidth, sourceHeight, 0, 0, canvas.width / dpr, canvas.height / dpr);
1272
+ if (options.addPlayWatermark) canvas = await $15ddac3121cc3a5d$var$addVideoPlayerWatermarkedCanvas(canvas, window.devicePixelRatio);
1257
1273
  const watermarkedCanvas = await $15ddac3121cc3a5d$var$getWatermarkedCanvas(canvas, window.devicePixelRatio);
1258
- if (options.addPlayWatermark) return (await $15ddac3121cc3a5d$var$addVideoPlayerWatermarkedCanvas(canvas, window.devicePixelRatio)).toDataURL("image/jpeg");
1259
1274
  return watermarkedCanvas.toDataURL("image/jpeg");
1260
1275
  };
1261
1276
  const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src, options = {
@@ -1270,13 +1285,13 @@ const $15ddac3121cc3a5d$export$4a210166cc9cb64b = async (src, options = {
1270
1285
  video.width = settings.width || 0;
1271
1286
  video.height = settings.height || 0;
1272
1287
  await video.play();
1273
- const canvas = document.createElement("canvas");
1288
+ let canvas = document.createElement("canvas");
1274
1289
  const ctx = canvas.getContext("2d");
1275
1290
  canvas.height = video.height;
1276
1291
  canvas.width = video.width;
1277
1292
  ctx?.drawImage(video, 0, 0);
1293
+ if (options.addPlayWatermark) canvas = await $15ddac3121cc3a5d$var$addVideoPlayerWatermarkedCanvas(canvas);
1278
1294
  const watermarkedCanvas = await $15ddac3121cc3a5d$var$getWatermarkedCanvas(canvas);
1279
- if (options.addPlayWatermark) return (await $15ddac3121cc3a5d$var$addVideoPlayerWatermarkedCanvas(canvas)).toDataURL("image/jpeg");
1280
1295
  return watermarkedCanvas.toDataURL("image/jpeg");
1281
1296
  };
1282
1297
 
@@ -9917,7 +9932,7 @@ const $df41bfe6da05853a$var$EndView = ()=>{
9917
9932
  const full = streamState === "full";
9918
9933
  const onGoBackClick = ()=>{
9919
9934
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).init();
9920
- setStreamState("streaming");
9935
+ setStreamState("loading");
9921
9936
  };
9922
9937
  (0, $3Sbms$useEffect)(()=>{
9923
9938
  if (document.pictureInPictureElement) document.exitPictureInPicture();
@@ -10732,6 +10747,50 @@ const $4fb4815baa04b470$export$914ddf2021ea8ee6 = (0, $3Sbms$styledcomponents).d
10732
10747
 
10733
10748
 
10734
10749
 
10750
+ function $448b01a7ea61a08a$export$c74cd098b7a410cb({ mode: mode = "photo" , requestedMedia: requestedMedia = "camera" , permissionBlockedModalState: permissionBlockedModalState , captureThumbnail: captureThumbnail }) {
10751
+ const [currentMode, setMode] = (0, $3Sbms$useState)(mode);
10752
+ const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
10753
+ const [currentRequestedMedia] = (0, $3Sbms$useState)(requestedMedia);
10754
+ const [startRecordTime, setStartRecordTime] = (0, $3Sbms$useState)(undefined);
10755
+ const [timer, setTimer] = (0, $3Sbms$useState)(0);
10756
+ const [assets, setAssets] = (0, $3Sbms$useState)([]);
10757
+ const assetsPopupState = (0, $3Sbms$useOverlayTriggerState)({});
10758
+ const [assetLoading, setAssetLoading] = (0, $3Sbms$useState)(false);
10759
+ (0, $3Sbms$useEffect)(()=>{
10760
+ if (startRecordTime) {
10761
+ const interval = setInterval(()=>{
10762
+ const delta = (Date.now() - startRecordTime) / 1000;
10763
+ setTimer(delta);
10764
+ }, 1000);
10765
+ return ()=>clearInterval(interval);
10766
+ } else setTimer(0);
10767
+ }, [
10768
+ startRecordTime,
10769
+ setTimer
10770
+ ]);
10771
+ return {
10772
+ requestedMedia: currentRequestedMedia,
10773
+ mode: currentMode,
10774
+ setMode: setMode,
10775
+ streaming: streaming,
10776
+ setStreaming: setStreaming,
10777
+ permissionBlockedModalState: permissionBlockedModalState,
10778
+ startRecordTime: startRecordTime,
10779
+ setStartRecordTime: setStartRecordTime,
10780
+ timer: timer,
10781
+ assetsPopupState: assetsPopupState,
10782
+ assets: assets,
10783
+ setAssets: setAssets,
10784
+ assetLoading: assetLoading,
10785
+ setAssetLoading: setAssetLoading,
10786
+ captureThumbnail: captureThumbnail
10787
+ };
10788
+ }
10789
+
10790
+
10791
+
10792
+
10793
+
10735
10794
 
10736
10795
 
10737
10796
 
@@ -10744,7 +10803,7 @@ const $4fb4815baa04b470$export$914ddf2021ea8ee6 = (0, $3Sbms$styledcomponents).d
10744
10803
 
10745
10804
 
10746
10805
 
10747
- function $5a48b7481979330f$export$61dc559f8a0b9bcf(ref) {
10806
+ function $f9059e11662133b7$export$61dc559f8a0b9bcf(ref) {
10748
10807
  const innerRef = (0, $3Sbms$useRef)(null);
10749
10808
  (0, $3Sbms$useEffect)(()=>{
10750
10809
  if (!ref) return;
@@ -10753,8 +10812,8 @@ function $5a48b7481979330f$export$61dc559f8a0b9bcf(ref) {
10753
10812
  });
10754
10813
  return innerRef;
10755
10814
  }
10756
- const $5a48b7481979330f$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $3Sbms$forwardRef)(function Button({ children: children , ...otherProps }, forwardedRef) {
10757
- const ref = $5a48b7481979330f$export$61dc559f8a0b9bcf(forwardedRef);
10815
+ const $f9059e11662133b7$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $3Sbms$forwardRef)(function Button({ children: children , ...otherProps }, forwardedRef) {
10816
+ const ref = $f9059e11662133b7$export$61dc559f8a0b9bcf(forwardedRef);
10758
10817
  let state = (0, $3Sbms$useToggleState)(otherProps);
10759
10818
  const { buttonProps: buttonProps } = (0, $3Sbms$useToggleButton)(otherProps, state, ref);
10760
10819
  const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $3Sbms$useFocusRing)();
@@ -10775,18 +10834,273 @@ const $5a48b7481979330f$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $3Sbms$forwa
10775
10834
 
10776
10835
 
10777
10836
 
10837
+ const $f3d9f6a4bbe7f552$export$4e594bceac139abd = (props)=>{
10838
+ const { selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
10839
+ if (props.state === "request") return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
10840
+ className: (0, $3Sbms$classnames)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),
10841
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10842
+ className: (0, $3Sbms$classnames)("border-[7px] border-white border-b-[#E5484D] border-b-[7px] rounded-[50%] w-[64px] h-[64px] animate-spin")
10843
+ })
10844
+ });
10845
+ if (props.state === "live") return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
10846
+ className: (0, $3Sbms$classnames)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),
10847
+ onClick: ()=>{
10848
+ props.onCapturePress();
10849
+ },
10850
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10851
+ className: "bg-white border-[4px] border-[#E5484D] w-[72px] h-[72px] rounded-full flex items-center justify-center",
10852
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10853
+ className: "bg-[#E5484D] w-[24px] h-[24px] rounded-[8px] "
10854
+ })
10855
+ })
10856
+ });
10857
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
10858
+ className: (0, $3Sbms$classnames)("bg-white rounded-full w-[86px] h-[86px] flex items-center justify-center"),
10859
+ onClick: ()=>{
10860
+ if (selfPeerId) props.onCapturePress();
10861
+ },
10862
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10863
+ className: "bg-[#E5484D] w-[70px] h-[70px] rounded-full flex items-center justify-center",
10864
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10865
+ className: "bg-[#E5484D] w-[62px] h-[62px] rounded-full border-[3px] border-[#FFFFF]"
10866
+ })
10867
+ })
10868
+ });
10869
+ };
10870
+ const $f3d9f6a4bbe7f552$export$f9da3144ae2525a3 = (props)=>{
10871
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10872
+ className: (0, $3Sbms$classnames)("bg-white rounded-full w-[72px] h-[72px] p-[3px]"),
10873
+ onClick: ()=>props.onCapturePress(),
10874
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10875
+ className: "bg-primary rounded-full w-full h-full p-[3px] flex items-center justify-center cursor-pointer",
10876
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10877
+ className: (0, $3Sbms$classnames)("w-full h-full transition-[transform,border-radius] duration-300", props.state.mode === "photo" ? "bg-white" : "bg-[#f12828]", props.state.streaming ? "rounded-[5px] scale-[0.4]" : "rounded-[60px]")
10878
+ })
10879
+ })
10880
+ });
10881
+ };
10882
+
10883
+
10884
+ const $a180b95972399d58$export$11a6fe490bbc4873 = (props)=>{
10885
+ const { t: t } = (0, $3Sbms$useTranslation)();
10886
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10887
+ className: "flex flex-col bg-primary h-[150px] w-full max-w-[500px] rounded-[15px] p-2.5 gap-2.5",
10888
+ children: [
10889
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10890
+ className: "flex flex-1 flex-row px-[10px] w-full",
10891
+ children: [
10892
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10893
+ className: "flex flex-row flex-auto items-center gap-[10px]",
10894
+ children: [
10895
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a1ac29d50bdaa837$export$3741e4ac43f04ca2), {}),
10896
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10897
+ className: " text-white text-base font-medium",
10898
+ children: "SnapCall"
10899
+ })
10900
+ ]
10901
+ }),
10902
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10903
+ className: "flex flex-row justify-end flex-auto items-center gap-[10px] ",
10904
+ children: [
10905
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f9059e11662133b7$export$d2b052e7b4be1756), {
10906
+ isSelected: props.state.mode === "photo",
10907
+ onPress: ()=>{
10908
+ if (!props.state.streaming) props.changeMode("photo");
10909
+ },
10910
+ children: t("misc.photo")
10911
+ }),
10912
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f9059e11662133b7$export$d2b052e7b4be1756), {
10913
+ isSelected: props.state.mode === "video",
10914
+ onPress: ()=>{
10915
+ if (!props.state.streaming) props.changeMode("video");
10916
+ },
10917
+ children: t("misc.video")
10918
+ })
10919
+ ]
10920
+ })
10921
+ ]
10922
+ }),
10923
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10924
+ className: "flex flex-row flex-1 items-center justify-between w-full ",
10925
+ children: [
10926
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10927
+ className: "w-[60px] h-[60px]",
10928
+ children: props.thumbnail
10929
+ }),
10930
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f3d9f6a4bbe7f552$export$f9da3144ae2525a3), {
10931
+ ...props
10932
+ }),
10933
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10934
+ onClick: props.onSwitch,
10935
+ className: "rounded-full w-[56px] h-[56px] flex items-center justify-center bg-[#565656] cursor-pointer",
10936
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $58d405d56c1abe95$export$aefffb14595958fe), {})
10937
+ })
10938
+ ]
10939
+ })
10940
+ ]
10941
+ });
10942
+ };
10943
+
10944
+
10945
+
10946
+
10947
+
10948
+ const $209863c2c7a7b6c0$export$53819c0e58f98d49 = (props)=>{
10949
+ const [countdown, setCountdown] = (0, $3Sbms$useState)(props.initialValue);
10950
+ (0, $3Sbms$useEffect)(()=>{
10951
+ if (countdown === undefined) return;
10952
+ const t = setTimeout(()=>{
10953
+ if (countdown === 1) props.onFinish();
10954
+ setCountdown(countdown - 1);
10955
+ }, 1000);
10956
+ return ()=>clearTimeout(t);
10957
+ }, [
10958
+ countdown,
10959
+ props
10960
+ ]);
10961
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10962
+ className: "absolute w-full h-full flex justify-center items-center bg-black/[.6] z-50",
10963
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
10964
+ className: "text-white/80 text-[112px] font-medium",
10965
+ children: countdown
10966
+ })
10967
+ });
10968
+ };
10969
+
10970
+
10971
+
10972
+
10973
+
10974
+
10975
+
10976
+
10977
+ const $7dc8075008cdffc1$export$8c410456846722ea = /*#__PURE__*/ (0, $3Sbms$forwardRef)((props, forwardedRef)=>{
10978
+ const ref = (0, $f9059e11662133b7$export$61dc559f8a0b9bcf)(forwardedRef);
10979
+ (0, $3Sbms$useEffect)(()=>{
10980
+ const onScreenshareEnabled = ()=>{
10981
+ if (!ref?.current) return;
10982
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestLocalScreenshare(ref.current);
10983
+ };
10984
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareEnabled", onScreenshareEnabled);
10985
+ return ()=>{
10986
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareEnabled", onScreenshareEnabled);
10987
+ };
10988
+ }, [
10989
+ ref
10990
+ ]);
10991
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
10992
+ autoPlay: true,
10993
+ muted: true,
10994
+ playsInline: true,
10995
+ ref: ref,
10996
+ className: "rounded-[10px] max-w-[100%] max-h-[100%] object-fit ",
10997
+ children: props.children
10998
+ });
10999
+ });
11000
+ const $7dc8075008cdffc1$export$287f8fcc69caf433 = /*#__PURE__*/ (0, $3Sbms$forwardRef)((_, forwardedRef)=>{
11001
+ const ref = (0, $f9059e11662133b7$export$61dc559f8a0b9bcf)(forwardedRef);
11002
+ const [facingMode, setFacingMode] = (0, $3Sbms$useState)("user");
11003
+ (0, $3Sbms$useEffect)(()=>{
11004
+ const onLocalVideoChange = (event)=>{
11005
+ if (!event.detail?.camera?.device || !ref.current) return;
11006
+ const { facingMode: newFacingMode } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestLocalVideo(ref?.current);
11007
+ setFacingMode(newFacingMode);
11008
+ };
11009
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoAvailable", onLocalVideoChange);
11010
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoChange", onLocalVideoChange);
11011
+ return ()=>{
11012
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoAvailable", onLocalVideoChange);
11013
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoChange", onLocalVideoChange);
11014
+ };
11015
+ }, [
11016
+ ref
11017
+ ]);
11018
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11019
+ autoPlay: true,
11020
+ muted: true,
11021
+ playsInline: true,
11022
+ ref: ref,
11023
+ className: (0, $3Sbms$classnames)("w-full h-full object-cover rounded-[inherit]", {
11024
+ "scale-x-[-1]": facingMode === "user"
11025
+ })
11026
+ });
11027
+ });
11028
+
11029
+
11030
+
11031
+ const $7227f0300555e42c$export$1cd1efc78cb52ca5 = ({ asset: asset , onClick: onClick })=>{
11032
+ if (!asset) return null;
11033
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11034
+ className: "flex items-center justify-center w-[60px] h-[60px] cursor-pointer relative overflow-hidden",
11035
+ onClick: onClick,
11036
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("img", {
11037
+ className: "cursor-pointer rounded-[8px] w-[60px] h-[60px] object-cover",
11038
+ src: asset.thumbnailURL || asset.objectUrl,
11039
+ alt: "last shot"
11040
+ })
11041
+ });
11042
+ };
11043
+
11044
+
11045
+
11046
+
11047
+
11048
+
11049
+
10778
11050
 
10779
11051
 
10780
11052
 
10781
11053
 
10782
11054
 
10783
11055
 
11056
+ const $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $3Sbms$forwardRef)(function Button({ children: children , variant: variant = "primary" , size: size = "medium" , fullWidth: fullWidth = false , form: form , className: className , ...otherProps }, forwardedRef) {
11057
+ const ref = (0, $f9059e11662133b7$export$61dc559f8a0b9bcf)(forwardedRef);
11058
+ const { buttonProps: buttonProps , isPressed: isPressed } = (0, $3Sbms$useButton)(otherProps, ref);
11059
+ const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $3Sbms$useFocusRing)();
11060
+ const { hoverProps: hoverProps , isHovered: isHovered } = (0, $3Sbms$useHover)({
11061
+ isDisabled: buttonProps.disabled
11062
+ });
11063
+ const isActive = isHovered || isFocusVisible || isPressed;
11064
+ const variantStyle = {
11065
+ primary: (0, $3Sbms$classnames)(isActive ? "bg-primaryLight" : "bg-primary", "text-white disabled:bg-secondaryLight"),
11066
+ secondary: (0, $3Sbms$classnames)(isActive ? "bg-graySelected" : "bg-transparent", "text-primary border border-secondaryLight disabled:text-secondaryLight disabled:bg-graySelected"),
11067
+ basic: (0, $3Sbms$classnames)(isActive ? "bg-graySelected" : "bg-white", "text-primary disabled:text-secondaryLight disabled:bg-graySelected"),
11068
+ tertiary: (0, $3Sbms$classnames)(isActive ? "bg-tertiarySelected" : "bg-tertiary", "text-mainBlue disabled:opacity-50"),
11069
+ blue: (0, $3Sbms$classnames)(isActive ? "bg-mainBlueSelected" : "bg-mainBlue", "text-white disabled:opacity-50"),
11070
+ custom: ""
11071
+ };
11072
+ const sizeStyle = {
11073
+ large: "py-3 px-4 text-base rounded-lg",
11074
+ medium: "py-[9px] px-3.5 text-base rounded-lg",
11075
+ small: "py-2 px-3 text-sm rounded-lg",
11076
+ extraSmall: "py-1.5 px-2.5 text-xs rounded-md",
11077
+ custom: ""
11078
+ };
11079
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
11080
+ className: (0, $3Sbms$classnames)(sizeStyle[size], variantStyle[variant], "flex items-center justify-center gap-[5px] font-medium", "transition-colors ease-in-out", "focus:outline-none", {
11081
+ "ring-[3px] ring-cta": isFocusVisible,
11082
+ "cursor-not-allowed": buttonProps.disabled,
11083
+ "w-full": fullWidth
11084
+ }, className),
11085
+ ...buttonProps,
11086
+ ...focusProps,
11087
+ ...hoverProps,
11088
+ form: form,
11089
+ ref: ref,
11090
+ children: children
11091
+ });
11092
+ });
11093
+
11094
+
11095
+
11096
+
11097
+
10784
11098
 
10785
11099
 
10786
11100
 
10787
11101
 
10788
11102
 
10789
- const $91e337bf8187124b$export$a703eb468fcf7e69 = (props)=>{
11103
+ const $08835f3b5a72d418$export$a703eb468fcf7e69 = (props)=>{
10790
11104
  const { state: state , children: children } = props;
10791
11105
  const ref = (0, $3Sbms$useRef)(null);
10792
11106
  const { modalProps: modalProps , underlayProps: underlayProps } = (0, $3Sbms$useModalOverlay)({
@@ -10839,51 +11153,8 @@ const $91e337bf8187124b$export$a703eb468fcf7e69 = (props)=>{
10839
11153
 
10840
11154
 
10841
11155
 
10842
-
10843
-
10844
-
10845
-
10846
-
10847
- const $0590ee3141e14968$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $3Sbms$forwardRef)(function Button({ children: children , variant: variant = "primary" , size: size = "medium" , fullWidth: fullWidth = false , form: form , className: className , ...otherProps }, forwardedRef) {
10848
- const ref = (0, $5a48b7481979330f$export$61dc559f8a0b9bcf)(forwardedRef);
10849
- const { buttonProps: buttonProps , isPressed: isPressed } = (0, $3Sbms$useButton)(otherProps, ref);
10850
- const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $3Sbms$useFocusRing)();
10851
- const { hoverProps: hoverProps , isHovered: isHovered } = (0, $3Sbms$useHover)({
10852
- isDisabled: buttonProps.disabled
10853
- });
10854
- const isActive = isHovered || isFocusVisible || isPressed;
10855
- const variantStyle = {
10856
- primary: (0, $3Sbms$classnames)(isActive ? "bg-primaryLight" : "bg-primary", "text-white disabled:bg-secondaryLight"),
10857
- secondary: (0, $3Sbms$classnames)(isActive ? "bg-graySelected" : "bg-transparent", "text-primary border border-secondaryLight disabled:text-secondaryLight disabled:bg-graySelected"),
10858
- basic: (0, $3Sbms$classnames)(isActive ? "bg-graySelected" : "bg-white", "text-primary disabled:text-secondaryLight disabled:bg-graySelected"),
10859
- tertiary: (0, $3Sbms$classnames)(isActive ? "bg-tertiarySelected" : "bg-tertiary", "text-mainBlue disabled:opacity-50"),
10860
- custom: ""
10861
- };
10862
- const sizeStyle = {
10863
- large: "py-3 px-4 text-base rounded-lg",
10864
- medium: "py-[9px] px-3.5 text-base rounded-lg",
10865
- small: "py-2 px-3 text-sm rounded-lg",
10866
- extraSmall: "py-1.5 px-2.5 text-xs rounded-md",
10867
- custom: ""
10868
- };
10869
- return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
10870
- className: (0, $3Sbms$classnames)(sizeStyle[size], variantStyle[variant], "flex items-center justify-center gap-[5px] font-medium", "transition-colors ease-in-out", "focus:outline-none", {
10871
- "ring-[3px] ring-cta": isFocusVisible,
10872
- "cursor-not-allowed": buttonProps.disabled,
10873
- "w-full": fullWidth
10874
- }, className),
10875
- ...buttonProps,
10876
- ...focusProps,
10877
- ...hoverProps,
10878
- form: form,
10879
- ref: ref,
10880
- children: children
10881
- });
10882
- });
10883
-
10884
-
10885
- function $c0bb66c3d546ed81$export$2b77a92f1a5ad772(props) {
10886
- const { children: children , state: state , size: size = "small" , title: title , description: description , primaryAction: primaryAction , secondaryAction: secondaryAction , centered: centered = false } = props;
11156
+ function $4381ee6dfabb36f4$export$2b77a92f1a5ad772(props) {
11157
+ const { children: children , state: state , size: size = "small" , title: title , description: description , primaryAction: primaryAction , secondaryAction: secondaryAction , centered: centered = false , ...otherProps } = props;
10887
11158
  const viewport = (0, $3Sbms$useViewportSize)();
10888
11159
  const maxHeight = viewport.height - 64;
10889
11160
  const modalSize = {
@@ -10891,8 +11162,9 @@ function $c0bb66c3d546ed81$export$2b77a92f1a5ad772(props) {
10891
11162
  medium: "max-w-[600px]",
10892
11163
  large: "max-w-[800px]"
10893
11164
  };
10894
- return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $91e337bf8187124b$export$a703eb468fcf7e69), {
11165
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $08835f3b5a72d418$export$a703eb468fcf7e69), {
10895
11166
  state: state,
11167
+ ...otherProps,
10896
11168
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10897
11169
  className: (0, $3Sbms$classnames)("bg-white rounded-[10px] z-[1] overflow-x-auto focus:outline-none", modalSize[size]),
10898
11170
  style: {
@@ -10925,7 +11197,7 @@ function $c0bb66c3d546ed81$export$2b77a92f1a5ad772(props) {
10925
11197
  (primaryAction || secondaryAction) && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10926
11198
  className: (0, $3Sbms$classnames)("flex justify-end gap-2.5", centered ? "justify-center" : "justify-end"),
10927
11199
  children: [
10928
- typeof secondaryAction === "string" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11200
+ typeof secondaryAction === "string" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
10929
11201
  variant: "secondary",
10930
11202
  onPress: state.close,
10931
11203
  fullWidth: centered,
@@ -10934,7 +11206,7 @@ function $c0bb66c3d546ed81$export$2b77a92f1a5ad772(props) {
10934
11206
  typeof secondaryAction === "function" && secondaryAction({
10935
11207
  close: state.close
10936
11208
  }),
10937
- typeof primaryAction === "string" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11209
+ typeof primaryAction === "string" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
10938
11210
  onPress: state.close,
10939
11211
  fullWidth: centered,
10940
11212
  children: primaryAction
@@ -10953,7 +11225,70 @@ function $c0bb66c3d546ed81$export$2b77a92f1a5ad772(props) {
10953
11225
 
10954
11226
 
10955
11227
 
10956
- const $444e1dd9fa8f6883$export$f9da3144ae2525a3 = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
11228
+
11229
+ const $dcecc67f51a66b8d$export$f9d8408fefd786da = ({ state: state , onClose: onClose })=>{
11230
+ const { t: t } = (0, $3Sbms$useTranslation)();
11231
+ const QRCodeRef = (0, $3Sbms$useRef)(null);
11232
+ const { options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11233
+ const [QRCodeContainerRef, { width: QRCodeContainerWidth }] = (0, $af23c74942bdcae7$export$e295b0c537d32d7d)();
11234
+ (0, $3Sbms$useEffect)(()=>{
11235
+ const url = options.sharedURL || window.location.href;
11236
+ $3Sbms$toCanvas(QRCodeRef.current, url, {
11237
+ width: QRCodeContainerWidth > 300 ? 300 : QRCodeContainerWidth,
11238
+ errorCorrectionLevel: "Q",
11239
+ margin: 0
11240
+ });
11241
+ }, [
11242
+ QRCodeContainerWidth,
11243
+ options.sharedURL
11244
+ ]);
11245
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4381ee6dfabb36f4$export$2b77a92f1a5ad772), {
11246
+ centered: true,
11247
+ title: t("recorder.switchToMobileTitle"),
11248
+ description: t("recorder.switchToMobileDescription"),
11249
+ isDismissable: false,
11250
+ state: state,
11251
+ primaryAction: ({ close: close })=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
11252
+ fullWidth: true,
11253
+ variant: "blue",
11254
+ onPress: ()=>{
11255
+ close();
11256
+ onClose();
11257
+ },
11258
+ children: t("recorder.useDesktopVersion")
11259
+ }),
11260
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11261
+ className: "flex flex-col gap-[20px]",
11262
+ children: [
11263
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11264
+ ref: QRCodeContainerRef,
11265
+ className: "flex flex-1 items-center justify-center relative",
11266
+ children: [
11267
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11268
+ className: "absolute w-1/3 h-1/3 max-w-[70px] max-h-[70px] flex items-center justify-center",
11269
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $16d11fc0880587fd$export$2e2bcd8739ae039), {})
11270
+ }),
11271
+ /*#__PURE__*/ (0, $3Sbms$jsx)("canvas", {
11272
+ ref: QRCodeRef
11273
+ })
11274
+ ]
11275
+ }),
11276
+ /*#__PURE__*/ (0, $3Sbms$jsx)("p", {
11277
+ className: "flex items-center justify-center text-xs text-primaryLight text-center",
11278
+ children: t("recorder.scanQRCode")
11279
+ })
11280
+ ]
11281
+ })
11282
+ });
11283
+ };
11284
+
11285
+
11286
+
11287
+
11288
+
11289
+
11290
+
11291
+ const $444e1dd9fa8f6883$export$f9da3144ae2525a3 = ({ sideColor: sideColor , mainColor: mainColor })=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
10957
11292
  width: "20",
10958
11293
  height: "21",
10959
11294
  viewBox: "0 0 20 21",
@@ -10966,15 +11301,15 @@ const $444e1dd9fa8f6883$export$f9da3144ae2525a3 = ()=>/*#__PURE__*/ (0, $3Sbms$j
10966
11301
  children: [
10967
11302
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10968
11303
  d: "M10 2.167a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",
10969
- fill: "#1D1C20"
11304
+ fill: sideColor || "#1D1C20"
10970
11305
  }),
10971
11306
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10972
11307
  d: "M6.76 5.65a5.833 5.833 0 1 1 6.481 9.7 5.833 5.833 0 0 1-6.481-9.7Z",
10973
- fill: "#F12828"
11308
+ fill: mainColor || "#F12828"
10974
11309
  })
10975
11310
  ]
10976
11311
  });
10977
- const $444e1dd9fa8f6883$export$c6a849fd9d9d93a2 = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
11312
+ const $444e1dd9fa8f6883$export$c6a849fd9d9d93a2 = ({ sideColor: sideColor , mainColor: mainColor })=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
10978
11313
  width: "20",
10979
11314
  height: "20",
10980
11315
  viewBox: "0 0 20 20",
@@ -10987,11 +11322,11 @@ const $444e1dd9fa8f6883$export$c6a849fd9d9d93a2 = ()=>/*#__PURE__*/ (0, $3Sbms$j
10987
11322
  children: [
10988
11323
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10989
11324
  d: "M10 1.667a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",
10990
- fill: "#1D1C20"
11325
+ fill: sideColor || "#1D1C20"
10991
11326
  }),
10992
11327
  /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10993
11328
  d: "M7.5 6.667h5a.833.833 0 0 1 .833.833v5a.833.833 0 0 1-.834.834h-5a.833.833 0 0 1-.833-.834v-5a.833.833 0 0 1 .833-.833Z",
10994
- fill: "#F12828"
11329
+ fill: mainColor || "#F12828"
10995
11330
  })
10996
11331
  ]
10997
11332
  });
@@ -11021,330 +11356,373 @@ const $444e1dd9fa8f6883$export$dce36e07153365d = ()=>/*#__PURE__*/ (0, $3Sbms$js
11021
11356
 
11022
11357
 
11023
11358
 
11024
- const $96999d2514f71e51$var$Text = ({ children: children })=>/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11025
- className: "w-full text-base text-primaryLight font-normal leading-[20px]",
11026
- children: children
11359
+
11360
+ const $d775b8f941514ed9$var$savedPermissions = {
11361
+ audio: false,
11362
+ video: false
11363
+ };
11364
+ const $d775b8f941514ed9$export$d791e41b9a4de1f2 = (constraints)=>{
11365
+ const [media, setMedia] = (0, $3Sbms$useState)();
11366
+ const state = (0, $3Sbms$useMutation)([
11367
+ constraints
11368
+ ], async ()=>{
11369
+ const mediaStream = await navigator.mediaDevices.getUserMedia(constraints);
11370
+ setMedia(mediaStream);
11371
+ if (constraints.audio && !$d775b8f941514ed9$var$savedPermissions.audio) $d775b8f941514ed9$var$savedPermissions.audio = true;
11372
+ if (constraints.video && !$d775b8f941514ed9$var$savedPermissions.video) $d775b8f941514ed9$var$savedPermissions.video = true;
11373
+ return {
11374
+ media: media,
11375
+ savedPermissions: $d775b8f941514ed9$var$savedPermissions
11376
+ };
11377
+ });
11378
+ if (state.data == null) media?.getTracks().forEach((track)=>{
11379
+ track.stop();
11380
+ media?.removeTrack(track);
11027
11381
  });
11028
- const $96999d2514f71e51$var$Bold = ({ children: children })=>/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11382
+ return {
11383
+ ...state,
11384
+ savedPermissions: $d775b8f941514ed9$var$savedPermissions
11385
+ };
11386
+ };
11387
+
11388
+
11389
+ const $8fe8c7100159474e$var$Bold = ({ children: children })=>/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11029
11390
  className: "text-primary font-medium",
11030
11391
  children: children
11031
11392
  });
11032
- const $96999d2514f71e51$var$InstructionRow = ({ children: children , index: index })=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11033
- className: "flex flex-row justify-center gap-[5px]",
11034
- children: [
11035
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11036
- className: "flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-secondaryVLight",
11037
- children: index
11038
- }),
11039
- children
11040
- ]
11041
- });
11042
- const $96999d2514f71e51$export$788cb893d96254c8 = ({ state: state , type: type })=>{
11393
+ const $8fe8c7100159474e$export$788cb893d96254c8 = ({ state: state , mode: mode , ...props })=>{
11043
11394
  const { t: t } = (0, $3Sbms$useTranslation)();
11395
+ const getUserMediaMutation = (0, $d775b8f941514ed9$export$d791e41b9a4de1f2)({
11396
+ audio: true,
11397
+ video: true
11398
+ });
11044
11399
  const [permissionsState, setPermissionsState] = (0, $3Sbms$useState)("idle");
11045
11400
  (0, $3Sbms$useEffect)(()=>{
11046
11401
  const { deviceState: deviceState } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState();
11047
- if (deviceState.screenshare.enabled && type === "screen") return setPermissionsState("granted");
11048
- if (deviceState.camera.enabled && type !== "screen") return setPermissionsState("granted");
11402
+ if (deviceState.screenshare.enabled) return setPermissionsState("granted");
11403
+ if (deviceState.camera.enabled) return setPermissionsState("granted");
11049
11404
  setPermissionsState("idle");
11050
11405
  }, [
11051
- type
11406
+ mode
11052
11407
  ]);
11053
- const { deviceState: deviceState } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState();
11054
- const [isRoomReady, setRoomReady] = (0, $3Sbms$useState)(false);
11055
11408
  const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11056
11409
  const device = orientation === "landscape" ? "desktop" : "mobile";
11057
11410
  const videoLength = permissionsState === "granted" ? "short" : "full";
11058
- const videoType = type === "photo" ? "photo" : "video";
11059
- const onEnterRoom = ()=>setRoomReady(true);
11060
- const onLeaveRoom = ()=>setRoomReady(false);
11061
11411
  const ref = (0, $3Sbms$useRef)(null);
11062
- const title = (0, $3Sbms$useMemo)(()=>{
11063
- if (permissionsState === "refused") return t("recorder.permissionDeniedTitle");
11064
- if (type === "photo") return t("recorder.photoInstructionsTitle");
11065
- else if (type === "video") return t("recorder.videoInstructionsTitle");
11066
- else return t("recorder.screenShareInstructionsTitle");
11067
- }, [
11068
- permissionsState,
11069
- type,
11070
- t
11071
- ]);
11072
- (0, $3Sbms$useEffect)(()=>{
11073
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("enterRoom", onEnterRoom);
11074
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("leaveRoom", onLeaveRoom);
11075
- return ()=>{
11076
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("enterRoom", onEnterRoom);
11077
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("leaveRoom", onLeaveRoom);
11078
- };
11079
- }, []);
11080
- const permissionsInstructionIndex = Number(permissionsState !== "granted");
11081
- return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
11412
+ const title = mode === "photo" ? t("recorder.photoInstructionsTitle") : t("recorder.videoInstructionsTitle");
11413
+ const mediaInstruction = [
11414
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11415
+ i18nKey: "recorder.instructions.allowAccessOnPrompt",
11416
+ children: [
11417
+ "When prompted, ",
11418
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11419
+ children: "allow access"
11420
+ }),
11421
+ " to camera and microphone."
11422
+ ]
11423
+ })
11424
+ ];
11425
+ const instructionPhoto = [
11426
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11427
+ i18nKey: "recorder.instructions.tapPhotoButton",
11428
+ com: true,
11429
+ children: [
11430
+ "Tap the ",
11431
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$dce36e07153365d), {}),
11432
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11433
+ children: " Camera button"
11434
+ }),
11435
+ " to take a photo."
11436
+ ]
11437
+ }),
11438
+ t("recorder.instructions.multiplePhotos"),
11439
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11440
+ i18nKey: "recorder.instructions.reviewAndSendPhotos",
11441
+ children: [
11442
+ "You can review your photo and then ",
11443
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11444
+ children: "send it when you're done."
11445
+ })
11446
+ ]
11447
+ })
11448
+ ];
11449
+ const instructionVideo = [
11450
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11451
+ i18nKey: "recorder.instructions.tapVideoButton",
11452
+ children: [
11453
+ "Tap the ",
11454
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$f9da3144ae2525a3), {}),
11455
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11456
+ children: " Record button"
11457
+ }),
11458
+ " to start a recording."
11459
+ ]
11460
+ }),
11461
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11462
+ i18nKey: "recorder.instructions.videoSpeech",
11463
+ children: [
11464
+ "You can ",
11465
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11466
+ children: "speak during"
11467
+ }),
11468
+ " the recording for added detail."
11469
+ ]
11470
+ }),
11471
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11472
+ i18nKey: "recorder.instructions.tapStopVideoButton",
11473
+ children: [
11474
+ "When you're finished, tap the ",
11475
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$c6a849fd9d9d93a2), {}),
11476
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11477
+ children: " Stop button"
11478
+ }),
11479
+ "."
11480
+ ]
11481
+ }),
11482
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11483
+ i18nKey: "recorder.instructions.reviewAndSendVideos",
11484
+ children: [
11485
+ "You can review your video and then ",
11486
+ /*#__PURE__*/ (0, $3Sbms$jsx)($8fe8c7100159474e$var$Bold, {
11487
+ children: "send it when you're done"
11488
+ }),
11489
+ "."
11490
+ ]
11491
+ })
11492
+ ];
11493
+ const instructions = [];
11494
+ if (!getUserMediaMutation.savedPermissions.audio) instructions.push(...mediaInstruction);
11495
+ instructions.push(...mode === "photo" ? instructionPhoto : instructionVideo);
11496
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4381ee6dfabb36f4$export$2b77a92f1a5ad772), {
11082
11497
  title: title,
11083
11498
  state: state,
11084
- centered: permissionsState !== "refused",
11499
+ centered: true,
11085
11500
  isDismissable: false,
11086
- primaryAction: ()=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
11087
- children: permissionsState === "refused" ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11088
- fullWidth: true,
11089
- onPress: ()=>window.location.reload(),
11090
- children: t("recorder.allowAccess")
11091
- }) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
11092
- children: permissionsState === "granted" ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11093
- fullWidth: true,
11094
- onPress: state.close,
11095
- children: t("recorder.okay")
11096
- }) : /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11097
- fullWidth: true,
11098
- isDisabled: permissionsState === "requesting" || isRoomReady === false,
11099
- onPress: async ()=>{
11100
- setPermissionsState("requesting");
11101
- try {
11102
- if (!deviceState.microphone.enabled) {
11103
- const mediaResult = await navigator.mediaDevices.getUserMedia({
11104
- audio: true,
11105
- video: type !== "screen"
11106
- });
11107
- mediaResult.getTracks().forEach((track)=>track.stop());
11108
- }
11109
- if (!deviceState.microphone.enabled) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
11110
- if (!deviceState.camera.enabled && type !== "screen") {
11111
- await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).disableScreenshare();
11112
- await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo({
11113
- resolution: "vga",
11114
- frameRate: 20,
11115
- facingMode: "environment"
11116
- });
11117
- }
11118
- if (!deviceState.screenshare.enabled && type === "screen") {
11119
- await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).disableVideo();
11120
- await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableScreenshare({
11121
- audioTransportOption: "mix"
11122
- });
11123
- }
11124
- setPermissionsState("granted");
11125
- state.close();
11126
- } catch (error) {
11127
- console.log("error", error);
11128
- setPermissionsState("refused");
11129
- }
11130
- },
11131
- children: [
11132
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {}),
11133
- type !== "screen" ? t("recorder.allowCamMicAccess") : t("recorder.allowScreenShareAccess")
11134
- ]
11135
- })
11136
- })
11137
- }),
11501
+ ...props,
11138
11502
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11139
11503
  className: "flex flex-col gap-[20px]",
11140
11504
  children: [
11141
11505
  /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11142
11506
  className: "flex flex-col gap-[10px]",
11143
11507
  ref: ref,
11144
- children: permissionsState === "refused" ? /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11145
- children: t("recorder.permissionDeniedDescription")
11146
- }) : /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11147
- children: [
11148
- permissionsState !== "granted" && /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11149
- index: 1,
11150
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11151
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11152
- i18nKey: "recorder.instructions.allowAccessOnPrompt",
11153
- children: [
11154
- "When prompted, ",
11155
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11156
- children: "allow access"
11157
- }),
11158
- " to camera and microphone."
11159
- ]
11160
- })
11508
+ children: instructions.map((value, index)=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11509
+ className: "flex flex-row justify-center gap-[5px]",
11510
+ children: [
11511
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11512
+ className: "flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-secondaryVLight",
11513
+ children: index + 1
11514
+ }),
11515
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11516
+ className: "w-full text-base text-primaryLight font-normal leading-[20px]",
11517
+ children: value
11161
11518
  })
11162
- }),
11163
- type === "photo" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11164
- children: [
11165
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11166
- index: 1 + permissionsInstructionIndex,
11167
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11168
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11169
- i18nKey: "recorder.instructions.tapPhotoButton",
11170
- com: true,
11171
- children: [
11172
- "Tap the ",
11173
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$dce36e07153365d), {}),
11174
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11175
- children: " Camera button"
11176
- }),
11177
- " to take a photo."
11178
- ]
11179
- })
11180
- })
11181
- }),
11182
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11183
- index: 2 + permissionsInstructionIndex,
11184
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11185
- children: t("recorder.instructions.multiplePhotos")
11186
- })
11187
- }),
11188
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11189
- index: 3 + permissionsInstructionIndex,
11190
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11191
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11192
- i18nKey: "recorder.instructions.reviewAndSendPhotos",
11193
- children: [
11194
- "You can review your photo and then ",
11195
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11196
- children: "send it when you're done."
11197
- })
11198
- ]
11199
- })
11200
- })
11201
- })
11202
- ]
11203
- }),
11204
- type === "video" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11205
- children: [
11206
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11207
- index: 1 + permissionsInstructionIndex,
11208
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11209
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11210
- i18nKey: "recorder.instructions.tapVideoButton",
11211
- children: [
11212
- "Tap the ",
11213
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$f9da3144ae2525a3), {}),
11214
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11215
- children: " Record button"
11216
- }),
11217
- " to start a recording."
11218
- ]
11219
- })
11220
- })
11221
- }),
11222
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11223
- index: 2 + permissionsInstructionIndex,
11224
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11225
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11226
- i18nKey: "recorder.instructions.videoSpeech",
11227
- children: [
11228
- "You can ",
11229
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11230
- children: "speak during"
11231
- }),
11232
- " the recording for added detail."
11233
- ]
11234
- })
11235
- })
11236
- }),
11237
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11238
- index: 3 + permissionsInstructionIndex,
11239
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11240
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11241
- i18nKey: "recorder.instructions.tapStopVideoButton",
11242
- children: [
11243
- "When you're finished, tap the ",
11244
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$c6a849fd9d9d93a2), {}),
11245
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11246
- children: " Stop button"
11247
- }),
11248
- "."
11249
- ]
11250
- })
11251
- })
11252
- }),
11253
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11254
- index: 4 + permissionsInstructionIndex,
11255
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11256
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11257
- i18nKey: "recorder.instructions.reviewAndSendVideos",
11258
- children: [
11259
- "You can review your video and then ",
11260
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11261
- children: "send it when you're done"
11262
- }),
11263
- "."
11264
- ]
11265
- })
11266
- })
11267
- })
11268
- ]
11269
- }),
11270
- type === "screen" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11271
- children: [
11272
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11273
- index: 1 + permissionsInstructionIndex,
11274
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11275
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11276
- i18nKey: "recorder.instructions.tapScreenShareButton",
11277
- children: [
11278
- "Tap on",
11279
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11280
- children: " Record my screen"
11281
- }),
11282
- " to start a recording."
11283
- ]
11284
- })
11285
- })
11286
- }),
11287
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11288
- index: 2 + permissionsInstructionIndex,
11289
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11290
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11291
- i18nKey: "recorder.instructions.videoSpeech",
11292
- children: [
11293
- "You can ",
11294
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11295
- children: "speak during"
11296
- }),
11297
- " the recording for added detail."
11298
- ]
11299
- })
11300
- })
11301
- }),
11302
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11303
- index: 3 + permissionsInstructionIndex,
11304
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11305
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11306
- i18nKey: "recorder.instructions.tapStopScreenShareButton",
11307
- children: [
11308
- "When you're finished, tap on ",
11309
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11310
- children: "Stop recording"
11311
- }),
11312
- "."
11313
- ]
11314
- })
11315
- })
11316
- }),
11317
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
11318
- index: 4 + permissionsInstructionIndex,
11319
- children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
11320
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11321
- i18nKey: "recorder.instructions.reviewAndSendScreenShare",
11322
- children: [
11323
- "You can review your video and then ",
11324
- /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
11325
- children: "send it when you're done."
11326
- })
11327
- ]
11328
- })
11329
- })
11330
- })
11331
- ]
11332
- })
11333
- ]
11334
- })
11519
+ ]
11520
+ }, index))
11335
11521
  }),
11336
- permissionsState !== "refused" && /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11522
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11337
11523
  className: "flex items-center justify-center rounded-[8px] overflow-hidden",
11338
11524
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11339
- src: `${"https://stream-assets.snapcall.io"}/animations/${device}-assist-onboarding-${videoType}-${videoLength}.mp4`,
11525
+ src: `${"https://stream-assets.snapcall.io"}/animations/${device}-assist-onboarding-${mode}-${videoLength}.mp4`,
11340
11526
  playsInline: true,
11341
11527
  autoPlay: true,
11342
11528
  muted: true,
11343
11529
  loop: true
11344
11530
  })
11345
11531
  })
11346
- ]
11347
- })
11532
+ ]
11533
+ })
11534
+ });
11535
+ };
11536
+
11537
+
11538
+ const $1e6ffcfc059a8789$export$cc010f6d61e5dce8 = (delta)=>{
11539
+ const d = [
11540
+ Math.floor(delta / 60),
11541
+ Math.round(delta % 60)
11542
+ ].map((n)=>`${n < 10 ? "0" : ""}${n}`);
11543
+ return d.join(":");
11544
+ };
11545
+ function $1e6ffcfc059a8789$export$3ae94a2503e890a1(date) {
11546
+ const dateFormat = new Intl.DateTimeFormat("default", {
11547
+ dateStyle: "short"
11548
+ });
11549
+ const timeFormat = new Intl.DateTimeFormat("default", {
11550
+ hour: "numeric",
11551
+ minute: "2-digit"
11552
+ });
11553
+ return `${dateFormat.format(date)} at ${timeFormat.format(date)}`;
11554
+ }
11555
+
11556
+
11557
+
11558
+
11559
+
11560
+ const $c9e5583d5dd9328d$var$browser = (0, $3Sbms$bowser).parse(window.navigator.userAgent);
11561
+ const $c9e5583d5dd9328d$export$5b8e641151f8011d = ({ recorderState: recorderState })=>{
11562
+ const { t: t } = (0, $3Sbms$useTranslation)();
11563
+ const { selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11564
+ const getUserMediaMutation = (0, $d775b8f941514ed9$export$d791e41b9a4de1f2)({
11565
+ audio: true,
11566
+ video: true
11567
+ });
11568
+ const [countdownVisible, setCountdownVisible] = (0, $3Sbms$useState)(false);
11569
+ const videoElementRef = (0, $3Sbms$useRef)(null);
11570
+ const isDesktop = $c9e5583d5dd9328d$var$browser.platform.type === "desktop";
11571
+ const instructionModalState = (0, $3Sbms$useOverlayTriggerState)({
11572
+ defaultOpen: !isDesktop
11573
+ });
11574
+ const [isInstructionVideoDisplayed, setInstructionVideoDisplayed] = (0, $3Sbms$useState)(false);
11575
+ const [isInstructionPhotoDisplayed, setInstructionPhotoDisplayed] = (0, $3Sbms$useState)(false);
11576
+ const qrCodeModalState = (0, $3Sbms$useOverlayTriggerState)({
11577
+ defaultOpen: isDesktop
11578
+ });
11579
+ const [flashAnimation, setFlashAnimation] = (0, $3Sbms$useState)(false);
11580
+ const exitStreaming = (0, $3Sbms$useCallback)(()=>{
11581
+ setCountdownVisible(false);
11582
+ }, []);
11583
+ const onPhotoCapture = async (videoElement)=>{
11584
+ const timestamp = Date.now();
11585
+ recorderState.setAssetLoading(true);
11586
+ const image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElement);
11587
+ const { url: url , assetId: assetId } = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).saveCapture(image);
11588
+ recorderState.setAssetLoading(false);
11589
+ recorderState.setAssets([
11590
+ ...recorderState.assets,
11591
+ {
11592
+ type: "photo",
11593
+ timestamp: timestamp,
11594
+ objectUrl: url,
11595
+ assetId: assetId
11596
+ }
11597
+ ]);
11598
+ };
11599
+ const enableMedia = async ()=>{
11600
+ getUserMediaMutation.mutate(undefined, {
11601
+ onError: ()=>{
11602
+ recorderState.permissionBlockedModalState.setOpen(true);
11603
+ },
11604
+ onSettled: ()=>undefined,
11605
+ onSuccess: async ()=>{
11606
+ instructionModalState.close();
11607
+ const { deviceState: deviceState } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState();
11608
+ getUserMediaMutation.reset();
11609
+ if (!deviceState.microphone.enabled) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
11610
+ if (!deviceState.camera.enabled) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo({
11611
+ resolution: "vga",
11612
+ frameRate: 20,
11613
+ facingMode: "environment"
11614
+ });
11615
+ }
11616
+ });
11617
+ };
11618
+ (0, $3Sbms$useEffect)(()=>{
11619
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("recordStopped", exitStreaming);
11620
+ return ()=>{
11621
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("recordStopped", exitStreaming);
11622
+ };
11623
+ }, [
11624
+ exitStreaming
11625
+ ]);
11626
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11627
+ className: (0, $3Sbms$classnames)("bg-[#000] w-full h-full justify-center flex flex-col antialiased inter", {}),
11628
+ children: [
11629
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $8fe8c7100159474e$export$788cb893d96254c8), {
11630
+ state: instructionModalState,
11631
+ mode: recorderState.mode,
11632
+ primaryAction: ()=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
11633
+ fullWidth: true,
11634
+ variant: "blue",
11635
+ isDisabled: !selfPeerId || getUserMediaMutation.isLoading,
11636
+ onPress: ()=>{
11637
+ if (!getUserMediaMutation.savedPermissions.audio) return enableMedia();
11638
+ instructionModalState.close();
11639
+ },
11640
+ children: !getUserMediaMutation?.savedPermissions.audio ? /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11641
+ children: [
11642
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {}),
11643
+ t("recorder.allowCamMicAccess")
11644
+ ]
11645
+ }) : t("recorder.okay")
11646
+ })
11647
+ }),
11648
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $dcecc67f51a66b8d$export$f9d8408fefd786da), {
11649
+ state: qrCodeModalState,
11650
+ onClose: instructionModalState.open
11651
+ }),
11652
+ (recorderState.mode === "video" || recorderState.streaming) && /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11653
+ className: "text-base text-white text-center font-medium pt-2.5",
11654
+ children: (0, $1e6ffcfc059a8789$export$cc010f6d61e5dce8)(recorderState.timer)
11655
+ }),
11656
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11657
+ className: "flex-1 min-h-0 p-2.5 ",
11658
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11659
+ className: "relative w-full h-full rounded-[10px] ",
11660
+ children: [
11661
+ countdownVisible && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $209863c2c7a7b6c0$export$53819c0e58f98d49), {
11662
+ initialValue: 3,
11663
+ onFinish: ()=>{
11664
+ setCountdownVisible(false);
11665
+ recorderState.setStartRecordTime(Date.now());
11666
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).startRecord().then(()=>{
11667
+ if (videoElementRef.current) recorderState.captureThumbnail(videoElementRef.current);
11668
+ });
11669
+ }
11670
+ }),
11671
+ flashAnimation && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$2b501aee548bae06), {
11672
+ onAnimationEnd: ()=>{
11673
+ setFlashAnimation(false);
11674
+ recorderState.assetsPopupState.open();
11675
+ }
11676
+ }),
11677
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7dc8075008cdffc1$export$287f8fcc69caf433), {
11678
+ ref: videoElementRef
11679
+ })
11680
+ ]
11681
+ })
11682
+ }),
11683
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11684
+ className: "flex justify-center px-2.5 pb-2.5 z-10",
11685
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a180b95972399d58$export$11a6fe490bbc4873), {
11686
+ state: recorderState,
11687
+ changeMode: (mode)=>{
11688
+ recorderState.setMode(mode);
11689
+ if (mode === "photo" && !isInstructionPhotoDisplayed) {
11690
+ setInstructionPhotoDisplayed(true);
11691
+ instructionModalState.open();
11692
+ }
11693
+ if (mode === "video" && !isInstructionVideoDisplayed) {
11694
+ setInstructionVideoDisplayed(true);
11695
+ instructionModalState.open();
11696
+ }
11697
+ },
11698
+ thumbnail: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7227f0300555e42c$export$1cd1efc78cb52ca5), {
11699
+ asset: recorderState.assets[recorderState.assets.length - 1],
11700
+ onClick: recorderState.assetsPopupState.open
11701
+ }),
11702
+ onSwitch: ()=>{
11703
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).rotateVideo();
11704
+ },
11705
+ onCapturePress: ()=>{
11706
+ if (recorderState.mode === "photo" && videoElementRef.current) {
11707
+ onPhotoCapture(videoElementRef.current);
11708
+ setFlashAnimation(true);
11709
+ }
11710
+ if (recorderState.mode !== "photo" && !recorderState.streaming) {
11711
+ recorderState.setStreaming(true);
11712
+ setCountdownVisible(true);
11713
+ }
11714
+ if (recorderState.mode !== "photo" && recorderState.streaming) {
11715
+ exitStreaming();
11716
+ if (recorderState.startRecordTime) {
11717
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).stopRecord();
11718
+ recorderState.setAssetLoading(true);
11719
+ recorderState.assetsPopupState.open();
11720
+ }
11721
+ }
11722
+ }
11723
+ })
11724
+ })
11725
+ ]
11348
11726
  });
11349
11727
  };
11350
11728
 
@@ -11358,230 +11736,226 @@ const $96999d2514f71e51$export$788cb893d96254c8 = ({ state: state , type: type
11358
11736
 
11359
11737
 
11360
11738
 
11361
- const $1c8fc500105e5c78$export$f9d8408fefd786da = ({ state: state , setReady: setReady })=>{
11739
+
11740
+
11741
+
11742
+ const $ad3ba5899eb05ecf$var$Bold = ({ children: children })=>/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11743
+ className: "text-white font-medium",
11744
+ children: children
11745
+ });
11746
+ const $ad3ba5899eb05ecf$export$f361d4ae234b90f4 = ()=>{
11362
11747
  const { t: t } = (0, $3Sbms$useTranslation)();
11363
- const QRCodeRef = (0, $3Sbms$useRef)(null);
11364
- const { options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11365
- const [QRCodeContainerRef, { width: QRCodeContainerWidth }] = (0, $af23c74942bdcae7$export$e295b0c537d32d7d)();
11366
- (0, $3Sbms$useEffect)(()=>{
11367
- const url = options.sharedURL || window.location.href;
11368
- $3Sbms$toCanvas(QRCodeRef.current, url, {
11369
- width: QRCodeContainerWidth > 300 ? 300 : QRCodeContainerWidth,
11370
- errorCorrectionLevel: "Q",
11371
- margin: 0
11372
- });
11373
- }, [
11374
- QRCodeContainerWidth,
11375
- options.sharedURL
11376
- ]);
11377
- return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
11378
- centered: true,
11379
- title: t("recorder.switchToMobileTitle"),
11380
- description: t("recorder.switchToMobileDescription"),
11381
- isDismissable: false,
11382
- state: state,
11383
- primaryAction: ()=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11384
- fullWidth: true,
11385
- onPress: ()=>{
11386
- setReady(true);
11387
- state.close();
11388
- },
11389
- children: t("recorder.useDesktopVersion")
11390
- }),
11391
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11392
- className: "flex flex-col gap-[20px]",
11748
+ const instructions = [
11749
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11750
+ i18nKey: "recorder.instructions.tapVideoButton",
11393
11751
  children: [
11394
- /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11395
- ref: QRCodeContainerRef,
11396
- className: "flex flex-1 items-center justify-center relative",
11397
- children: [
11398
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11399
- className: "absolute w-1/3 h-1/3 max-w-[70px] max-h-[70px] flex items-center justify-center",
11400
- children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $16d11fc0880587fd$export$2e2bcd8739ae039), {})
11401
- }),
11402
- /*#__PURE__*/ (0, $3Sbms$jsx)("canvas", {
11403
- ref: QRCodeRef
11404
- })
11405
- ]
11752
+ "Tap the ",
11753
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$f9da3144ae2525a3), {
11754
+ sideColor: "#FFFFFF",
11755
+ mainColor: "#E5484D"
11406
11756
  }),
11407
- /*#__PURE__*/ (0, $3Sbms$jsx)("p", {
11408
- className: "flex items-center justify-center text-xs text-primaryLight text-center",
11409
- children: t("recorder.scanQRCode")
11410
- })
11757
+ /*#__PURE__*/ (0, $3Sbms$jsx)($ad3ba5899eb05ecf$var$Bold, {
11758
+ children: " Record button"
11759
+ }),
11760
+ " to start a recording."
11761
+ ]
11762
+ }),
11763
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Trans), {
11764
+ i18nKey: "recorder.instructions.screenShareInstruction"
11765
+ }),
11766
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11767
+ i18nKey: "recorder.instructions.videoSpeech",
11768
+ children: [
11769
+ "You can ",
11770
+ /*#__PURE__*/ (0, $3Sbms$jsx)($ad3ba5899eb05ecf$var$Bold, {
11771
+ children: "speak during"
11772
+ }),
11773
+ " the recording for added detail."
11774
+ ]
11775
+ }),
11776
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11777
+ i18nKey: "recorder.instructions.tapStopVideoButton",
11778
+ children: [
11779
+ "When you're finished, tap the ",
11780
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$c6a849fd9d9d93a2), {
11781
+ sideColor: "#FFFFFF",
11782
+ mainColor: "#E5484D"
11783
+ }),
11784
+ /*#__PURE__*/ (0, $3Sbms$jsx)($ad3ba5899eb05ecf$var$Bold, {
11785
+ children: " Stop button"
11786
+ }),
11787
+ "."
11788
+ ]
11789
+ }),
11790
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Trans), {
11791
+ i18nKey: "recorder.instructions.reviewAndSendVideos",
11792
+ children: [
11793
+ "You can review your video and then ",
11794
+ /*#__PURE__*/ (0, $3Sbms$jsx)($ad3ba5899eb05ecf$var$Bold, {
11795
+ children: "send it when you're done"
11796
+ }),
11797
+ "."
11411
11798
  ]
11412
11799
  })
11413
- });
11414
- };
11415
-
11416
-
11417
- function $d48329960b5b412c$export$fc3bf4634b488af8({ mode: mode }) {
11418
- const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11419
- const desktop = orientation === "landscape";
11420
- const [ready, setReady] = (0, $3Sbms$useState)(mode === "screen" || !desktop);
11421
- const [isInstructionsModalOpen, setIsInstructionsModalOpen] = (0, $3Sbms$useState)(ready);
11422
- const modalState = (0, $3Sbms$useOverlayTriggerState)({
11423
- isOpen: isInstructionsModalOpen && ready,
11424
- onOpenChange: setIsInstructionsModalOpen
11425
- });
11426
- (0, $3Sbms$useEffect)(()=>{
11427
- setIsInstructionsModalOpen(true);
11428
- }, [
11429
- ready,
11430
- mode
11431
- ]);
11432
- return {
11433
- mode: mode,
11434
- modalState: modalState,
11435
- ready: ready,
11436
- setReady: setReady
11437
- };
11438
- }
11439
- const $d48329960b5b412c$export$bee10e8ab511933f = ({ state: state })=>{
11440
- const [isSwitchToMobileModalOpen, setIsSwitchToMobileOpen] = (0, $3Sbms$useState)(!state.ready);
11441
- const switchToMobileModalState = (0, $3Sbms$useOverlayTriggerState)({
11442
- isOpen: isSwitchToMobileModalOpen,
11443
- onOpenChange: setIsSwitchToMobileOpen
11444
- });
11445
- return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11800
+ ];
11801
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11802
+ className: "flex flex-row gap-[20px] w-full justify-between px-[60px]",
11446
11803
  children: [
11447
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $96999d2514f71e51$export$788cb893d96254c8), {
11448
- state: state.modalState,
11449
- type: state.mode
11804
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11805
+ className: "flex flex-col gap-[10px] w-[50%] items-start justify-center",
11806
+ children: [
11807
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11808
+ className: " text-white font-semibold text-lg pb-[20px]",
11809
+ children: t("recorder.screenTitle")
11810
+ }),
11811
+ instructions.map((value, index)=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11812
+ className: "flex flex-row items-center justify-center gap-[20px]",
11813
+ children: [
11814
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11815
+ className: "flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-[#171717] text-white",
11816
+ children: index + 1
11817
+ }),
11818
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11819
+ className: "w-full text-base text-white font-normal leading-[20px]",
11820
+ children: value
11821
+ })
11822
+ ]
11823
+ }, index))
11824
+ ]
11450
11825
  }),
11451
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1c8fc500105e5c78$export$f9d8408fefd786da), {
11452
- state: switchToMobileModalState,
11453
- setReady: state.setReady
11826
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11827
+ className: "flex items-center justify-center overflow-hidden w-[50%] box-border",
11828
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11829
+ src: `${"https://stream-assets.snapcall.io"}/animations/desktop-assist-onboarding-screen.mp4`,
11830
+ playsInline: true,
11831
+ autoPlay: true,
11832
+ muted: true,
11833
+ loop: true,
11834
+ className: "object-fit border-[white] border-[2px] rounded-[8px]"
11835
+ })
11454
11836
  })
11455
11837
  ]
11456
11838
  });
11457
11839
  };
11458
11840
 
11459
11841
 
11460
-
11461
-
11462
-
11463
- const $39932392769664d0$export$4e594bceac139abd = (props)=>{
11464
- const { t: t } = (0, $3Sbms$useTranslation)();
11465
- return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11466
- className: (0, $3Sbms$classnames)("flex rounded-full h-[40px] p-[10px] border-2 border-white text-white justify-center items-center align-middle", "font-semibold", "cursor-pointer", {
11467
- "bg-[#f12828]": !props.state.streaming
11468
- }),
11469
- onClick: ()=>props.onCapturePress(),
11470
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11471
- children: props.state.streaming ? t("recorder.stopScreenShareButton") : t("recorder.startScreenShareButton")
11472
- })
11473
- });
11474
- };
11475
- const $39932392769664d0$export$f9da3144ae2525a3 = (props)=>{
11476
- return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11477
- className: (0, $3Sbms$classnames)("bg-white rounded-full w-[72px] h-[72px] p-[3px]"),
11478
- onClick: ()=>props.onCapturePress(),
11479
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11480
- className: "bg-primary rounded-full w-full h-full p-[3px] flex items-center justify-center cursor-pointer",
11481
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11482
- className: (0, $3Sbms$classnames)("w-full h-full transition-[transform,border-radius] duration-300", props.state.mode === "photo" ? "bg-white" : "bg-[#f12828]", props.state.streaming ? "rounded-[5px] scale-[0.4]" : "rounded-[60px]")
11483
- })
11484
- })
11485
- });
11486
- };
11487
-
11488
-
11489
- function $a94f21ef9007b90a$export$bd7b6af6aa16550c({ state: state = "photo" }) {
11490
- const [currentMode, setMode] = (0, $3Sbms$useState)(state);
11491
- const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
11492
- return {
11493
- mode: currentMode,
11494
- setMode: (mode)=>{
11495
- setMode(mode);
11496
- },
11497
- streaming: streaming,
11498
- setStreaming: setStreaming
11499
- };
11500
- }
11501
- const $a94f21ef9007b90a$export$11a6fe490bbc4873 = (props)=>{
11842
+ const $a3830e399ecc7fc4$export$2d78fbe400238869 = ({ recorderState: recorderState })=>{
11843
+ const videoElementRef = (0, $3Sbms$useRef)(null);
11502
11844
  const { t: t } = (0, $3Sbms$useTranslation)();
11503
- const setupModalsState = (0, $d48329960b5b412c$export$fc3bf4634b488af8)({
11504
- mode: props.state.mode
11845
+ const getUserMediaMutation = (0, $d775b8f941514ed9$export$d791e41b9a4de1f2)({
11846
+ audio: true
11505
11847
  });
11848
+ const [state, setState] = (0, $3Sbms$useState)("base");
11849
+ (0, $3Sbms$useEffect)(()=>{
11850
+ if (recorderState.mode !== "video") recorderState.setMode("video");
11851
+ }, [
11852
+ recorderState
11853
+ ]);
11854
+ const screenshareDisabled = (0, $3Sbms$useCallback)(()=>{
11855
+ recorderState.assetsPopupState.setOpen(true);
11856
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).stopRecord();
11857
+ setState("base");
11858
+ }, [
11859
+ recorderState
11860
+ ]);
11861
+ (0, $3Sbms$useEffect)(()=>{
11862
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareDisabled", screenshareDisabled);
11863
+ return ()=>{
11864
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareDisabled", screenshareDisabled);
11865
+ };
11866
+ }, [
11867
+ screenshareDisabled
11868
+ ]);
11869
+ (0, $3Sbms$useEffect)(()=>{
11870
+ const onStopRecord = ()=>{
11871
+ recorderState.assetsPopupState.setOpen(true);
11872
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).disableScreenshare();
11873
+ setState("base");
11874
+ };
11875
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("recordStopped", onStopRecord);
11876
+ return ()=>{
11877
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("recordStopped", onStopRecord);
11878
+ };
11879
+ }, [
11880
+ recorderState.assetsPopupState
11881
+ ]);
11506
11882
  return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11507
- className: "flex flex-col bg-primary h-[150px] w-full max-w-[500px] rounded-[15px] p-2.5 gap-2.5",
11883
+ className: "w-full h-full bg-black flex flex-col items-center justify-center py-[125px]",
11508
11884
  children: [
11509
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $d48329960b5b412c$export$bee10e8ab511933f), {
11510
- state: setupModalsState
11511
- }),
11512
- /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11513
- className: "flex flex-1 flex-row px-[10px] w-full",
11885
+ state !== "live" && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11886
+ className: "relative bg-cover box-border rounded-[8px] w-full h-full max-w-[1116px] bg-[url('https://cdn.snapcall.io/img/assist/gradient-bg.jpg')] flex flex-col items-center justify-center ",
11514
11887
  children: [
11888
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ad3ba5899eb05ecf$export$f361d4ae234b90f4), {}),
11515
11889
  /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11516
- className: "flex flex-row flex-auto items-center gap-[10px]",
11517
- children: [
11518
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a1ac29d50bdaa837$export$3741e4ac43f04ca2), {}),
11519
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11520
- className: " text-white text-base font-medium",
11521
- children: "SnapCall"
11522
- })
11523
- ]
11524
- }),
11525
- /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11526
- className: "flex flex-row justify-end flex-auto items-center gap-[10px] ",
11890
+ className: "absolute w-[486px] bottom-[-85px] left-[calc(50%-243px)] flex flex-col gap-[7px] items-center justify-center",
11527
11891
  children: [
11528
- props.state.mode !== "screen" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11529
- children: [
11530
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5a48b7481979330f$export$d2b052e7b4be1756), {
11531
- onPress: ()=>{
11532
- if (!props.state.streaming) {
11533
- props.state.setMode("photo");
11534
- setupModalsState.modalState.open();
11535
- }
11892
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f3d9f6a4bbe7f552$export$4e594bceac139abd), {
11893
+ state: state,
11894
+ onCapturePress: ()=>{
11895
+ setState("request");
11896
+ recorderState.setStreaming(true);
11897
+ getUserMediaMutation.mutate(undefined, {
11898
+ onError: ()=>{
11899
+ recorderState.permissionBlockedModalState.setOpen(true);
11536
11900
  },
11537
- isSelected: props.state.mode === "photo",
11538
- children: t("misc.photo")
11539
- }),
11540
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5a48b7481979330f$export$d2b052e7b4be1756), {
11541
- onPress: ()=>{
11542
- if (!props.state.streaming) {
11543
- props.state.setMode("video");
11544
- setupModalsState.modalState.open();
11901
+ onSuccess: async ()=>{
11902
+ try {
11903
+ const { deviceState: deviceState } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).getState();
11904
+ getUserMediaMutation.reset();
11905
+ if (!deviceState.microphone.enabled) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
11906
+ await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableScreenshare({
11907
+ audioTransportOption: "mix"
11908
+ });
11909
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).startRecord().then(()=>{
11910
+ setTimeout(()=>{
11911
+ if (videoElementRef.current) recorderState.captureThumbnail(videoElementRef.current);
11912
+ }, 1000);
11913
+ });
11914
+ setState("live");
11915
+ recorderState.setStartRecordTime(Date.now());
11916
+ } catch (err) {
11917
+ console.log(err);
11918
+ recorderState.permissionBlockedModalState.setOpen(true);
11545
11919
  }
11546
- },
11547
- isSelected: props.state.mode === "video",
11548
- children: t("misc.video")
11549
- })
11550
- ]
11920
+ }
11921
+ });
11922
+ }
11551
11923
  }),
11552
- props.state.mode === "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5a48b7481979330f$export$d2b052e7b4be1756), {
11553
- onPress: ()=>{
11554
- if (!props.state.streaming) {
11555
- props.state.setMode("screen");
11556
- setupModalsState.modalState.open();
11557
- }
11558
- },
11559
- isSelected: props.state.mode === "screen",
11560
- children: t("misc.screen")
11924
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11925
+ className: "text-white text-center font-small text-sm overflow-visible",
11926
+ children: t("recorder.limit")
11561
11927
  })
11562
11928
  ]
11563
11929
  })
11564
11930
  ]
11565
11931
  }),
11566
11932
  /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11567
- className: "flex flex-row flex-1 items-center justify-between w-full ",
11933
+ className: (0, $3Sbms$classnames)("relative", {
11934
+ "w-0 h-0": state !== "live",
11935
+ "min-w-[200px] max-h-[100%]": state === "live"
11936
+ }),
11568
11937
  children: [
11569
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11570
- className: "w-[60px] h-[60px]",
11571
- children: props.thumbnail
11572
- }),
11573
- props.state.mode === "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $39932392769664d0$export$4e594bceac139abd), {
11574
- ...props
11575
- }),
11576
- props.state.mode !== "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $39932392769664d0$export$f9da3144ae2525a3), {
11577
- ...props
11938
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7dc8075008cdffc1$export$8c410456846722ea), {
11939
+ ref: videoElementRef
11578
11940
  }),
11579
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11580
- onClick: props.onSwitch,
11581
- className: (0, $3Sbms$classnames)("rounded-full w-[56px] h-[56px] flex items-center justify-center", {
11582
- "bg-[#565656] cursor-pointer": props.state.mode !== "screen"
11583
- }),
11584
- children: props.state.mode !== "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $58d405d56c1abe95$export$aefffb14595958fe), {})
11941
+ state === "live" && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11942
+ className: "absolute w-[86px] h-[86px] bottom-[-65px] left-[calc(50%-43px)]",
11943
+ children: [
11944
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f3d9f6a4bbe7f552$export$4e594bceac139abd), {
11945
+ onCapturePress: ()=>{
11946
+ recorderState.setAssetLoading(true);
11947
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).disableScreenshare();
11948
+ },
11949
+ state: state
11950
+ }),
11951
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("span", {
11952
+ className: "text-white font-small text-sm text-center pt-[14px]",
11953
+ children: [
11954
+ (0, $1e6ffcfc059a8789$export$cc010f6d61e5dce8)(recorderState.timer),
11955
+ " / 05:00"
11956
+ ]
11957
+ })
11958
+ ]
11585
11959
  })
11586
11960
  ]
11587
11961
  })
@@ -11595,6 +11969,39 @@ const $a94f21ef9007b90a$export$11a6fe490bbc4873 = (props)=>{
11595
11969
 
11596
11970
 
11597
11971
 
11972
+ const $99a415196205cb06$export$c31ece446899894 = ({ state: state })=>{
11973
+ const { t: t } = (0, $3Sbms$useTranslation)();
11974
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4381ee6dfabb36f4$export$2b77a92f1a5ad772), {
11975
+ title: t("recorder.permissionDeniedTitle"),
11976
+ state: state,
11977
+ centered: false,
11978
+ isDismissable: false,
11979
+ primaryAction: ()=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
11980
+ variant: "blue",
11981
+ fullWidth: true,
11982
+ onPress: ()=>window.location.reload(),
11983
+ children: t("recorder.allowAccess")
11984
+ }),
11985
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11986
+ className: "flex flex-col gap-[20px]",
11987
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11988
+ className: "flex flex-col gap-[10px]",
11989
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11990
+ className: "w-full text-base text-primaryLight font-normal leading-[20px]",
11991
+ children: t("recorder.permissionDeniedDescription")
11992
+ })
11993
+ })
11994
+ })
11995
+ });
11996
+ };
11997
+
11998
+
11999
+
12000
+
12001
+
12002
+
12003
+
12004
+
11598
12005
 
11599
12006
 
11600
12007
 
@@ -11602,7 +12009,7 @@ const $a94f21ef9007b90a$export$11a6fe490bbc4873 = (props)=>{
11602
12009
 
11603
12010
 
11604
12011
 
11605
- function $38cdd553fb158eaa$export$4589ed81930b555c(props) {
12012
+ function $7f25a3e9cee224b0$export$4589ed81930b555c(props) {
11606
12013
  const { children: children , state: state } = props;
11607
12014
  const ref = (0, $3Sbms$react).useRef(null);
11608
12015
  const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
@@ -11610,7 +12017,7 @@ function $38cdd553fb158eaa$export$4589ed81930b555c(props) {
11610
12017
  const [exited, setExited] = (0, $3Sbms$useState)(!state.isOpen);
11611
12018
  const viewport = (0, $3Sbms$useViewportSize)();
11612
12019
  const maxHeight = viewport.height - 64;
11613
- const desktop = orientation === "landscape";
12020
+ const [desktop] = (0, $3Sbms$useState)(orientation === "landscape");
11614
12021
  // Don't render anything if the modal is not open and we're not animating out.
11615
12022
  if (!(state.isOpen || !exited)) return null;
11616
12023
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Overlay1), {
@@ -11629,7 +12036,7 @@ function $38cdd553fb158eaa$export$4589ed81930b555c(props) {
11629
12036
  exit: "opacity-0 transition ease-out"
11630
12037
  },
11631
12038
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11632
- className: (0, $3Sbms$classnames)("fixed z-[100] inset-0 bg-underlay flex justify-center inter", desktop ? "items-center" : "items-end"),
12039
+ className: (0, $3Sbms$classnames)("fixed z-[100] inset-0 bg-underlay flex justify-center inter", desktop ? "items-center" : "items-end h-full"),
11633
12040
  ...underlayProps,
11634
12041
  children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$CSSTransition), {
11635
12042
  in: state.isOpen,
@@ -11671,49 +12078,6 @@ function $38cdd553fb158eaa$export$4589ed81930b555c(props) {
11671
12078
 
11672
12079
 
11673
12080
 
11674
- const $4425c0dfad3f82bb$export$480db61f4dcd7727 = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
11675
- width: "12",
11676
- height: "15",
11677
- viewBox: "0 0 12 15",
11678
- fill: "none",
11679
- xmlns: "http://www.w3.org/2000/svg",
11680
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
11681
- d: "M11.103 5.747 2.677.272A1.614 1.614 0 0 0 1.773 0a1.62 1.62 0 0 0-.9.288 1.886 1.886 0 0 0-.64.733A2.235 2.235 0 0 0 0 2.025v10.95c0 .352.08.699.233 1.004.154.305.375.558.64.733.273.186.584.285.9.288.317.003.63-.091.904-.272l8.426-5.475c.272-.173.498-.427.656-.736.158-.308.241-.66.241-1.017a2.24 2.24 0 0 0-.24-1.017 1.884 1.884 0 0 0-.657-.736Z",
11682
- fill: "#fff"
11683
- })
11684
- });
11685
-
11686
-
11687
- const $c7542aa0d9bb5f39$export$1cd1efc78cb52ca5 = ({ asset: asset , onClick: onClick })=>{
11688
- if (!asset) return null;
11689
- return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11690
- className: "flex items-center justify-center w-[60px] h-[60px] rounded-[8px] cursor-pointer bg-white relative overflow-hidden",
11691
- onClick: onClick,
11692
- children: [
11693
- asset?.type === "picture" && /*#__PURE__*/ (0, $3Sbms$jsx)("img", {
11694
- className: "cursor-pointer bg-white",
11695
- src: asset.objectUrl,
11696
- alt: "last shot"
11697
- }),
11698
- asset?.type === "video" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11699
- children: [
11700
- /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11701
- src: asset.objectUrl,
11702
- className: "min-w-[100%] min-h-[100%] object-cover"
11703
- }),
11704
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11705
- className: "absolute left-0 top-0 flex items-center justify-center w-[60px] h-[60px] bg-primary opacity-50",
11706
- children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4425c0dfad3f82bb$export$480db61f4dcd7727), {})
11707
- })
11708
- ]
11709
- })
11710
- ]
11711
- });
11712
- };
11713
-
11714
-
11715
-
11716
-
11717
12081
  const $a879d6bc7f43b0c5$export$28e1ba20e0688eb7 = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
11718
12082
  width: "18",
11719
12083
  height: "19",
@@ -11730,40 +12094,30 @@ const $a879d6bc7f43b0c5$export$28e1ba20e0688eb7 = ()=>/*#__PURE__*/ (0, $3Sbms$j
11730
12094
 
11731
12095
 
11732
12096
 
11733
- const $a4b1c68ef470f35c$export$f56b3b5841ad32ae = ({ asset: asset , state: state })=>{
11734
- return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $91e337bf8187124b$export$a703eb468fcf7e69), {
12097
+ const $c22caa553a50352e$export$f56b3b5841ad32ae = ({ asset: asset , state: state })=>{
12098
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $08835f3b5a72d418$export$a703eb468fcf7e69), {
11735
12099
  state: state,
11736
12100
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11737
- className: "flex flex-col items-center w-screen h-screen p-[15px] gap-[10px]",
12101
+ className: "flex flex-col items-center justify-center w-screen h-screen p-[15px] gap-[10px]",
11738
12102
  children: [
11739
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11740
- className: "flex items-center max-w-[400px] w-full h-full",
11741
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11742
- className: "min-w-full rounded-[10px] overflow-hidden",
11743
- children: [
11744
- asset.type === "picture" && /*#__PURE__*/ (0, $3Sbms$jsx)("img", {
11745
- src: asset.objectUrl,
11746
- alt: `Asset-${asset.assetId}`,
11747
- className: "object-fill"
11748
- }),
11749
- asset.type === "video" && /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11750
- src: asset.objectUrl,
11751
- playsInline: true,
11752
- autoPlay: true,
11753
- controls: true
11754
- })
11755
- ]
11756
- })
12103
+ asset.type === "photo" && /*#__PURE__*/ (0, $3Sbms$jsx)("img", {
12104
+ src: asset.objectUrl,
12105
+ alt: `Asset-${asset.assetId}`,
12106
+ className: "flex-1 object-cover rounded-[10px] max-h-[90%] max-w-[90%] mb-[9px]"
12107
+ }),
12108
+ asset.type === "video" && /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
12109
+ src: asset.objectUrl,
12110
+ playsInline: true,
12111
+ autoPlay: true,
12112
+ controls: true,
12113
+ className: "flex-1 rounded-[10px] min-w-full max-h-[90%] max-w-[90%] pb-[9px]"
11757
12114
  }),
11758
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11759
- className: "max-w-[135px] w-1/3",
11760
- children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11761
- onPress: state.close,
11762
- variant: "tertiary",
11763
- size: "large",
11764
- fullWidth: true,
11765
- children: "Close"
11766
- })
12115
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
12116
+ onPress: state.close,
12117
+ variant: "tertiary",
12118
+ size: "large",
12119
+ className: "w-[135px]",
12120
+ children: "Close"
11767
12121
  })
11768
12122
  ]
11769
12123
  })
@@ -11771,20 +12125,23 @@ const $a4b1c68ef470f35c$export$f56b3b5841ad32ae = ({ asset: asset , state: state
11771
12125
  };
11772
12126
 
11773
12127
 
11774
- const $77fb06ba253d6f7c$export$c9169049516d8bcf = ({ asset: asset , index: index , removeAsset: removeAsset })=>{
12128
+
12129
+ const $fb723e1b00f53002$export$c9169049516d8bcf = ({ asset: asset , index: index , removeAsset: removeAsset })=>{
11775
12130
  const { t: t } = (0, $3Sbms$useTranslation)();
11776
12131
  const confirmRemovalModalState = (0, $3Sbms$useOverlayTriggerState)({});
11777
12132
  const previewAssetModalProps = (0, $3Sbms$useOverlayTriggerState)({});
11778
12133
  return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11779
- className: "flex flex-row justify-between items-center",
12134
+ className: "flex flex-row justify-between items-center ",
11780
12135
  children: [
11781
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
12136
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4381ee6dfabb36f4$export$2b77a92f1a5ad772), {
11782
12137
  title: t("recorder.confirmRemovalTitle"),
11783
12138
  state: confirmRemovalModalState,
11784
12139
  description: t("recorder.confirmRemovalDescription"),
11785
- primaryAction: ({ close: close })=>/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
12140
+ primaryAction: ({ close: close })=>/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
12141
+ fullWidth: true,
12142
+ variant: "blue",
11786
12143
  onPress: async ()=>{
11787
- await removeAsset(asset);
12144
+ await removeAsset?.(asset);
11788
12145
  close();
11789
12146
  },
11790
12147
  children: [
@@ -11792,16 +12149,20 @@ const $77fb06ba253d6f7c$export$c9169049516d8bcf = ({ asset: asset , index: index
11792
12149
  t("misc.confirm")
11793
12150
  ]
11794
12151
  }),
11795
- secondaryAction: t("misc.cancel")
12152
+ secondaryAction: ({ close: close })=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
12153
+ fullWidth: true,
12154
+ variant: "tertiary",
12155
+ children: t("misc.cancel")
12156
+ })
11796
12157
  }),
11797
12158
  /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11798
- className: "flex flex-row gap-[10px] items-center",
12159
+ className: "flex flex-row gap-[10px] items-center justify-between",
11799
12160
  children: [
11800
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a4b1c68ef470f35c$export$f56b3b5841ad32ae), {
12161
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c22caa553a50352e$export$f56b3b5841ad32ae), {
11801
12162
  state: previewAssetModalProps,
11802
12163
  asset: asset
11803
12164
  }),
11804
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c7542aa0d9bb5f39$export$1cd1efc78cb52ca5), {
12165
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7227f0300555e42c$export$1cd1efc78cb52ca5), {
11805
12166
  asset: asset,
11806
12167
  onClick: previewAssetModalProps.open
11807
12168
  }),
@@ -11811,17 +12172,17 @@ const $77fb06ba253d6f7c$export$c9169049516d8bcf = ({ asset: asset , index: index
11811
12172
  hyphens: "manual"
11812
12173
  },
11813
12174
  children: [
11814
- asset.type === "picture" ? t("misc.photo") : t("misc.video"),
12175
+ asset.type === "photo" ? t("misc.photo") : t("misc.video"),
11815
12176
  " ",
11816
12177
  index + 1,
11817
12178
  " \xb7",
11818
12179
  " ",
11819
- (0, $92672d57809ea9d3$export$3ae94a2503e890a1)(new Date(asset.timestamp))
12180
+ (0, $1e6ffcfc059a8789$export$3ae94a2503e890a1)(new Date(asset.timestamp))
11820
12181
  ]
11821
12182
  })
11822
12183
  ]
11823
12184
  }),
11824
- /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
12185
+ removeAsset && /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11825
12186
  className: "text-xs font-bold underline cursor-pointer ml-[10px]",
11826
12187
  onClick: confirmRemovalModalState.open,
11827
12188
  children: t("misc.remove")
@@ -11833,7 +12194,7 @@ const $77fb06ba253d6f7c$export$c9169049516d8bcf = ({ asset: asset , index: index
11833
12194
 
11834
12195
 
11835
12196
 
11836
- const $7436fc0a14c16764$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12197
+ const $6749624e70bad8a6$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11837
12198
  className: "w-screen max-w-[400px] h-[235px] px-[20px] py-[25px] gap-[10px]",
11838
12199
  children: [
11839
12200
  /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
@@ -11841,7 +12202,7 @@ const $7436fc0a14c16764$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$j
11841
12202
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$reactcontentloader), {
11842
12203
  width: 360,
11843
12204
  height: 93,
11844
- foregroundColor: "#EBEBEB",
12205
+ foregroundColor: "#C7DEFF",
11845
12206
  children: [
11846
12207
  /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
11847
12208
  x: 0,
@@ -11871,11 +12232,11 @@ const $7436fc0a14c16764$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$j
11871
12232
  })
11872
12233
  }),
11873
12234
  /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11874
- className: "flex items-center justify-center w-full h-[40px] rounded-[8px] border border-primaryLight mt-[10px]",
12235
+ className: "flex items-center justify-center w-full h-[40px] rounded-[8px] bg-[#F7F7F7] mt-[10px]",
11875
12236
  children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$reactcontentloader), {
11876
12237
  width: 120,
11877
12238
  height: 14,
11878
- foregroundColor: "#EBEBEB",
12239
+ foregroundColor: "#C7DEFF",
11879
12240
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
11880
12241
  x: 0,
11881
12242
  y: 0,
@@ -11887,11 +12248,11 @@ const $7436fc0a14c16764$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$j
11887
12248
  })
11888
12249
  }),
11889
12250
  /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11890
- className: "flex items-center justify-center w-full h-[40px] rounded-[8px] bg-primary mt-[10px]",
12251
+ className: "flex items-center justify-center w-full h-[40px] rounded-[8px] bg-[#C7DEFF] mt-[10px]",
11891
12252
  children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$reactcontentloader), {
11892
12253
  width: 120,
11893
12254
  height: 14,
11894
- foregroundColor: "#EBEBEB",
12255
+ foregroundColor: "#C7DEFF",
11895
12256
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
11896
12257
  x: 0,
11897
12258
  y: 0,
@@ -11906,35 +12267,28 @@ const $7436fc0a14c16764$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$j
11906
12267
  });
11907
12268
 
11908
12269
 
11909
- const $d4d374dc7955cc18$export$5c334f209b1aa661 = ({ assets: assets , state: state , onSendAssets: onSendAssets , removeAsset: removeAsset , loading: loading })=>{
12270
+ const $ec9697affdd50464$export$5c334f209b1aa661 = ({ assets: assets , state: state , onSendAssets: onSendAssets , removeAsset: removeAsset , loading: loading , recorderState: recorderState })=>{
11910
12271
  const { t: t } = (0, $3Sbms$useTranslation)();
11911
- const ref = (0, $3Sbms$useRef)(null);
11912
- const [assetKind, setAssetKind] = (0, $3Sbms$useState)(assets[assets.length - 1]?.type === "picture" ? "photo" : "video");
11913
12272
  const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11914
- const desktop = orientation === "landscape";
11915
- (0, $3Sbms$useEffect)(()=>{
11916
- if (assets.length < 1) return;
11917
- setAssetKind(assets[assets.length - 1]?.type === "picture" ? "photo" : "video");
11918
- }, [
11919
- assets
11920
- ]);
11921
- return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11922
- children: [
11923
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$CSSTransition), {
11924
- in: state.isOpen,
11925
- appear: true,
11926
- timeout: {
11927
- enter: 0,
11928
- exit: 300
11929
- },
11930
- classNames: {
11931
- enter: "opacity-0",
11932
- enterDone: "opacity-90 transition ease-in",
11933
- exit: "opacity-0 transition ease-out"
11934
- },
11935
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11936
- className: (0, $3Sbms$classnames)("fixed justify-center w-screen h-screen top-0 left-0 bg-black z-[1]", state.isOpen ? "flex" : "hidden"),
11937
- children: loading && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12273
+ const [desktop] = (0, $3Sbms$useState)(orientation === "landscape");
12274
+ const mode = recorderState.mode;
12275
+ const assetTitle = mode === "photo" ? t("misc.photo") : t("misc.video");
12276
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
12277
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$CSSTransition), {
12278
+ in: state.isOpen,
12279
+ timeout: {
12280
+ enter: 0,
12281
+ exit: 300
12282
+ },
12283
+ classNames: {
12284
+ enter: "opacity-0",
12285
+ enterDone: "opacity-90 transition ease-in",
12286
+ exit: "opacity-0 transition ease-out"
12287
+ },
12288
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12289
+ className: (0, $3Sbms$classnames)("fixed justify-center w-screen h-screen top-0 left-0 bg-black z-[1]", state.isOpen ? "flex" : "hidden"),
12290
+ children: [
12291
+ loading && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11938
12292
  className: (0, $3Sbms$classnames)("flex mt-[50px] h-fit opacity-1", desktop ? "flex-row items-center w-[450px]" : "flex-col items-center text-center w-[320px]"),
11939
12293
  children: [
11940
12294
  /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
@@ -11945,74 +12299,75 @@ const $d4d374dc7955cc18$export$5c334f209b1aa661 = ({ assets: assets , state: sta
11945
12299
  className: "text-sm text-white",
11946
12300
  children: [
11947
12301
  t("recorder.elementBeingProcessed", {
11948
- type: loading === "picture" ? t("misc.photo").toLocaleLowerCase() : t("misc.video").toLocaleLowerCase()
12302
+ type: assetTitle.toLocaleLowerCase()
11949
12303
  }),
11950
- loading === "video" && t("recorder.waitVideo")
12304
+ " ",
12305
+ mode === "video" && t("recorder.waitVideo")
11951
12306
  ]
11952
12307
  })
11953
12308
  ]
11954
- })
11955
- })
11956
- }),
11957
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $38cdd553fb158eaa$export$4589ed81930b555c), {
11958
- state: {
11959
- ...state,
11960
- close: loading ? ()=>{} : state.close
11961
- },
11962
- children: loading ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7436fc0a14c16764$export$4fa52f68b1c78fbf), {}) : /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11963
- ref: ref,
11964
- className: "flex flex-col w-screen max-w-[400px] text-primary",
11965
- children: [
11966
- /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11967
- className: "flex flex-row justify-between p-[12px]",
11968
- children: [
11969
- /*#__PURE__*/ (0, $3Sbms$jsx)("h1", {
11970
- className: "text-lg first-letter:capitalize",
11971
- children: t("recorder.elementCaptureSuccess", {
11972
- type: t(`misc.${assetKind}`)
11973
- })
11974
- }),
11975
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11976
- className: "flex justify-center items-center rounded-full bg-[#f3f3f3] h-[30px] w-[30px] cursor-pointer",
11977
- onClick: state.close,
11978
- children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57ab7b9a012d9acd$export$2e2bcd8739ae039), {
11979
- color: "#565656"
11980
- })
11981
- })
11982
- ]
11983
- }),
11984
- /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11985
- className: "flex flex-col px-[20px] pb-[25px] gap-[10px]",
12309
+ }),
12310
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7f25a3e9cee224b0$export$4589ed81930b555c), {
12311
+ state: {
12312
+ ...state,
12313
+ close: loading ? ()=>{} : state.close
12314
+ },
12315
+ children: loading ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6749624e70bad8a6$export$4fa52f68b1c78fbf), {}) : /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12316
+ className: "flex flex-col max-w-[400px] text-primary",
11986
12317
  children: [
11987
- assets.map((asset, index)=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $77fb06ba253d6f7c$export$c9169049516d8bcf), {
11988
- asset: asset,
11989
- index: index,
11990
- removeAsset: removeAsset
11991
- }, asset.assetId)),
11992
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11993
- variant: "secondary",
11994
- onPress: state.close,
11995
- children: t("recorder.takeNewElement", {
11996
- type: t(`misc.${assetKind}`).toLocaleLowerCase()
11997
- })
12318
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12319
+ className: "flex flex-row justify-between p-[12px]",
12320
+ children: [
12321
+ /*#__PURE__*/ (0, $3Sbms$jsx)("h1", {
12322
+ className: "text-lg first-letter:capitalize",
12323
+ children: t("recorder.elementCaptureSuccess", {
12324
+ type: assetTitle
12325
+ })
12326
+ }),
12327
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12328
+ className: "flex justify-center items-center rounded-full bg-[#f3f3f3] h-[30px] w-[30px] cursor-pointer",
12329
+ onClick: state.close,
12330
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57ab7b9a012d9acd$export$2e2bcd8739ae039), {
12331
+ color: "#565656"
12332
+ })
12333
+ })
12334
+ ]
11998
12335
  }),
11999
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
12000
- onPress: ()=>{
12001
- onSendAssets();
12002
- state.close();
12003
- },
12004
- children: assets.length > 1 ? t("recorder.sendElements", {
12005
- count: assets.length
12006
- }) : t("recorder.sendElement", {
12007
- type: t(`misc.${assetKind}`).toLocaleLowerCase()
12008
- })
12336
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12337
+ className: "flex flex-col px-[20px] pb-[25px] gap-[10px]",
12338
+ children: [
12339
+ assets.map((asset, index)=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $fb723e1b00f53002$export$c9169049516d8bcf), {
12340
+ asset: asset,
12341
+ index: index,
12342
+ removeAsset: removeAsset
12343
+ }, asset.assetId)),
12344
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
12345
+ variant: "tertiary",
12346
+ onPress: state.close,
12347
+ children: t("recorder.takeNewElement", {
12348
+ type: assetTitle.toLocaleLowerCase()
12349
+ })
12350
+ }),
12351
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a6ff3d37cbdeb3a3$export$353f5b6fc5456de1), {
12352
+ variant: "blue",
12353
+ onPress: ()=>{
12354
+ onSendAssets();
12355
+ state.close();
12356
+ },
12357
+ children: assets.length > 1 ? t("recorder.sendElements", {
12358
+ count: assets.length
12359
+ }) : t("recorder.sendElement", {
12360
+ type: assetTitle.toLocaleLowerCase()
12361
+ })
12362
+ })
12363
+ ]
12009
12364
  })
12010
12365
  ]
12011
12366
  })
12012
- ]
12013
- })
12367
+ })
12368
+ ]
12014
12369
  })
12015
- ]
12370
+ })
12016
12371
  });
12017
12372
  };
12018
12373
 
@@ -12021,118 +12376,35 @@ const $d4d374dc7955cc18$export$5c334f209b1aa661 = ({ assets: assets , state: sta
12021
12376
 
12022
12377
 
12023
12378
 
12024
-
12025
- const $db82628e5503d51b$export$53819c0e58f98d49 = (props)=>{
12026
- const [countdown, setCountdown] = (0, $3Sbms$useState)(props.initialValue);
12027
- (0, $3Sbms$useEffect)(()=>{
12028
- if (countdown === undefined) return;
12029
- const t = setTimeout(()=>{
12030
- if (countdown === 1) props.onFinish();
12031
- setCountdown(countdown - 1);
12032
- }, 1000);
12033
- return ()=>clearTimeout(t);
12034
- }, [
12035
- countdown,
12036
- props
12037
- ]);
12038
- return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12039
- className: "absolute w-full h-full flex justify-center items-center bg-black/[.6] z-50",
12040
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
12041
- className: "text-white/80 text-[112px] font-medium",
12042
- children: countdown
12043
- })
12379
+ const $a8756e233448261f$export$3646917cb6200e2e = ({ state: state , assets: assets })=>{
12380
+ const { t: t } = (0, $3Sbms$useTranslation)();
12381
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $4381ee6dfabb36f4$export$2b77a92f1a5ad772), {
12382
+ title: t("recorder.submissionTitle"),
12383
+ state: state,
12384
+ isDismissable: false,
12385
+ children: [
12386
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
12387
+ className: "text-base text-primaryLight",
12388
+ children: t("recorder.submissionDescription")
12389
+ }),
12390
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12391
+ className: "flex flex-col gap-[20px] border-t border-secondaryVLight pt-[20px]",
12392
+ children: assets.map((asset, index)=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $fb723e1b00f53002$export$c9169049516d8bcf), {
12393
+ asset: asset,
12394
+ index: index,
12395
+ removeAsset: undefined
12396
+ }, asset.assetId))
12397
+ })
12398
+ ]
12044
12399
  });
12045
12400
  };
12046
12401
 
12047
12402
 
12048
-
12049
- const $92672d57809ea9d3$var$timerText = (delta)=>{
12050
- const d = [
12051
- Math.floor(delta / 60),
12052
- Math.round(delta % 60)
12053
- ].map((n)=>`${n < 10 ? "0" : ""}${n}`);
12054
- return d.join(":");
12055
- };
12056
- const $92672d57809ea9d3$var$dateFormat = new Intl.DateTimeFormat("default", {
12057
- dateStyle: "short"
12058
- });
12059
- const $92672d57809ea9d3$var$timeFormat = new Intl.DateTimeFormat("default", {
12060
- hour: "numeric",
12061
- minute: "2-digit"
12062
- });
12063
- function $92672d57809ea9d3$export$3ae94a2503e890a1(date) {
12064
- return `${$92672d57809ea9d3$var$dateFormat.format(date)} at ${$92672d57809ea9d3$var$timeFormat.format(date)}`;
12065
- }
12066
- const $92672d57809ea9d3$export$336a011955157f9a = ()=>{
12067
- const { t: t } = (0, $3Sbms$useTranslation)();
12403
+ const $b76354b532370976$export$336a011955157f9a = ()=>{
12068
12404
  const { options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
12069
- const [startRecordTime, setStartRecordTime] = (0, $3Sbms$useState)(undefined);
12070
- const [timer, setTimer] = (0, $3Sbms$useState)(0);
12071
- const [countdownVisible, setCountdownVisible] = (0, $3Sbms$useState)(false);
12072
- const videoElementRef = (0, $3Sbms$useRef)(null);
12073
- const [assets, setAssets] = (0, $3Sbms$useState)([]);
12074
- const [assetLoading, setAssetLoading] = (0, $3Sbms$useState)(null);
12075
- const [isAssetsPopupStateOpen, setIsAssetsPopupStateOpen] = (0, $3Sbms$useState)(false);
12076
- const [facingMode, setFacingMode] = (0, $3Sbms$useState)("user");
12077
- const assetsPopupState = (0, $3Sbms$useOverlayTriggerState)({
12078
- isOpen: isAssetsPopupStateOpen,
12079
- onOpenChange: setIsAssetsPopupStateOpen
12080
- });
12081
- const sendAssetsModalState = (0, $3Sbms$useOverlayTriggerState)({});
12082
- const [flashAnimation, setFlashAnimation] = (0, $3Sbms$useState)(false);
12083
- const menuBarState = (0, $a94f21ef9007b90a$export$bd7b6af6aa16550c)({
12084
- state: options?.recorder?.defaultState || "photo"
12085
- });
12086
- const exitStreaming = (0, $3Sbms$useCallback)(()=>{
12087
- menuBarState.setStreaming(false);
12088
- setStartRecordTime(undefined);
12089
- setCountdownVisible(false);
12090
- setTimer(0);
12091
- }, [
12092
- menuBarState
12093
- ]);
12094
- const onLocalVideoChange = (event)=>{
12095
- if (!event.detail?.camera?.device || !videoElementRef.current) return;
12096
- const { facingMode: newFacingMode } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestLocalVideo(videoElementRef?.current);
12097
- setFacingMode(newFacingMode);
12098
- };
12099
- const onScreenshareEnabled = (event)=>{
12100
- if (!videoElementRef.current) return;
12101
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestLocalScreenshare(videoElementRef.current);
12102
- };
12103
- const onStopRecord = (0, $3Sbms$useCallback)((event)=>{
12104
- const { url: url , assetId: assetId } = event.detail;
12105
- exitStreaming();
12106
- setAssetLoading(null);
12107
- setAssets([
12108
- ...assets,
12109
- {
12110
- type: "video",
12111
- timestamp: Date.now(),
12112
- objectUrl: url,
12113
- assetId: assetId
12114
- }
12115
- ]);
12116
- }, [
12117
- assets,
12118
- exitStreaming
12119
- ]);
12120
- const onPhotoCapture = async (videoElement)=>{
12121
- const timestamp = Date.now();
12122
- setAssetLoading("picture");
12123
- const image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElement);
12124
- const { url: url , assetId: assetId } = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).saveCapture(image);
12125
- setAssetLoading(null);
12126
- setAssets([
12127
- ...assets,
12128
- {
12129
- type: "picture",
12130
- timestamp: timestamp,
12131
- objectUrl: url,
12132
- assetId: assetId
12133
- }
12134
- ]);
12135
- };
12405
+ const submitAssetsModalState = (0, $3Sbms$useOverlayTriggerState)({});
12406
+ const permissionBlockedModalState = (0, $3Sbms$useOverlayTriggerState)({});
12407
+ const [thumbnailURL, setLastThumbnailURL] = (0, $3Sbms$useState)(undefined);
12136
12408
  const captureThumbnail = async (videoElement)=>{
12137
12409
  let image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(undefined, {
12138
12410
  addPlayWatermark: true
@@ -12140,173 +12412,83 @@ const $92672d57809ea9d3$export$336a011955157f9a = ()=>{
12140
12412
  if (!image) image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElement, {
12141
12413
  addPlayWatermark: true
12142
12414
  });
12143
- await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).saveThumbnail(image);
12415
+ const { url: url } = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).saveThumbnail(image);
12416
+ setLastThumbnailURL(url);
12144
12417
  };
12418
+ const recorderState = (0, $448b01a7ea61a08a$export$c74cd098b7a410cb)({
12419
+ mode: options?.recorder?.defaultMode || "photo",
12420
+ requestedMedia: options?.recorder?.defaultMedia || "camera",
12421
+ permissionBlockedModalState: permissionBlockedModalState,
12422
+ captureThumbnail: captureThumbnail
12423
+ });
12145
12424
  const removeAsset = (0, $3Sbms$useCallback)(async (asset)=>{
12146
12425
  if (!asset.assetId) return;
12147
12426
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).deleteCapture(asset.assetId);
12148
- const newAssets = assets.filter((item)=>item.assetId !== asset.assetId);
12149
- setAssets(newAssets);
12150
- if (newAssets.length < 1) setIsAssetsPopupStateOpen(false);
12427
+ const newAssets = recorderState.assets.filter((item)=>item.assetId !== asset.assetId);
12428
+ recorderState.setAssets(newAssets);
12429
+ if (newAssets.length < 1) recorderState.assetsPopupState.close();
12151
12430
  }, [
12152
- assets
12431
+ recorderState
12153
12432
  ]);
12154
- (0, $3Sbms$useEffect)(()=>{
12155
- if (startRecordTime === undefined) return;
12156
- const interval = setInterval(()=>{
12157
- const delta = (Date.now() - startRecordTime) / 1000;
12158
- setTimer(delta);
12159
- }, 1000);
12160
- return ()=>clearInterval(interval);
12433
+ const exitStreaming = (0, $3Sbms$useCallback)(()=>{
12434
+ recorderState.setStreaming(false);
12435
+ recorderState.setStartRecordTime(undefined);
12436
+ }, [
12437
+ recorderState
12438
+ ]);
12439
+ const onStopRecord = (0, $3Sbms$useCallback)((event)=>{
12440
+ const { url: url , assetId: assetId } = event.detail;
12441
+ exitStreaming();
12442
+ recorderState.setAssetLoading(false);
12443
+ recorderState.setAssets([
12444
+ ...recorderState.assets,
12445
+ {
12446
+ type: "video",
12447
+ timestamp: Date.now(),
12448
+ objectUrl: url,
12449
+ assetId: assetId,
12450
+ thumbnailURL: thumbnailURL
12451
+ }
12452
+ ]);
12161
12453
  }, [
12162
- startRecordTime
12454
+ exitStreaming,
12455
+ recorderState,
12456
+ thumbnailURL
12163
12457
  ]);
12164
12458
  (0, $3Sbms$useEffect)(()=>{
12165
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoAvailable", onLocalVideoChange);
12166
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("screenshareEnabled", onScreenshareEnabled);
12167
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoChange", onLocalVideoChange);
12168
12459
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("recordStopped", onStopRecord);
12169
12460
  return ()=>{
12170
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoChange", onLocalVideoChange);
12171
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("screenshareEnabled", onScreenshareEnabled);
12172
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoAvailable", onLocalVideoChange);
12173
12461
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("recordStopped", onStopRecord);
12174
12462
  };
12175
12463
  }, [
12176
12464
  onStopRecord
12177
12465
  ]);
12178
12466
  return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12179
- className: (0, $3Sbms$classnames)("bg-[#000] w-full h-full justify-center flex flex-col antialiased inter", {
12180
- "bg-[url('https://cdn.snapcall.io/img/assist/gradient-bg.jpg')] bg-cover": menuBarState.mode === "screen"
12181
- }),
12467
+ className: "w-full h-full ",
12182
12468
  children: [
12183
- (menuBarState.mode === "video" || menuBarState.mode === "screen" && menuBarState.streaming) && /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12184
- className: "text-base text-white text-center font-medium pt-2.5",
12185
- children: $92672d57809ea9d3$var$timerText(timer)
12469
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $99a415196205cb06$export$c31ece446899894), {
12470
+ state: permissionBlockedModalState
12186
12471
  }),
12187
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12188
- className: "flex-1 min-h-0 p-2.5 ",
12189
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12190
- className: "relative w-full h-full rounded-[10px] ",
12191
- children: [
12192
- countdownVisible && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $db82628e5503d51b$export$53819c0e58f98d49), {
12193
- initialValue: 3,
12194
- onFinish: ()=>{
12195
- setCountdownVisible(false);
12196
- setStartRecordTime(Date.now());
12197
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).startRecord().then(()=>{
12198
- if (videoElementRef.current) captureThumbnail(videoElementRef.current);
12199
- });
12200
- }
12201
- }),
12202
- flashAnimation && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$2b501aee548bae06), {
12203
- onAnimationEnd: ()=>{
12204
- setFlashAnimation(false);
12205
- assetsPopupState.open();
12206
- }
12207
- }),
12208
- menuBarState.mode === "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12209
- className: "object-fit h-full",
12210
- children: /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
12211
- autoPlay: true,
12212
- muted: true,
12213
- playsInline: true,
12214
- ref: videoElementRef,
12215
- className: (0, $3Sbms$classnames)("w-full h-full rounded-[inherit]", {
12216
- "scale-x-[-1]": facingMode === "user" && menuBarState.mode !== "screen",
12217
- "max-w-[screen]": menuBarState.mode === "screen"
12218
- })
12219
- })
12220
- }),
12221
- menuBarState.mode !== "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
12222
- autoPlay: true,
12223
- muted: true,
12224
- playsInline: true,
12225
- ref: videoElementRef,
12226
- className: (0, $3Sbms$classnames)("w-full h-full object-cover rounded-[inherit]", {
12227
- "scale-x-[-1]": facingMode === "user"
12228
- })
12229
- })
12230
- ]
12231
- })
12472
+ recorderState.requestedMedia === "camera" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c9e5583d5dd9328d$export$5b8e641151f8011d), {
12473
+ recorderState: recorderState
12232
12474
  }),
12233
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12234
- className: "flex justify-center px-2.5 pb-2.5 z-10",
12235
- children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a94f21ef9007b90a$export$11a6fe490bbc4873), {
12236
- state: menuBarState,
12237
- thumbnail: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c7542aa0d9bb5f39$export$1cd1efc78cb52ca5), {
12238
- asset: assets[assets.length - 1],
12239
- onClick: assetsPopupState.open
12240
- }),
12241
- onSwitch: ()=>{
12242
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).rotateVideo();
12243
- },
12244
- onCapturePress: ()=>{
12245
- if (menuBarState.mode === "photo" && videoElementRef.current) {
12246
- onPhotoCapture(videoElementRef.current);
12247
- setFlashAnimation(true);
12248
- }
12249
- if (menuBarState.mode !== "photo" && !menuBarState.streaming) {
12250
- menuBarState.setStreaming(true);
12251
- setTimer(0);
12252
- setCountdownVisible(true);
12253
- }
12254
- if (menuBarState.mode !== "photo" && menuBarState.streaming) {
12255
- exitStreaming();
12256
- if (startRecordTime) {
12257
- (0, $c9e496369b59be7a$export$2f377c2162fd02b2).stopRecord();
12258
- setAssetLoading("video");
12259
- assetsPopupState.open();
12260
- }
12261
- }
12262
- }
12263
- })
12475
+ recorderState.requestedMedia === "screen" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a3830e399ecc7fc4$export$2d78fbe400238869), {
12476
+ recorderState: recorderState
12264
12477
  }),
12265
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $d4d374dc7955cc18$export$5c334f209b1aa661), {
12266
- assets: assets,
12267
- state: assetsPopupState,
12478
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $ec9697affdd50464$export$5c334f209b1aa661), {
12479
+ assets: recorderState.assets,
12480
+ state: recorderState.assetsPopupState,
12268
12481
  onSendAssets: ()=>{
12269
12482
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).release();
12270
- sendAssetsModalState.open();
12483
+ submitAssetsModalState.open();
12271
12484
  },
12272
12485
  removeAsset: removeAsset,
12273
- loading: assetLoading
12486
+ loading: recorderState.assetLoading,
12487
+ recorderState: recorderState
12274
12488
  }),
12275
- /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
12276
- title: t("recorder.submissionTitle"),
12277
- state: sendAssetsModalState,
12278
- isDismissable: false,
12279
- children: [
12280
- /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
12281
- className: "text-base text-primaryLight",
12282
- children: t("recorder.submissionDescription")
12283
- }),
12284
- /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
12285
- className: "flex flex-col gap-[20px] border-t border-secondaryVLight pt-[20px]",
12286
- children: assets.map((asset, index)=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
12287
- className: "flex flex-row items-center gap-[10px]",
12288
- children: [
12289
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c7542aa0d9bb5f39$export$1cd1efc78cb52ca5), {
12290
- asset: asset
12291
- }),
12292
- /*#__PURE__*/ (0, $3Sbms$jsxs)("span", {
12293
- className: "text-sm",
12294
- style: {
12295
- hyphens: "manual"
12296
- },
12297
- children: [
12298
- asset.type === "picture" ? "Photo" : "Video",
12299
- " ",
12300
- index + 1,
12301
- " \xb7",
12302
- " ",
12303
- $92672d57809ea9d3$export$3ae94a2503e890a1(new Date(asset.timestamp))
12304
- ]
12305
- })
12306
- ]
12307
- }))
12308
- })
12309
- ]
12489
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a8756e233448261f$export$3646917cb6200e2e), {
12490
+ state: submitAssetsModalState,
12491
+ assets: recorderState.assets
12310
12492
  })
12311
12493
  ]
12312
12494
  });
@@ -12379,15 +12561,17 @@ const $91d20ee7d2ade85c$export$669f6ea7d267feaf = ()=>{
12379
12561
  };
12380
12562
 
12381
12563
 
12564
+
12382
12565
  const $26ed036cbc17809a$var$currentTheme = (0, $52580db2e49cdd90$export$3bfd0d5209a8006a)();
12383
12566
  const $26ed036cbc17809a$var$currentLanguage = (0, $a3e657fb86ae23f3$export$604ba5624273df44)();
12567
+ const $26ed036cbc17809a$var$queryClient = new (0, $3Sbms$QueryClient)();
12384
12568
  let $26ed036cbc17809a$var$timestampCriticalError = -1;
12385
12569
  const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
12386
12570
  const [selfPeerId, setSelfPeerId] = (0, $3Sbms$useState)(undefined);
12387
12571
  const streamUIContainerRef = (0, $3Sbms$useRef)(null);
12388
12572
  const videosContainerRef = (0, $3Sbms$useRef)(null);
12389
12573
  const remoteTilesContainerRef = (0, $3Sbms$useRef)(null);
12390
- const [streamState, setStreamState] = (0, $3Sbms$useState)(options.recorder?.enabled ? "recorder" : "streaming");
12574
+ const [streamState, setStreamState] = (0, $3Sbms$useState)(options.recorder?.enabled ? "recorder" : "loading");
12391
12575
  const [isQuickConnectPopupVisible, setIsQuickConnectPopupVisible] = (0, $3Sbms$useState)(false);
12392
12576
  const [isSettingsMenuVisible, setIsSettingsMenuVisible] = (0, $3Sbms$useState)(false);
12393
12577
  const [isYoutubePopupVisible, setIsYoutubePopupVisible] = (0, $3Sbms$useState)(false);
@@ -12398,7 +12582,6 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
12398
12582
  const [profile, setProfile] = (0, $3Sbms$useState)({});
12399
12583
  const [muted, setMuted] = (0, $3Sbms$useState)(true);
12400
12584
  const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
12401
- const [isLoading, setLoading] = (0, $3Sbms$useState)(!options.recorder?.enabled);
12402
12585
  const [screensharing, setScreensharing] = (0, $3Sbms$useState)(false);
12403
12586
  const [isAgent, setIsAgent] = (0, $3Sbms$useState)(false);
12404
12587
  const [userInteractionTriggered, setUserInteractionTriggered] = (0, $3Sbms$useState)(false);
@@ -12546,7 +12729,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
12546
12729
  setBlockedDevicesPopupOpen(true);
12547
12730
  console.error("User interaction trigger failed", userInteractionError);
12548
12731
  } finally{
12549
- setLoading(false);
12732
+ setStreamState("streaming");
12550
12733
  }
12551
12734
  };
12552
12735
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("enterRoom", onEnterRoom);
@@ -12556,73 +12739,76 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
12556
12739
  }, [
12557
12740
  options
12558
12741
  ]);
12559
- return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039).Provider, {
12560
- value: {
12561
- plan: plan,
12562
- permissions: permissions,
12563
- selfPeerId: selfPeerId,
12564
- streamUIContainerRef: streamUIContainerRef,
12565
- videosContainerRef: videosContainerRef,
12566
- remoteTilesContainerRef: remoteTilesContainerRef,
12567
- streamState: streamState,
12568
- setStreamState: setStreamState,
12569
- isQuickConnectPopupVisible: isQuickConnectPopupVisible,
12570
- setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible,
12571
- isSettingsMenuVisible: isSettingsMenuVisible,
12572
- setIsSettingsMenuVisible: setIsSettingsMenuVisible,
12573
- isYoutubePopupVisible: isYoutubePopupVisible,
12574
- setIsYoutubePopupVisible: setIsYoutubePopupVisible,
12575
- isLinksharePopupVisible: isLinksharePopupVisible,
12576
- setIsLinksharePopupVisible: setIsLinksharePopupVisible,
12577
- isVirtualBackgroundPopupVisible: isVirtualBackgroundPopupVisible,
12578
- setIsVirtualBackgroundPopupVisible: setIsVirtualBackgroundPopupVisible,
12579
- isBlockedFeaturePopupOpen: isBlockedFeaturePopupOpen,
12580
- setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen,
12581
- theme: theme,
12582
- setTheme: setTheme,
12583
- language: language,
12584
- setLanguage: setLanguage,
12585
- options: options,
12586
- profile: profile,
12587
- muted: muted,
12588
- streaming: streaming,
12589
- screensharing: screensharing,
12590
- isAgent: isAgent,
12591
- userInteractionTriggered: userInteractionTriggered,
12592
- orientation: orientation
12593
- },
12594
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$ThemeProvider), {
12595
- theme: styledTheme,
12596
- children: [
12597
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4fb4815baa04b470$export$20f257fc407da7a3), {}),
12598
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $d6008ea114507578$export$2e2bcd8739ae039), {}),
12599
- /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $4fb4815baa04b470$export$914ddf2021ea8ee6), {
12600
- ref: streamUIContainerRef,
12601
- children: [
12602
- isLoading && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $91d20ee7d2ade85c$export$669f6ea7d267feaf), {}),
12603
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a42b2ef7646d035$export$2e2bcd8739ae039), {}),
12604
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $805d92fa41e6e1b0$export$2e2bcd8739ae039), {}),
12605
- isBlockedDevicesPopupOpen && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6aca0f707e80bf63$export$2e2bcd8739ae039), {
12606
- close: ()=>{
12607
- setUserInteractionTriggered(true);
12608
- setBlockedDevicesPopupOpen(false);
12609
- }
12610
- }),
12611
- streamState === "recorder" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $92672d57809ea9d3$export$336a011955157f9a), {}),
12612
- streamState === "streaming" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
12613
- children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $cce9fd41d8a55a18$export$74636703cfe1eecf), {
12614
- children: [
12615
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f235befa4cdc42d6$export$2e2bcd8739ae039), {}),
12616
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $cdab47bb8796991e$export$2e2bcd8739ae039), {}),
12617
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $69a9c49ece80e773$export$2e2bcd8739ae039), {}),
12618
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $01986a58bfba8001$export$2e2bcd8739ae039), {})
12619
- ]
12620
- })
12621
- }),
12622
- (streamState === "ended" || streamState === "terminated" || streamState === "full" || streamState === "expired") && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $df41bfe6da05853a$export$2e2bcd8739ae039), {})
12623
- ]
12624
- })
12625
- ]
12742
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$QueryClientProvider), {
12743
+ client: $26ed036cbc17809a$var$queryClient,
12744
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039).Provider, {
12745
+ value: {
12746
+ plan: plan,
12747
+ permissions: permissions,
12748
+ selfPeerId: selfPeerId,
12749
+ streamUIContainerRef: streamUIContainerRef,
12750
+ videosContainerRef: videosContainerRef,
12751
+ remoteTilesContainerRef: remoteTilesContainerRef,
12752
+ streamState: streamState,
12753
+ setStreamState: setStreamState,
12754
+ isQuickConnectPopupVisible: isQuickConnectPopupVisible,
12755
+ setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible,
12756
+ isSettingsMenuVisible: isSettingsMenuVisible,
12757
+ setIsSettingsMenuVisible: setIsSettingsMenuVisible,
12758
+ isYoutubePopupVisible: isYoutubePopupVisible,
12759
+ setIsYoutubePopupVisible: setIsYoutubePopupVisible,
12760
+ isLinksharePopupVisible: isLinksharePopupVisible,
12761
+ setIsLinksharePopupVisible: setIsLinksharePopupVisible,
12762
+ isVirtualBackgroundPopupVisible: isVirtualBackgroundPopupVisible,
12763
+ setIsVirtualBackgroundPopupVisible: setIsVirtualBackgroundPopupVisible,
12764
+ isBlockedFeaturePopupOpen: isBlockedFeaturePopupOpen,
12765
+ setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen,
12766
+ theme: theme,
12767
+ setTheme: setTheme,
12768
+ language: language,
12769
+ setLanguage: setLanguage,
12770
+ options: options,
12771
+ profile: profile,
12772
+ muted: muted,
12773
+ streaming: streaming,
12774
+ screensharing: screensharing,
12775
+ isAgent: isAgent,
12776
+ userInteractionTriggered: userInteractionTriggered,
12777
+ orientation: orientation
12778
+ },
12779
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$ThemeProvider), {
12780
+ theme: styledTheme,
12781
+ children: [
12782
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4fb4815baa04b470$export$20f257fc407da7a3), {}),
12783
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $d6008ea114507578$export$2e2bcd8739ae039), {}),
12784
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $4fb4815baa04b470$export$914ddf2021ea8ee6), {
12785
+ ref: streamUIContainerRef,
12786
+ children: [
12787
+ streamState === "loading" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $91d20ee7d2ade85c$export$669f6ea7d267feaf), {}),
12788
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a42b2ef7646d035$export$2e2bcd8739ae039), {}),
12789
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $805d92fa41e6e1b0$export$2e2bcd8739ae039), {}),
12790
+ isBlockedDevicesPopupOpen && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6aca0f707e80bf63$export$2e2bcd8739ae039), {
12791
+ close: ()=>{
12792
+ setUserInteractionTriggered(true);
12793
+ setBlockedDevicesPopupOpen(false);
12794
+ }
12795
+ }),
12796
+ streamState === "recorder" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $b76354b532370976$export$336a011955157f9a), {}),
12797
+ (streamState === "streaming" || streamState === "loading") && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
12798
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $cce9fd41d8a55a18$export$74636703cfe1eecf), {
12799
+ children: [
12800
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $f235befa4cdc42d6$export$2e2bcd8739ae039), {}),
12801
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $cdab47bb8796991e$export$2e2bcd8739ae039), {}),
12802
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $69a9c49ece80e773$export$2e2bcd8739ae039), {}),
12803
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $01986a58bfba8001$export$2e2bcd8739ae039), {})
12804
+ ]
12805
+ })
12806
+ }),
12807
+ (streamState === "ended" || streamState === "terminated" || streamState === "full" || streamState === "expired") && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $df41bfe6da05853a$export$2e2bcd8739ae039), {})
12808
+ ]
12809
+ })
12810
+ ]
12811
+ })
12626
12812
  })
12627
12813
  });
12628
12814
  };
@@ -13055,7 +13241,7 @@ var $f8d57e3d223f5089$export$2e2bcd8739ae039 = $f8d57e3d223f5089$var$GreetingVie
13055
13241
 
13056
13242
 
13057
13243
  var $1e2747ca72d0ab49$exports = {};
13058
- $1e2747ca72d0ab49$exports = "*, :before, :after, ::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #3b82f680;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n.visible {\n visibility: visible;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.inset-0 {\n inset: 0;\n}\n\n.left-0 {\n left: 0;\n}\n\n.top-0 {\n top: 0;\n}\n\n.z-\\[100\\] {\n z-index: 100;\n}\n\n.z-50 {\n z-index: 50;\n}\n\n.z-\\[1\\] {\n z-index: 1;\n}\n\n.z-10 {\n z-index: 10;\n}\n\n.m-\\[10px\\] {\n margin: 10px;\n}\n\n.mx-\\[20px\\] {\n margin-left: 20px;\n margin-right: 20px;\n}\n\n.ml-\\[10px\\] {\n margin-left: 10px;\n}\n\n.mt-\\[10px\\] {\n margin-top: 10px;\n}\n\n.mt-\\[50px\\] {\n margin-top: 50px;\n}\n\n.block {\n display: block;\n}\n\n.inline {\n display: inline;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.hidden {\n display: none;\n}\n\n.h-screen {\n height: 100vh;\n}\n\n.h-full {\n height: 100%;\n}\n\n.h-\\[150px\\] {\n height: 150px;\n}\n\n.h-\\[60px\\] {\n height: 60px;\n}\n\n.h-\\[56px\\] {\n height: 56px;\n}\n\n.h-\\[40px\\] {\n height: 40px;\n}\n\n.h-\\[72px\\] {\n height: 72px;\n}\n\n.h-\\[235px\\] {\n height: 235px;\n}\n\n.h-\\[93px\\] {\n height: 93px;\n}\n\n.h-fit {\n height: -moz-fit-content;\n height: fit-content;\n}\n\n.h-\\[24px\\] {\n height: 24px;\n}\n\n.h-\\[30px\\] {\n height: 30px;\n}\n\n.h-1\\/3 {\n height: 33.3333%;\n}\n\n.max-h-\\[inherit\\] {\n max-height: inherit;\n}\n\n.max-h-\\[70px\\] {\n max-height: 70px;\n}\n\n.min-h-0 {\n min-height: 0;\n}\n\n.min-h-\\[100\\%\\] {\n min-height: 100%;\n}\n\n.w-screen {\n width: 100vw;\n}\n\n.w-full {\n width: 100%;\n}\n\n.w-1\\/3 {\n width: 33.3333%;\n}\n\n.w-\\[60px\\] {\n width: 60px;\n}\n\n.w-\\[56px\\] {\n width: 56px;\n}\n\n.w-\\[72px\\] {\n width: 72px;\n}\n\n.w-\\[76px\\] {\n width: 76px;\n}\n\n.w-\\[360px\\] {\n width: 360px;\n}\n\n.w-\\[450px\\] {\n width: 450px;\n}\n\n.w-\\[320px\\] {\n width: 320px;\n}\n\n.w-\\[24px\\] {\n width: 24px;\n}\n\n.w-\\[30px\\] {\n width: 30px;\n}\n\n.min-w-full, .min-w-\\[100\\%\\] {\n min-width: 100%;\n}\n\n.min-w-\\[24px\\] {\n min-width: 24px;\n}\n\n.max-w-\\[400px\\] {\n max-width: 400px;\n}\n\n.max-w-\\[135px\\] {\n max-width: 135px;\n}\n\n.max-w-\\[500px\\] {\n max-width: 500px;\n}\n\n.max-w-\\[600px\\] {\n max-width: 600px;\n}\n\n.max-w-\\[800px\\] {\n max-width: 800px;\n}\n\n.max-w-\\[screen\\] {\n max-width: screen;\n}\n\n.max-w-\\[70px\\] {\n max-width: 70px;\n}\n\n.flex-1 {\n flex: 1;\n}\n\n.flex-auto {\n flex: auto;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.translate-y-2 {\n --tw-translate-y: .5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-\\[200\\%\\] {\n --tw-translate-y: 200%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-full {\n --tw-translate-y: 100%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-\\[0\\.4\\] {\n --tw-scale-x: .4;\n --tw-scale-y: .4;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-x-\\[-1\\] {\n --tw-scale-x: -1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.resize {\n resize: both;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.items-end {\n align-items: flex-end;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-\\[10px\\] {\n gap: 10px;\n}\n\n.gap-\\[5px\\] {\n gap: 5px;\n}\n\n.gap-2\\.5 {\n gap: .625rem;\n}\n\n.gap-2 {\n gap: .5rem;\n}\n\n.gap-5 {\n gap: 1.25rem;\n}\n\n.gap-\\[20px\\] {\n gap: 20px;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.overflow-x-auto {\n overflow-x: auto;\n}\n\n.rounded-\\[10px\\] {\n border-radius: 10px;\n}\n\n.rounded-lg {\n border-radius: .5rem;\n}\n\n.rounded-md {\n border-radius: .375rem;\n}\n\n.rounded-\\[15px\\] {\n border-radius: 15px;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.rounded-\\[5px\\] {\n border-radius: 5px;\n}\n\n.rounded-\\[60px\\] {\n border-radius: 60px;\n}\n\n.rounded-\\[inherit\\] {\n border-radius: inherit;\n}\n\n.rounded-\\[8px\\] {\n border-radius: 8px;\n}\n\n.rounded-\\[50\\%\\] {\n border-radius: 50%;\n}\n\n.rounded-t-\\[15px\\] {\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-2 {\n border-width: 2px;\n}\n\n.border-t {\n border-top-width: 1px;\n}\n\n.border-secondaryLight {\n --tw-border-opacity: 1;\n border-color: rgb(179 179 179 / var(--tw-border-opacity));\n}\n\n.border-white {\n --tw-border-opacity: 1;\n border-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n\n.border-secondaryVLight {\n --tw-border-opacity: 1;\n border-color: rgb(235 235 235 / var(--tw-border-opacity));\n}\n\n.border-primaryLight {\n --tw-border-opacity: 1;\n border-color: rgb(86 86 86 / var(--tw-border-opacity));\n}\n\n.bg-black {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity));\n}\n\n.bg-primaryLight {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-primary {\n --tw-bg-opacity: 1;\n background-color: rgb(29 28 32 / var(--tw-bg-opacity));\n}\n\n.bg-graySelected {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-transparent {\n background-color: #0000;\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-tertiarySelected {\n --tw-bg-opacity: 1;\n background-color: rgb(216 216 216 / var(--tw-bg-opacity));\n}\n\n.bg-tertiary {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-black\\/\\[\\.6\\] {\n background-color: #0009;\n}\n\n.bg-\\[\\#565656\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#f12828\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(241 40 40 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#000\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#FFFFFF\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-underlay {\n background-color: #00000040;\n}\n\n.bg-\\[\\#f3f3f3\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(243 243 243 / var(--tw-bg-opacity));\n}\n\n.bg-secondaryVLight {\n --tw-bg-opacity: 1;\n background-color: rgb(235 235 235 / var(--tw-bg-opacity));\n}\n\n.bg-opacity-90 {\n --tw-bg-opacity: .9;\n}\n\n.bg-\\[url\\(\\'https\\:\\/\\/cdn\\.snapcall\\.io\\/img\\/assist\\/gradient-bg\\.jpg\\'\\)\\] {\n background-image: url(\"https://cdn.snapcall.io/img/assist/gradient-bg.jpg\");\n}\n\n.bg-cover {\n background-size: cover;\n}\n\n.object-cover {\n object-fit: cover;\n}\n\n.object-fill {\n object-fit: fill;\n}\n\n.p-\\[15px\\] {\n padding: 15px;\n}\n\n.p-2\\.5 {\n padding: .625rem;\n}\n\n.p-2 {\n padding: .5rem;\n}\n\n.p-\\[10px\\] {\n padding: 10px;\n}\n\n.p-\\[3px\\] {\n padding: 3px;\n}\n\n.p-\\[12px\\] {\n padding: 12px;\n}\n\n.py-3 {\n padding-top: .75rem;\n padding-bottom: .75rem;\n}\n\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n.py-\\[9px\\] {\n padding-top: 9px;\n padding-bottom: 9px;\n}\n\n.px-3\\.5 {\n padding-left: .875rem;\n padding-right: .875rem;\n}\n\n.px-3 {\n padding-left: .75rem;\n padding-right: .75rem;\n}\n\n.py-2 {\n padding-top: .5rem;\n padding-bottom: .5rem;\n}\n\n.py-1\\.5 {\n padding-top: .375rem;\n padding-bottom: .375rem;\n}\n\n.px-2\\.5 {\n padding-left: .625rem;\n padding-right: .625rem;\n}\n\n.py-1 {\n padding-top: .25rem;\n padding-bottom: .25rem;\n}\n\n.px-2 {\n padding-left: .5rem;\n padding-right: .5rem;\n}\n\n.px-\\[10px\\] {\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n\n.py-\\[25px\\] {\n padding-top: 25px;\n padding-bottom: 25px;\n}\n\n.px-\\[20px\\] {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.pt-2\\.5 {\n padding-top: .625rem;\n}\n\n.pt-2 {\n padding-top: .5rem;\n}\n\n.pb-2\\.5 {\n padding-bottom: .625rem;\n}\n\n.pb-2 {\n padding-bottom: .5rem;\n}\n\n.pt-\\[20px\\] {\n padding-top: 20px;\n}\n\n.pb-\\[25px\\] {\n padding-bottom: 25px;\n}\n\n.text-center {\n text-align: center;\n}\n\n.align-middle {\n vertical-align: middle;\n}\n\n.text-base {\n letter-spacing: -.02em;\n font-size: 16px;\n line-height: 19px;\n}\n\n.text-sm {\n letter-spacing: -.02em;\n font-size: 14px;\n line-height: 17px;\n}\n\n.text-xs {\n letter-spacing: -.02em;\n font-size: 12px;\n line-height: 14px;\n}\n\n.text-\\[112px\\] {\n font-size: 112px;\n}\n\n.text-xl {\n letter-spacing: -.02em;\n font-size: 20px;\n line-height: 24px;\n}\n\n.text-lg {\n letter-spacing: -.02em;\n font-size: 18px;\n line-height: 22px;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.font-semibold {\n font-weight: 600;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.font-normal {\n font-weight: 400;\n}\n\n.leading-\\[20px\\] {\n line-height: 20px;\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.text-primary {\n --tw-text-opacity: 1;\n color: rgb(29 28 32 / var(--tw-text-opacity));\n}\n\n.text-mainBlue {\n --tw-text-opacity: 1;\n color: rgb(0 106 255 / var(--tw-text-opacity));\n}\n\n.text-white\\/80 {\n color: #fffc;\n}\n\n.text-secondary {\n --tw-text-opacity: 1;\n color: rgb(134 134 134 / var(--tw-text-opacity));\n}\n\n.text-primaryLight {\n --tw-text-opacity: 1;\n color: rgb(86 86 86 / var(--tw-text-opacity));\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.underline {\n text-decoration-line: underline;\n}\n\n.antialiased {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-50 {\n opacity: .5;\n}\n\n.opacity-\\[0\\.4\\] {\n opacity: .4;\n}\n\n.opacity-90 {\n opacity: .9;\n}\n\n.outline {\n outline-style: solid;\n}\n\n.ring-\\[3px\\] {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-cta {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(38 138 250 / var(--tw-ring-opacity));\n}\n\n.blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter, backdrop-filter;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-\\[transform\\,border-radius\\] {\n transition-property: transform, border-radius;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.duration-300 {\n transition-duration: .3s;\n}\n\n.ease-in {\n transition-timing-function: cubic-bezier(.4, 0, 1, 1);\n}\n\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, .2, 1);\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.inter {\n font-family: Inter, sans-serif;\n}\n\n@supports (font-variation-settings: normal) {\n .inter {\n font-family: Inter var, sans-serif;\n }\n}\n\n.first-letter\\:capitalize:first-letter {\n text-transform: capitalize;\n}\n\n.focus\\:outline-none:focus {\n outline-offset: 2px;\n outline: 2px solid #0000;\n}\n\n.disabled\\:bg-secondaryLight:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(179 179 179 / var(--tw-bg-opacity));\n}\n\n.disabled\\:bg-graySelected:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.disabled\\:text-secondaryLight:disabled {\n --tw-text-opacity: 1;\n color: rgb(179 179 179 / var(--tw-text-opacity));\n}\n\n.disabled\\:opacity-50:disabled {\n opacity: .5;\n}\n\n";
13244
+ $1e2747ca72d0ab49$exports = "*, :before, :after, ::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #3b82f680;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n.visible {\n visibility: visible;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.inset-0 {\n inset: 0;\n}\n\n.bottom-\\[-85px\\] {\n bottom: -85px;\n}\n\n.left-\\[calc\\(50\\%-243px\\)\\] {\n left: calc(50% - 243px);\n}\n\n.bottom-\\[-65px\\] {\n bottom: -65px;\n}\n\n.left-\\[calc\\(50\\%-43px\\)\\] {\n left: calc(50% - 43px);\n}\n\n.top-0 {\n top: 0;\n}\n\n.left-0 {\n left: 0;\n}\n\n.z-10 {\n z-index: 10;\n}\n\n.z-50 {\n z-index: 50;\n}\n\n.z-\\[1\\] {\n z-index: 1;\n}\n\n.z-\\[100\\] {\n z-index: 100;\n}\n\n.m-\\[10px\\] {\n margin: 10px;\n}\n\n.mx-\\[20px\\] {\n margin-left: 20px;\n margin-right: 20px;\n}\n\n.ml-\\[10px\\] {\n margin-left: 10px;\n}\n\n.mt-\\[10px\\] {\n margin-top: 10px;\n}\n\n.mt-\\[50px\\] {\n margin-top: 50px;\n}\n\n.mb-\\[9px\\] {\n margin-bottom: 9px;\n}\n\n.box-border {\n box-sizing: border-box;\n}\n\n.block {\n display: block;\n}\n\n.inline {\n display: inline;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.hidden {\n display: none;\n}\n\n.h-full {\n height: 100%;\n}\n\n.h-0 {\n height: 0;\n}\n\n.h-\\[86px\\] {\n height: 86px;\n}\n\n.h-\\[150px\\] {\n height: 150px;\n}\n\n.h-\\[60px\\] {\n height: 60px;\n}\n\n.h-\\[56px\\] {\n height: 56px;\n}\n\n.h-\\[64px\\] {\n height: 64px;\n}\n\n.h-\\[72px\\] {\n height: 72px;\n}\n\n.h-\\[24px\\] {\n height: 24px;\n}\n\n.h-\\[70px\\] {\n height: 70px;\n}\n\n.h-\\[62px\\] {\n height: 62px;\n}\n\n.h-\\[40px\\] {\n height: 40px;\n}\n\n.h-1\\/3 {\n height: 33.3333%;\n}\n\n.h-\\[235px\\] {\n height: 235px;\n}\n\n.h-\\[93px\\] {\n height: 93px;\n}\n\n.h-screen {\n height: 100vh;\n}\n\n.h-fit {\n height: -moz-fit-content;\n height: fit-content;\n}\n\n.h-\\[30px\\] {\n height: 30px;\n}\n\n.max-h-\\[100\\%\\] {\n max-height: 100%;\n}\n\n.max-h-\\[inherit\\] {\n max-height: inherit;\n}\n\n.max-h-\\[70px\\] {\n max-height: 70px;\n}\n\n.max-h-\\[90\\%\\] {\n max-height: 90%;\n}\n\n.min-h-0 {\n min-height: 0;\n}\n\n.w-full {\n width: 100%;\n}\n\n.w-\\[486px\\] {\n width: 486px;\n}\n\n.w-0 {\n width: 0;\n}\n\n.w-\\[86px\\] {\n width: 86px;\n}\n\n.w-\\[60px\\] {\n width: 60px;\n}\n\n.w-\\[56px\\] {\n width: 56px;\n}\n\n.w-\\[64px\\] {\n width: 64px;\n}\n\n.w-\\[72px\\] {\n width: 72px;\n}\n\n.w-\\[24px\\] {\n width: 24px;\n}\n\n.w-\\[70px\\] {\n width: 70px;\n}\n\n.w-\\[62px\\] {\n width: 62px;\n}\n\n.w-\\[50\\%\\] {\n width: 50%;\n}\n\n.w-\\[76px\\] {\n width: 76px;\n}\n\n.w-1\\/3 {\n width: 33.3333%;\n}\n\n.w-screen {\n width: 100vw;\n}\n\n.w-\\[360px\\] {\n width: 360px;\n}\n\n.w-\\[450px\\] {\n width: 450px;\n}\n\n.w-\\[320px\\] {\n width: 320px;\n}\n\n.w-\\[30px\\] {\n width: 30px;\n}\n\n.w-\\[135px\\] {\n width: 135px;\n}\n\n.min-w-\\[200px\\] {\n min-width: 200px;\n}\n\n.min-w-\\[24px\\] {\n min-width: 24px;\n}\n\n.min-w-full {\n min-width: 100%;\n}\n\n.max-w-\\[1116px\\] {\n max-width: 1116px;\n}\n\n.max-w-\\[500px\\] {\n max-width: 500px;\n}\n\n.max-w-\\[400px\\] {\n max-width: 400px;\n}\n\n.max-w-\\[600px\\] {\n max-width: 600px;\n}\n\n.max-w-\\[800px\\] {\n max-width: 800px;\n}\n\n.max-w-\\[100\\%\\] {\n max-width: 100%;\n}\n\n.max-w-\\[70px\\] {\n max-width: 70px;\n}\n\n.max-w-\\[90\\%\\] {\n max-width: 90%;\n}\n\n.flex-1 {\n flex: 1;\n}\n\n.flex-auto {\n flex: auto;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.translate-y-\\[200\\%\\] {\n --tw-translate-y: 200%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-full {\n --tw-translate-y: 100%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-2 {\n --tw-translate-y: .5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-\\[0\\.4\\] {\n --tw-scale-x: .4;\n --tw-scale-y: .4;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-x-\\[-1\\] {\n --tw-scale-x: -1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n.animate-spin {\n animation: 1s linear infinite spin;\n}\n\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.resize {\n resize: both;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.items-start {\n align-items: flex-start;\n}\n\n.items-end {\n align-items: flex-end;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-\\[7px\\] {\n gap: 7px;\n}\n\n.gap-\\[5px\\] {\n gap: 5px;\n}\n\n.gap-2\\.5 {\n gap: .625rem;\n}\n\n.gap-2 {\n gap: .5rem;\n}\n\n.gap-\\[10px\\] {\n gap: 10px;\n}\n\n.gap-5 {\n gap: 1.25rem;\n}\n\n.gap-\\[20px\\] {\n gap: 20px;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.overflow-visible {\n overflow: visible;\n}\n\n.overflow-x-auto {\n overflow-x: auto;\n}\n\n.rounded-\\[10px\\] {\n border-radius: 10px;\n}\n\n.rounded-\\[8px\\] {\n border-radius: 8px;\n}\n\n.rounded-lg {\n border-radius: .5rem;\n}\n\n.rounded-md {\n border-radius: .375rem;\n}\n\n.rounded-\\[15px\\] {\n border-radius: 15px;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.rounded-\\[50\\%\\] {\n border-radius: 50%;\n}\n\n.rounded-\\[5px\\] {\n border-radius: 5px;\n}\n\n.rounded-\\[60px\\] {\n border-radius: 60px;\n}\n\n.rounded-\\[inherit\\] {\n border-radius: inherit;\n}\n\n.rounded-t-\\[15px\\] {\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-\\[7px\\] {\n border-width: 7px;\n}\n\n.border-\\[4px\\] {\n border-width: 4px;\n}\n\n.border-\\[3px\\] {\n border-width: 3px;\n}\n\n.border-\\[2px\\] {\n border-width: 2px;\n}\n\n.border-b-\\[7px\\] {\n border-bottom-width: 7px;\n}\n\n.border-t {\n border-top-width: 1px;\n}\n\n.border-secondaryLight {\n --tw-border-opacity: 1;\n border-color: rgb(179 179 179 / var(--tw-border-opacity));\n}\n\n.border-white {\n --tw-border-opacity: 1;\n border-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n\n.border-\\[\\#E5484D\\] {\n --tw-border-opacity: 1;\n border-color: rgb(229 72 77 / var(--tw-border-opacity));\n}\n\n.border-\\[\\#FFFFF\\] {\n border-color: #FFFFF;\n}\n\n.border-\\[white\\] {\n --tw-border-opacity: 1;\n border-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n\n.border-secondaryVLight {\n --tw-border-opacity: 1;\n border-color: rgb(235 235 235 / var(--tw-border-opacity));\n}\n\n.border-b-\\[\\#E5484D\\] {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(229 72 77 / var(--tw-border-opacity));\n}\n\n.bg-\\[\\#000\\], .bg-black {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity));\n}\n\n.bg-primaryLight {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-primary {\n --tw-bg-opacity: 1;\n background-color: rgb(29 28 32 / var(--tw-bg-opacity));\n}\n\n.bg-graySelected {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-transparent {\n background-color: #0000;\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-tertiarySelected {\n --tw-bg-opacity: 1;\n background-color: rgb(216 216 216 / var(--tw-bg-opacity));\n}\n\n.bg-tertiary {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-mainBlueSelected {\n --tw-bg-opacity: 1;\n background-color: rgb(0 90 218 / var(--tw-bg-opacity));\n}\n\n.bg-mainBlue {\n --tw-bg-opacity: 1;\n background-color: rgb(0 106 255 / var(--tw-bg-opacity));\n}\n\n.bg-black\\/\\[\\.6\\] {\n background-color: #0009;\n}\n\n.bg-\\[\\#565656\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#E5484D\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(229 72 77 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#f12828\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(241 40 40 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#171717\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#FFFFFF\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-underlay {\n background-color: #00000040;\n}\n\n.bg-\\[\\#F7F7F7\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(247 247 247 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#C7DEFF\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(199 222 255 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#f3f3f3\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(243 243 243 / var(--tw-bg-opacity));\n}\n\n.bg-secondaryVLight {\n --tw-bg-opacity: 1;\n background-color: rgb(235 235 235 / var(--tw-bg-opacity));\n}\n\n.bg-opacity-90 {\n --tw-bg-opacity: .9;\n}\n\n.bg-\\[url\\(\\'https\\:\\/\\/cdn\\.snapcall\\.io\\/img\\/assist\\/gradient-bg\\.jpg\\'\\)\\] {\n background-image: url(\"https://cdn.snapcall.io/img/assist/gradient-bg.jpg\");\n}\n\n.bg-cover {\n background-size: cover;\n}\n\n.object-cover {\n object-fit: cover;\n}\n\n.p-2\\.5 {\n padding: .625rem;\n}\n\n.p-2 {\n padding: .5rem;\n}\n\n.p-\\[3px\\] {\n padding: 3px;\n}\n\n.p-\\[12px\\] {\n padding: 12px;\n}\n\n.p-\\[15px\\] {\n padding: 15px;\n}\n\n.px-2\\.5 {\n padding-left: .625rem;\n padding-right: .625rem;\n}\n\n.px-2 {\n padding-left: .5rem;\n padding-right: .5rem;\n}\n\n.py-\\[125px\\] {\n padding-top: 125px;\n padding-bottom: 125px;\n}\n\n.py-3 {\n padding-top: .75rem;\n padding-bottom: .75rem;\n}\n\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n.py-\\[9px\\] {\n padding-top: 9px;\n padding-bottom: 9px;\n}\n\n.px-3\\.5 {\n padding-left: .875rem;\n padding-right: .875rem;\n}\n\n.px-3 {\n padding-left: .75rem;\n padding-right: .75rem;\n}\n\n.py-2 {\n padding-top: .5rem;\n padding-bottom: .5rem;\n}\n\n.py-1\\.5 {\n padding-top: .375rem;\n padding-bottom: .375rem;\n}\n\n.py-1 {\n padding-top: .25rem;\n padding-bottom: .25rem;\n}\n\n.px-\\[10px\\] {\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n\n.py-\\[25px\\] {\n padding-top: 25px;\n padding-bottom: 25px;\n}\n\n.px-\\[60px\\] {\n padding-left: 60px;\n padding-right: 60px;\n}\n\n.px-\\[20px\\] {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.pt-2\\.5 {\n padding-top: .625rem;\n}\n\n.pt-2 {\n padding-top: .5rem;\n}\n\n.pb-2\\.5 {\n padding-bottom: .625rem;\n}\n\n.pb-2 {\n padding-bottom: .5rem;\n}\n\n.pt-\\[14px\\] {\n padding-top: 14px;\n}\n\n.pb-\\[20px\\] {\n padding-bottom: 20px;\n}\n\n.pb-\\[25px\\] {\n padding-bottom: 25px;\n}\n\n.pb-\\[9px\\] {\n padding-bottom: 9px;\n}\n\n.pt-\\[20px\\] {\n padding-top: 20px;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-base {\n letter-spacing: -.02em;\n font-size: 16px;\n line-height: 19px;\n}\n\n.text-sm {\n letter-spacing: -.02em;\n font-size: 14px;\n line-height: 17px;\n}\n\n.text-xs {\n letter-spacing: -.02em;\n font-size: 12px;\n line-height: 14px;\n}\n\n.text-\\[112px\\] {\n font-size: 112px;\n}\n\n.text-xl {\n letter-spacing: -.02em;\n font-size: 20px;\n line-height: 24px;\n}\n\n.text-lg {\n letter-spacing: -.02em;\n font-size: 18px;\n line-height: 22px;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.font-semibold {\n font-weight: 600;\n}\n\n.font-normal {\n font-weight: 400;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.leading-\\[20px\\] {\n line-height: 20px;\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.text-primary {\n --tw-text-opacity: 1;\n color: rgb(29 28 32 / var(--tw-text-opacity));\n}\n\n.text-mainBlue {\n --tw-text-opacity: 1;\n color: rgb(0 106 255 / var(--tw-text-opacity));\n}\n\n.text-white\\/80 {\n color: #fffc;\n}\n\n.text-secondary {\n --tw-text-opacity: 1;\n color: rgb(134 134 134 / var(--tw-text-opacity));\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.text-primaryLight {\n --tw-text-opacity: 1;\n color: rgb(86 86 86 / var(--tw-text-opacity));\n}\n\n.underline {\n text-decoration-line: underline;\n}\n\n.antialiased {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.opacity-\\[0\\.4\\] {\n opacity: .4;\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-90 {\n opacity: .9;\n}\n\n.outline {\n outline-style: solid;\n}\n\n.ring-\\[3px\\] {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-cta {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(38 138 250 / var(--tw-ring-opacity));\n}\n\n.blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter, backdrop-filter;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-\\[transform\\,border-radius\\] {\n transition-property: transform, border-radius;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.duration-300 {\n transition-duration: .3s;\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.ease-in {\n transition-timing-function: cubic-bezier(.4, 0, 1, 1);\n}\n\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, .2, 1);\n}\n\n.inter {\n font-family: Inter, sans-serif;\n}\n\n@supports (font-variation-settings: normal) {\n .inter {\n font-family: Inter var, sans-serif;\n }\n}\n\n.first-letter\\:capitalize:first-letter {\n text-transform: capitalize;\n}\n\n.focus\\:outline-none:focus {\n outline-offset: 2px;\n outline: 2px solid #0000;\n}\n\n.disabled\\:bg-secondaryLight:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(179 179 179 / var(--tw-bg-opacity));\n}\n\n.disabled\\:bg-graySelected:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.disabled\\:text-secondaryLight:disabled {\n --tw-text-opacity: 1;\n color: rgb(179 179 179 / var(--tw-text-opacity));\n}\n\n.disabled\\:opacity-50:disabled {\n opacity: .5;\n}\n\n";
13059
13245
 
13060
13246
 
13061
13247
  var $e02c50a47b475960$exports = {};
@@ -13065,7 +13251,8 @@ $e02c50a47b475960$exports = "*, :before, :after {\n box-sizing: border-box;\n
13065
13251
  const $24075a5d702d64b3$var$defaultOptions = {
13066
13252
  recorder: {
13067
13253
  enabled: false,
13068
- defaultState: "photo"
13254
+ defaultMode: "photo",
13255
+ defaultMedia: "camera"
13069
13256
  },
13070
13257
  sharedURL: window.location.href,
13071
13258
  showMenuButton: true,
@@ -13095,7 +13282,8 @@ const $24075a5d702d64b3$export$3f94917203ab7078 = {
13095
13282
  init: ({ element: element , ...options })=>{
13096
13283
  if (typeof options.recorder === "boolean") options.recorder = {
13097
13284
  enabled: options.recorder,
13098
- defaultState: "photo"
13285
+ defaultMode: "photo",
13286
+ defaultMedia: "camera"
13099
13287
  };
13100
13288
  if (element?.nodeType !== window.Node.ELEMENT_NODE) throw new Error('The "element" property must be a valid element!');
13101
13289
  const mergedOptions = (0, $365e765f9890497b$export$6969335ea1e4e77c)($24075a5d702d64b3$var$defaultOptions, options);