@arcware-cloud/pixelstreaming-websdk 1.3.12 → 1.3.13

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/index.cjs.js CHANGED
@@ -23357,6 +23357,7 @@ const zod_1 = __webpack_require__(8754);
23357
23357
  const lib_pixelstreamingfrontend_ue5_5_1 = __webpack_require__(693);
23358
23358
  const Session_1 = __webpack_require__(2469);
23359
23359
  const ArcwareSettingsSchema_1 = __webpack_require__(5602);
23360
+ const whiteLabelling_1 = __webpack_require__(3545);
23360
23361
  /** Default arcware signalling endpoint. */
23361
23362
  exports.DefaultUrl = `wss://signalling-client.ragnarok.arcware.cloud`;
23362
23363
  // The below Logger overrides can likely be removed as PSInfra 5.5 logger supports setting log verbosity
@@ -23399,7 +23400,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
23399
23400
  };
23400
23401
  }
23401
23402
  constructor(config) {
23402
- var _a, _b;
23403
+ var _a, _b, _c;
23403
23404
  const dfToken = new URL(window.location.href).search
23404
23405
  .slice(1)
23405
23406
  .split("&")
@@ -23420,7 +23421,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
23420
23421
  if (!config.initialSettings.ss)
23421
23422
  config.initialSettings.ss = exports.DefaultUrl;
23422
23423
  super(config);
23423
- this.VERSION = "1.3.12";
23424
+ this.VERSION = "1.3.13";
23424
23425
  this.settings = settings;
23425
23426
  this.session = new Session_1.Session();
23426
23427
  this._initialSettings = config.initialSettings;
@@ -23429,6 +23430,16 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
23429
23430
  // IMPORTANT NOTE: The feature BrowserSendOffer is no longer supported in PSInfra 5.5.
23430
23431
  // The offer is now expected to come from UE. Ensure that your signalling server supports this behaviour.
23431
23432
  //this.setFlagEnabled(Flags.BrowserSendOffer, true);
23433
+ if (this.useUrlParams) {
23434
+ // Get the query string from URL
23435
+ const qs = new URLSearchParams(window.location.search);
23436
+ // Retrieve image loading from there
23437
+ const wlParsed = this.useUrlParams ? (0, whiteLabelling_1.readWhiteLabelFromQuery)(qs) : undefined; // respect useUrlParams
23438
+ if (wlParsed) {
23439
+ this.settings.whiteLabelling = Object.assign(Object.assign({}, ((_c = this.settings.whiteLabelling) !== null && _c !== void 0 ? _c : {})), wlParsed);
23440
+ }
23441
+ this.settings.infoButton = qs.has("i") || qs.has("info");
23442
+ }
23432
23443
  }
23433
23444
  /** Setup connection string. */
23434
23445
  get urlFlags() {
@@ -23536,7 +23547,14 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
23536
23547
  useUrlParams: (configuration === null || configuration === void 0 ? void 0 : configuration.useUrlParams) === true,
23537
23548
  initialSettings: Object.assign({ ss: ArcwareConfig_1.DefaultUrl, AutoConnect: false, StartVideoMuted: true, AutoPlayVideo: true, KeyboardInput: true, MouseInput: true, GamepadInput: true, TouchInput: true, XRControllerInput: true, UseMic: true, SuppressBrowserKeys: true, FakeMouseWithTouches: false, ForceMonoAudio: false, HoveringMouse: true }, configuration === null || configuration === void 0 ? void 0 : configuration.initialSettings),
23538
23549
  settings: Object.assign({ shareId,
23539
- projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false, connectionIdentifierLoggingDisabled: undefined, errorHandler: undefined, loveLetterHandler: undefined, loveLetterLogging: undefined, queueHandler: undefined, sessionIdHandler: undefined, startHeight: undefined, startWidth: undefined, orientationZoom: undefined }, configuration === null || configuration === void 0 ? void 0 : configuration.settings)
23550
+ projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false, connectionIdentifierLoggingDisabled: undefined, errorHandler: undefined, loveLetterHandler: undefined, loveLetterLogging: undefined, queueHandler: undefined, sessionIdHandler: undefined, startHeight: undefined, startWidth: undefined, orientationZoom: undefined, whiteLabelling: {
23551
+ splashScreenUrl: undefined,
23552
+ loadingIconFadeMs: undefined,
23553
+ loadingIconUrl: undefined,
23554
+ splashScreenMode: undefined,
23555
+ splashScreenPosition: undefined,
23556
+ splashScreenBgColor: undefined
23557
+ } }, configuration === null || configuration === void 0 ? void 0 : configuration.settings)
23540
23558
  });
23541
23559
  const PixelStreaming = new ArcwarePixelStreaming_1.ArcwarePixelStreaming(Config);
23542
23560
  const Application = new ArcwareApplication_1.ArcwareApplication({ stream: PixelStreaming });
@@ -23885,6 +23903,7 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23885
23903
  });
23886
23904
  }
23887
23905
  }
23906
+ this.applyBrandingFromSettings();
23888
23907
  this.handleMouseLock();
23889
23908
  this.injectCustomUI();
23890
23909
  }
@@ -24132,12 +24151,12 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24132
24151
  // Zoom level for orientation change if provided
24133
24152
  if (orientationZoom) {
24134
24153
  if (browserWidth < browserHeight) {
24135
- if (orientationZoom.hasOwnProperty('portrait'))
24154
+ if (orientationZoom.hasOwnProperty("portrait"))
24136
24155
  (_a = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _a === void 0 ? void 0 : _a.emitUIInteraction({
24137
24156
  zoom: orientationZoom.portrait
24138
24157
  });
24139
24158
  }
24140
- else if (orientationZoom.hasOwnProperty('landscape')) {
24159
+ else if (orientationZoom.hasOwnProperty("landscape")) {
24141
24160
  (_b = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _b === void 0 ? void 0 : _b.emitUIInteraction({
24142
24161
  zoom: orientationZoom.landscape
24143
24162
  });
@@ -24207,26 +24226,27 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24207
24226
  initLoveLettersContainer() {
24208
24227
  var _a;
24209
24228
  const logoLoader = new ArcwareLogoLoader_1.ArcwareLogoLoader();
24229
+ this.logoLoader = logoLoader;
24210
24230
  if (!this.loveLettersContainer) {
24211
- const loveLettersContainer = document === null || document === void 0 ? void 0 : document.createElement("div");
24212
- const { videoPlayer } = this === null || this === void 0 ? void 0 : this.webRtcController;
24231
+ const loveLettersContainer = document.createElement("div");
24232
+ this.loveLettersContainer = loveLettersContainer; // keep the ref
24233
+ const { videoPlayer } = this.webRtcController;
24213
24234
  const videoElementParent = videoPlayer.getVideoParentElement();
24214
- (_a = loveLettersContainer === null || loveLettersContainer === void 0 ? void 0 : loveLettersContainer.classList) === null || _a === void 0 ? void 0 : _a.add("love-letters-box-root");
24215
- videoElementParent === null || videoElementParent === void 0 ? void 0 : videoElementParent.appendChild(loveLettersContainer);
24216
- const lettersBlock = document === null || document === void 0 ? void 0 : document.createElement("div");
24235
+ loveLettersContainer.classList.add("love-letters-box-root");
24236
+ videoElementParent.appendChild(loveLettersContainer);
24237
+ const lettersBlock = document.createElement("div");
24217
24238
  lettersBlock.id = "letters-block";
24218
- const lettersWrapper = document === null || document === void 0 ? void 0 : document.createElement("div");
24239
+ const lettersWrapper = document.createElement("div");
24219
24240
  lettersWrapper.id = "letters-wrapper";
24220
- if (loveLettersContainer) {
24221
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(logoLoader === null || logoLoader === void 0 ? void 0 : logoLoader.arcwareLogoLoader);
24222
- loveLettersContainer === null || loveLettersContainer === void 0 ? void 0 : loveLettersContainer.appendChild(lettersBlock);
24223
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(lettersWrapper);
24224
- }
24225
- lettersBlock.innerHTML = "";
24226
- if (lettersBlock) {
24227
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(logoLoader === null || logoLoader === void 0 ? void 0 : logoLoader.arcwareLogoLoader);
24228
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(lettersWrapper);
24229
- }
24241
+ // append your existing loader root (with SVG) into the lettersBlock
24242
+ const loaderRoot = logoLoader.arcwareLogoLoader; // your existing getter
24243
+ lettersBlock.appendChild(loaderRoot);
24244
+ // ensure the loader knows its host
24245
+ (_a = logoLoader.setHostElement) === null || _a === void 0 ? void 0 : _a.call(logoLoader, loaderRoot);
24246
+ loveLettersContainer.appendChild(lettersBlock);
24247
+ lettersBlock.appendChild(lettersWrapper);
24248
+ // apply current (local) settings immediately
24249
+ this.applyBrandingFromSettings();
24230
24250
  }
24231
24251
  }
24232
24252
  pushLetter(letter) {
@@ -24332,8 +24352,7 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24332
24352
  }
24333
24353
  }
24334
24354
  injectCustomUI() {
24335
- (0, common_1.waitForElement)('#stream-ui')
24336
- .then(el => {
24355
+ (0, common_1.waitForElement)("#stream-ui").then((el) => {
24337
24356
  var _a;
24338
24357
  const videoElementParent = (_a = this === null || this === void 0 ? void 0 : this.videoElementParent) === null || _a === void 0 ? void 0 : _a.parentElement;
24339
24358
  if (videoElementParent) {
@@ -24341,6 +24360,61 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24341
24360
  }
24342
24361
  });
24343
24362
  }
24363
+ applyBrandingFromSettings() {
24364
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
24365
+ const cfg = ((_b = (_a = this === null || this === void 0 ? void 0 : this.config) === null || _a === void 0 ? void 0 : _a.settings.whiteLabelling) !== null && _b !== void 0 ? _b : {});
24366
+ // Loader image + fade
24367
+ try {
24368
+ if (this.logoLoader) {
24369
+ (_d = (_c = this.logoLoader).setImage) === null || _d === void 0 ? void 0 : _d.call(_c, cfg.loadingIconUrl);
24370
+ (_f = (_e = this.logoLoader).setFade) === null || _f === void 0 ? void 0 : _f.call(_e, cfg.loadingIconFadeMs);
24371
+ }
24372
+ }
24373
+ catch (_p) { }
24374
+ // Splash on loveLettersContainer (preferred), fallback to player parent
24375
+ try {
24376
+ const el = (_m = (_g = this.loveLettersContainer) !== null && _g !== void 0 ? _g : (_l = (_k = (_j = (_h = this.webRtcController) === null || _h === void 0 ? void 0 : _h.videoPlayer) === null || _j === void 0 ? void 0 : _j.getVideoParentElement) === null || _k === void 0 ? void 0 : _k.call(_j)) === null || _l === void 0 ? void 0 : _l.parentElement) !== null && _m !== void 0 ? _m : null;
24377
+ if (!el)
24378
+ return;
24379
+ // Clear previous inline choices
24380
+ const s = el.style;
24381
+ s.removeProperty("background-image");
24382
+ s.removeProperty("background-size");
24383
+ s.removeProperty("background-repeat");
24384
+ s.removeProperty("background-position");
24385
+ s.removeProperty("background-color");
24386
+ el.classList.remove("aw-splash");
24387
+ if (cfg.splashScreenUrl) {
24388
+ el.classList.add("aw-splash"); // keeps your global defaults
24389
+ // Compute mode (default to 'contain' if not provided)
24390
+ const mode = ((_o = cfg.splashScreenMode) !== null && _o !== void 0 ? _o : "contain");
24391
+ // Apply sizing/repeat per mode
24392
+ switch (mode) {
24393
+ case "contain":
24394
+ s.backgroundSize = "contain";
24395
+ s.backgroundRepeat = "no-repeat";
24396
+ break;
24397
+ case "cover":
24398
+ s.backgroundSize = "cover";
24399
+ s.backgroundRepeat = "no-repeat";
24400
+ break;
24401
+ case "stretch":
24402
+ s.backgroundSize = "100% 100%";
24403
+ s.backgroundRepeat = "no-repeat";
24404
+ break;
24405
+ case "repeat":
24406
+ s.backgroundSize = "auto"; // keep intrinsic px
24407
+ s.backgroundRepeat = "repeat";
24408
+ break;
24409
+ }
24410
+ // Position & color (optional)
24411
+ s.backgroundPosition = cfg.splashScreenPosition || "center center";
24412
+ s.backgroundColor = cfg.splashScreenBgColor || "var(--color0)";
24413
+ s.backgroundImage = `url("${cfg.splashScreenUrl}")`;
24414
+ }
24415
+ }
24416
+ catch (_q) { }
24417
+ }
24344
24418
  }
24345
24419
  exports.ArcwarePixelStreaming = ArcwarePixelStreaming;
24346
24420
 
@@ -24405,10 +24479,15 @@ exports.ArcwareSettingsSchema = zod_1.z.object({
24405
24479
  /** Height with which instance should be started */
24406
24480
  startHeight: zod_1.z.number().optional(),
24407
24481
  /** Zoom functionality */
24408
- orientationZoom: zod_1.z.object({
24482
+ orientationZoom: zod_1.z
24483
+ .object({
24409
24484
  landscape: zod_1.z.number(),
24410
- portrait: zod_1.z.number(),
24411
- }).strict().optional()
24485
+ portrait: zod_1.z.number()
24486
+ })
24487
+ .strict()
24488
+ .optional(),
24489
+ /** Loader customization */
24490
+ whiteLabelling: shared_pixelstreaming_websdk_1.ZWhiteLabel.optional()
24412
24491
  });
24413
24492
 
24414
24493
 
@@ -25327,6 +25406,47 @@ function waitForElement(selector, { root = document, timeout = 3000 } = {}) {
25327
25406
  exports.waitForElement = waitForElement;
25328
25407
 
25329
25408
 
25409
+ /***/ }),
25410
+
25411
+ /***/ 3545:
25412
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
25413
+
25414
+
25415
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
25416
+ exports.readWhiteLabelFromQuery = void 0;
25417
+ const shared_pixelstreaming_websdk_1 = __webpack_require__(7910);
25418
+ function decodeBase64OrBase64Url(raw) {
25419
+ const normalized = raw.replace(/-/g, "+").replace(/_/g, "/");
25420
+ const padded = normalized + "===".slice((normalized.length + 3) % 4);
25421
+ if (typeof atob === "function")
25422
+ return atob(padded);
25423
+ // @ts-ignore (Node fallback if this runs server-side)
25424
+ return Buffer.from(padded, "base64").toString("utf-8");
25425
+ }
25426
+ /** Parse ?wl=... (or ?whitelabel=...) → validated partial settings */
25427
+ function readWhiteLabelFromQuery(qs) {
25428
+ var _a;
25429
+ try {
25430
+ const raw = (_a = qs.get("wl")) !== null && _a !== void 0 ? _a : qs.get("whitelabel");
25431
+ if (!raw)
25432
+ return undefined;
25433
+ const jsonStr = decodeBase64OrBase64Url(raw);
25434
+ const obj = JSON.parse(jsonStr);
25435
+ const parsed = shared_pixelstreaming_websdk_1.ZWhiteLabel.safeParse(obj);
25436
+ if (!parsed.success) {
25437
+ //console.warn("[ArcwareConfig] Invalid wl payload:", parsed.error?.flatten?.());
25438
+ return undefined;
25439
+ }
25440
+ return parsed.data;
25441
+ }
25442
+ catch (e) {
25443
+ //console.warn("[ArcwareConfig] Failed to parse wl payload:", e);
25444
+ return undefined;
25445
+ }
25446
+ }
25447
+ exports.readWhiteLabelFromQuery = readWhiteLabelFromQuery;
25448
+
25449
+
25330
25450
  /***/ }),
25331
25451
 
25332
25452
  /***/ 9399:
@@ -25367,16 +25487,27 @@ exports.ArcwareStyles = {
25367
25487
  "--color11": "rgba(65,0,139,1) !important",
25368
25488
  "--color12": "#222224 !important",
25369
25489
  "--color13": "#f0f0f2 !important",
25370
- "--colorBoxShadow": "rgba(0, 0, 0, 0.20) !important",
25490
+ "--colorBoxShadow": "rgba(0, 0, 0, 0.20) !important"
25371
25491
  },
25492
+ ".aw-splash": {
25493
+ backgroundRepeat: "no-repeat",
25494
+ backgroundPosition: "center center",
25495
+ backgroundSize: "contain",
25496
+ backgroundColor: "var(--color0)"
25497
+ },
25498
+ "@keyframes aw-loader-fade": {
25499
+ from: { opacity: 0.25 },
25500
+ to: { opacity: 1 }
25501
+ },
25502
+ /* ---------- /NEW ---------- */
25372
25503
  "#playerUI *": {
25373
- fontFamily: "system-ui",
25504
+ fontFamily: "system-ui"
25374
25505
  },
25375
25506
  "#shared-stream-container": {
25376
- boxSizing: "border-box",
25507
+ boxSizing: "border-box"
25377
25508
  },
25378
25509
  "#shared-stream-container::-webkit-scrollbar": {
25379
- width: "10px",
25510
+ width: "10px"
25380
25511
  },
25381
25512
  "#shared-stream-container::-webkit-scrollbar-track": {
25382
25513
  background: "var(--color13)",
@@ -25385,10 +25516,10 @@ exports.ArcwareStyles = {
25385
25516
  borderTop: "20px solid var(--color0)",
25386
25517
  borderRight: "5px solid var(--color0)",
25387
25518
  borderBottom: "20px solid var(--color0)",
25388
- borderLeft: "5px solid var(--color0)",
25519
+ borderLeft: "5px solid var(--color0)"
25389
25520
  },
25390
25521
  "#shared-stream-container::-webkit-scrollbar-track-piece": {
25391
- background: "transparent",
25522
+ background: "transparent"
25392
25523
  },
25393
25524
  "#shared-stream-container::-webkit-scrollbar-thumb": {
25394
25525
  background: "var(--color13)",
@@ -25396,11 +25527,11 @@ exports.ArcwareStyles = {
25396
25527
  borderRight: "2px solid var(--color0)",
25397
25528
  borderLeft: "2px solid var(--color0)",
25398
25529
  transition: "all ease-in-out 0.3s",
25399
- borderRadius: "7px",
25530
+ borderRadius: "7px"
25400
25531
  },
25401
25532
  "#shared-stream-container::-webkit-scrollbar-thumb:hover": {
25402
25533
  transition: "all ease-in-out 0.3s",
25403
- background: "var(--color3)",
25534
+ background: "var(--color3)"
25404
25535
  },
25405
25536
  "#playerUI, #videoElementParent": {
25406
25537
  position: "absolute",
@@ -25414,13 +25545,13 @@ exports.ArcwareStyles = {
25414
25545
  left: 0,
25415
25546
  margin: "auto",
25416
25547
  boxSizing: "border-box",
25417
- pointerEvents: "all",
25548
+ pointerEvents: "all"
25418
25549
  },
25419
25550
  "#streamingVideo": {
25420
25551
  maxWidth: "100%",
25421
25552
  maxHeight: "100%",
25422
25553
  boxSizing: "border-box",
25423
- background: "#18181A",
25554
+ background: "#18181A"
25424
25555
  },
25425
25556
  "#uiFeatures #controls": {
25426
25557
  top: "auto",
@@ -25428,13 +25559,13 @@ exports.ArcwareStyles = {
25428
25559
  bottom: "10px",
25429
25560
  right: "20px",
25430
25561
  display: "flex",
25431
- flexDirection: "column-reverse",
25562
+ flexDirection: "column-reverse"
25432
25563
  },
25433
25564
  "#uiFeatures #connection": {
25434
25565
  bottom: "5px",
25435
25566
  left: "10px",
25436
25567
  width: "2.5rem",
25437
- heihgt: "2.5rem",
25568
+ heihgt: "2.5rem"
25438
25569
  },
25439
25570
  "#uiFeatures button": {
25440
25571
  backgroundColor: "var(--color12)",
@@ -25451,23 +25582,23 @@ exports.ArcwareStyles = {
25451
25582
  alignItems: "center",
25452
25583
  boxShadow: "0px 0px 24px 0px var(--colorBoxShadow)",
25453
25584
  borderRadius: "3px",
25454
- outline: "none",
25585
+ outline: "none"
25455
25586
  },
25456
25587
  "#uiFeatures button:hover, #uiFeatures button:active": {
25457
25588
  padding: "0 !important",
25458
- border: "none",
25589
+ border: "none"
25459
25590
  },
25460
25591
  "#uiFeatures button #audioIconMuted, #uiFeatures button #audioIconUnmuted, #uiFeatures button #micIconMuted, #uiFeatures button #micIconUnmuted": {
25461
25592
  width: "31px",
25462
- height: "28px",
25593
+ height: "28px"
25463
25594
  },
25464
25595
  "#uiFeatures button #maximizeIcon, #uiFeatures button #minimizeIcon": {
25465
25596
  width: "25px",
25466
- height: "25px",
25597
+ height: "25px"
25467
25598
  },
25468
25599
  "#stopIcon, #playIcon": {
25469
25600
  width: "30px",
25470
- height: "30px",
25601
+ height: "30px"
25471
25602
  },
25472
25603
  "#uiFeatures button .tooltiptext": {
25473
25604
  right: "125%",
@@ -25476,35 +25607,35 @@ exports.ArcwareStyles = {
25476
25607
  borderRadius: "3px",
25477
25608
  backgroundColor: "var(--color12)",
25478
25609
  width: "95px",
25479
- visibility: "hidden!important",
25610
+ visibility: "hidden!important"
25480
25611
  },
25481
25612
  "@media (hover: hover) and (pointer: fine)": {
25482
25613
  "#uiFeatures button:hover .tooltiptext": {
25483
- visibility: "visible!important",
25484
- },
25614
+ visibility: "visible!important"
25615
+ }
25485
25616
  },
25486
25617
  "#controls>*": {
25487
25618
  marginBottom: "0.5rem",
25488
25619
  display: "block",
25489
25620
  lineHeight: "1.75rem",
25490
25621
  padding: "0.5rem",
25491
- backgroundColor: "var(--color12)",
25622
+ backgroundColor: "var(--color12)"
25492
25623
  },
25493
25624
  "#uiFeatures #settingsIcon, #uiFeatures #statsIcon": {
25494
25625
  width: "27px",
25495
- height: "27px",
25626
+ height: "27px"
25496
25627
  },
25497
25628
  ".svgIcon": {
25498
- fill: "var(--color13)",
25629
+ fill: "var(--color13)"
25499
25630
  },
25500
25631
  "#uiFeatures button:hover .svgIcon, #uiFeatures button:active .svgIcon": {
25501
- fill: "var(--color12)",
25632
+ fill: "var(--color12)"
25502
25633
  },
25503
25634
  ".tgl-switch .tgl-slider, .tgl-flat:checked+.tgl-slider": {
25504
- border: "3px solid transparent",
25635
+ border: "3px solid transparent"
25505
25636
  },
25506
25637
  ".tgl-switch .tgl-slider": {
25507
- background: "none",
25638
+ background: "none"
25508
25639
  },
25509
25640
  ".tgl-switch .tgl-slider::before": {
25510
25641
  content: "''",
@@ -25518,18 +25649,18 @@ exports.ArcwareStyles = {
25518
25649
  top: "0",
25519
25650
  bottom: "0",
25520
25651
  left: "0",
25521
- right: "0",
25652
+ right: "0"
25522
25653
  },
25523
25654
  ".tgl-switch .tgl-slider::after": {
25524
25655
  height: "13px",
25525
25656
  width: "13px",
25526
25657
  borderRadius: "50%",
25527
25658
  top: "-2px",
25528
- left: "-1%",
25659
+ left: "-1%"
25529
25660
  },
25530
25661
  ".tgl-flat:checked+.tgl-slider:after": {
25531
25662
  left: "62%",
25532
- background: "var(--color3)",
25663
+ background: "var(--color3)"
25533
25664
  },
25534
25665
  ".form-control": {
25535
25666
  backgroundColor: "transparent",
@@ -25538,7 +25669,7 @@ exports.ArcwareStyles = {
25538
25669
  color: "var(--color13)",
25539
25670
  textAlign: "left",
25540
25671
  fontFamily: "inherit",
25541
- padding: "5px 15px ",
25672
+ padding: "5px 15px "
25542
25673
  },
25543
25674
  ".btn-flat": {
25544
25675
  background: "var(--color3)",
@@ -25548,31 +25679,62 @@ exports.ArcwareStyles = {
25548
25679
  cursor: "pointer",
25549
25680
  borderRadius: "4px",
25550
25681
  textTransform: "uppercase",
25551
- minWidth: "175px",
25682
+ minWidth: "175px"
25552
25683
  },
25553
25684
  ".btn-flat:disabled": {
25554
25685
  background: "var(--color7)",
25555
25686
  borderColor: "var(--color3)",
25556
25687
  color: "var(--color3)",
25557
- cursor: "default",
25688
+ cursor: "default"
25558
25689
  },
25559
25690
  ".btn-flat:focus": {
25560
- outline: "none",
25691
+ outline: "none"
25561
25692
  },
25562
25693
  ".arcware-logo-loader": {
25563
25694
  position: "relative",
25564
- display: "block",
25695
+ display: "flex",
25696
+ alignItems: "center",
25697
+ justifyContent: "center",
25565
25698
  width: "12.5%",
25566
25699
  height: "12.5%",
25700
+ margin: "0 auto",
25701
+ boxSizing: "border-box"
25702
+ },
25703
+ // image rendering + centering inside the box
25704
+ ".arcware-logo-loader img": {
25705
+ maxWidth: "40%",
25706
+ maxHeight: "40%",
25707
+ objectFit: "contain",
25708
+ objectPosition: "center center",
25709
+ display: "block",
25710
+ margin: 0,
25711
+ verticalAlign: "middle"
25712
+ },
25713
+ // fade stays the same
25714
+ ".arcware-logo-loader.pulse img": {
25715
+ animation: "aw-loader-fade var(--aw-fade,1200ms) ease-in-out infinite alternate"
25716
+ },
25717
+ ".arcware-logo-loader.aw-custom-loader": {
25718
+ width: "auto !important",
25719
+ height: "auto !important"
25720
+ },
25721
+ ".arcware-logo-loader.aw-custom-loader img": {
25722
+ display: "block",
25723
+ width: "auto",
25724
+ height: "auto",
25725
+ maxWidth: "80%",
25726
+ maxHeight: "80%",
25727
+ objectFit: "contain",
25728
+ margin: "0 auto" // ensure horizontal centering inside the loader
25567
25729
  },
25568
25730
  "#playOverlay img#playButton": {
25569
- width: "5%",
25731
+ width: "5%"
25570
25732
  },
25571
25733
  "#disconnectOverlay, #errorOverlay": {
25572
25734
  textTransform: "initial",
25573
25735
  textAlign: "center",
25574
25736
  fontSize: "20px",
25575
- lineHeight: 2.5,
25737
+ lineHeight: 2.5
25576
25738
  },
25577
25739
  "#disconnectOverlay .clickableState": {
25578
25740
  textTransform: "initial",
@@ -25582,13 +25744,13 @@ exports.ArcwareStyles = {
25582
25744
  fontSize: "18px",
25583
25745
  border: "1px solid #DAF693",
25584
25746
  margin: "25px auto 0",
25585
- width: "180px",
25747
+ width: "180px"
25586
25748
  },
25587
25749
  "#afkOverlay": {
25588
25750
  background: "none",
25589
25751
  transition: "all ease-in-out 0.5s",
25590
25752
  opacity: 1,
25591
- pointerEvents: "initial",
25753
+ pointerEvents: "initial"
25592
25754
  },
25593
25755
  "#afkOverlayInner": {
25594
25756
  textTransform: "initial",
@@ -25597,18 +25759,18 @@ exports.ArcwareStyles = {
25597
25759
  fontSize: "18px",
25598
25760
  width: "360px",
25599
25761
  textAlign: "center",
25600
- lineHeight: 2.5,
25762
+ lineHeight: 2.5
25601
25763
  },
25602
25764
  "#afkOverlayInner center::first-line": {
25603
25765
  textTransform: "uppercase",
25604
25766
  color: "#FF8461",
25605
25767
  fontWeight: "bold",
25606
- fontSize: "24px",
25768
+ fontSize: "24px"
25607
25769
  },
25608
25770
  "#afkOverlayInner #afkCountDownNumber": {
25609
25771
  color: "#DAF693",
25610
25772
  fontSize: "26px",
25611
- lineHeight: "22px",
25773
+ lineHeight: "22px"
25612
25774
  },
25613
25775
  "#afkOverlayInner center .retry-button": {
25614
25776
  textTransform: "initial",
@@ -25618,7 +25780,7 @@ exports.ArcwareStyles = {
25618
25780
  fontSize: "18px",
25619
25781
  border: "1px solid #DAF693",
25620
25782
  margin: "25px auto 0",
25621
- width: "180px",
25783
+ width: "180px"
25622
25784
  },
25623
25785
  "#connectOverlay #connectButton": {
25624
25786
  textTransform: "initial",
@@ -25628,33 +25790,33 @@ exports.ArcwareStyles = {
25628
25790
  fontSize: "18px",
25629
25791
  border: "1px solid #DAF693",
25630
25792
  margin: "25px auto 0",
25631
- width: "180px",
25793
+ width: "180px"
25632
25794
  },
25633
25795
  "#connectOverlay .connection-text": {
25634
25796
  textTransform: "initial",
25635
25797
  textAlign: "center",
25636
- margin: "25px auto 0",
25798
+ margin: "25px auto 0"
25637
25799
  },
25638
25800
  "#connectOverlay .connection-text .title": {
25639
25801
  color: "#ffffff",
25640
25802
  fontSize: "18px",
25641
- margin: "5px 0",
25803
+ margin: "5px 0"
25642
25804
  },
25643
25805
  "#connectOverlay .connection-text .subtitle": {
25644
25806
  color: "#ffffff",
25645
25807
  opacity: 0.5,
25646
25808
  fontSize: "12px",
25647
- margin: "10px 0",
25809
+ margin: "10px 0"
25648
25810
  },
25649
25811
  "#infoOverlay.hiddenState": {
25650
- display: "none",
25812
+ display: "none"
25651
25813
  },
25652
25814
  "#disconnectOverlay, #playOverlay, #errorOverlay, #microphoneOverlay, #connectOverlay": {
25653
25815
  background: "#18181A",
25654
25816
  display: "flex",
25655
25817
  transition: "all ease-in-out 0.5s",
25656
25818
  opacity: 1,
25657
- pointerEvents: "initial",
25819
+ pointerEvents: "initial"
25658
25820
  },
25659
25821
  "#microphoneOverlay": {
25660
25822
  textTransform: "initial",
@@ -25673,51 +25835,51 @@ exports.ArcwareStyles = {
25673
25835
  justifyContent: "center",
25674
25836
  alignItems: "center",
25675
25837
  flexDirection: "column",
25676
- zIndex: 99999,
25838
+ zIndex: 99999
25677
25839
  },
25678
25840
  "#microphoneOverlay .title": {
25679
25841
  fontSize: "24px",
25680
25842
  position: "relative",
25681
25843
  marginBottom: "20px",
25682
- color: "#F0F0F2",
25844
+ color: "#F0F0F2"
25683
25845
  },
25684
25846
  "#microphoneOverlay .title:after": {
25685
25847
  content: "''",
25686
25848
  display: "inline-block",
25687
25849
  animation: "dotty steps(1,end) 1s infinite",
25688
- position: "absolute",
25850
+ position: "absolute"
25689
25851
  },
25690
25852
  "#microphoneOverlay p": {
25691
25853
  margin: 0,
25692
- color: "#858588",
25854
+ color: "#858588"
25693
25855
  },
25694
25856
  "#microphoneOverlay svg": {
25695
25857
  height: "65px",
25696
25858
  marginBottom: "15px",
25697
- marginTop: "-5px",
25859
+ marginTop: "-5px"
25698
25860
  },
25699
25861
  "#microphoneOverlay .svgIcon": {
25700
- fill: "#DAF693",
25862
+ fill: "#DAF693"
25701
25863
  },
25702
25864
  "#disconnectOverlay.hiddenState, #playOverlay.hiddenState, #errorOverlay.hiddenState, #afkOverlay.hiddenState, #microphoneOverlay.hiddenState": {
25703
25865
  opacity: 0,
25704
- pointerEvents: "none",
25866
+ pointerEvents: "none"
25705
25867
  },
25706
25868
  "#disconnectOverlay.mic-overlay-is-visible, #errorOverlay.mic-overlay-is-visible, #infoOverlay.mic-overlay-is-visible": {
25707
25869
  opacity: 0,
25708
- pointerEvents: "none",
25870
+ pointerEvents: "none"
25709
25871
  },
25710
25872
  "#infoOverlay.hiddenState, #connectOverlay.hiddenState": {
25711
- display: "none",
25873
+ display: "none"
25712
25874
  },
25713
25875
  "#connectOverlay": {
25714
25876
  display: "flex",
25715
25877
  flexDirection: "column-reverse",
25716
25878
  alignItems: "center",
25717
- justifyContent: "center",
25879
+ justifyContent: "center"
25718
25880
  },
25719
25881
  "#infoOverlay": {
25720
- display: "none",
25882
+ display: "none"
25721
25883
  },
25722
25884
  ".love-letters-box-root": {
25723
25885
  display: "flex",
@@ -25729,11 +25891,11 @@ exports.ArcwareStyles = {
25729
25891
  alignItems: "center",
25730
25892
  flexDirection: "column",
25731
25893
  background: "#18181A",
25732
- zIndex: 1,
25894
+ zIndex: 1
25733
25895
  },
25734
25896
  ".love-letters-box-root.fade-out": {
25735
25897
  opacity: 0,
25736
- transition: "opacity 0.5s",
25898
+ transition: "opacity 0.5s"
25737
25899
  },
25738
25900
  "#letters-block": {
25739
25901
  position: "absolute",
@@ -25750,7 +25912,7 @@ exports.ArcwareStyles = {
25750
25912
  alignItems: "center",
25751
25913
  fontSize: "16px",
25752
25914
  textTransform: "initial",
25753
- textAlign: "center",
25915
+ textAlign: "center"
25754
25916
  },
25755
25917
  "#letters-wrapper": {
25756
25918
  height: "77px",
@@ -25761,62 +25923,88 @@ exports.ArcwareStyles = {
25761
25923
  alignItems: "center",
25762
25924
  justifyContent: "flex-end",
25763
25925
  marginTop: "10px",
25764
- paddingBottom: "2px",
25926
+ paddingBottom: "2px"
25765
25927
  },
25766
25928
  "#letters-wrapper p": {
25767
25929
  textAlign: "center",
25768
25930
  lineHeight: 1.25,
25769
- fontSize: "16px",
25931
+ fontSize: "16px"
25770
25932
  },
25771
25933
  ".letter-animation:nth-last-of-type(1)::after": {
25772
25934
  display: "inline-block",
25773
25935
  animation: "dotty steps(1,end) 1s infinite",
25774
25936
  content: "''",
25775
- position: "absolute",
25937
+ position: "absolute"
25776
25938
  },
25777
25939
  ".letter-animation": {
25778
25940
  transition: "all 0.5s ease-in-out",
25779
25941
  transformOrigin: "bottom",
25780
- margin: "0 auto",
25942
+ margin: "0 auto"
25781
25943
  },
25782
25944
  ".letter-animation-enter": {
25783
- animation: "fadeInUp 0.75s ease-out",
25945
+ animation: "fadeInUp 0.75s ease-out"
25784
25946
  },
25785
25947
  ".letter-animation-exit": {
25786
25948
  opacity: 0,
25787
25949
  scale: 0.9,
25788
25950
  transition: "all ease-in-out 1s",
25789
- margin: 0,
25951
+ margin: 0
25790
25952
  },
25791
25953
  "@keyframes dotty": {
25792
25954
  "0%": { content: "''" },
25793
25955
  "25%": { content: "'.'" },
25794
25956
  "50%": { content: "'..'" },
25795
25957
  "75%": { content: "'...'" },
25796
- "100%": { content: "''" },
25958
+ "100%": { content: "''" }
25797
25959
  },
25798
25960
  "@keyframes fadeInUp": {
25799
25961
  from: {
25800
25962
  opacity: 0,
25801
25963
  transform: " translateY(5px)",
25802
- scale: 0.9,
25964
+ scale: 0.9
25803
25965
  },
25804
25966
  to: {
25805
25967
  opacity: 1,
25806
25968
  transform: "translateY(0)",
25807
- scale: 1,
25808
- },
25969
+ scale: 1
25970
+ }
25809
25971
  },
25810
25972
  ".hidden": {
25811
25973
  display: "none",
25812
- opacity: 0,
25974
+ opacity: 0
25813
25975
  },
25814
25976
  ".visible": {
25815
25977
  display: "block",
25816
25978
  opacity: 1,
25817
- transition: "opacity 1s ease-out",
25979
+ transition: "opacity 1s ease-out"
25818
25980
  },
25819
- },
25981
+ // Make the host a flex centering box
25982
+ ".love-letters-box-root .arcware-logo-loader": {
25983
+ display: "flex",
25984
+ alignItems: "center",
25985
+ justifyContent: "center"
25986
+ },
25987
+ // When a custom image is active, ignore the legacy 12.5% box
25988
+ ".love-letters-box-root .arcware-logo-loader.aw-custom-loader": {
25989
+ width: "auto !important",
25990
+ height: "auto !important"
25991
+ },
25992
+ // Size & center the <img> itself (independent of host size)
25993
+ ".love-letters-box-root .arcware-logo-loader.aw-custom-loader img": {
25994
+ display: "block",
25995
+ margin: "0 auto",
25996
+ width: "min(40vmin, 40vw)",
25997
+ height: "auto",
25998
+ objectFit: "contain",
25999
+ objectPosition: "center center"
26000
+ },
26001
+ // (optional) If you prefer the old “percentage of container” behavior:
26002
+ ".love-letters-box-root .arcware-logo-loader.aw-custom-loader img.alt-40pct": {
26003
+ width: "40%",
26004
+ maxWidth: "100%",
26005
+ height: "auto"
26006
+ }
26007
+ }
25820
26008
  };
25821
26009
 
25822
26010
 
@@ -25838,6 +26026,56 @@ class ArcwareLogoLoader {
25838
26026
  arcwareLogoLoader.innerHTML = this.getSvg();
25839
26027
  return arcwareLogoLoader;
25840
26028
  }
26029
+ /** Call this once after you create the wrapper/root that contains the SVG */
26030
+ setHostElement(el) {
26031
+ this._hostEl = el;
26032
+ }
26033
+ /** Swap the loader image at runtime; pass undefined to go back to SVG */
26034
+ setImage(url) {
26035
+ var _a, _b;
26036
+ if (!this._hostEl)
26037
+ return;
26038
+ // lazily create <img> once
26039
+ if (!this._imgEl) {
26040
+ const img = document.createElement("img");
26041
+ img.alt = "Loading";
26042
+ img.style.display = "none"; // hidden until we set a URL
26043
+ this._hostEl.appendChild(img);
26044
+ this._imgEl = img;
26045
+ }
26046
+ if (url && url.trim()) {
26047
+ (_a = this._hostEl) === null || _a === void 0 ? void 0 : _a.classList.add("aw-custom-loader");
26048
+ if (this._imgEl.src !== url)
26049
+ this._imgEl.src = url;
26050
+ // show <img>, hide SVG
26051
+ this._imgEl.style.display = "";
26052
+ const svg = this._hostEl.querySelector("svg");
26053
+ if (svg)
26054
+ svg.style.display = "none";
26055
+ }
26056
+ else {
26057
+ // no url → fall back to SVG
26058
+ (_b = this._hostEl) === null || _b === void 0 ? void 0 : _b.classList.remove("aw-custom-loader");
26059
+ this._imgEl.style.display = "none";
26060
+ const svg = this._hostEl.querySelector("svg");
26061
+ if (svg)
26062
+ svg.style.display = "";
26063
+ }
26064
+ }
26065
+ /** Enable/disable pulsing fade in ms; 0 disables */
26066
+ setFade(ms) {
26067
+ if (!this._hostEl)
26068
+ return;
26069
+ const n = Number(ms) || 0;
26070
+ if (n > 0) {
26071
+ this._hostEl.style.setProperty("--aw-fade", `${n}ms`);
26072
+ this._hostEl.classList.add("pulse"); // uses #aw-loader.pulse styles you added
26073
+ }
26074
+ else {
26075
+ this._hostEl.classList.remove("pulse");
26076
+ this._hostEl.style.removeProperty("--aw-fade");
26077
+ }
26078
+ }
25841
26079
  getSvg() {
25842
26080
  return `
25843
26081
  <svg width="42" height="80" viewBox="0 0 42 80" xmlns="http://www.w3.org/2000/svg">
@@ -26908,6 +27146,40 @@ exports.Send = {
26908
27146
  };
26909
27147
 
26910
27148
 
27149
+ /***/ }),
27150
+
27151
+ /***/ 6750:
27152
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
27153
+
27154
+
27155
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
27156
+ exports.ZWhiteLabel = void 0;
27157
+ const zod_1 = __webpack_require__(8754);
27158
+ /** Absolute HTTPS URL (no http) */
27159
+ const AbsoluteHttpsUrl = zod_1.z
27160
+ .string()
27161
+ .url()
27162
+ .refine((u) => u.startsWith("https://"), { message: "URL must use https://" });
27163
+ /** Relative path (no scheme like http:, data:, javascript:, etc.) */
27164
+ const RelativePath = zod_1.z
27165
+ .string()
27166
+ .min(1)
27167
+ .refine((s) => !/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s), { message: "Expected a relative path without a URL scheme" });
27168
+ /** Image URL can be absolute (https) or relative (e.g. /assets/logo.png, ./img.png) */
27169
+ const ImageUrl = zod_1.z.union([AbsoluteHttpsUrl, RelativePath]);
27170
+ /** Strict allowlist for white-label brand fields coming from the URL */
27171
+ exports.ZWhiteLabel = zod_1.z
27172
+ .object({
27173
+ loadingIconUrl: ImageUrl.optional(),
27174
+ loadingIconFadeMs: zod_1.z.number().int().positive().optional(),
27175
+ splashScreenUrl: ImageUrl.optional(),
27176
+ splashScreenMode: zod_1.z.enum(["contain", "cover", "stretch", "repeat"]).optional(),
27177
+ splashScreenPosition: zod_1.z.string().optional(),
27178
+ splashScreenBgColor: zod_1.z.string().optional()
27179
+ })
27180
+ .strict();
27181
+
27182
+
26911
27183
  /***/ }),
26912
27184
 
26913
27185
  /***/ 318:
@@ -26915,8 +27187,10 @@ exports.Send = {
26915
27187
 
26916
27188
 
26917
27189
  Object.defineProperty(exports, "__esModule", ({ value: true }));
26918
- exports.Messages = void 0;
27190
+ exports.ZWhiteLabel = exports.Messages = void 0;
26919
27191
  exports.Messages = __webpack_require__(5387);
27192
+ var ZWhiteLabel_1 = __webpack_require__(6750);
27193
+ Object.defineProperty(exports, "ZWhiteLabel", ({ enumerable: true, get: function () { return ZWhiteLabel_1.ZWhiteLabel; } }));
26920
27194
 
26921
27195
 
26922
27196
  /***/ }),