@peerbots/face 0.2.0 → 0.4.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.
package/dist/index.cjs CHANGED
@@ -176,7 +176,8 @@ var init_face = __esm({
176
176
  captions: {
177
177
  enabled: false,
178
178
  fontSize: 32,
179
- offset: { x: 0, y: 0 }
179
+ offset: { x: 0, y: 0 },
180
+ style: "pill"
180
181
  }
181
182
  };
182
183
  builtInFaces = createBuiltInPixiFaces();
@@ -279,6 +280,9 @@ var init_labels = __esm({
279
280
  interruptSpeech: "Interrupt current speech",
280
281
  queueSpeech: "Queue after current speech",
281
282
  captions: "Captions",
283
+ captionStyle: "Caption Style",
284
+ captionStylePill: "Dark Pill",
285
+ captionStyleOutline: "Text Outline",
282
286
  fontSize: "Caption Font Size",
283
287
  verticalPosition: "Vertical Position",
284
288
  voiceSelectorLanguage: "Language",
@@ -632,30 +636,317 @@ var init_voice_helpers = __esm({
632
636
  }
633
637
  });
634
638
 
639
+ // src/helpers/fullscreen.ts
640
+ function getFullscreenElement(doc = typeof document !== "undefined" ? document : void 0) {
641
+ if (!doc) return null;
642
+ const vendorDoc = doc;
643
+ return vendorDoc.fullscreenElement ?? vendorDoc.webkitFullscreenElement ?? vendorDoc.mozFullScreenElement ?? vendorDoc.msFullscreenElement ?? null;
644
+ }
645
+ function isNativeFullscreenSupported(element, doc = typeof document !== "undefined" ? document : void 0) {
646
+ if (!doc) return false;
647
+ const vendorDoc = doc;
648
+ const enabledFlag = vendorDoc.fullscreenEnabled ?? vendorDoc.webkitFullscreenEnabled ?? vendorDoc.mozFullScreenEnabled ?? vendorDoc.msFullscreenEnabled;
649
+ if (enabledFlag === false) {
650
+ return false;
651
+ }
652
+ const target = element ?? doc.documentElement;
653
+ if (!target) return false;
654
+ return Boolean(
655
+ typeof target.requestFullscreen === "function" || typeof target.webkitRequestFullscreen === "function" || typeof target.mozRequestFullScreen === "function" || typeof target.msRequestFullscreen === "function"
656
+ );
657
+ }
658
+ async function requestNativeFullscreen(element) {
659
+ const vendorEl = element;
660
+ if (typeof vendorEl.requestFullscreen === "function") {
661
+ await vendorEl.requestFullscreen();
662
+ return;
663
+ }
664
+ if (typeof vendorEl.webkitRequestFullscreen === "function") {
665
+ await vendorEl.webkitRequestFullscreen();
666
+ return;
667
+ }
668
+ if (typeof vendorEl.mozRequestFullScreen === "function") {
669
+ await vendorEl.mozRequestFullScreen();
670
+ return;
671
+ }
672
+ if (typeof vendorEl.msRequestFullscreen === "function") {
673
+ await vendorEl.msRequestFullscreen();
674
+ return;
675
+ }
676
+ throw new Error("Native Fullscreen API is not supported on this element");
677
+ }
678
+ async function exitNativeFullscreen(doc = typeof document !== "undefined" ? document : void 0) {
679
+ if (!doc) return;
680
+ const vendorDoc = doc;
681
+ if (typeof vendorDoc.exitFullscreen === "function") {
682
+ await vendorDoc.exitFullscreen();
683
+ return;
684
+ }
685
+ if (typeof vendorDoc.webkitExitFullscreen === "function") {
686
+ await vendorDoc.webkitExitFullscreen();
687
+ return;
688
+ }
689
+ if (typeof vendorDoc.mozCancelFullScreen === "function") {
690
+ await vendorDoc.mozCancelFullScreen();
691
+ return;
692
+ }
693
+ if (typeof vendorDoc.msExitFullscreen === "function") {
694
+ await vendorDoc.msExitFullscreen();
695
+ }
696
+ }
697
+ function addFullscreenChangeListener(listener, doc = typeof document !== "undefined" ? document : void 0) {
698
+ if (!doc) {
699
+ return () => void 0;
700
+ }
701
+ for (const eventName of FULLSCREEN_CHANGE_EVENTS) {
702
+ doc.addEventListener(eventName, listener);
703
+ }
704
+ return () => {
705
+ for (const eventName of FULLSCREEN_CHANGE_EVENTS) {
706
+ doc.removeEventListener(eventName, listener);
707
+ }
708
+ };
709
+ }
710
+ var FULLSCREEN_CHANGE_EVENTS;
711
+ var init_fullscreen = __esm({
712
+ "src/helpers/fullscreen.ts"() {
713
+ "use strict";
714
+ FULLSCREEN_CHANGE_EVENTS = [
715
+ "fullscreenchange",
716
+ "webkitfullscreenchange",
717
+ "mozfullscreenchange",
718
+ "MSFullscreenChange"
719
+ ];
720
+ }
721
+ });
722
+
723
+ // src/services/AudioManager.ts
724
+ function isIOSDevice(nav) {
725
+ const target = nav ?? (typeof navigator !== "undefined" ? navigator : void 0);
726
+ if (!target) {
727
+ return false;
728
+ }
729
+ const ua = target.userAgent ?? "";
730
+ if (/iPad|iPhone|iPod/.test(ua)) {
731
+ return true;
732
+ }
733
+ return target.platform === "MacIntel" && typeof target.maxTouchPoints === "number" && target.maxTouchPoints > 1;
734
+ }
735
+ function isMobileSafari(nav) {
736
+ const target = nav ?? (typeof navigator !== "undefined" ? navigator : void 0);
737
+ if (!target || !isIOSDevice(target)) {
738
+ return false;
739
+ }
740
+ const ua = target.userAgent ?? "";
741
+ return /Safari/i.test(ua) && !/CriOS|FxiOS|OPiOS|EdgiOS/i.test(ua);
742
+ }
743
+ var SILENT_WAV_DATA_URI, AudioManager, audioManager;
744
+ var init_AudioManager = __esm({
745
+ "src/services/AudioManager.ts"() {
746
+ "use strict";
747
+ SILENT_WAV_DATA_URI = "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA";
748
+ AudioManager = class {
749
+ audioElement = null;
750
+ registeredContexts = /* @__PURE__ */ new Set();
751
+ unlocked = false;
752
+ isUnlocked() {
753
+ return this.unlocked;
754
+ }
755
+ /**
756
+ * Registers an AudioContext so `unlock()` automatically resumes it during a
757
+ * user gesture.
758
+ */
759
+ registerAudioContext(ctx) {
760
+ this.registeredContexts.add(ctx);
761
+ }
762
+ /**
763
+ * Returns the single persistent HTMLAudioElement configured for inline
764
+ * cross-origin playback on iOS / Mobile Safari.
765
+ */
766
+ getAudioElement() {
767
+ if (this.audioElement) {
768
+ return this.audioElement;
769
+ }
770
+ if (typeof Audio === "undefined") {
771
+ return null;
772
+ }
773
+ const audio = new Audio();
774
+ audio.crossOrigin = "anonymous";
775
+ audio.preload = "auto";
776
+ audio.playsInline = true;
777
+ if (typeof audio.setAttribute === "function") {
778
+ audio.setAttribute("playsinline", "true");
779
+ }
780
+ this.audioElement = audio;
781
+ return this.audioElement;
782
+ }
783
+ /**
784
+ * Unlocks audio playback on iOS / Mobile Safari. MUST be called synchronously
785
+ * inside a user-gesture event handler (e.g. click or touchstart).
786
+ */
787
+ async unlock(options = {}) {
788
+ let anySucceeded = false;
789
+ const audio = this.getAudioElement();
790
+ let audioPlayPromise = null;
791
+ if (audio) {
792
+ try {
793
+ if (audio.paused || !audio.src) {
794
+ audio.src = SILENT_WAV_DATA_URI;
795
+ }
796
+ const playResult = audio.play();
797
+ if (playResult && typeof playResult.then === "function") {
798
+ audioPlayPromise = playResult.then(
799
+ () => {
800
+ if (audio.src === SILENT_WAV_DATA_URI) {
801
+ try {
802
+ audio.pause();
803
+ audio.currentTime = 0;
804
+ } catch (pauseErr) {
805
+ void pauseErr;
806
+ }
807
+ }
808
+ anySucceeded = true;
809
+ },
810
+ (err) => {
811
+ console.warn("AudioManager silent WAV unlock warning:", err);
812
+ }
813
+ );
814
+ } else {
815
+ if (audio.src === SILENT_WAV_DATA_URI) {
816
+ try {
817
+ audio.pause();
818
+ audio.currentTime = 0;
819
+ } catch (pauseErr) {
820
+ void pauseErr;
821
+ }
822
+ }
823
+ anySucceeded = true;
824
+ }
825
+ } catch (err) {
826
+ console.warn("AudioManager audio element unlock warning:", err);
827
+ }
828
+ }
829
+ const contextsToResume = new Set(this.registeredContexts);
830
+ if (options.audioContext) {
831
+ contextsToResume.add(options.audioContext);
832
+ }
833
+ const resumePromises = [];
834
+ for (const ctx of contextsToResume) {
835
+ if (ctx.state === "suspended" && typeof ctx.resume === "function") {
836
+ resumePromises.push(
837
+ ctx.resume().then(
838
+ () => {
839
+ anySucceeded = true;
840
+ },
841
+ (err) => {
842
+ console.warn("AudioManager AudioContext resume warning:", err);
843
+ }
844
+ )
845
+ );
846
+ }
847
+ }
848
+ if (typeof window !== "undefined" && "speechSynthesis" in window && typeof SpeechSynthesisUtterance !== "undefined") {
849
+ try {
850
+ if (window.speechSynthesis.paused) {
851
+ window.speechSynthesis.resume();
852
+ }
853
+ const utterance = new SpeechSynthesisUtterance("");
854
+ utterance.volume = 0;
855
+ window.speechSynthesis.speak(utterance);
856
+ anySucceeded = true;
857
+ } catch (err) {
858
+ console.warn("AudioManager speechSynthesis prime warning:", err);
859
+ }
860
+ }
861
+ if (audioPlayPromise) {
862
+ await audioPlayPromise;
863
+ }
864
+ if (resumePromises.length > 0) {
865
+ await Promise.all(resumePromises);
866
+ }
867
+ if (anySucceeded) {
868
+ this.unlocked = true;
869
+ }
870
+ return this.unlocked;
871
+ }
872
+ /**
873
+ * Resets internal state (primarily for unit testing).
874
+ */
875
+ reset() {
876
+ if (this.audioElement) {
877
+ try {
878
+ this.audioElement.pause();
879
+ } catch (err) {
880
+ void err;
881
+ }
882
+ }
883
+ this.audioElement = null;
884
+ this.registeredContexts.clear();
885
+ this.unlocked = false;
886
+ }
887
+ };
888
+ audioManager = new AudioManager();
889
+ }
890
+ });
891
+
635
892
  // src/services/AudioAnalyzer.ts
636
893
  var AudioAnalyzer, audioAnalyzer;
637
894
  var init_AudioAnalyzer = __esm({
638
895
  "src/services/AudioAnalyzer.ts"() {
639
896
  "use strict";
897
+ init_AudioManager();
640
898
  AudioAnalyzer = class {
641
899
  ctx = null;
642
900
  analyzer = null;
643
901
  data = null;
644
902
  connectedElements = /* @__PURE__ */ new WeakSet();
645
- connect(audio) {
903
+ getContext() {
904
+ return this.ctx;
905
+ }
906
+ async resumeContext() {
907
+ if (!this.ctx) {
908
+ return false;
909
+ }
910
+ if (this.ctx.state === "suspended" && typeof this.ctx.resume === "function") {
911
+ try {
912
+ await this.ctx.resume();
913
+ } catch (error) {
914
+ console.warn("AudioAnalyzer resumeContext error:", error);
915
+ return false;
916
+ }
917
+ }
918
+ return this.ctx.state !== "suspended";
919
+ }
920
+ connect(audio, options = {}) {
646
921
  if (typeof window === "undefined") {
647
- return;
922
+ return false;
923
+ }
924
+ if (!options.force && isIOSDevice()) {
925
+ return false;
648
926
  }
649
927
  const AudioContextCtor = window.AudioContext || window.webkitAudioContext;
650
928
  if (!AudioContextCtor) {
651
- return;
929
+ return false;
652
930
  }
653
931
  try {
654
932
  if (!this.ctx) {
655
933
  this.ctx = new AudioContextCtor();
934
+ audioManager.registerAudioContext(this.ctx);
935
+ }
936
+ if (this.ctx.state === "suspended") {
937
+ if (typeof this.ctx.resume === "function") {
938
+ void this.ctx.resume().catch((err) => {
939
+ console.warn("AudioAnalyzer AudioContext resume warning:", err);
940
+ });
941
+ }
942
+ return false;
943
+ }
944
+ if (!this.analyzer) {
656
945
  this.analyzer = this.ctx.createAnalyser();
657
946
  this.analyzer.fftSize = 256;
658
- this.data = new Uint8Array(new ArrayBuffer(this.analyzer.frequencyBinCount));
947
+ this.data = new Uint8Array(
948
+ new ArrayBuffer(this.analyzer.frequencyBinCount)
949
+ );
659
950
  }
660
951
  if (!this.connectedElements.has(audio) && this.analyzer) {
661
952
  const source = this.ctx.createMediaElementSource(audio);
@@ -663,12 +954,14 @@ var init_AudioAnalyzer = __esm({
663
954
  this.analyzer.connect(this.ctx.destination);
664
955
  this.connectedElements.add(audio);
665
956
  }
957
+ return true;
666
958
  } catch (error) {
667
959
  console.warn("AudioAnalyzer connect error:", error);
960
+ return false;
668
961
  }
669
962
  }
670
963
  getAmplitude() {
671
- if (!this.analyzer || !this.data) {
964
+ if (!this.analyzer || !this.data || this.ctx?.state === "suspended") {
672
965
  return 0;
673
966
  }
674
967
  this.analyzer.getByteTimeDomainData(this.data);
@@ -1069,6 +1362,123 @@ var init_useMessageVisualState = __esm({
1069
1362
  }
1070
1363
  });
1071
1364
 
1365
+ // src/hooks/useFullscreen.ts
1366
+ function useFaceFullscreenContext() {
1367
+ return (0, import_react2.useContext)(FaceFullscreenContext);
1368
+ }
1369
+ function useFullscreen(targetRef, options = {}) {
1370
+ const { onFullscreenChange } = options;
1371
+ const [isNativeFullscreen, setIsNativeFullscreen] = (0, import_react2.useState)(false);
1372
+ const [isPseudoFullscreen, setIsPseudoFullscreen] = (0, import_react2.useState)(false);
1373
+ const previousBodyOverflowRef = (0, import_react2.useRef)(null);
1374
+ const onChangeRef = (0, import_react2.useRef)(onFullscreenChange);
1375
+ onChangeRef.current = onFullscreenChange;
1376
+ const isFullscreen = isNativeFullscreen || isPseudoFullscreen;
1377
+ const prevReportedRef = (0, import_react2.useRef)(false);
1378
+ (0, import_react2.useEffect)(() => {
1379
+ if (prevReportedRef.current !== isFullscreen) {
1380
+ prevReportedRef.current = isFullscreen;
1381
+ onChangeRef.current?.(isFullscreen);
1382
+ }
1383
+ }, [isFullscreen]);
1384
+ (0, import_react2.useEffect)(() => {
1385
+ const syncNative = () => {
1386
+ const fsEl = getFullscreenElement();
1387
+ const target = targetRef.current;
1388
+ const active = Boolean(
1389
+ fsEl && (!target || fsEl === target || target.contains(fsEl))
1390
+ );
1391
+ setIsNativeFullscreen(active);
1392
+ };
1393
+ syncNative();
1394
+ return addFullscreenChangeListener(syncNative);
1395
+ }, [targetRef]);
1396
+ (0, import_react2.useEffect)(() => {
1397
+ if (!isPseudoFullscreen || typeof document === "undefined") {
1398
+ return;
1399
+ }
1400
+ previousBodyOverflowRef.current = document.body.style.overflow;
1401
+ document.body.style.overflow = "hidden";
1402
+ const handleKeyDown = (event) => {
1403
+ if (event.key === "Escape") {
1404
+ setIsPseudoFullscreen(false);
1405
+ }
1406
+ };
1407
+ window.addEventListener("keydown", handleKeyDown);
1408
+ return () => {
1409
+ window.removeEventListener("keydown", handleKeyDown);
1410
+ if (previousBodyOverflowRef.current !== null) {
1411
+ document.body.style.overflow = previousBodyOverflowRef.current;
1412
+ previousBodyOverflowRef.current = null;
1413
+ }
1414
+ };
1415
+ }, [isPseudoFullscreen]);
1416
+ const enterFullscreen = (0, import_react2.useCallback)(async () => {
1417
+ const target = targetRef.current;
1418
+ if (!target) {
1419
+ return;
1420
+ }
1421
+ if (isNativeFullscreenSupported(target)) {
1422
+ try {
1423
+ await requestNativeFullscreen(target);
1424
+ setIsNativeFullscreen(true);
1425
+ return;
1426
+ } catch (err) {
1427
+ console.warn(
1428
+ "Native fullscreen request failed; falling back to CSS pseudo-fullscreen:",
1429
+ err
1430
+ );
1431
+ }
1432
+ }
1433
+ setIsPseudoFullscreen(true);
1434
+ }, [targetRef]);
1435
+ const exitFullscreen = (0, import_react2.useCallback)(async () => {
1436
+ if (isPseudoFullscreen) {
1437
+ setIsPseudoFullscreen(false);
1438
+ }
1439
+ if (getFullscreenElement()) {
1440
+ try {
1441
+ await exitNativeFullscreen();
1442
+ } catch (err) {
1443
+ console.warn("Exit fullscreen error:", err);
1444
+ }
1445
+ }
1446
+ setIsNativeFullscreen(false);
1447
+ }, [isPseudoFullscreen]);
1448
+ const toggleFullscreen = (0, import_react2.useCallback)(async () => {
1449
+ if (isFullscreen) {
1450
+ await exitFullscreen();
1451
+ } else {
1452
+ await enterFullscreen();
1453
+ }
1454
+ }, [isFullscreen, exitFullscreen, enterFullscreen]);
1455
+ return (0, import_react2.useMemo)(
1456
+ () => ({
1457
+ isFullscreen,
1458
+ isPseudoFullscreen,
1459
+ enterFullscreen,
1460
+ exitFullscreen,
1461
+ toggleFullscreen
1462
+ }),
1463
+ [
1464
+ isFullscreen,
1465
+ isPseudoFullscreen,
1466
+ enterFullscreen,
1467
+ exitFullscreen,
1468
+ toggleFullscreen
1469
+ ]
1470
+ );
1471
+ }
1472
+ var import_react2, FaceFullscreenContext;
1473
+ var init_useFullscreen = __esm({
1474
+ "src/hooks/useFullscreen.ts"() {
1475
+ "use strict";
1476
+ import_react2 = require("react");
1477
+ init_fullscreen();
1478
+ FaceFullscreenContext = (0, import_react2.createContext)(null);
1479
+ }
1480
+ });
1481
+
1072
1482
  // src/store/faceRenderingSlice.ts
1073
1483
  function clampUnit(value) {
1074
1484
  if (Number.isNaN(value)) {
@@ -1193,6 +1603,12 @@ var init_faceRenderingSlice = __esm({
1193
1603
  });
1194
1604
 
1195
1605
  // src/store/faceSpeechSlice.ts
1606
+ function isNotAllowedError(err) {
1607
+ if (!err || typeof err !== "object") {
1608
+ return false;
1609
+ }
1610
+ return err.name === "NotAllowedError";
1611
+ }
1196
1612
  function isNativeSpeechSynthesisVoice(voice) {
1197
1613
  if (!voice || typeof voice !== "object") {
1198
1614
  return false;
@@ -1223,6 +1639,7 @@ function createFaceSpeechSlice(sliceOptions = {}) {
1223
1639
  let adapter = sliceOptions.speechAdapter ?? null;
1224
1640
  const cache = sliceOptions.ttsCache === false ? null : sliceOptions.ttsCache ?? defaultTtsAudioCache;
1225
1641
  const analyzer = sliceOptions.audioAnalyzer ?? audioAnalyzer;
1642
+ const speechAudioManager = sliceOptions.audioManager ?? audioManager;
1226
1643
  const utteranceDeferMs = sliceOptions.utteranceDeferMs ?? 10;
1227
1644
  let activeAudio = null;
1228
1645
  let activeObjectUrl = null;
@@ -1385,11 +1802,20 @@ function createFaceSpeechSlice(sliceOptions = {}) {
1385
1802
  playbackUrl = synthesized.audioUrl;
1386
1803
  }
1387
1804
  }
1388
- if (playbackUrl && typeof Audio !== "undefined") {
1805
+ const audio = playbackUrl ? speechAudioManager.getAudioElement() : null;
1806
+ if (playbackUrl && audio) {
1389
1807
  get().setSpokenVisemes(visemes);
1390
1808
  get().setAmplitudeData(ampData, extrema);
1391
- const audio = new Audio(playbackUrl);
1392
- audio.crossOrigin = "anonymous";
1809
+ audio.onplay = null;
1810
+ audio.onended = null;
1811
+ audio.onerror = null;
1812
+ try {
1813
+ audio.pause();
1814
+ audio.currentTime = 0;
1815
+ } catch (resetErr) {
1816
+ void resetErr;
1817
+ }
1818
+ audio.src = playbackUrl;
1393
1819
  activeAudio = audio;
1394
1820
  if (shouldRevokeUrl) {
1395
1821
  activeObjectUrl = playbackUrl;
@@ -1421,7 +1847,19 @@ function createFaceSpeechSlice(sliceOptions = {}) {
1421
1847
  audio.onerror = () => {
1422
1848
  finishGeneration(myGeneration);
1423
1849
  };
1424
- await audio.play();
1850
+ try {
1851
+ await audio.play();
1852
+ } catch (playError) {
1853
+ if (isNotAllowedError(playError)) {
1854
+ console.warn(
1855
+ "Audio playback blocked by browser autoplay policy (NotAllowedError); prompting user to re-enable sound."
1856
+ );
1857
+ get().setSpeechAllowed(false);
1858
+ finishGeneration(myGeneration);
1859
+ return;
1860
+ }
1861
+ throw playError;
1862
+ }
1425
1863
  return;
1426
1864
  }
1427
1865
  } catch (adapterError) {
@@ -1527,6 +1965,16 @@ function createFaceSpeechSlice(sliceOptions = {}) {
1527
1965
  setSpeechAllowed: (allowed) => {
1528
1966
  set({ speechAllowed: allowed });
1529
1967
  },
1968
+ unlockAudio: async () => {
1969
+ const unlockPromise = speechAudioManager.unlock({
1970
+ audioContext: analyzer.getContext()
1971
+ });
1972
+ set({ speechAllowed: true });
1973
+ void get().refreshVoices();
1974
+ const unlocked = await unlockPromise;
1975
+ await analyzer.resumeContext();
1976
+ return unlocked;
1977
+ },
1530
1978
  setAvailableVoices: (voices) => {
1531
1979
  set({ availableVoices: voices });
1532
1980
  },
@@ -1653,6 +2101,7 @@ var init_faceSpeechSlice = __esm({
1653
2101
  init_voice_helpers();
1654
2102
  init_viseme_mapper();
1655
2103
  init_AudioAnalyzer();
2104
+ init_AudioManager();
1656
2105
  init_ttsAudioCache();
1657
2106
  FALLBACK_DEFAULT_VOICE = {
1658
2107
  default: false,
@@ -1762,7 +2211,7 @@ function FaceStoreProvider({
1762
2211
  store,
1763
2212
  options
1764
2213
  }) {
1765
- const [internalStore] = (0, import_react2.useState)(
2214
+ const [internalStore] = (0, import_react3.useState)(
1766
2215
  () => store ?? createPeerbotsFaceStore(options)
1767
2216
  );
1768
2217
  const resolvedStore = store ?? internalStore;
@@ -1775,22 +2224,22 @@ function getGlobalFaceStore() {
1775
2224
  return activeGlobalFaceStore;
1776
2225
  }
1777
2226
  function useFaceStoreInstance() {
1778
- const context = (0, import_react2.useContext)(FaceStoreContext);
2227
+ const context = (0, import_react3.useContext)(FaceStoreContext);
1779
2228
  return context ?? activeGlobalFaceStore;
1780
2229
  }
1781
2230
  function useFaceStoreBase(selector) {
1782
2231
  const store = useFaceStoreInstance();
1783
2232
  return (0, import_zustand2.useStore)(store, selector);
1784
2233
  }
1785
- var import_react2, import_zustand2, import_jsx_runtime, FaceStoreContext, activeGlobalFaceStore, useFaceStore;
2234
+ var import_react3, import_zustand2, import_jsx_runtime, FaceStoreContext, activeGlobalFaceStore, useFaceStore;
1786
2235
  var init_FaceStoreContext = __esm({
1787
2236
  "src/store/FaceStoreContext.tsx"() {
1788
2237
  "use strict";
1789
- import_react2 = require("react");
2238
+ import_react3 = require("react");
1790
2239
  import_zustand2 = require("zustand");
1791
2240
  init_createPeerbotsFaceStore();
1792
2241
  import_jsx_runtime = require("react/jsx-runtime");
1793
- FaceStoreContext = (0, import_react2.createContext)(null);
2242
+ FaceStoreContext = (0, import_react3.createContext)(null);
1794
2243
  activeGlobalFaceStore = globalFaceStore;
1795
2244
  useFaceStore = Object.assign(useFaceStoreBase, {
1796
2245
  getState: () => activeGlobalFaceStore.getState(),
@@ -1809,37 +2258,37 @@ function FaceEyes({
1809
2258
  const face = useFaceStore((state) => state.selectedFace);
1810
2259
  const gaze = useFaceStore((state) => state.gaze);
1811
2260
  const pixiSettings = useFaceStore((state) => state.faceSettings.pixiSettings);
1812
- (0, import_react4.useExtend)({ Container: import_pixi.Container, Sprite: import_pixi.Sprite, Graphics: import_pixi.Graphics });
1813
- const [faceSheet, setFaceSheet] = (0, import_react5.useState)(null);
1814
- const [cheekTexture, setCheekTexture] = (0, import_react5.useState)(null);
1815
- const [eyeBrows, setEyeBrows] = (0, import_react5.useState)("Hugo");
1816
- const leftEyeTexture = (0, import_react5.useMemo)(() => {
2261
+ (0, import_react5.useExtend)({ Container: import_pixi.Container, Sprite: import_pixi.Sprite, Graphics: import_pixi.Graphics });
2262
+ const [faceSheet, setFaceSheet] = (0, import_react6.useState)(null);
2263
+ const [cheekTexture, setCheekTexture] = (0, import_react6.useState)(null);
2264
+ const [eyeBrows, setEyeBrows] = (0, import_react6.useState)("Hugo");
2265
+ const leftEyeTexture = (0, import_react6.useMemo)(() => {
1817
2266
  if (!faceSheet) return import_pixi.Texture.EMPTY;
1818
2267
  const emotion = message?.emotion || "Neutral";
1819
2268
  return faceSheet.textures?.[`${emotion.toLowerCase()}_l.png`] || faceSheet.textures?.["neutral_l.png"] || import_pixi.Texture.EMPTY;
1820
2269
  }, [message, faceSheet]);
1821
- const rightEyeTexture = (0, import_react5.useMemo)(() => {
2270
+ const rightEyeTexture = (0, import_react6.useMemo)(() => {
1822
2271
  if (!faceSheet) return import_pixi.Texture.EMPTY;
1823
2272
  const emotion = message?.emotion || "Neutral";
1824
2273
  return faceSheet.textures?.[`${emotion.toLowerCase()}_r.png`] || faceSheet.textures?.["neutral_r.png"] || import_pixi.Texture.EMPTY;
1825
2274
  }, [message, faceSheet]);
1826
- const breathingScaleRef = (0, import_react5.useRef)(1);
1827
- const breathingTimeRef = (0, import_react5.useRef)(0);
1828
- const blinkScaleRef = (0, import_react5.useRef)(1);
1829
- const isBlinkingRef = (0, import_react5.useRef)(false);
1830
- const blinkEveryRef = (0, import_react5.useRef)(500);
1831
- const blinkTimerRef = (0, import_react5.useRef)(0);
1832
- const blinkTargetScaleRef = (0, import_react5.useRef)(1);
1833
- const currentGazeRef = (0, import_react5.useRef)({ x: 0, y: 0 });
1834
- const leftEyeContainerRef = (0, import_react5.useRef)(null);
1835
- const rightEyeContainerRef = (0, import_react5.useRef)(null);
1836
- const leftEyebrowRef = (0, import_react5.useRef)(null);
1837
- const rightEyebrowRef = (0, import_react5.useRef)(null);
1838
- const leftEyeSpriteRef = (0, import_react5.useRef)(null);
1839
- const rightEyeSpriteRef = (0, import_react5.useRef)(null);
1840
- const leftCheekRef = (0, import_react5.useRef)(null);
1841
- const rightCheekRef = (0, import_react5.useRef)(null);
1842
- const positions = (0, import_react5.useMemo)(() => {
2275
+ const breathingScaleRef = (0, import_react6.useRef)(1);
2276
+ const breathingTimeRef = (0, import_react6.useRef)(0);
2277
+ const blinkScaleRef = (0, import_react6.useRef)(1);
2278
+ const isBlinkingRef = (0, import_react6.useRef)(false);
2279
+ const blinkEveryRef = (0, import_react6.useRef)(500);
2280
+ const blinkTimerRef = (0, import_react6.useRef)(0);
2281
+ const blinkTargetScaleRef = (0, import_react6.useRef)(1);
2282
+ const currentGazeRef = (0, import_react6.useRef)({ x: 0, y: 0 });
2283
+ const leftEyeContainerRef = (0, import_react6.useRef)(null);
2284
+ const rightEyeContainerRef = (0, import_react6.useRef)(null);
2285
+ const leftEyebrowRef = (0, import_react6.useRef)(null);
2286
+ const rightEyebrowRef = (0, import_react6.useRef)(null);
2287
+ const leftEyeSpriteRef = (0, import_react6.useRef)(null);
2288
+ const rightEyeSpriteRef = (0, import_react6.useRef)(null);
2289
+ const leftCheekRef = (0, import_react6.useRef)(null);
2290
+ const rightCheekRef = (0, import_react6.useRef)(null);
2291
+ const positions = (0, import_react6.useMemo)(() => {
1843
2292
  return {
1844
2293
  leftEyeX: -300 * scale,
1845
2294
  rightEyeX: 300 * scale,
@@ -1851,7 +2300,7 @@ function FaceEyes({
1851
2300
  eyebrowOffset: -180 * scale
1852
2301
  };
1853
2302
  }, [scale]);
1854
- (0, import_react4.useTick)((ticker) => {
2303
+ (0, import_react5.useTick)((ticker) => {
1855
2304
  const deltaTime = frozen ? 0 : ticker.deltaTime;
1856
2305
  const frequency = 785e-5;
1857
2306
  breathingTimeRef.current += deltaTime;
@@ -1934,7 +2383,7 @@ function FaceEyes({
1934
2383
  });
1935
2384
  }
1936
2385
  });
1937
- const drawEyebrow = (0, import_react5.useCallback)(
2386
+ const drawEyebrow = (0, import_react6.useCallback)(
1938
2387
  (g) => {
1939
2388
  g.clear();
1940
2389
  const mult = positions.eyebrowMultiplier * breathingScaleRef.current;
@@ -1952,7 +2401,7 @@ function FaceEyes({
1952
2401
  },
1953
2402
  [positions.eyebrowMultiplier, scale]
1954
2403
  );
1955
- (0, import_react5.useEffect)(() => {
2404
+ (0, import_react6.useEffect)(() => {
1956
2405
  let cancelled = false;
1957
2406
  async function loadAvatarTextures(currentFace) {
1958
2407
  if (currentFace?.kind !== "PixiFace" || currentFace.type !== "avatar") {
@@ -2073,13 +2522,13 @@ function FaceEyes({
2073
2522
  )
2074
2523
  ] });
2075
2524
  }
2076
- var import_pixi, import_react4, import_react5, import_jsx_runtime5, EYEBROW_POINTS;
2525
+ var import_pixi, import_react5, import_react6, import_jsx_runtime5, EYEBROW_POINTS;
2077
2526
  var init_FaceEyes = __esm({
2078
2527
  "src/components/FaceEyes.tsx"() {
2079
2528
  "use strict";
2080
2529
  import_pixi = require("pixi.js");
2081
- import_react4 = require("@pixi/react");
2082
- import_react5 = require("react");
2530
+ import_react5 = require("@pixi/react");
2531
+ import_react6 = require("react");
2083
2532
  init_FaceStoreContext();
2084
2533
  import_jsx_runtime5 = require("react/jsx-runtime");
2085
2534
  EYEBROW_POINTS = [
@@ -2103,21 +2552,21 @@ function FaceMouth({
2103
2552
  scale,
2104
2553
  frozen = false
2105
2554
  }) {
2106
- (0, import_react7.useExtend)({ Graphics: import_pixi2.Graphics });
2555
+ (0, import_react8.useExtend)({ Graphics: import_pixi2.Graphics });
2107
2556
  const talking = useFaceStore((state) => state.isSpeaking);
2108
2557
  const face = useFaceStore((state) => state.selectedFace);
2109
2558
  const pixiSettings = useFaceStore((state) => state.faceSettings.pixiSettings);
2110
2559
  const currentAmplitude = useFaceStore((state) => state.currentAmplitude);
2111
2560
  const amplitudeData = useFaceStore((state) => state.amplitudeData);
2112
2561
  const speechStartTime = useFaceStore((state) => state.speechStartTime);
2113
- const talkingScaleRef = (0, import_react6.useRef)(1);
2114
- const talkingTimeRef = (0, import_react6.useRef)(0);
2115
- const talkingShape = (0, import_react6.useMemo)(
2562
+ const talkingScaleRef = (0, import_react7.useRef)(1);
2563
+ const talkingTimeRef = (0, import_react7.useRef)(0);
2564
+ const talkingShape = (0, import_react7.useMemo)(
2116
2565
  () => face?.kind === "PixiFace" && face.type === "avatar" ? face.mouth : "Ellipse",
2117
2566
  [face]
2118
2567
  );
2119
- const graphicsRef = (0, import_react6.useRef)(null);
2120
- const getAmplitudeAtTime = (0, import_react6.useCallback)(
2568
+ const graphicsRef = (0, import_react7.useRef)(null);
2569
+ const getAmplitudeAtTime = (0, import_react7.useCallback)(
2121
2570
  (timeMs) => {
2122
2571
  if (!amplitudeData || amplitudeData.length === 0) return 0;
2123
2572
  const point = amplitudeData.find((p, i) => {
@@ -2128,7 +2577,7 @@ function FaceMouth({
2128
2577
  },
2129
2578
  [amplitudeData]
2130
2579
  );
2131
- const drawMouth = (0, import_react6.useCallback)(
2580
+ const drawMouth = (0, import_react7.useCallback)(
2132
2581
  (graphics) => {
2133
2582
  graphics.clear();
2134
2583
  const talkingScale = talkingScaleRef.current;
@@ -2201,7 +2650,7 @@ function FaceMouth({
2201
2650
  },
2202
2651
  [scale, talking, talkingShape]
2203
2652
  );
2204
- (0, import_react7.useTick)((time) => {
2653
+ (0, import_react8.useTick)((time) => {
2205
2654
  if (frozen) return;
2206
2655
  let targetScale;
2207
2656
  if (talking) {
@@ -2226,13 +2675,13 @@ function FaceMouth({
2226
2675
  if (pixiSettings?.mouthDisplay === "none") return null;
2227
2676
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("pixiGraphics", { ref: graphicsRef, label: "Mouth", draw: drawMouth });
2228
2677
  }
2229
- var import_react6, import_pixi2, import_react7, import_jsx_runtime6, ZIG_ZAG_POINTS, SMILEY_POINTS;
2678
+ var import_react7, import_pixi2, import_react8, import_jsx_runtime6, ZIG_ZAG_POINTS, SMILEY_POINTS;
2230
2679
  var init_FaceMouth = __esm({
2231
2680
  "src/components/FaceMouth.tsx"() {
2232
2681
  "use strict";
2233
- import_react6 = require("react");
2682
+ import_react7 = require("react");
2234
2683
  import_pixi2 = require("pixi.js");
2235
- import_react7 = require("@pixi/react");
2684
+ import_react8 = require("@pixi/react");
2236
2685
  init_FaceStoreContext();
2237
2686
  import_jsx_runtime6 = require("react/jsx-runtime");
2238
2687
  ZIG_ZAG_POINTS = [
@@ -2265,12 +2714,12 @@ var init_FaceMouth = __esm({
2265
2714
 
2266
2715
  // src/components/FaceText.tsx
2267
2716
  function FaceText({ scale }) {
2268
- (0, import_react9.useExtend)({ Text: import_pixi3.Text });
2717
+ (0, import_react10.useExtend)({ Text: import_pixi3.Text });
2269
2718
  const lastMessage = useFaceStore((state) => state.lastMessage);
2270
2719
  const isSpeaking = useFaceStore((state) => state.isSpeaking);
2271
2720
  const selectedFace = useFaceStore((state) => state.selectedFace);
2272
2721
  const pixiSettings = useFaceStore((state) => state.faceSettings.pixiSettings);
2273
- const emotionType = (0, import_react8.useMemo)(() => {
2722
+ const emotionType = (0, import_react9.useMemo)(() => {
2274
2723
  if (pixiSettings?.emotionDisplay) {
2275
2724
  return pixiSettings.emotionDisplay;
2276
2725
  }
@@ -2287,13 +2736,13 @@ function FaceText({ scale }) {
2287
2736
  pauseBeforeNextMsg: PAUSE_BEFORE_NEXT_MSG
2288
2737
  }
2289
2738
  );
2290
- (0, import_react8.useEffect)(() => {
2739
+ (0, import_react9.useEffect)(() => {
2291
2740
  queueMessage(lastMessage.speech);
2292
2741
  }, [lastMessage.speech, queueMessage]);
2293
- (0, import_react9.useTick)((delta) => {
2742
+ (0, import_react10.useTick)((delta) => {
2294
2743
  update(delta.deltaMS);
2295
2744
  });
2296
- const emotionStyle = (0, import_react8.useMemo)(
2745
+ const emotionStyle = (0, import_react9.useMemo)(
2297
2746
  () => new import_pixi3.TextStyle({
2298
2747
  fontFamily: FONT_FAMILY,
2299
2748
  fontSize: Math.max(12, 48 * scale),
@@ -2302,7 +2751,7 @@ function FaceText({ scale }) {
2302
2751
  }),
2303
2752
  [scale]
2304
2753
  );
2305
- const bodyStyle = (0, import_react8.useMemo)(
2754
+ const bodyStyle = (0, import_react9.useMemo)(
2306
2755
  () => new import_pixi3.TextStyle({
2307
2756
  fontFamily: FONT_FAMILY,
2308
2757
  fontSize: Math.max(12, 48 * scale),
@@ -2337,13 +2786,13 @@ function FaceText({ scale }) {
2337
2786
  )
2338
2787
  ] });
2339
2788
  }
2340
- var import_react8, import_pixi3, import_react9, import_jsx_runtime7, FONT_FAMILY, TEXT_PERSISTENCE_DURATION, MS_PER_CHAR, PAUSE_BEFORE_NEXT_MSG;
2789
+ var import_react9, import_pixi3, import_react10, import_jsx_runtime7, FONT_FAMILY, TEXT_PERSISTENCE_DURATION, MS_PER_CHAR, PAUSE_BEFORE_NEXT_MSG;
2341
2790
  var init_FaceText = __esm({
2342
2791
  "src/components/FaceText.tsx"() {
2343
2792
  "use strict";
2344
- import_react8 = require("react");
2793
+ import_react9 = require("react");
2345
2794
  import_pixi3 = require("pixi.js");
2346
- import_react9 = require("@pixi/react");
2795
+ import_react10 = require("@pixi/react");
2347
2796
  init_FaceStoreContext();
2348
2797
  init_emotion_mapper();
2349
2798
  init_useMessageVisualState();
@@ -2381,9 +2830,9 @@ function createRadialGradientTexture(size) {
2381
2830
  return import_pixi4.Texture.from(canvas);
2382
2831
  }
2383
2832
  function FaceBackground() {
2384
- (0, import_react11.useExtend)({ Sprite: import_pixi4.Sprite });
2385
- const { app, isInitialised } = (0, import_react11.useApplication)();
2386
- const texture = (0, import_react10.useMemo)(() => createRadialGradientTexture(1024), []);
2833
+ (0, import_react12.useExtend)({ Sprite: import_pixi4.Sprite });
2834
+ const { app, isInitialised } = (0, import_react12.useApplication)();
2835
+ const texture = (0, import_react11.useMemo)(() => createRadialGradientTexture(1024), []);
2387
2836
  if (!app || !isInitialised || !app.renderer) return null;
2388
2837
  const screenWidth = app.renderer.screen && app.renderer.screen.width || app.renderer.width || 2e3;
2389
2838
  const screenHeight = app.renderer.screen && app.renderer.screen.height || app.renderer.height || 2e3;
@@ -2402,13 +2851,13 @@ function FaceBackground() {
2402
2851
  }
2403
2852
  );
2404
2853
  }
2405
- var import_react10, import_pixi4, import_react11, import_jsx_runtime8;
2854
+ var import_react11, import_pixi4, import_react12, import_jsx_runtime8;
2406
2855
  var init_FaceBackground = __esm({
2407
2856
  "src/components/FaceBackground.tsx"() {
2408
2857
  "use strict";
2409
- import_react10 = require("react");
2858
+ import_react11 = require("react");
2410
2859
  import_pixi4 = require("pixi.js");
2411
- import_react11 = require("@pixi/react");
2860
+ import_react12 = require("@pixi/react");
2412
2861
  import_jsx_runtime8 = require("react/jsx-runtime");
2413
2862
  }
2414
2863
  });
@@ -2429,19 +2878,19 @@ function stepRendererBackgroundColor(renderer, targetHex) {
2429
2878
  }
2430
2879
  }
2431
2880
  function FaceContainer({ frozen = false }) {
2432
- (0, import_react13.useExtend)({ Container: import_pixi5.Container });
2881
+ (0, import_react14.useExtend)({ Container: import_pixi5.Container });
2433
2882
  const settings = useFaceStore((state) => state.faceSettings);
2434
2883
  const selectedFace = useFaceStore((state) => state.selectedFace);
2435
2884
  const lastMessage = useFaceStore((state) => state.lastMessage);
2436
- const { app, isInitialised } = (0, import_react13.useApplication)();
2437
- const [layout, setLayout] = (0, import_react12.useState)({
2885
+ const { app, isInitialised } = (0, import_react14.useApplication)();
2886
+ const [layout, setLayout] = (0, import_react13.useState)({
2438
2887
  landscape: true,
2439
2888
  scale: 1,
2440
2889
  x: 400,
2441
2890
  y: 300
2442
2891
  });
2443
2892
  const isAvatar = selectedFace?.kind === "PixiFace" && selectedFace.type === "avatar";
2444
- (0, import_react12.useEffect)(() => {
2893
+ (0, import_react13.useEffect)(() => {
2445
2894
  if (!app || !isInitialised || !app.renderer) return;
2446
2895
  const updateLayout = () => {
2447
2896
  if (!app?.renderer) return;
@@ -2474,7 +2923,7 @@ function FaceContainer({ frozen = false }) {
2474
2923
  }
2475
2924
  };
2476
2925
  }, [app, isInitialised, settings.autoRotate]);
2477
- (0, import_react13.useTick)(() => {
2926
+ (0, import_react14.useTick)(() => {
2478
2927
  if (app?.renderer && lastMessage) {
2479
2928
  const targetColor = color_mapping[lastMessage.color] ?? color_mapping["Light Blue"];
2480
2929
  stepRendererBackgroundColor(app.renderer, targetColor);
@@ -2500,13 +2949,13 @@ function FaceContainer({ frozen = false }) {
2500
2949
  }
2501
2950
  );
2502
2951
  }
2503
- var import_react12, import_pixi5, import_react13, import_jsx_runtime9;
2952
+ var import_react13, import_pixi5, import_react14, import_jsx_runtime9;
2504
2953
  var init_FaceContainer = __esm({
2505
2954
  "src/components/FaceContainer.tsx"() {
2506
2955
  "use strict";
2507
- import_react12 = require("react");
2956
+ import_react13 = require("react");
2508
2957
  import_pixi5 = require("pixi.js");
2509
- import_react13 = require("@pixi/react");
2958
+ import_react14 = require("@pixi/react");
2510
2959
  init_FaceStoreContext();
2511
2960
  init_color_mappers();
2512
2961
  init_FaceEyes();
@@ -2519,58 +2968,33 @@ var init_FaceContainer = __esm({
2519
2968
 
2520
2969
  // src/components/FaceFullScreenButton.tsx
2521
2970
  function FaceFullScreenButton() {
2522
- (0, import_react15.useExtend)({ Graphics: import_pixi6.Graphics, Container: import_pixi6.Container });
2523
- const { app } = (0, import_react15.useApplication)();
2524
- const [fullScreen, setFullScreen] = (0, import_react14.useState)(false);
2525
- (0, import_react14.useEffect)(() => {
2526
- if (typeof document === "undefined") {
2971
+ (0, import_react16.useExtend)({ Graphics: import_pixi6.Graphics, Container: import_pixi6.Container });
2972
+ const { app } = (0, import_react16.useApplication)();
2973
+ const contextFullscreen = useFaceFullscreenContext();
2974
+ const fallbackRef = (0, import_react15.useRef)(null);
2975
+ const fallbackFullscreen = useFullscreen(fallbackRef);
2976
+ const isFullscreen = contextFullscreen ? contextFullscreen.isFullscreen : fallbackFullscreen.isFullscreen;
2977
+ const toggleFullScreen = (0, import_react15.useCallback)(() => {
2978
+ if (contextFullscreen) {
2979
+ void contextFullscreen.toggleFullscreen();
2527
2980
  return;
2528
2981
  }
2529
- const handleFullscreenChange = () => {
2530
- setFullScreen(Boolean(document.fullscreenElement));
2531
- };
2532
- document.addEventListener("fullscreenchange", handleFullscreenChange);
2533
- return () => {
2534
- document.removeEventListener("fullscreenchange", handleFullscreenChange);
2535
- };
2536
- }, []);
2537
- const toggleFullScreen = (0, import_react14.useCallback)(() => {
2538
- if (typeof document === "undefined") {
2539
- return;
2540
- }
2541
- if (fullScreen) {
2542
- void document.exitFullscreen().catch((err) => {
2543
- console.warn("Exit fullscreen error:", err);
2544
- });
2545
- } else {
2546
- const container = document.getElementById("face-view-container");
2547
- if (container) {
2548
- container.requestFullscreen().catch((err) => {
2549
- console.warn("Container fullscreen error:", err);
2550
- if (app?.canvas) {
2551
- void app.canvas.requestFullscreen().catch((canvasErr) => {
2552
- console.warn("Canvas fullscreen error:", canvasErr);
2553
- });
2554
- }
2555
- });
2556
- } else if (app?.canvas) {
2557
- void app.canvas.requestFullscreen().catch((err) => {
2558
- console.warn("Canvas fullscreen error:", err);
2559
- });
2560
- }
2982
+ if (typeof document !== "undefined") {
2983
+ fallbackRef.current = document.getElementById("face-view-container") ?? (app?.canvas instanceof HTMLElement ? app.canvas : null);
2561
2984
  }
2562
- }, [app, fullScreen]);
2563
- const drawIcon = (0, import_react14.useCallback)(
2985
+ void fallbackFullscreen.toggleFullscreen();
2986
+ }, [app, contextFullscreen, fallbackFullscreen]);
2987
+ const drawIcon = (0, import_react15.useCallback)(
2564
2988
  (graphics) => {
2565
2989
  graphics.clear();
2566
- const pathD = fullScreen ? import_core2.iconPaths.arrowsPointingIn : import_core2.iconPaths.arrowsPointingOut;
2990
+ const pathD = isFullscreen ? import_core2.iconPaths.arrowsPointingIn : import_core2.iconPaths.arrowsPointingOut;
2567
2991
  graphics.svg(`
2568
2992
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="black">
2569
2993
  <path strokeLinecap="round" strokeLinejoin="round" d="${pathD}" />
2570
2994
  </svg>
2571
2995
  `);
2572
2996
  },
2573
- [fullScreen]
2997
+ [isFullscreen]
2574
2998
  );
2575
2999
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2576
3000
  "pixiContainer",
@@ -2592,30 +3016,31 @@ function FaceFullScreenButton() {
2592
3016
  }
2593
3017
  );
2594
3018
  }
2595
- var import_react14, import_react15, import_pixi6, import_core2, import_jsx_runtime10;
3019
+ var import_react15, import_react16, import_pixi6, import_core2, import_jsx_runtime10;
2596
3020
  var init_FaceFullScreenButton = __esm({
2597
3021
  "src/components/FaceFullScreenButton.tsx"() {
2598
3022
  "use strict";
2599
- import_react14 = require("react");
2600
- import_react15 = require("@pixi/react");
3023
+ import_react15 = require("react");
3024
+ import_react16 = require("@pixi/react");
2601
3025
  import_pixi6 = require("pixi.js");
2602
3026
  import_core2 = require("@peerbots/core");
3027
+ init_useFullscreen();
2603
3028
  import_jsx_runtime10 = require("react/jsx-runtime");
2604
3029
  }
2605
3030
  });
2606
3031
 
2607
3032
  // src/components/FaceScrollToTopButton.tsx
2608
3033
  function FaceScrollToTopButton() {
2609
- (0, import_react17.useExtend)({ Graphics: import_pixi7.Graphics, Container: import_pixi7.Container });
2610
- const [xPos, setXPos] = (0, import_react16.useState)(
3034
+ (0, import_react18.useExtend)({ Graphics: import_pixi7.Graphics, Container: import_pixi7.Container });
3035
+ const [xPos, setXPos] = (0, import_react17.useState)(
2611
3036
  () => typeof window !== "undefined" ? window.innerWidth - 50 : 750
2612
3037
  );
2613
- const scrollToTop = (0, import_react16.useCallback)(() => {
3038
+ const scrollToTop = (0, import_react17.useCallback)(() => {
2614
3039
  if (typeof window !== "undefined") {
2615
3040
  window.scrollTo(0, 0);
2616
3041
  }
2617
3042
  }, []);
2618
- (0, import_react16.useLayoutEffect)(() => {
3043
+ (0, import_react17.useLayoutEffect)(() => {
2619
3044
  if (typeof window === "undefined") {
2620
3045
  return;
2621
3046
  }
@@ -2630,7 +3055,7 @@ function FaceScrollToTopButton() {
2630
3055
  window.removeEventListener("resize", calculatePositionBasedOnWindow);
2631
3056
  };
2632
3057
  }, []);
2633
- const drawChevron = (0, import_react16.useCallback)((graphics) => {
3058
+ const drawChevron = (0, import_react17.useCallback)((graphics) => {
2634
3059
  graphics.clear();
2635
3060
  graphics.svg(`
2636
3061
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="black">
@@ -2658,12 +3083,12 @@ function FaceScrollToTopButton() {
2658
3083
  }
2659
3084
  );
2660
3085
  }
2661
- var import_react16, import_react17, import_pixi7, import_core3, import_jsx_runtime11;
3086
+ var import_react17, import_react18, import_pixi7, import_core3, import_jsx_runtime11;
2662
3087
  var init_FaceScrollToTopButton = __esm({
2663
3088
  "src/components/FaceScrollToTopButton.tsx"() {
2664
3089
  "use strict";
2665
- import_react16 = require("react");
2666
- import_react17 = require("@pixi/react");
3090
+ import_react17 = require("react");
3091
+ import_react18 = require("@pixi/react");
2667
3092
  import_pixi7 = require("pixi.js");
2668
3093
  import_core3 = require("@peerbots/core");
2669
3094
  import_jsx_runtime11 = require("react/jsx-runtime");
@@ -2687,10 +3112,10 @@ function PixiFaceView({
2687
3112
  isPreview = false,
2688
3113
  frozen = false
2689
3114
  } = {}) {
2690
- (0, import_react19.useExtend)({ Container: import_pixi8.Container, Graphics: import_pixi8.Graphics, Sprite: import_pixi8.Sprite, Text: import_pixi8.Text });
3115
+ (0, import_react20.useExtend)({ Container: import_pixi8.Container, Graphics: import_pixi8.Graphics, Sprite: import_pixi8.Sprite, Text: import_pixi8.Text });
2691
3116
  const settings = useFaceStore((state) => state.faceSettings);
2692
3117
  const currentStore = useFaceStoreInstance();
2693
- const [containerEl, setContainerEl] = (0, import_react18.useState)(null);
3118
+ const [containerEl, setContainerEl] = (0, import_react19.useState)(null);
2694
3119
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2695
3120
  "div",
2696
3121
  {
@@ -2698,7 +3123,7 @@ function PixiFaceView({
2698
3123
  className: "pbf:w-full pbf:h-full pbf:relative pbf:overflow-hidden",
2699
3124
  "data-testid": "pixi-face-view",
2700
3125
  children: containerEl ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2701
- import_react19.Application,
3126
+ import_react20.Application,
2702
3127
  {
2703
3128
  resizeTo: containerEl,
2704
3129
  backgroundColor: "#ABE3FA",
@@ -2713,12 +3138,12 @@ function PixiFaceView({
2713
3138
  }
2714
3139
  );
2715
3140
  }
2716
- var import_react18, import_react19, import_pixi8, import_jsx_runtime12, PixiFaceView_default;
3141
+ var import_react19, import_react20, import_pixi8, import_jsx_runtime12, PixiFaceView_default;
2717
3142
  var init_PixiFaceView = __esm({
2718
3143
  "src/components/PixiFaceView.tsx"() {
2719
3144
  "use strict";
2720
- import_react18 = require("react");
2721
- import_react19 = require("@pixi/react");
3145
+ import_react19 = require("react");
3146
+ import_react20 = require("@pixi/react");
2722
3147
  import_pixi8 = require("pixi.js");
2723
3148
  init_FaceStoreContext();
2724
3149
  init_FaceContainer();
@@ -2759,7 +3184,7 @@ function VizijPoseSetter() {
2759
3184
  const lastMessage = useFaceStore((state) => state.lastMessage);
2760
3185
  const selectedFace = useFaceStore((state) => state.selectedFace);
2761
3186
  const spokenVisemes = useFaceStore((state) => state.spokenVisemes);
2762
- const expressEmotion = (0, import_react20.useCallback)(
3187
+ const expressEmotion = (0, import_react21.useCallback)(
2763
3188
  (emotion) => {
2764
3189
  const expressivity = settings.vizijSettings?.faceExpressivity ?? 1;
2765
3190
  void animateValue(
@@ -2790,7 +3215,7 @@ function VizijPoseSetter() {
2790
3215
  },
2791
3216
  [animateValue, faceId, settings.vizijSettings?.faceExpressivity]
2792
3217
  );
2793
- const expressColor = (0, import_react20.useCallback)(
3218
+ const expressColor = (0, import_react21.useCallback)(
2794
3219
  (color) => {
2795
3220
  const rgbColor = hexToRgb(color_mapping[color]) ?? {
2796
3221
  r: 0,
@@ -2809,7 +3234,7 @@ function VizijPoseSetter() {
2809
3234
  },
2810
3235
  [faceId, animateValue]
2811
3236
  );
2812
- const expressViseme = (0, import_react20.useCallback)(
3237
+ const expressViseme = (0, import_react21.useCallback)(
2813
3238
  (viseme, durationSec, prevViseme) => {
2814
3239
  const visemeVizijPath = pollyVisemeToVizijPath[viseme];
2815
3240
  const promises = [];
@@ -2844,7 +3269,7 @@ function VizijPoseSetter() {
2844
3269
  },
2845
3270
  [animateValue, faceId]
2846
3271
  );
2847
- const expressTimedVisemes = (0, import_react20.useCallback)(
3272
+ const expressTimedVisemes = (0, import_react21.useCallback)(
2848
3273
  async (visemes) => {
2849
3274
  let prevViseme;
2850
3275
  for (const viseme of visemes) {
@@ -2855,7 +3280,7 @@ function VizijPoseSetter() {
2855
3280
  },
2856
3281
  [expressViseme]
2857
3282
  );
2858
- (0, import_react20.useEffect)(() => {
3283
+ (0, import_react21.useEffect)(() => {
2859
3284
  if (ready) {
2860
3285
  expressColor(lastMessage.color);
2861
3286
  expressEmotion(lastMessage.emotion);
@@ -2867,7 +3292,7 @@ function VizijPoseSetter() {
2867
3292
  expressColor,
2868
3293
  expressEmotion
2869
3294
  ]);
2870
- (0, import_react20.useEffect)(() => {
3295
+ (0, import_react21.useEffect)(() => {
2871
3296
  if (ready && selectedFace?.kind === "Vizij") {
2872
3297
  setInput(`rig/${faceId}/scene/scale/x`, settings.zoom);
2873
3298
  setInput(`rig/${faceId}/scene/scale/y`, settings.zoom);
@@ -2881,7 +3306,7 @@ function VizijPoseSetter() {
2881
3306
  );
2882
3307
  }
2883
3308
  }, [ready, selectedFace?.kind, faceId, setInput, settings]);
2884
- (0, import_react20.useEffect)(() => {
3309
+ (0, import_react21.useEffect)(() => {
2885
3310
  if (spokenVisemes !== null && ready) {
2886
3311
  void expressTimedVisemes(spokenVisemes);
2887
3312
  }
@@ -2899,16 +3324,16 @@ function VizijFaceView({ labels } = {}) {
2899
3324
  const rotClass = ROTATION_CLASS[normalizedRot] ?? ROTATION_CLASS[0];
2900
3325
  const glb = selectedFace.assetBundle?.glb;
2901
3326
  const hasGlbUrl = Boolean(glb) && "kind" in glb && glb.kind === "url" && Boolean(glb.src);
2902
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: rotClass, "data-testid": "vizij-face-view", children: hasGlbUrl ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_runtime_react.VizijRuntimeProvider, { assetBundle: selectedFace.assetBundle, autostart: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react20.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(VizijFallback, { labels: uiLabels }), children: [
3327
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: rotClass, "data-testid": "vizij-face-view", children: hasGlbUrl ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_runtime_react.VizijRuntimeProvider, { assetBundle: selectedFace.assetBundle, autostart: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react21.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(VizijFallback, { labels: uiLabels }), children: [
2903
3328
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_runtime_react.VizijRuntimeFace, { className: "pbf:bg-black pbf:w-full pbf:h-full" }),
2904
3329
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(VizijPoseSetter, {})
2905
3330
  ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "pbf:flex pbf:items-center pbf:justify-center pbf:h-full pbf:text-white pbf:bg-slate-900 pbf:p-4 pbf:text-sm", children: uiLabels.vizijUploadGlb }) });
2906
3331
  }
2907
- var import_react20, import_runtime_react, import_jsx_runtime13, ROTATION_CLASS, VizijFaceView_default;
3332
+ var import_react21, import_runtime_react, import_jsx_runtime13, ROTATION_CLASS, VizijFaceView_default;
2908
3333
  var init_VizijFaceView = __esm({
2909
3334
  "src/components/VizijFaceView.tsx"() {
2910
3335
  "use strict";
2911
- import_react20 = require("react");
3336
+ import_react21 = require("react");
2912
3337
  import_runtime_react = require("@vizij/runtime-react");
2913
3338
  init_FaceStoreContext();
2914
3339
  init_viseme_mapper();
@@ -2930,6 +3355,7 @@ var src_exports = {};
2930
3355
  __export(src_exports, {
2931
3356
  AmplitudeGraph: () => AmplitudeGraph,
2932
3357
  AudioAnalyzer: () => AudioAnalyzer,
3358
+ AudioManager: () => AudioManager,
2933
3359
  CONNECTION_FACE_MESSAGE: () => CONNECTION_FACE_MESSAGE,
2934
3360
  CharacterSelectionControls: () => CharacterSelectionControls,
2935
3361
  CharacterSelectionSection: () => CharacterSelectionSection,
@@ -2942,6 +3368,7 @@ __export(src_exports, {
2942
3368
  FaceAudioPrompt: () => FaceAudioPrompt,
2943
3369
  FaceBehaviorControls: () => FaceBehaviorControls,
2944
3370
  FaceCaption: () => FaceCaption,
3371
+ FaceFullscreenContext: () => FaceFullscreenContext,
2945
3372
  FacePositioningControls: () => FacePositioningControls,
2946
3373
  FacePositioningSection: () => FacePositioningSection,
2947
3374
  FaceRendererRegistry: () => FaceRendererRegistry,
@@ -2957,10 +3384,13 @@ __export(src_exports, {
2957
3384
  PEERBOTS_COLORS: () => PEERBOTS_COLORS,
2958
3385
  PEERBOTS_EMOTIONS: () => PEERBOTS_EMOTIONS,
2959
3386
  PoweredByVizij: () => PoweredByVizij,
3387
+ SILENT_WAV_DATA_URI: () => SILENT_WAV_DATA_URI,
2960
3388
  StaticFaceFallback: () => StaticFaceFallback,
2961
3389
  TtsAudioCache: () => TtsAudioCache,
2962
3390
  VoiceSelector: () => VoiceSelector,
3391
+ addFullscreenChangeListener: () => addFullscreenChangeListener,
2963
3392
  audioAnalyzer: () => audioAnalyzer,
3393
+ audioManager: () => audioManager,
2964
3394
  availableFaces: () => availableFaces,
2965
3395
  blobToArrayBuffer: () => blobToArrayBuffer,
2966
3396
  buildTtsCacheKey: () => buildTtsCacheKey,
@@ -2982,6 +3412,7 @@ __export(src_exports, {
2982
3412
  defaultTtsAudioCache: () => defaultTtsAudioCache,
2983
3413
  emotion_mapping: () => emotion_mapping,
2984
3414
  estimateVisemesFromText: () => estimateVisemesFromText,
3415
+ exitNativeFullscreen: () => exitNativeFullscreen,
2985
3416
  findMatchingVoice: () => findMatchingVoice,
2986
3417
  font_color_mapping: () => font_color_mapping,
2987
3418
  formatRbga: () => formatRbga,
@@ -2990,6 +3421,7 @@ __export(src_exports, {
2990
3421
  getEmotionEyeSpritePaths: () => getEmotionEyeSpritePaths,
2991
3422
  getEmotionIconPath: () => getEmotionIconPath,
2992
3423
  getFaceCapabilities: () => getFaceCapabilities,
3424
+ getFullscreenElement: () => getFullscreenElement,
2993
3425
  getGlobalFaceStore: () => getGlobalFaceStore,
2994
3426
  getLanguageName: () => getLanguageName,
2995
3427
  globalFaceStore: () => globalFaceStore,
@@ -2998,6 +3430,9 @@ __export(src_exports, {
2998
3430
  includedVizijFaces: () => includedVizijFaces,
2999
3431
  interpolateColor: () => interpolateColor,
3000
3432
  isHeadlessOrTestEnvironment: () => isHeadlessOrTestEnvironment,
3433
+ isIOSDevice: () => isIOSDevice,
3434
+ isMobileSafari: () => isMobileSafari,
3435
+ isNativeFullscreenSupported: () => isNativeFullscreenSupported,
3001
3436
  isWebGLAvailable: () => isWebGLAvailable,
3002
3437
  mapVisemeToVizijTarget: () => mapVisemeToVizijTarget,
3003
3438
  mergeFaceSettings: () => mergeFaceSettings,
@@ -3006,13 +3441,16 @@ __export(src_exports, {
3006
3441
  pollyVisemeToVizijPath: () => pollyVisemeToVizijPath,
3007
3442
  possiblePollyVisemes: () => possiblePollyVisemes,
3008
3443
  rbgToRgba: () => rbgToRgba,
3444
+ requestNativeFullscreen: () => requestNativeFullscreen,
3009
3445
  resolveFaceUiLabels: () => resolveFaceUiLabels,
3010
3446
  rgbToRgba: () => rgbToRgba,
3011
3447
  rgbaToHex: () => rgbaToHex,
3012
3448
  setGlobalFaceStore: () => setGlobalFaceStore,
3013
3449
  stopNativeSpeechSynthesis: () => stopNativeSpeechSynthesis,
3450
+ useFaceFullscreenContext: () => useFaceFullscreenContext,
3014
3451
  useFaceStore: () => useFaceStore,
3015
3452
  useFaceStoreInstance: () => useFaceStoreInstance,
3453
+ useFullscreen: () => useFullscreen,
3016
3454
  useMessageVisualState: () => useMessageVisualState,
3017
3455
  vizijFaceRendererStrategy: () => vizijFaceRendererStrategy
3018
3456
  });
@@ -3041,7 +3479,7 @@ function styleInject(css, { insertAt } = {}) {
3041
3479
  }
3042
3480
 
3043
3481
  // src/styles/index.css
3044
- styleInject('/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root,\n :host {\n --pbf-font-sans:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n "Noto Sans",\n Arial,\n sans-serif,\n "Apple Color Emoji",\n "Segoe UI Emoji",\n "Segoe UI Symbol",\n "Noto Color Emoji";\n --pbf-font-mono:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n "Liberation Mono",\n "Courier New",\n monospace;\n --pbf-color-green-400: oklch(79.2% 0.209 151.711);\n --pbf-color-green-500: oklch(72.3% 0.219 149.579);\n --pbf-color-emerald-600: oklch(59.6% 0.145 163.225);\n --pbf-color-teal-700: oklch(51.1% 0.096 186.391);\n --pbf-color-sky-50: oklch(97.7% 0.013 236.62);\n --pbf-color-blue-500: oklch(62.3% 0.214 259.815);\n --pbf-color-blue-600: oklch(54.6% 0.245 262.881);\n --pbf-color-slate-50: oklch(98.4% 0.003 247.858);\n --pbf-color-slate-100: oklch(96.8% 0.007 247.896);\n --pbf-color-slate-300: oklch(86.9% 0.022 252.894);\n --pbf-color-slate-400: oklch(70.4% 0.04 256.788);\n --pbf-color-slate-600: oklch(44.6% 0.043 257.281);\n --pbf-color-slate-700: oklch(37.2% 0.044 257.287);\n --pbf-color-slate-800: oklch(27.9% 0.041 260.031);\n --pbf-color-slate-900: oklch(20.8% 0.042 265.755);\n --pbf-color-gray-50: oklch(98.5% 0.002 247.839);\n --pbf-color-gray-100: oklch(96.7% 0.003 264.542);\n --pbf-color-gray-200: oklch(92.8% 0.006 264.531);\n --pbf-color-gray-500: oklch(55.1% 0.027 264.364);\n --pbf-color-black: #000;\n --pbf-color-white: #fff;\n --pbf-spacing: 0.25rem;\n --pbf-container-lg: 32rem;\n --pbf-container-xl: 36rem;\n --pbf-text-xs: 0.75rem;\n --pbf-text-xs--line-height: calc(1 / 0.75);\n --pbf-text-sm: 0.875rem;\n --pbf-text-sm--line-height: calc(1.25 / 0.875);\n --pbf-text-lg: 1.125rem;\n --pbf-text-lg--line-height: calc(1.75 / 1.125);\n --pbf-text-2xl: 1.5rem;\n --pbf-text-2xl--line-height: calc(2 / 1.5);\n --pbf-text-4xl: 2.25rem;\n --pbf-text-4xl--line-height: calc(2.5 / 2.25);\n --pbf-font-weight-medium: 500;\n --pbf-font-weight-semibold: 600;\n --pbf-font-weight-bold: 700;\n --pbf-tracking-tight: -0.025em;\n --pbf-tracking-wide: 0.025em;\n --pbf-tracking-wider: 0.05em;\n --pbf-leading-tight: 1.25;\n --pbf-radius-md: 0.375rem;\n --pbf-radius-lg: 0.5rem;\n --pbf-ease-out: cubic-bezier(0, 0, 0.2, 1);\n --pbf-animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;\n --pbf-default-transition-duration: 150ms;\n --pbf-default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --pbf-default-font-family: var(--pbf-font-sans);\n --pbf-default-mono-font-family: var(--pbf-font-mono);\n }\n}\n@layer base {\n *,\n ::after,\n ::before,\n ::backdrop,\n ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html,\n :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--pbf-default-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--pbf-default-font-feature-settings, normal);\n font-variation-settings: var(--pbf-default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b,\n strong {\n font-weight: bolder;\n }\n code,\n kbd,\n samp,\n pre {\n font-family: var(--pbf-default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--pbf-default-mono-font-feature-settings, normal);\n font-variation-settings: var(--pbf-default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring:where(:not(iframe)) {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol,\n ul,\n menu {\n list-style: none;\n }\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n vertical-align: middle;\n }\n img,\n video {\n max-width: 100%;\n height: auto;\n }\n button,\n input,\n select,\n optgroup,\n textarea,\n ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit,\n ::-webkit-datetime-edit-year-field,\n ::-webkit-datetime-edit-month-field,\n ::-webkit-datetime-edit-day-field,\n ::-webkit-datetime-edit-hour-field,\n ::-webkit-datetime-edit-minute-field,\n ::-webkit-datetime-edit-second-field,\n ::-webkit-datetime-edit-millisecond-field,\n ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n ::-webkit-calendar-picker-indicator {\n line-height: 1;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button,\n input:where([type=button], [type=reset], [type=submit]),\n ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button,\n ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=until-found])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pbf\\:pointer-events-none {\n pointer-events: none;\n }\n .pbf\\:absolute {\n position: absolute;\n }\n .pbf\\:fixed {\n position: fixed;\n }\n .pbf\\:relative {\n position: relative;\n }\n .pbf\\:top-1\\/3 {\n top: calc(1 / 3 * 100%);\n }\n .pbf\\:top-4 {\n top: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:left-1\\/2 {\n left: calc(1 / 2 * 100%);\n }\n .pbf\\:z-50 {\n z-index: 50;\n }\n .pbf\\:m-4 {\n margin: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:my-2 {\n margin-block: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:mt-1 {\n margin-top: var(--pbf-spacing);\n }\n .pbf\\:mt-2 {\n margin-top: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:mt-4 {\n margin-top: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:mt-48 {\n margin-top: calc(var(--pbf-spacing) * 48);\n }\n .pbf\\:mb-0 {\n margin-bottom: 0px;\n }\n .pbf\\:mb-1 {\n margin-bottom: var(--pbf-spacing);\n }\n .pbf\\:mb-1\\.5 {\n margin-bottom: calc(var(--pbf-spacing) * 1.5);\n }\n .pbf\\:mb-2 {\n margin-bottom: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:block {\n display: block;\n }\n .pbf\\:flex {\n display: flex;\n }\n .pbf\\:grid {\n display: grid;\n }\n .pbf\\:inline-flex {\n display: inline-flex;\n }\n .pbf\\:h-2 {\n height: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:h-3 {\n height: calc(var(--pbf-spacing) * 3);\n }\n .pbf\\:h-3\\.5 {\n height: calc(var(--pbf-spacing) * 3.5);\n }\n .pbf\\:h-4 {\n height: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:h-5 {\n height: calc(var(--pbf-spacing) * 5);\n }\n .pbf\\:h-6 {\n height: calc(var(--pbf-spacing) * 6);\n }\n .pbf\\:h-8 {\n height: calc(var(--pbf-spacing) * 8);\n }\n .pbf\\:h-16 {\n height: calc(var(--pbf-spacing) * 16);\n }\n .pbf\\:h-20 {\n height: calc(var(--pbf-spacing) * 20);\n }\n .pbf\\:h-full {\n height: 100%;\n }\n .pbf\\:max-h-32 {\n max-height: calc(var(--pbf-spacing) * 32);\n }\n .pbf\\:\\!w-auto {\n width: auto !important;\n }\n .pbf\\:w-2 {\n width: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:w-3 {\n width: calc(var(--pbf-spacing) * 3);\n }\n .pbf\\:w-3\\.5 {\n width: calc(var(--pbf-spacing) * 3.5);\n }\n .pbf\\:w-5 {\n width: calc(var(--pbf-spacing) * 5);\n }\n .pbf\\:w-8 {\n width: calc(var(--pbf-spacing) * 8);\n }\n .pbf\\:w-14 {\n width: calc(var(--pbf-spacing) * 14);\n }\n .pbf\\:w-16 {\n width: calc(var(--pbf-spacing) * 16);\n }\n .pbf\\:w-20 {\n width: calc(var(--pbf-spacing) * 20);\n }\n .pbf\\:w-24 {\n width: calc(var(--pbf-spacing) * 24);\n }\n .pbf\\:w-\\[80\\%\\] {\n width: 80%;\n }\n .pbf\\:w-full {\n width: 100%;\n }\n .pbf\\:max-w-lg {\n max-width: var(--pbf-container-lg);\n }\n .pbf\\:max-w-xl {\n max-width: var(--pbf-container-xl);\n }\n .pbf\\:min-w-0 {\n min-width: 0px;\n }\n .pbf\\:min-w-\\[260px\\] {\n min-width: 260px;\n }\n .pbf\\:min-w-fit {\n min-width: fit-content;\n }\n .pbf\\:flex-1 {\n flex: 1;\n }\n .pbf\\:shrink-0 {\n flex-shrink: 0;\n }\n .pbf\\:-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .pbf\\:rotate-0 {\n rotate: 0deg;\n }\n .pbf\\:rotate-90 {\n rotate: 90deg;\n }\n .pbf\\:rotate-180 {\n rotate: 180deg;\n }\n .pbf\\:rotate-270 {\n rotate: 270deg;\n }\n .pbf\\:animate-ping {\n animation: var(--pbf-animate-ping);\n }\n .pbf\\:cursor-pointer {\n cursor: pointer;\n }\n .pbf\\:grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n .pbf\\:grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .pbf\\:flex-col {\n flex-direction: column;\n }\n .pbf\\:flex-row {\n flex-direction: row;\n }\n .pbf\\:flex-wrap {\n flex-wrap: wrap;\n }\n .pbf\\:items-center {\n align-items: center;\n }\n .pbf\\:items-start {\n align-items: flex-start;\n }\n .pbf\\:justify-around {\n justify-content: space-around;\n }\n .pbf\\:justify-between {\n justify-content: space-between;\n }\n .pbf\\:justify-center {\n justify-content: center;\n }\n .pbf\\:gap-0\\.5 {\n gap: calc(var(--pbf-spacing) * 0.5);\n }\n .pbf\\:gap-1 {\n gap: var(--pbf-spacing);\n }\n .pbf\\:gap-1\\.5 {\n gap: calc(var(--pbf-spacing) * 1.5);\n }\n .pbf\\:gap-2 {\n gap: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:gap-3 {\n gap: calc(var(--pbf-spacing) * 3);\n }\n .pbf\\:gap-4 {\n gap: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:gap-8 {\n gap: calc(var(--pbf-spacing) * 8);\n }\n .pbf\\:gap-16 {\n gap: calc(var(--pbf-spacing) * 16);\n }\n :where(.pbf\\:space-y-3 > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--pbf-spacing) * 3) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--pbf-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));\n }\n :where(.pbf\\:space-y-4 > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--pbf-spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--pbf-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n .pbf\\:gap-x-4 {\n column-gap: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:gap-y-2 {\n row-gap: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:overflow-hidden {\n overflow: hidden;\n }\n .pbf\\:overflow-y-auto {\n overflow-y: auto;\n }\n .pbf\\:rounded {\n border-radius: 0.25rem;\n }\n .pbf\\:rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .pbf\\:rounded-lg {\n border-radius: var(--pbf-radius-lg);\n }\n .pbf\\:rounded-r-md {\n border-top-right-radius: var(--pbf-radius-md);\n border-bottom-right-radius: var(--pbf-radius-md);\n }\n .pbf\\:rounded-b-full {\n border-bottom-right-radius: calc(infinity * 1px);\n border-bottom-left-radius: calc(infinity * 1px);\n }\n .pbf\\:border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .pbf\\:border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .pbf\\:border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .pbf\\:border-l-2 {\n border-left-style: var(--tw-border-style);\n border-left-width: 2px;\n }\n .pbf\\:border-gray-100 {\n border-color: var(--pbf-color-gray-100);\n }\n .pbf\\:border-gray-200 {\n border-color: var(--pbf-color-gray-200);\n }\n .pbf\\:border-teal-700\\/30 {\n border-color: var(--pbf-color-teal-700);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--pbf-color-teal-700) 30%, transparent);\n }\n }\n .pbf\\:bg-black {\n background-color: var(--pbf-color-black);\n }\n .pbf\\:bg-blue-500 {\n background-color: var(--pbf-color-blue-500);\n }\n .pbf\\:bg-emerald-600 {\n background-color: var(--pbf-color-emerald-600);\n }\n .pbf\\:bg-gray-50 {\n background-color: var(--pbf-color-gray-50);\n }\n .pbf\\:bg-gray-200 {\n background-color: var(--pbf-color-gray-200);\n }\n .pbf\\:bg-green-400 {\n background-color: var(--pbf-color-green-400);\n }\n .pbf\\:bg-green-500 {\n background-color: var(--pbf-color-green-500);\n }\n .pbf\\:bg-sky-50 {\n background-color: var(--pbf-color-sky-50);\n }\n .pbf\\:bg-slate-50 {\n background-color: var(--pbf-color-slate-50);\n }\n .pbf\\:bg-slate-100 {\n background-color: var(--pbf-color-slate-100);\n }\n .pbf\\:bg-slate-300 {\n background-color: var(--pbf-color-slate-300);\n }\n .pbf\\:bg-slate-400 {\n background-color: var(--pbf-color-slate-400);\n }\n .pbf\\:bg-slate-900 {\n background-color: var(--pbf-color-slate-900);\n }\n .pbf\\:bg-white {\n background-color: var(--pbf-color-white);\n }\n .pbf\\:object-contain {\n object-fit: contain;\n }\n .pbf\\:p-1\\.5 {\n padding: calc(var(--pbf-spacing) * 1.5);\n }\n .pbf\\:p-2 {\n padding: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:p-4 {\n padding: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:p-6 {\n padding: calc(var(--pbf-spacing) * 6);\n }\n .pbf\\:p-8 {\n padding: calc(var(--pbf-spacing) * 8);\n }\n .pbf\\:px-3 {\n padding-inline: calc(var(--pbf-spacing) * 3);\n }\n .pbf\\:px-4 {\n padding-inline: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:px-12 {\n padding-inline: calc(var(--pbf-spacing) * 12);\n }\n .pbf\\:py-0\\.5 {\n padding-block: calc(var(--pbf-spacing) * 0.5);\n }\n .pbf\\:py-1\\.5 {\n padding-block: calc(var(--pbf-spacing) * 1.5);\n }\n .pbf\\:py-2 {\n padding-block: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:pt-1 {\n padding-top: var(--pbf-spacing);\n }\n .pbf\\:pt-2 {\n padding-top: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:text-center {\n text-align: center;\n }\n .pbf\\:font-mono {\n font-family: var(--pbf-font-mono);\n }\n .pbf\\:font-sans {\n font-family: var(--pbf-font-sans);\n }\n .pbf\\:text-2xl {\n font-size: var(--pbf-text-2xl);\n line-height: var(--tw-leading, var(--pbf-text-2xl--line-height));\n }\n .pbf\\:text-4xl {\n font-size: var(--pbf-text-4xl);\n line-height: var(--tw-leading, var(--pbf-text-4xl--line-height));\n }\n .pbf\\:text-lg {\n font-size: var(--pbf-text-lg);\n line-height: var(--tw-leading, var(--pbf-text-lg--line-height));\n }\n .pbf\\:text-sm {\n font-size: var(--pbf-text-sm);\n line-height: var(--tw-leading, var(--pbf-text-sm--line-height));\n }\n .pbf\\:text-xs {\n font-size: var(--pbf-text-xs);\n line-height: var(--tw-leading, var(--pbf-text-xs--line-height));\n }\n .pbf\\:text-\\[9px\\] {\n font-size: 9px;\n }\n .pbf\\:text-\\[11px\\] {\n font-size: 11px;\n }\n .pbf\\:leading-6 {\n --tw-leading: calc(var(--pbf-spacing) * 6);\n line-height: calc(var(--pbf-spacing) * 6);\n }\n .pbf\\:leading-tight {\n --tw-leading: var(--pbf-leading-tight);\n line-height: var(--pbf-leading-tight);\n }\n .pbf\\:font-bold {\n --tw-font-weight: var(--pbf-font-weight-bold);\n font-weight: var(--pbf-font-weight-bold);\n }\n .pbf\\:font-medium {\n --tw-font-weight: var(--pbf-font-weight-medium);\n font-weight: var(--pbf-font-weight-medium);\n }\n .pbf\\:font-semibold {\n --tw-font-weight: var(--pbf-font-weight-semibold);\n font-weight: var(--pbf-font-weight-semibold);\n }\n .pbf\\:tracking-\\[0\\.2em\\] {\n --tw-tracking: 0.2em;\n letter-spacing: 0.2em;\n }\n .pbf\\:tracking-tight {\n --tw-tracking: var(--pbf-tracking-tight);\n letter-spacing: var(--pbf-tracking-tight);\n }\n .pbf\\:tracking-wide {\n --tw-tracking: var(--pbf-tracking-wide);\n letter-spacing: var(--pbf-tracking-wide);\n }\n .pbf\\:tracking-wider {\n --tw-tracking: var(--pbf-tracking-wider);\n letter-spacing: var(--pbf-tracking-wider);\n }\n .pbf\\:break-words {\n overflow-wrap: break-word;\n }\n .pbf\\:whitespace-nowrap {\n white-space: nowrap;\n }\n .pbf\\:text-blue-600 {\n color: var(--pbf-color-blue-600);\n }\n .pbf\\:text-gray-500 {\n color: var(--pbf-color-gray-500);\n }\n .pbf\\:text-slate-600 {\n color: var(--pbf-color-slate-600);\n }\n .pbf\\:text-slate-700 {\n color: var(--pbf-color-slate-700);\n }\n .pbf\\:text-slate-800 {\n color: var(--pbf-color-slate-800);\n }\n .pbf\\:text-slate-900 {\n color: var(--pbf-color-slate-900);\n }\n .pbf\\:text-teal-700 {\n color: var(--pbf-color-teal-700);\n }\n .pbf\\:text-white {\n color: var(--pbf-color-white);\n }\n .pbf\\:uppercase {\n text-transform: uppercase;\n }\n .pbf\\:italic {\n font-style: italic;\n }\n .pbf\\:opacity-75 {\n opacity: 75%;\n }\n .pbf\\:opacity-90 {\n opacity: 90%;\n }\n .pbf\\:shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow:\n var(--tw-inset-shadow),\n var(--tw-inset-ring-shadow),\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow);\n }\n .pbf\\:shadow-xl {\n --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow:\n var(--tw-inset-shadow),\n var(--tw-inset-ring-shadow),\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow);\n }\n .pbf\\:transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--pbf-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--pbf-default-transition-duration));\n }\n .pbf\\:transition-colors {\n transition-property:\n color,\n background-color,\n border-color,\n outline-color,\n text-decoration-color,\n fill,\n stroke,\n --tw-gradient-from,\n --tw-gradient-via,\n --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--pbf-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--pbf-default-transition-duration));\n }\n .pbf\\:transition-transform {\n transition-property:\n transform,\n translate,\n scale,\n rotate;\n transition-timing-function: var(--tw-ease, var(--pbf-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--pbf-default-transition-duration));\n }\n .pbf\\:duration-75 {\n --tw-duration: 75ms;\n transition-duration: 75ms;\n }\n .pbf\\:duration-150 {\n --tw-duration: 150ms;\n transition-duration: 150ms;\n }\n .pbf\\:duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .pbf\\:duration-300 {\n --tw-duration: 300ms;\n transition-duration: 300ms;\n }\n .pbf\\:ease-out {\n --tw-ease: var(--pbf-ease-out);\n transition-timing-function: var(--pbf-ease-out);\n }\n .pbf\\:select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n @media (hover: hover) {\n :is(:where(.pbf\\:group):hover .pbf\\:group-hover\\:scale-110) {\n --tw-scale-x: 110%;\n --tw-scale-y: 110%;\n --tw-scale-z: 110%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n }\n .pbf\\:last\\:border-0:last-child {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n @media (hover: hover) {\n .pbf\\:hover\\:opacity-100:hover {\n opacity: 100%;\n }\n }\n .pbf\\:focus-visible\\:outline-none:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n @media (width >= 48rem) {\n .pbf\\:md\\:h-12 {\n height: calc(var(--pbf-spacing) * 12);\n }\n .pbf\\:md\\:h-24 {\n height: calc(var(--pbf-spacing) * 24);\n }\n .pbf\\:md\\:h-28 {\n height: calc(var(--pbf-spacing) * 28);\n }\n .pbf\\:md\\:w-24 {\n width: calc(var(--pbf-spacing) * 24);\n }\n .pbf\\:md\\:w-28 {\n width: calc(var(--pbf-spacing) * 28);\n }\n .pbf\\:md\\:w-32 {\n width: calc(var(--pbf-spacing) * 32);\n }\n .pbf\\:md\\:grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .pbf\\:md\\:gap-24 {\n gap: calc(var(--pbf-spacing) * 24);\n }\n }\n @media (width >= 64rem) {\n .pbf\\:lg\\:grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n .pbf\\:lg\\:gap-6 {\n gap: calc(var(--pbf-spacing) * 6);\n }\n }\n .pbf\\:rtl\\:border-r-2:where(:dir(rtl), [dir=rtl], [dir=rtl] *) {\n border-right-style: var(--tw-border-style);\n border-right-width: 2px;\n }\n .pbf\\:rtl\\:border-l-0:where(:dir(rtl), [dir=rtl], [dir=rtl] *) {\n border-left-style: var(--tw-border-style);\n border-left-width: 0px;\n }\n}\n@property --tw-translate-x { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-translate-y { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-translate-z { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-space-y-reverse { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }\n@property --tw-leading { syntax: "*"; inherits: false; }\n@property --tw-font-weight { syntax: "*"; inherits: false; }\n@property --tw-tracking { syntax: "*"; inherits: false; }\n@property --tw-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-shadow-color { syntax: "*"; inherits: false; }\n@property --tw-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }\n@property --tw-inset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-inset-shadow-color { syntax: "*"; inherits: false; }\n@property --tw-inset-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }\n@property --tw-ring-color { syntax: "*"; inherits: false; }\n@property --tw-ring-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-inset-ring-color { syntax: "*"; inherits: false; }\n@property --tw-inset-ring-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-ring-inset { syntax: "*"; inherits: false; }\n@property --tw-ring-offset-width { syntax: "<length>"; inherits: false; initial-value: 0px; }\n@property --tw-ring-offset-color { syntax: "*"; inherits: false; initial-value: #fff; }\n@property --tw-ring-offset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-duration { syntax: "*"; inherits: false; }\n@property --tw-ease { syntax: "*"; inherits: false; }\n@property --tw-scale-x { syntax: "*"; inherits: false; initial-value: 1; }\n@property --tw-scale-y { syntax: "*"; inherits: false; initial-value: 1; }\n@property --tw-scale-z { syntax: "*"; inherits: false; initial-value: 1; }\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *,\n ::before,\n ::after,\n ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-tracking: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n --tw-ease: initial;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n }\n }\n}\n', { insertAt: "top" });
3482
+ styleInject('/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root,\n :host {\n --pbf-font-sans:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n "Noto Sans",\n Arial,\n sans-serif,\n "Apple Color Emoji",\n "Segoe UI Emoji",\n "Segoe UI Symbol",\n "Noto Color Emoji";\n --pbf-font-mono:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n "Liberation Mono",\n "Courier New",\n monospace;\n --pbf-color-green-400: oklch(79.2% 0.209 151.711);\n --pbf-color-green-500: oklch(72.3% 0.219 149.579);\n --pbf-color-emerald-600: oklch(59.6% 0.145 163.225);\n --pbf-color-teal-700: oklch(51.1% 0.096 186.391);\n --pbf-color-sky-50: oklch(97.7% 0.013 236.62);\n --pbf-color-blue-500: oklch(62.3% 0.214 259.815);\n --pbf-color-blue-600: oklch(54.6% 0.245 262.881);\n --pbf-color-slate-50: oklch(98.4% 0.003 247.858);\n --pbf-color-slate-100: oklch(96.8% 0.007 247.896);\n --pbf-color-slate-300: oklch(86.9% 0.022 252.894);\n --pbf-color-slate-400: oklch(70.4% 0.04 256.788);\n --pbf-color-slate-600: oklch(44.6% 0.043 257.281);\n --pbf-color-slate-700: oklch(37.2% 0.044 257.287);\n --pbf-color-slate-800: oklch(27.9% 0.041 260.031);\n --pbf-color-slate-900: oklch(20.8% 0.042 265.755);\n --pbf-color-gray-50: oklch(98.5% 0.002 247.839);\n --pbf-color-gray-100: oklch(96.7% 0.003 264.542);\n --pbf-color-gray-200: oklch(92.8% 0.006 264.531);\n --pbf-color-gray-500: oklch(55.1% 0.027 264.364);\n --pbf-color-black: #000;\n --pbf-color-white: #fff;\n --pbf-spacing: 0.25rem;\n --pbf-container-lg: 32rem;\n --pbf-container-xl: 36rem;\n --pbf-text-xs: 0.75rem;\n --pbf-text-xs--line-height: calc(1 / 0.75);\n --pbf-text-sm: 0.875rem;\n --pbf-text-sm--line-height: calc(1.25 / 0.875);\n --pbf-text-lg: 1.125rem;\n --pbf-text-lg--line-height: calc(1.75 / 1.125);\n --pbf-text-2xl: 1.5rem;\n --pbf-text-2xl--line-height: calc(2 / 1.5);\n --pbf-text-4xl: 2.25rem;\n --pbf-text-4xl--line-height: calc(2.5 / 2.25);\n --pbf-font-weight-medium: 500;\n --pbf-font-weight-semibold: 600;\n --pbf-font-weight-bold: 700;\n --pbf-tracking-tight: -0.025em;\n --pbf-tracking-wide: 0.025em;\n --pbf-tracking-wider: 0.05em;\n --pbf-leading-tight: 1.25;\n --pbf-radius-md: 0.375rem;\n --pbf-radius-lg: 0.5rem;\n --pbf-ease-out: cubic-bezier(0, 0, 0.2, 1);\n --pbf-animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;\n --pbf-blur-sm: 8px;\n --pbf-default-transition-duration: 150ms;\n --pbf-default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --pbf-default-font-family: var(--pbf-font-sans);\n --pbf-default-mono-font-family: var(--pbf-font-mono);\n }\n}\n@layer base {\n *,\n ::after,\n ::before,\n ::backdrop,\n ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html,\n :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--pbf-default-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--pbf-default-font-feature-settings, normal);\n font-variation-settings: var(--pbf-default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b,\n strong {\n font-weight: bolder;\n }\n code,\n kbd,\n samp,\n pre {\n font-family: var(--pbf-default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--pbf-default-mono-font-feature-settings, normal);\n font-variation-settings: var(--pbf-default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring:where(:not(iframe)) {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol,\n ul,\n menu {\n list-style: none;\n }\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n vertical-align: middle;\n }\n img,\n video {\n max-width: 100%;\n height: auto;\n }\n button,\n input,\n select,\n optgroup,\n textarea,\n ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit,\n ::-webkit-datetime-edit-year-field,\n ::-webkit-datetime-edit-month-field,\n ::-webkit-datetime-edit-day-field,\n ::-webkit-datetime-edit-hour-field,\n ::-webkit-datetime-edit-minute-field,\n ::-webkit-datetime-edit-second-field,\n ::-webkit-datetime-edit-millisecond-field,\n ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n ::-webkit-calendar-picker-indicator {\n line-height: 1;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button,\n input:where([type=button], [type=reset], [type=submit]),\n ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button,\n ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=until-found])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pbf\\:pointer-events-none {\n pointer-events: none;\n }\n .pbf\\:absolute {\n position: absolute;\n }\n .pbf\\:fixed {\n position: fixed;\n }\n .pbf\\:relative {\n position: relative;\n }\n .pbf\\:inset-0 {\n inset: 0px;\n }\n .pbf\\:top-1\\/3 {\n top: calc(1 / 3 * 100%);\n }\n .pbf\\:top-4 {\n top: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:left-1\\/2 {\n left: calc(1 / 2 * 100%);\n }\n .pbf\\:z-50 {\n z-index: 50;\n }\n .pbf\\:z-\\[9999\\] {\n z-index: 9999;\n }\n .pbf\\:m-4 {\n margin: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:my-2 {\n margin-block: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:mt-1 {\n margin-top: var(--pbf-spacing);\n }\n .pbf\\:mt-2 {\n margin-top: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:mt-4 {\n margin-top: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:mt-48 {\n margin-top: calc(var(--pbf-spacing) * 48);\n }\n .pbf\\:mb-0 {\n margin-bottom: 0px;\n }\n .pbf\\:mb-1 {\n margin-bottom: var(--pbf-spacing);\n }\n .pbf\\:mb-1\\.5 {\n margin-bottom: calc(var(--pbf-spacing) * 1.5);\n }\n .pbf\\:mb-2 {\n margin-bottom: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:block {\n display: block;\n }\n .pbf\\:flex {\n display: flex;\n }\n .pbf\\:grid {\n display: grid;\n }\n .pbf\\:inline-flex {\n display: inline-flex;\n }\n .pbf\\:h-2 {\n height: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:h-3 {\n height: calc(var(--pbf-spacing) * 3);\n }\n .pbf\\:h-3\\.5 {\n height: calc(var(--pbf-spacing) * 3.5);\n }\n .pbf\\:h-4 {\n height: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:h-5 {\n height: calc(var(--pbf-spacing) * 5);\n }\n .pbf\\:h-6 {\n height: calc(var(--pbf-spacing) * 6);\n }\n .pbf\\:h-8 {\n height: calc(var(--pbf-spacing) * 8);\n }\n .pbf\\:h-16 {\n height: calc(var(--pbf-spacing) * 16);\n }\n .pbf\\:h-20 {\n height: calc(var(--pbf-spacing) * 20);\n }\n .pbf\\:h-\\[100dvh\\] {\n height: 100dvh;\n }\n .pbf\\:h-full {\n height: 100%;\n }\n .pbf\\:max-h-32 {\n max-height: calc(var(--pbf-spacing) * 32);\n }\n .pbf\\:\\!w-auto {\n width: auto !important;\n }\n .pbf\\:w-2 {\n width: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:w-3 {\n width: calc(var(--pbf-spacing) * 3);\n }\n .pbf\\:w-3\\.5 {\n width: calc(var(--pbf-spacing) * 3.5);\n }\n .pbf\\:w-5 {\n width: calc(var(--pbf-spacing) * 5);\n }\n .pbf\\:w-8 {\n width: calc(var(--pbf-spacing) * 8);\n }\n .pbf\\:w-14 {\n width: calc(var(--pbf-spacing) * 14);\n }\n .pbf\\:w-16 {\n width: calc(var(--pbf-spacing) * 16);\n }\n .pbf\\:w-20 {\n width: calc(var(--pbf-spacing) * 20);\n }\n .pbf\\:w-24 {\n width: calc(var(--pbf-spacing) * 24);\n }\n .pbf\\:w-\\[80\\%\\] {\n width: 80%;\n }\n .pbf\\:w-full {\n width: 100%;\n }\n .pbf\\:w-screen {\n width: 100vw;\n }\n .pbf\\:max-w-lg {\n max-width: var(--pbf-container-lg);\n }\n .pbf\\:max-w-xl {\n max-width: var(--pbf-container-xl);\n }\n .pbf\\:min-w-0 {\n min-width: 0px;\n }\n .pbf\\:min-w-\\[260px\\] {\n min-width: 260px;\n }\n .pbf\\:min-w-fit {\n min-width: fit-content;\n }\n .pbf\\:flex-1 {\n flex: 1;\n }\n .pbf\\:shrink-0 {\n flex-shrink: 0;\n }\n .pbf\\:-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .pbf\\:rotate-0 {\n rotate: 0deg;\n }\n .pbf\\:rotate-90 {\n rotate: 90deg;\n }\n .pbf\\:rotate-180 {\n rotate: 180deg;\n }\n .pbf\\:rotate-270 {\n rotate: 270deg;\n }\n .pbf\\:animate-ping {\n animation: var(--pbf-animate-ping);\n }\n .pbf\\:cursor-pointer {\n cursor: pointer;\n }\n .pbf\\:grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n .pbf\\:grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .pbf\\:flex-col {\n flex-direction: column;\n }\n .pbf\\:flex-row {\n flex-direction: row;\n }\n .pbf\\:flex-wrap {\n flex-wrap: wrap;\n }\n .pbf\\:items-center {\n align-items: center;\n }\n .pbf\\:items-start {\n align-items: flex-start;\n }\n .pbf\\:justify-around {\n justify-content: space-around;\n }\n .pbf\\:justify-between {\n justify-content: space-between;\n }\n .pbf\\:justify-center {\n justify-content: center;\n }\n .pbf\\:gap-0\\.5 {\n gap: calc(var(--pbf-spacing) * 0.5);\n }\n .pbf\\:gap-1 {\n gap: var(--pbf-spacing);\n }\n .pbf\\:gap-1\\.5 {\n gap: calc(var(--pbf-spacing) * 1.5);\n }\n .pbf\\:gap-2 {\n gap: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:gap-3 {\n gap: calc(var(--pbf-spacing) * 3);\n }\n .pbf\\:gap-4 {\n gap: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:gap-8 {\n gap: calc(var(--pbf-spacing) * 8);\n }\n .pbf\\:gap-16 {\n gap: calc(var(--pbf-spacing) * 16);\n }\n :where(.pbf\\:space-y-3 > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--pbf-spacing) * 3) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--pbf-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));\n }\n :where(.pbf\\:space-y-4 > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--pbf-spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--pbf-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n .pbf\\:gap-x-4 {\n column-gap: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:gap-y-2 {\n row-gap: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:overflow-hidden {\n overflow: hidden;\n }\n .pbf\\:overflow-y-auto {\n overflow-y: auto;\n }\n .pbf\\:rounded {\n border-radius: 0.25rem;\n }\n .pbf\\:rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .pbf\\:rounded-lg {\n border-radius: var(--pbf-radius-lg);\n }\n .pbf\\:rounded-r-md {\n border-top-right-radius: var(--pbf-radius-md);\n border-bottom-right-radius: var(--pbf-radius-md);\n }\n .pbf\\:rounded-b-full {\n border-bottom-right-radius: calc(infinity * 1px);\n border-bottom-left-radius: calc(infinity * 1px);\n }\n .pbf\\:border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .pbf\\:border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .pbf\\:border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .pbf\\:border-l-2 {\n border-left-style: var(--tw-border-style);\n border-left-width: 2px;\n }\n .pbf\\:border-gray-100 {\n border-color: var(--pbf-color-gray-100);\n }\n .pbf\\:border-gray-200 {\n border-color: var(--pbf-color-gray-200);\n }\n .pbf\\:border-teal-700\\/30 {\n border-color: var(--pbf-color-teal-700);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--pbf-color-teal-700) 30%, transparent);\n }\n }\n .pbf\\:border-white\\/20 {\n border-color: var(--pbf-color-white);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--pbf-color-white) 20%, transparent);\n }\n }\n .pbf\\:bg-black {\n background-color: var(--pbf-color-black);\n }\n .pbf\\:bg-blue-500 {\n background-color: var(--pbf-color-blue-500);\n }\n .pbf\\:bg-emerald-600 {\n background-color: var(--pbf-color-emerald-600);\n }\n .pbf\\:bg-gray-50 {\n background-color: var(--pbf-color-gray-50);\n }\n .pbf\\:bg-gray-200 {\n background-color: var(--pbf-color-gray-200);\n }\n .pbf\\:bg-green-400 {\n background-color: var(--pbf-color-green-400);\n }\n .pbf\\:bg-green-500 {\n background-color: var(--pbf-color-green-500);\n }\n .pbf\\:bg-sky-50 {\n background-color: var(--pbf-color-sky-50);\n }\n .pbf\\:bg-slate-50 {\n background-color: var(--pbf-color-slate-50);\n }\n .pbf\\:bg-slate-100 {\n background-color: var(--pbf-color-slate-100);\n }\n .pbf\\:bg-slate-300 {\n background-color: var(--pbf-color-slate-300);\n }\n .pbf\\:bg-slate-400 {\n background-color: var(--pbf-color-slate-400);\n }\n .pbf\\:bg-slate-900 {\n background-color: var(--pbf-color-slate-900);\n }\n .pbf\\:bg-white {\n background-color: var(--pbf-color-white);\n }\n .pbf\\:object-contain {\n object-fit: contain;\n }\n .pbf\\:p-1\\.5 {\n padding: calc(var(--pbf-spacing) * 1.5);\n }\n .pbf\\:p-2 {\n padding: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:p-4 {\n padding: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:p-6 {\n padding: calc(var(--pbf-spacing) * 6);\n }\n .pbf\\:p-8 {\n padding: calc(var(--pbf-spacing) * 8);\n }\n .pbf\\:px-3 {\n padding-inline: calc(var(--pbf-spacing) * 3);\n }\n .pbf\\:px-4 {\n padding-inline: calc(var(--pbf-spacing) * 4);\n }\n .pbf\\:px-12 {\n padding-inline: calc(var(--pbf-spacing) * 12);\n }\n .pbf\\:py-0\\.5 {\n padding-block: calc(var(--pbf-spacing) * 0.5);\n }\n .pbf\\:py-1\\.5 {\n padding-block: calc(var(--pbf-spacing) * 1.5);\n }\n .pbf\\:py-2 {\n padding-block: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:pt-1 {\n padding-top: var(--pbf-spacing);\n }\n .pbf\\:pt-2 {\n padding-top: calc(var(--pbf-spacing) * 2);\n }\n .pbf\\:text-center {\n text-align: center;\n }\n .pbf\\:font-mono {\n font-family: var(--pbf-font-mono);\n }\n .pbf\\:font-sans {\n font-family: var(--pbf-font-sans);\n }\n .pbf\\:text-2xl {\n font-size: var(--pbf-text-2xl);\n line-height: var(--tw-leading, var(--pbf-text-2xl--line-height));\n }\n .pbf\\:text-4xl {\n font-size: var(--pbf-text-4xl);\n line-height: var(--tw-leading, var(--pbf-text-4xl--line-height));\n }\n .pbf\\:text-lg {\n font-size: var(--pbf-text-lg);\n line-height: var(--tw-leading, var(--pbf-text-lg--line-height));\n }\n .pbf\\:text-sm {\n font-size: var(--pbf-text-sm);\n line-height: var(--tw-leading, var(--pbf-text-sm--line-height));\n }\n .pbf\\:text-xs {\n font-size: var(--pbf-text-xs);\n line-height: var(--tw-leading, var(--pbf-text-xs--line-height));\n }\n .pbf\\:text-\\[9px\\] {\n font-size: 9px;\n }\n .pbf\\:text-\\[11px\\] {\n font-size: 11px;\n }\n .pbf\\:leading-6 {\n --tw-leading: calc(var(--pbf-spacing) * 6);\n line-height: calc(var(--pbf-spacing) * 6);\n }\n .pbf\\:leading-tight {\n --tw-leading: var(--pbf-leading-tight);\n line-height: var(--pbf-leading-tight);\n }\n .pbf\\:font-bold {\n --tw-font-weight: var(--pbf-font-weight-bold);\n font-weight: var(--pbf-font-weight-bold);\n }\n .pbf\\:font-medium {\n --tw-font-weight: var(--pbf-font-weight-medium);\n font-weight: var(--pbf-font-weight-medium);\n }\n .pbf\\:font-semibold {\n --tw-font-weight: var(--pbf-font-weight-semibold);\n font-weight: var(--pbf-font-weight-semibold);\n }\n .pbf\\:tracking-\\[0\\.2em\\] {\n --tw-tracking: 0.2em;\n letter-spacing: 0.2em;\n }\n .pbf\\:tracking-tight {\n --tw-tracking: var(--pbf-tracking-tight);\n letter-spacing: var(--pbf-tracking-tight);\n }\n .pbf\\:tracking-wide {\n --tw-tracking: var(--pbf-tracking-wide);\n letter-spacing: var(--pbf-tracking-wide);\n }\n .pbf\\:tracking-wider {\n --tw-tracking: var(--pbf-tracking-wider);\n letter-spacing: var(--pbf-tracking-wider);\n }\n .pbf\\:break-words {\n overflow-wrap: break-word;\n }\n .pbf\\:whitespace-nowrap {\n white-space: nowrap;\n }\n .pbf\\:text-blue-600 {\n color: var(--pbf-color-blue-600);\n }\n .pbf\\:text-gray-500 {\n color: var(--pbf-color-gray-500);\n }\n .pbf\\:text-slate-600 {\n color: var(--pbf-color-slate-600);\n }\n .pbf\\:text-slate-700 {\n color: var(--pbf-color-slate-700);\n }\n .pbf\\:text-slate-800 {\n color: var(--pbf-color-slate-800);\n }\n .pbf\\:text-slate-900 {\n color: var(--pbf-color-slate-900);\n }\n .pbf\\:text-teal-700 {\n color: var(--pbf-color-teal-700);\n }\n .pbf\\:text-white {\n color: var(--pbf-color-white);\n }\n .pbf\\:uppercase {\n text-transform: uppercase;\n }\n .pbf\\:italic {\n font-style: italic;\n }\n .pbf\\:opacity-75 {\n opacity: 75%;\n }\n .pbf\\:opacity-90 {\n opacity: 90%;\n }\n .pbf\\:shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow:\n var(--tw-inset-shadow),\n var(--tw-inset-ring-shadow),\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow);\n }\n .pbf\\:shadow-xl {\n --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow:\n var(--tw-inset-shadow),\n var(--tw-inset-ring-shadow),\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow);\n }\n .pbf\\:backdrop-blur-sm {\n --tw-backdrop-blur: blur(var(--pbf-blur-sm));\n -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );\n backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );\n }\n .pbf\\:transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--pbf-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--pbf-default-transition-duration));\n }\n .pbf\\:transition-colors {\n transition-property:\n color,\n background-color,\n border-color,\n outline-color,\n text-decoration-color,\n fill,\n stroke,\n --tw-gradient-from,\n --tw-gradient-via,\n --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--pbf-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--pbf-default-transition-duration));\n }\n .pbf\\:transition-transform {\n transition-property:\n transform,\n translate,\n scale,\n rotate;\n transition-timing-function: var(--tw-ease, var(--pbf-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--pbf-default-transition-duration));\n }\n .pbf\\:duration-75 {\n --tw-duration: 75ms;\n transition-duration: 75ms;\n }\n .pbf\\:duration-150 {\n --tw-duration: 150ms;\n transition-duration: 150ms;\n }\n .pbf\\:duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .pbf\\:duration-300 {\n --tw-duration: 300ms;\n transition-duration: 300ms;\n }\n .pbf\\:ease-out {\n --tw-ease: var(--pbf-ease-out);\n transition-timing-function: var(--pbf-ease-out);\n }\n .pbf\\:select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n @media (hover: hover) {\n :is(:where(.pbf\\:group):hover .pbf\\:group-hover\\:scale-110) {\n --tw-scale-x: 110%;\n --tw-scale-y: 110%;\n --tw-scale-z: 110%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n }\n .pbf\\:last\\:border-0:last-child {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n @media (hover: hover) {\n .pbf\\:hover\\:scale-105:hover {\n --tw-scale-x: 105%;\n --tw-scale-y: 105%;\n --tw-scale-z: 105%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n .pbf\\:hover\\:opacity-100:hover {\n opacity: 100%;\n }\n }\n .pbf\\:focus-visible\\:outline-none:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n @media (width >= 48rem) {\n .pbf\\:md\\:h-12 {\n height: calc(var(--pbf-spacing) * 12);\n }\n .pbf\\:md\\:h-24 {\n height: calc(var(--pbf-spacing) * 24);\n }\n .pbf\\:md\\:h-28 {\n height: calc(var(--pbf-spacing) * 28);\n }\n .pbf\\:md\\:w-24 {\n width: calc(var(--pbf-spacing) * 24);\n }\n .pbf\\:md\\:w-28 {\n width: calc(var(--pbf-spacing) * 28);\n }\n .pbf\\:md\\:w-32 {\n width: calc(var(--pbf-spacing) * 32);\n }\n .pbf\\:md\\:grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .pbf\\:md\\:gap-24 {\n gap: calc(var(--pbf-spacing) * 24);\n }\n }\n @media (width >= 64rem) {\n .pbf\\:lg\\:grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n .pbf\\:lg\\:gap-6 {\n gap: calc(var(--pbf-spacing) * 6);\n }\n }\n .pbf\\:rtl\\:border-r-2:where(:dir(rtl), [dir=rtl], [dir=rtl] *) {\n border-right-style: var(--tw-border-style);\n border-right-width: 2px;\n }\n .pbf\\:rtl\\:border-l-0:where(:dir(rtl), [dir=rtl], [dir=rtl] *) {\n border-left-style: var(--tw-border-style);\n border-left-width: 0px;\n }\n}\n@property --tw-translate-x { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-translate-y { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-translate-z { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-space-y-reverse { syntax: "*"; inherits: false; initial-value: 0; }\n@property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }\n@property --tw-leading { syntax: "*"; inherits: false; }\n@property --tw-font-weight { syntax: "*"; inherits: false; }\n@property --tw-tracking { syntax: "*"; inherits: false; }\n@property --tw-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-shadow-color { syntax: "*"; inherits: false; }\n@property --tw-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }\n@property --tw-inset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-inset-shadow-color { syntax: "*"; inherits: false; }\n@property --tw-inset-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }\n@property --tw-ring-color { syntax: "*"; inherits: false; }\n@property --tw-ring-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-inset-ring-color { syntax: "*"; inherits: false; }\n@property --tw-inset-ring-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-ring-inset { syntax: "*"; inherits: false; }\n@property --tw-ring-offset-width { syntax: "<length>"; inherits: false; initial-value: 0px; }\n@property --tw-ring-offset-color { syntax: "*"; inherits: false; initial-value: #fff; }\n@property --tw-ring-offset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }\n@property --tw-backdrop-blur { syntax: "*"; inherits: false; }\n@property --tw-backdrop-brightness { syntax: "*"; inherits: false; }\n@property --tw-backdrop-contrast { syntax: "*"; inherits: false; }\n@property --tw-backdrop-grayscale { syntax: "*"; inherits: false; }\n@property --tw-backdrop-hue-rotate { syntax: "*"; inherits: false; }\n@property --tw-backdrop-invert { syntax: "*"; inherits: false; }\n@property --tw-backdrop-opacity { syntax: "*"; inherits: false; }\n@property --tw-backdrop-saturate { syntax: "*"; inherits: false; }\n@property --tw-backdrop-sepia { syntax: "*"; inherits: false; }\n@property --tw-duration { syntax: "*"; inherits: false; }\n@property --tw-ease { syntax: "*"; inherits: false; }\n@property --tw-scale-x { syntax: "*"; inherits: false; initial-value: 1; }\n@property --tw-scale-y { syntax: "*"; inherits: false; initial-value: 1; }\n@property --tw-scale-z { syntax: "*"; inherits: false; initial-value: 1; }\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *,\n ::before,\n ::after,\n ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-tracking: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-backdrop-blur: initial;\n --tw-backdrop-brightness: initial;\n --tw-backdrop-contrast: initial;\n --tw-backdrop-grayscale: initial;\n --tw-backdrop-hue-rotate: initial;\n --tw-backdrop-invert: initial;\n --tw-backdrop-opacity: initial;\n --tw-backdrop-saturate: initial;\n --tw-backdrop-sepia: initial;\n --tw-duration: initial;\n --tw-ease: initial;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n }\n }\n}\n', { insertAt: "top" });
3045
3483
 
3046
3484
  // src/types/index.ts
3047
3485
  init_face();
@@ -3116,12 +3554,17 @@ function isHeadlessOrTestEnvironment() {
3116
3554
  return !isWebGLAvailable();
3117
3555
  }
3118
3556
 
3557
+ // src/helpers/index.ts
3558
+ init_fullscreen();
3559
+
3119
3560
  // src/services/index.ts
3120
3561
  init_AudioAnalyzer();
3562
+ init_AudioManager();
3121
3563
  init_ttsAudioCache();
3122
3564
 
3123
3565
  // src/hooks/index.ts
3124
3566
  init_useMessageVisualState();
3567
+ init_useFullscreen();
3125
3568
 
3126
3569
  // src/store/index.ts
3127
3570
  init_faceRenderingSlice();
@@ -3130,7 +3573,7 @@ init_createPeerbotsFaceStore();
3130
3573
  init_FaceStoreContext();
3131
3574
 
3132
3575
  // src/components/FaceView.tsx
3133
- var import_react21 = require("react");
3576
+ var import_react22 = require("react");
3134
3577
 
3135
3578
  // src/helpers/cn.ts
3136
3579
  var import_clsx = require("clsx");
@@ -3154,9 +3597,10 @@ function faceCn(...inputs) {
3154
3597
  init_FaceStoreContext();
3155
3598
  init_face();
3156
3599
  init_labels();
3600
+ init_useFullscreen();
3157
3601
 
3158
3602
  // src/components/FaceCaption.tsx
3159
- var import_react3 = require("react");
3603
+ var import_react4 = require("react");
3160
3604
  init_FaceStoreContext();
3161
3605
  init_useMessageVisualState();
3162
3606
  var import_jsx_runtime2 = require("react/jsx-runtime");
@@ -3171,10 +3615,10 @@ function FaceCaption() {
3171
3615
  persistenceDuration: 1e3
3172
3616
  }
3173
3617
  );
3174
- (0, import_react3.useEffect)(() => {
3618
+ (0, import_react4.useEffect)(() => {
3175
3619
  queueMessage(lastMessage.speech);
3176
3620
  }, [lastMessage.speech, queueMessage]);
3177
- (0, import_react3.useEffect)(() => {
3621
+ (0, import_react4.useEffect)(() => {
3178
3622
  if (typeof requestAnimationFrame === "undefined") {
3179
3623
  return;
3180
3624
  }
@@ -3198,22 +3642,30 @@ function FaceCaption() {
3198
3642
  const offsetX = settings.captions.offset?.x ?? 0;
3199
3643
  const offsetY = settings.captions.offset?.y ?? 0;
3200
3644
  const fontSize = settings.captions.fontSize ?? 32;
3645
+ const captionStyle = settings.captions.style ?? "pill";
3646
+ const visualStyle = captionStyle === "outline" ? {
3647
+ color: "#ffffff",
3648
+ textShadow: "2px 2px 2px #000000, -1px -1px 0 #000000, 1px -1px 0 #000000, -1px 1px 0 #000000, 1px 1px 0 #000000"
3649
+ } : {
3650
+ color: "#ffffff",
3651
+ backgroundColor: "rgba(15, 23, 42, 0.75)",
3652
+ padding: "0.25rem 0.75rem",
3653
+ borderRadius: "0.75rem"
3654
+ };
3201
3655
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3202
3656
  "div",
3203
3657
  {
3204
3658
  role: "status",
3205
3659
  "aria-live": "polite",
3206
3660
  "data-testid": "face-caption",
3661
+ "data-caption-style": captionStyle,
3207
3662
  className: "pbf:absolute pbf:text-center pbf:w-[80%] pbf:pointer-events-none pbf:z-50 pbf:font-sans",
3208
3663
  style: {
3209
3664
  top: `calc(${offsetY}% + 80%)`,
3210
3665
  left: `calc(50% + ${offsetX}px)`,
3211
3666
  transform: "translate(-50%, -50%)",
3212
3667
  fontSize: `${fontSize}px`,
3213
- color: "#ffffff",
3214
- backgroundColor: "rgba(15, 23, 42, 0.75)",
3215
- padding: "0.25rem 0.75rem",
3216
- borderRadius: "0.75rem"
3668
+ ...visualStyle
3217
3669
  },
3218
3670
  children: displayText
3219
3671
  }
@@ -3376,12 +3828,12 @@ function StaticFaceFallback({
3376
3828
 
3377
3829
  // src/components/FaceView.tsx
3378
3830
  var import_jsx_runtime14 = require("react/jsx-runtime");
3379
- var LazyPixiFaceView = (0, import_react21.lazy)(
3831
+ var LazyPixiFaceView = (0, import_react22.lazy)(
3380
3832
  () => Promise.resolve().then(() => (init_PixiFaceView(), PixiFaceView_exports)).then((module2) => ({
3381
3833
  default: module2.PixiFaceView
3382
3834
  }))
3383
3835
  );
3384
- var LazyVizijFaceView = (0, import_react21.lazy)(
3836
+ var LazyVizijFaceView = (0, import_react22.lazy)(
3385
3837
  () => Promise.resolve().then(() => (init_VizijFaceView(), VizijFaceView_exports)).then((module2) => ({
3386
3838
  default: module2.VizijFaceView
3387
3839
  }))
@@ -3414,8 +3866,11 @@ function FaceView({
3414
3866
  showStaticSprites = true,
3415
3867
  registry = defaultFaceRendererRegistry,
3416
3868
  labels,
3417
- className
3869
+ className,
3870
+ onFullscreenChange
3418
3871
  } = {}) {
3872
+ const containerRef = (0, import_react22.useRef)(null);
3873
+ const fullscreenState = useFullscreen(containerRef, { onFullscreenChange });
3419
3874
  const uiLabels = resolveFaceUiLabels(labels);
3420
3875
  const selectedFace = useFaceStore((state) => state.selectedFace);
3421
3876
  const strategy = selectedFace ? registry.get(selectedFace.kind) : void 0;
@@ -3434,14 +3889,17 @@ function FaceView({
3434
3889
  if (useStaticFallback) {
3435
3890
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StaticFaceFallback, { showSprites: showStaticSprites });
3436
3891
  }
3437
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react21.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FaceViewSkeleton, { label: uiLabels.loading }), children: strategy.render({ face: selectedFace, isPreview, frozen }) });
3892
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react22.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FaceViewSkeleton, { label: uiLabels.loading }), children: strategy.render({ face: selectedFace, isPreview, frozen }) });
3438
3893
  };
3439
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
3894
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FaceFullscreenContext.Provider, { value: fullscreenState, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
3440
3895
  "div",
3441
3896
  {
3897
+ ref: containerRef,
3442
3898
  id: "face-view-container",
3899
+ "data-pseudo-fullscreen": fullscreenState.isPseudoFullscreen ? "true" : void 0,
3443
3900
  className: faceCn(
3444
3901
  "pbf:relative pbf:w-full pbf:h-full pbf:text-center pbf:overflow-hidden",
3902
+ fullscreenState.isPseudoFullscreen && "pbf:fixed pbf:inset-0 pbf:z-[9999] pbf:w-screen pbf:h-[100dvh]",
3445
3903
  className
3446
3904
  ),
3447
3905
  children: [
@@ -3449,11 +3907,11 @@ function FaceView({
3449
3907
  !isPreview && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FaceCaption, {})
3450
3908
  ]
3451
3909
  }
3452
- );
3910
+ ) });
3453
3911
  }
3454
3912
 
3455
3913
  // src/components/FaceAudioPrompt.tsx
3456
- var import_react22 = require("react");
3914
+ var import_react23 = require("react");
3457
3915
  var import_core4 = require("@peerbots/core");
3458
3916
  init_FaceStoreContext();
3459
3917
  init_labels();
@@ -3466,21 +3924,11 @@ function FaceAudioPrompt({
3466
3924
  }) {
3467
3925
  const uiLabels = resolveFaceUiLabels(labels);
3468
3926
  const speechAllowed = useFaceStore((state) => state.speechAllowed);
3469
- const setSpeechAllowed = useFaceStore((state) => state.setSpeechAllowed);
3470
- const refreshVoices = useFaceStore((state) => state.refreshVoices);
3471
- const handleEnableAudio = (0, import_react22.useCallback)(() => {
3472
- try {
3473
- if (typeof window !== "undefined" && "speechSynthesis" in window && typeof SpeechSynthesisUtterance !== "undefined") {
3474
- const utterance = new SpeechSynthesisUtterance(" ");
3475
- window.speechSynthesis.speak(utterance);
3476
- }
3477
- } catch (err) {
3478
- console.warn("Could not prime speechSynthesis:", err);
3479
- }
3480
- setSpeechAllowed(true);
3481
- void refreshVoices();
3927
+ const unlockAudio = useFaceStore((state) => state.unlockAudio);
3928
+ const handleEnableAudio = (0, import_react23.useCallback)(() => {
3929
+ void unlockAudio();
3482
3930
  onEnable?.();
3483
- }, [setSpeechAllowed, refreshVoices, onEnable]);
3931
+ }, [unlockAudio, onEnable]);
3484
3932
  if (speechAllowed) {
3485
3933
  return null;
3486
3934
  }
@@ -3493,11 +3941,10 @@ function FaceAudioPrompt({
3493
3941
  children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3494
3942
  import_core4.Button,
3495
3943
  {
3496
- variant: "solid",
3497
- color: "darkblue",
3944
+ variant: "primary",
3498
3945
  size: "sm",
3499
3946
  onClick: handleEnableAudio,
3500
- className: "pbf:shadow-lg pbf:px-4 pbf:py-2 pbf:flex pbf:items-center pbf:gap-2 pbf:rounded-full pbf:cursor-pointer",
3947
+ className: "pbf:shadow-lg pbf:border pbf:border-white/20 pbf:backdrop-blur-sm pbf:px-4 pbf:py-2 pbf:flex pbf:items-center pbf:gap-2 pbf:rounded-full pbf:cursor-pointer pbf:hover:scale-105 pbf:transition-transform",
3501
3948
  "aria-label": uiLabels.tapToEnableSound,
3502
3949
  children: [
3503
3950
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core4.Icon, { name: "play", size: "sm", className: "pbf:w-3.5 pbf:h-3.5" }),
@@ -3556,7 +4003,7 @@ function PoweredByVizij({
3556
4003
  }
3557
4004
 
3558
4005
  // src/components/FieldGroup.tsx
3559
- var import_react23 = require("react");
4006
+ var import_react24 = require("react");
3560
4007
  var import_jsx_runtime17 = require("react/jsx-runtime");
3561
4008
  function FieldGroup({
3562
4009
  label,
@@ -3566,7 +4013,7 @@ function FieldGroup({
3566
4013
  className,
3567
4014
  id: customId
3568
4015
  }) {
3569
- const generatedId = (0, import_react23.useId)();
4016
+ const generatedId = (0, import_react24.useId)();
3570
4017
  const labelId = customId || `field-group-${generatedId}`;
3571
4018
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
3572
4019
  "div",
@@ -3594,7 +4041,7 @@ function FieldGroup({
3594
4041
  }
3595
4042
 
3596
4043
  // src/components/VoiceSelector.tsx
3597
- var import_react24 = require("react");
4044
+ var import_react25 = require("react");
3598
4045
  var import_core5 = require("@peerbots/core");
3599
4046
  init_voice_helpers();
3600
4047
  init_labels();
@@ -3609,7 +4056,7 @@ function VoiceSelector({
3609
4056
  className
3610
4057
  }) {
3611
4058
  const uiLabels = resolveFaceUiLabels(labels);
3612
- const languages = (0, import_react24.useMemo)(() => {
4059
+ const languages = (0, import_react25.useMemo)(() => {
3613
4060
  const unique = new Set(
3614
4061
  voices.map((v) => getLanguageName(v.lang)).filter(Boolean)
3615
4062
  );
@@ -3624,7 +4071,7 @@ function VoiceSelector({
3624
4071
  value: langName
3625
4072
  }));
3626
4073
  }, [voices, selectedLanguage]);
3627
- const filteredVoices = (0, import_react24.useMemo)(() => {
4074
+ const filteredVoices = (0, import_react25.useMemo)(() => {
3628
4075
  const list = voices.filter(
3629
4076
  (v) => !selectedLanguage || getLanguageName(v.lang) === selectedLanguage
3630
4077
  ).map((v) => ({
@@ -3644,7 +4091,7 @@ function VoiceSelector({
3644
4091
  }
3645
4092
  return list;
3646
4093
  }, [voices, selectedLanguage, selectedVoiceUri]);
3647
- const activeVoiceValue = (0, import_react24.useMemo)(() => {
4094
+ const activeVoiceValue = (0, import_react25.useMemo)(() => {
3648
4095
  if (!selectedVoiceUri) {
3649
4096
  return filteredVoices[0]?.value ?? "";
3650
4097
  }
@@ -3701,7 +4148,6 @@ function CharacterSelectionControls({
3701
4148
  const faceSettings = useFaceStore((state) => state.faceSettings);
3702
4149
  const availableFaces2 = useFaceStore((state) => state.availableFaces);
3703
4150
  const availableVoices = useFaceStore((state) => state.availableVoices);
3704
- const refreshVoices = useFaceStore((state) => state.refreshVoices);
3705
4151
  const selectedFace = useFaceStore((state) => state.selectedFace);
3706
4152
  const getSelectedVoice = useFaceStore((state) => state.getSelectedVoice);
3707
4153
  const selectedVoiceUri = useFaceStore((state) => state.selectedVoiceUri);
@@ -3710,7 +4156,7 @@ function CharacterSelectionControls({
3710
4156
  const setFace = useFaceStore((state) => state.setFace);
3711
4157
  const setFaceSettings = useFaceStore((state) => state.setFaceSettings);
3712
4158
  const speechAllowed = useFaceStore((state) => state.speechAllowed);
3713
- const setSpeechAllowed = useFaceStore((state) => state.setSpeechAllowed);
4159
+ const unlockAudio = useFaceStore((state) => state.unlockAudio);
3714
4160
  const currentVoiceUri = selectedVoiceUri || getSelectedVoice()?.voiceURI || "";
3715
4161
  const selectableFaces = enableVizij ? availableFaces2 : availableFaces2.filter((f) => f.kind !== "Vizij");
3716
4162
  const caps = getFaceCapabilities(selectedFace);
@@ -3719,20 +4165,10 @@ function CharacterSelectionControls({
3719
4165
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pbf:flex", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3720
4166
  import_core6.Button,
3721
4167
  {
3722
- variant: "solid",
3723
- color: "darkblue",
4168
+ variant: "primary",
3724
4169
  size: "sm",
3725
4170
  onClick: () => {
3726
- try {
3727
- if (typeof window !== "undefined" && "speechSynthesis" in window && typeof SpeechSynthesisUtterance !== "undefined") {
3728
- const utterance = new SpeechSynthesisUtterance(" ");
3729
- window.speechSynthesis.speak(utterance);
3730
- }
3731
- } catch (err) {
3732
- console.warn("SpeechSynthesis prime warning:", err);
3733
- }
3734
- setSpeechAllowed(true);
3735
- void refreshVoices();
4171
+ void unlockAudio();
3736
4172
  },
3737
4173
  children: uiLabels.allowSpeech
3738
4174
  }
@@ -4251,6 +4687,33 @@ function FaceBehaviorControls({
4251
4687
  }
4252
4688
  ),
4253
4689
  faceSettings.captions?.enabled && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "pbf:flex pbf:flex-col pbf:gap-4 pbf:mt-1", children: [
4690
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4691
+ import_core8.Field,
4692
+ {
4693
+ label: uiLabels.captionStyle,
4694
+ labelPlacement: "left",
4695
+ className: "pbf:flex-row pbf:items-center pbf:justify-between",
4696
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4697
+ import_core8.TabRadio,
4698
+ {
4699
+ "aria-label": uiLabels.captionStyle,
4700
+ options: [
4701
+ { value: "pill", label: uiLabels.captionStylePill },
4702
+ { value: "outline", label: uiLabels.captionStyleOutline }
4703
+ ],
4704
+ value: faceSettings.captions?.style ?? "pill",
4705
+ onChange: (val) => {
4706
+ setFaceSettings({
4707
+ captions: {
4708
+ ...faceSettings.captions,
4709
+ style: val || "pill"
4710
+ }
4711
+ });
4712
+ }
4713
+ }
4714
+ )
4715
+ }
4716
+ ),
4254
4717
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FieldGroup, { label: uiLabels.fontSize, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4255
4718
  import_core8.SliderWithNumberField,
4256
4719
  {
@@ -4343,14 +4806,14 @@ function FaceSettingsPanel({
4343
4806
  var FaceSettingsControl = FaceSettingsPanel;
4344
4807
 
4345
4808
  // src/components/FaceTester.tsx
4346
- var import_react25 = require("react");
4809
+ var import_react26 = require("react");
4347
4810
  var import_core10 = require("@peerbots/core");
4348
4811
  init_FaceStoreContext();
4349
4812
  init_labels();
4350
4813
  var import_jsx_runtime23 = require("react/jsx-runtime");
4351
4814
  function FaceTester({ labels, onSendMessage } = {}) {
4352
4815
  const uiLabels = resolveFaceUiLabels(labels);
4353
- const textToSpeak = (0, import_react25.useRef)(null);
4816
+ const textToSpeak = (0, import_react26.useRef)(null);
4354
4817
  const lastMessage = useFaceStore((state) => state.lastMessage);
4355
4818
  const updateLastMessage = useFaceStore((state) => state.updateLastMessage);
4356
4819
  const dispatchMessage = (next) => {
@@ -4550,6 +5013,7 @@ function AmplitudeGraph() {
4550
5013
  0 && (module.exports = {
4551
5014
  AmplitudeGraph,
4552
5015
  AudioAnalyzer,
5016
+ AudioManager,
4553
5017
  CONNECTION_FACE_MESSAGE,
4554
5018
  CharacterSelectionControls,
4555
5019
  CharacterSelectionSection,
@@ -4562,6 +5026,7 @@ function AmplitudeGraph() {
4562
5026
  FaceAudioPrompt,
4563
5027
  FaceBehaviorControls,
4564
5028
  FaceCaption,
5029
+ FaceFullscreenContext,
4565
5030
  FacePositioningControls,
4566
5031
  FacePositioningSection,
4567
5032
  FaceRendererRegistry,
@@ -4577,10 +5042,13 @@ function AmplitudeGraph() {
4577
5042
  PEERBOTS_COLORS,
4578
5043
  PEERBOTS_EMOTIONS,
4579
5044
  PoweredByVizij,
5045
+ SILENT_WAV_DATA_URI,
4580
5046
  StaticFaceFallback,
4581
5047
  TtsAudioCache,
4582
5048
  VoiceSelector,
5049
+ addFullscreenChangeListener,
4583
5050
  audioAnalyzer,
5051
+ audioManager,
4584
5052
  availableFaces,
4585
5053
  blobToArrayBuffer,
4586
5054
  buildTtsCacheKey,
@@ -4602,6 +5070,7 @@ function AmplitudeGraph() {
4602
5070
  defaultTtsAudioCache,
4603
5071
  emotion_mapping,
4604
5072
  estimateVisemesFromText,
5073
+ exitNativeFullscreen,
4605
5074
  findMatchingVoice,
4606
5075
  font_color_mapping,
4607
5076
  formatRbga,
@@ -4610,6 +5079,7 @@ function AmplitudeGraph() {
4610
5079
  getEmotionEyeSpritePaths,
4611
5080
  getEmotionIconPath,
4612
5081
  getFaceCapabilities,
5082
+ getFullscreenElement,
4613
5083
  getGlobalFaceStore,
4614
5084
  getLanguageName,
4615
5085
  globalFaceStore,
@@ -4618,6 +5088,9 @@ function AmplitudeGraph() {
4618
5088
  includedVizijFaces,
4619
5089
  interpolateColor,
4620
5090
  isHeadlessOrTestEnvironment,
5091
+ isIOSDevice,
5092
+ isMobileSafari,
5093
+ isNativeFullscreenSupported,
4621
5094
  isWebGLAvailable,
4622
5095
  mapVisemeToVizijTarget,
4623
5096
  mergeFaceSettings,
@@ -4626,13 +5099,16 @@ function AmplitudeGraph() {
4626
5099
  pollyVisemeToVizijPath,
4627
5100
  possiblePollyVisemes,
4628
5101
  rbgToRgba,
5102
+ requestNativeFullscreen,
4629
5103
  resolveFaceUiLabels,
4630
5104
  rgbToRgba,
4631
5105
  rgbaToHex,
4632
5106
  setGlobalFaceStore,
4633
5107
  stopNativeSpeechSynthesis,
5108
+ useFaceFullscreenContext,
4634
5109
  useFaceStore,
4635
5110
  useFaceStoreInstance,
5111
+ useFullscreen,
4636
5112
  useMessageVisualState,
4637
5113
  vizijFaceRendererStrategy
4638
5114
  });