@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260325084305 → 0.8.1-dev.20260325111153

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.
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import {
3
+ HlsPlayer_default
4
+ } from "./chunk-CVVLFQ4J.mjs";
5
+ export {
6
+ HlsPlayer_default as default
7
+ };
@@ -0,0 +1,131 @@
1
+ // src/components/HlsPlayer.tsx
2
+ import React, { useRef, useEffect, useState, useCallback } from "react";
3
+ import Hls from "hls.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ var HlsPlayer = React.memo(
6
+ ({
7
+ assetUrl,
8
+ posterUrl,
9
+ intrinsicWidth,
10
+ intrinsicHeight,
11
+ showControls = true,
12
+ loop = false,
13
+ playOptions = "autoplay"
14
+ }) => {
15
+ const videoRef = useRef(null);
16
+ const hlsRef = useRef(null);
17
+ const [isPlaying, setIsPlaying] = useState(playOptions === "autoplay");
18
+ const [isHovered, setIsHovered] = useState(false);
19
+ const [isMobile, setIsMobile] = useState(false);
20
+ const wasManuallyPausedRef = useRef(false);
21
+ useEffect(() => {
22
+ const checkMobile = () => {
23
+ const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
24
+ const isSmallScreen = window.innerWidth <= 768;
25
+ const ua = navigator.userAgent.toLowerCase();
26
+ const isMobileUA = /android|iphone|ipad|ipod/i.test(ua);
27
+ setIsMobile(hasTouch || isSmallScreen || isMobileUA);
28
+ };
29
+ checkMobile();
30
+ window.addEventListener("resize", checkMobile);
31
+ return () => window.removeEventListener("resize", checkMobile);
32
+ }, []);
33
+ useEffect(() => {
34
+ const v = videoRef.current;
35
+ if (!v || !assetUrl) return;
36
+ if (hlsRef.current) {
37
+ hlsRef.current.destroy();
38
+ hlsRef.current = null;
39
+ }
40
+ if (Hls.isSupported()) {
41
+ const hls = new Hls();
42
+ hls.loadSource(assetUrl);
43
+ hls.attachMedia(v);
44
+ hls.on(Hls.Events.MANIFEST_PARSED, () => {
45
+ if (isPlaying && !wasManuallyPausedRef.current) {
46
+ v.play().catch(console.error);
47
+ }
48
+ });
49
+ hlsRef.current = hls;
50
+ } else if (v.canPlayType("application/vnd.apple.mpegurl")) {
51
+ v.src = assetUrl;
52
+ }
53
+ }, [assetUrl, isPlaying]);
54
+ const handlePlayPause = useCallback(() => {
55
+ const v = videoRef.current;
56
+ if (!v) return;
57
+ if (v.paused) {
58
+ wasManuallyPausedRef.current = false;
59
+ v.play().then(() => setIsPlaying(true));
60
+ } else {
61
+ wasManuallyPausedRef.current = true;
62
+ v.pause();
63
+ setIsPlaying(false);
64
+ }
65
+ }, []);
66
+ const handleMouseEnter = useCallback(() => {
67
+ if (isMobile) return;
68
+ setIsHovered(true);
69
+ if (playOptions === "playOnHover" && videoRef.current && !wasManuallyPausedRef.current) {
70
+ videoRef.current.play().then(() => setIsPlaying(true));
71
+ }
72
+ }, [playOptions, isMobile]);
73
+ const handleMouseLeave = useCallback(() => {
74
+ if (isMobile) return;
75
+ setIsHovered(false);
76
+ if (playOptions === "playOnHover" && videoRef.current) {
77
+ videoRef.current.pause();
78
+ videoRef.current.currentTime = 0;
79
+ setIsPlaying(false);
80
+ }
81
+ }, [playOptions, isMobile]);
82
+ return /* @__PURE__ */ jsxs(
83
+ "div",
84
+ {
85
+ className: "relative w-full aspect-video bg-black",
86
+ onMouseEnter: handleMouseEnter,
87
+ onMouseLeave: handleMouseLeave,
88
+ children: [
89
+ /* @__PURE__ */ jsx(
90
+ "video",
91
+ {
92
+ ref: videoRef,
93
+ className: "w-full h-full object-contain",
94
+ poster: posterUrl,
95
+ controls: showControls && (isMobile || isPlaying),
96
+ muted: playOptions === "autoplay" || playOptions === "playOnHover",
97
+ autoPlay: playOptions === "autoplay",
98
+ loop,
99
+ playsInline: true,
100
+ onClick: !isMobile && !isPlaying ? handlePlayPause : void 0
101
+ }
102
+ ),
103
+ !isMobile && playOptions === "playOnHover" && posterUrl && /* @__PURE__ */ jsx(
104
+ "img",
105
+ {
106
+ src: posterUrl,
107
+ width: intrinsicWidth,
108
+ height: intrinsicHeight,
109
+ alt: "poster",
110
+ className: `absolute inset-0 object-cover transition-opacity ${isHovered ? "opacity-0" : "opacity-100"}`
111
+ }
112
+ ),
113
+ !isMobile && !isPlaying && /* @__PURE__ */ jsx(
114
+ "div",
115
+ {
116
+ className: "absolute inset-0 flex items-center justify-center cursor-pointer",
117
+ onClick: handlePlayPause,
118
+ children: "\u25B6"
119
+ }
120
+ )
121
+ ]
122
+ }
123
+ );
124
+ }
125
+ );
126
+ HlsPlayer.displayName = "HlsPlayer";
127
+ var HlsPlayer_default = HlsPlayer;
128
+
129
+ export {
130
+ HlsPlayer_default
131
+ };
package/dist/index.js CHANGED
@@ -92,6 +92,145 @@ var init_CopyButton = __esm({
92
92
  }
93
93
  });
94
94
 
95
+ // src/components/HlsPlayer.tsx
96
+ var HlsPlayer_exports = {};
97
+ __export(HlsPlayer_exports, {
98
+ default: () => HlsPlayer_default
99
+ });
100
+ var import_react43, import_hls, import_jsx_runtime55, HlsPlayer, HlsPlayer_default;
101
+ var init_HlsPlayer = __esm({
102
+ "src/components/HlsPlayer.tsx"() {
103
+ "use strict";
104
+ "use client";
105
+ import_react43 = __toESM(require("react"));
106
+ import_hls = __toESM(require("hls.js"));
107
+ import_jsx_runtime55 = require("react/jsx-runtime");
108
+ HlsPlayer = import_react43.default.memo(
109
+ ({
110
+ assetUrl,
111
+ posterUrl,
112
+ intrinsicWidth,
113
+ intrinsicHeight,
114
+ showControls = true,
115
+ loop = false,
116
+ playOptions = "autoplay"
117
+ }) => {
118
+ const videoRef = (0, import_react43.useRef)(null);
119
+ const hlsRef = (0, import_react43.useRef)(null);
120
+ const [isPlaying, setIsPlaying] = (0, import_react43.useState)(playOptions === "autoplay");
121
+ const [isHovered, setIsHovered] = (0, import_react43.useState)(false);
122
+ const [isMobile, setIsMobile] = (0, import_react43.useState)(false);
123
+ const wasManuallyPausedRef = (0, import_react43.useRef)(false);
124
+ (0, import_react43.useEffect)(() => {
125
+ const checkMobile = () => {
126
+ const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
127
+ const isSmallScreen = window.innerWidth <= 768;
128
+ const ua = navigator.userAgent.toLowerCase();
129
+ const isMobileUA = /android|iphone|ipad|ipod/i.test(ua);
130
+ setIsMobile(hasTouch || isSmallScreen || isMobileUA);
131
+ };
132
+ checkMobile();
133
+ window.addEventListener("resize", checkMobile);
134
+ return () => window.removeEventListener("resize", checkMobile);
135
+ }, []);
136
+ (0, import_react43.useEffect)(() => {
137
+ const v = videoRef.current;
138
+ if (!v || !assetUrl) return;
139
+ if (hlsRef.current) {
140
+ hlsRef.current.destroy();
141
+ hlsRef.current = null;
142
+ }
143
+ if (import_hls.default.isSupported()) {
144
+ const hls = new import_hls.default();
145
+ hls.loadSource(assetUrl);
146
+ hls.attachMedia(v);
147
+ hls.on(import_hls.default.Events.MANIFEST_PARSED, () => {
148
+ if (isPlaying && !wasManuallyPausedRef.current) {
149
+ v.play().catch(console.error);
150
+ }
151
+ });
152
+ hlsRef.current = hls;
153
+ } else if (v.canPlayType("application/vnd.apple.mpegurl")) {
154
+ v.src = assetUrl;
155
+ }
156
+ }, [assetUrl, isPlaying]);
157
+ const handlePlayPause = (0, import_react43.useCallback)(() => {
158
+ const v = videoRef.current;
159
+ if (!v) return;
160
+ if (v.paused) {
161
+ wasManuallyPausedRef.current = false;
162
+ v.play().then(() => setIsPlaying(true));
163
+ } else {
164
+ wasManuallyPausedRef.current = true;
165
+ v.pause();
166
+ setIsPlaying(false);
167
+ }
168
+ }, []);
169
+ const handleMouseEnter = (0, import_react43.useCallback)(() => {
170
+ if (isMobile) return;
171
+ setIsHovered(true);
172
+ if (playOptions === "playOnHover" && videoRef.current && !wasManuallyPausedRef.current) {
173
+ videoRef.current.play().then(() => setIsPlaying(true));
174
+ }
175
+ }, [playOptions, isMobile]);
176
+ const handleMouseLeave = (0, import_react43.useCallback)(() => {
177
+ if (isMobile) return;
178
+ setIsHovered(false);
179
+ if (playOptions === "playOnHover" && videoRef.current) {
180
+ videoRef.current.pause();
181
+ videoRef.current.currentTime = 0;
182
+ setIsPlaying(false);
183
+ }
184
+ }, [playOptions, isMobile]);
185
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
186
+ "div",
187
+ {
188
+ className: "relative w-full aspect-video bg-black",
189
+ onMouseEnter: handleMouseEnter,
190
+ onMouseLeave: handleMouseLeave,
191
+ children: [
192
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
193
+ "video",
194
+ {
195
+ ref: videoRef,
196
+ className: "w-full h-full object-contain",
197
+ poster: posterUrl,
198
+ controls: showControls && (isMobile || isPlaying),
199
+ muted: playOptions === "autoplay" || playOptions === "playOnHover",
200
+ autoPlay: playOptions === "autoplay",
201
+ loop,
202
+ playsInline: true,
203
+ onClick: !isMobile && !isPlaying ? handlePlayPause : void 0
204
+ }
205
+ ),
206
+ !isMobile && playOptions === "playOnHover" && posterUrl && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
207
+ "img",
208
+ {
209
+ src: posterUrl,
210
+ width: intrinsicWidth,
211
+ height: intrinsicHeight,
212
+ alt: "poster",
213
+ className: `absolute inset-0 object-cover transition-opacity ${isHovered ? "opacity-0" : "opacity-100"}`
214
+ }
215
+ ),
216
+ !isMobile && !isPlaying && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
217
+ "div",
218
+ {
219
+ className: "absolute inset-0 flex items-center justify-center cursor-pointer",
220
+ onClick: handlePlayPause,
221
+ children: "\u25B6"
222
+ }
223
+ )
224
+ ]
225
+ }
226
+ );
227
+ }
228
+ );
229
+ HlsPlayer.displayName = "HlsPlayer";
230
+ HlsPlayer_default = HlsPlayer;
231
+ }
232
+ });
233
+
95
234
  // src/components/IFrameLoaderView.tsx
96
235
  var import_react46, import_jsx_runtime61, IFrameLoaderView, IFrameLoaderView_default;
97
236
  var init_IFrameLoaderView = __esm({
@@ -3168,11 +3307,11 @@ var CodeNode = (props) => {
3168
3307
  return "";
3169
3308
  }).join("") ?? "";
3170
3309
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "code-block", children: [
3171
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center relative text-gray-200 bg-gray-800 px-4 py-2.5 text-xs font-sans justify-between rounded-t-md", children: [
3310
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "code-block-header flex items-center relative px-4 py-2.5 text-xs font-sans justify-between rounded-t-md", children: [
3172
3311
  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: "Code Snippet" }),
3173
3312
  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CopyButton2, { text: textContent })
3174
3313
  ] }),
3175
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("code", { className: "block bg-gray-900 text-gray-100 p-4 rounded-b-md text-sm whitespace-pre-wrap", children: props.node.children && props.node.children.map((node, index) => {
3314
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("code", { className: "code-block-body p-4 rounded-b-md text-sm whitespace-pre-wrap", children: props.node.children && props.node.children.map((node, index) => {
3176
3315
  const SelectedNode = NodeTypes2[node.type];
3177
3316
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react42.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3178
3317
  SelectedNode,
@@ -3208,138 +3347,22 @@ var AssetUtility = class {
3208
3347
  if (!apiBaseUrl) return url;
3209
3348
  return `${apiBaseUrl}/${url}`;
3210
3349
  }
3350
+ static getAssetUrl(apiBaseUrl) {
3351
+ let domainName = apiBaseUrl.replace("https://", "");
3352
+ return `https://cdn.g-assets.com/${domainName}`;
3353
+ }
3354
+ static getAssetFullPath(apiBaseUrl, relativePath) {
3355
+ let domainName = apiBaseUrl.replace("https://", "");
3356
+ return `https://cdn.g-assets.com/${domainName}/${relativePath}`;
3357
+ }
3211
3358
  };
3212
3359
  var AssetUtility_default = AssetUtility;
3213
3360
 
3214
- // src/components/HlsPlayer.tsx
3215
- var import_react43 = __toESM(require("react"));
3216
- var import_hls = __toESM(require("hls.js"));
3217
- var import_jsx_runtime55 = require("react/jsx-runtime");
3218
- var HlsPlayer = import_react43.default.memo(
3219
- ({
3220
- assetUrl,
3221
- posterUrl,
3222
- intrinsicWidth,
3223
- intrinsicHeight,
3224
- showControls = true,
3225
- loop = false,
3226
- playOptions = "autoplay"
3227
- }) => {
3228
- const videoRef = (0, import_react43.useRef)(null);
3229
- const hlsRef = (0, import_react43.useRef)(null);
3230
- const [isPlaying, setIsPlaying] = (0, import_react43.useState)(playOptions === "autoplay");
3231
- const [isHovered, setIsHovered] = (0, import_react43.useState)(false);
3232
- const [isMobile, setIsMobile] = (0, import_react43.useState)(false);
3233
- const wasManuallyPausedRef = (0, import_react43.useRef)(false);
3234
- (0, import_react43.useEffect)(() => {
3235
- const checkMobile = () => {
3236
- const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
3237
- const isSmallScreen = window.innerWidth <= 768;
3238
- const ua = navigator.userAgent.toLowerCase();
3239
- const isMobileUA = /android|iphone|ipad|ipod/i.test(ua);
3240
- setIsMobile(hasTouch || isSmallScreen || isMobileUA);
3241
- };
3242
- checkMobile();
3243
- window.addEventListener("resize", checkMobile);
3244
- return () => window.removeEventListener("resize", checkMobile);
3245
- }, []);
3246
- (0, import_react43.useEffect)(() => {
3247
- const v = videoRef.current;
3248
- if (!v || !assetUrl) return;
3249
- if (hlsRef.current) {
3250
- hlsRef.current.destroy();
3251
- hlsRef.current = null;
3252
- }
3253
- if (import_hls.default.isSupported()) {
3254
- const hls = new import_hls.default();
3255
- hls.loadSource(assetUrl);
3256
- hls.attachMedia(v);
3257
- hls.on(import_hls.default.Events.MANIFEST_PARSED, () => {
3258
- if (isPlaying && !wasManuallyPausedRef.current) {
3259
- v.play().catch(console.error);
3260
- }
3261
- });
3262
- hlsRef.current = hls;
3263
- } else if (v.canPlayType("application/vnd.apple.mpegurl")) {
3264
- v.src = assetUrl;
3265
- }
3266
- }, [assetUrl, isPlaying]);
3267
- const handlePlayPause = (0, import_react43.useCallback)(() => {
3268
- const v = videoRef.current;
3269
- if (!v) return;
3270
- if (v.paused) {
3271
- wasManuallyPausedRef.current = false;
3272
- v.play().then(() => setIsPlaying(true));
3273
- } else {
3274
- wasManuallyPausedRef.current = true;
3275
- v.pause();
3276
- setIsPlaying(false);
3277
- }
3278
- }, []);
3279
- const handleMouseEnter = (0, import_react43.useCallback)(() => {
3280
- if (isMobile) return;
3281
- setIsHovered(true);
3282
- if (playOptions === "playOnHover" && videoRef.current && !wasManuallyPausedRef.current) {
3283
- videoRef.current.play().then(() => setIsPlaying(true));
3284
- }
3285
- }, [playOptions, isMobile]);
3286
- const handleMouseLeave = (0, import_react43.useCallback)(() => {
3287
- if (isMobile) return;
3288
- setIsHovered(false);
3289
- if (playOptions === "playOnHover" && videoRef.current) {
3290
- videoRef.current.pause();
3291
- videoRef.current.currentTime = 0;
3292
- setIsPlaying(false);
3293
- }
3294
- }, [playOptions, isMobile]);
3295
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
3296
- "div",
3297
- {
3298
- className: "relative w-full aspect-video bg-black",
3299
- onMouseEnter: handleMouseEnter,
3300
- onMouseLeave: handleMouseLeave,
3301
- children: [
3302
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3303
- "video",
3304
- {
3305
- ref: videoRef,
3306
- className: "w-full h-full object-contain",
3307
- poster: posterUrl,
3308
- controls: showControls && (isMobile || isPlaying),
3309
- muted: playOptions === "autoplay" || playOptions === "playOnHover",
3310
- autoPlay: playOptions === "autoplay",
3311
- loop,
3312
- playsInline: true,
3313
- onClick: !isMobile && !isPlaying ? handlePlayPause : void 0
3314
- }
3315
- ),
3316
- !isMobile && playOptions === "playOnHover" && posterUrl && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3317
- "img",
3318
- {
3319
- src: posterUrl,
3320
- width: intrinsicWidth,
3321
- height: intrinsicHeight,
3322
- alt: "poster",
3323
- className: `absolute inset-0 object-cover transition-opacity ${isHovered ? "opacity-0" : "opacity-100"}`
3324
- }
3325
- ),
3326
- !isMobile && !isPlaying && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3327
- "div",
3328
- {
3329
- className: "absolute inset-0 flex items-center justify-center cursor-pointer",
3330
- onClick: handlePlayPause,
3331
- children: "\u25B6"
3332
- }
3333
- )
3334
- ]
3335
- }
3336
- );
3337
- }
3338
- );
3339
- HlsPlayer.displayName = "HlsPlayer";
3340
- var HlsPlayer_default = HlsPlayer;
3361
+ // src/components/pageRenderingEngine/nodes/ImageNode.tsx
3362
+ var import_dynamic2 = __toESM(require("next/dynamic"));
3341
3363
 
3342
3364
  // src/components/DeviceAssetSelector.tsx
3365
+ init_HlsPlayer();
3343
3366
  var import_jsx_runtime56 = require("react/jsx-runtime");
3344
3367
  var DeviceAssetSelector = ({
3345
3368
  assets,
@@ -3424,7 +3447,9 @@ var DeviceAssetSelector = ({
3424
3447
  intrinsicHeight,
3425
3448
  showControls,
3426
3449
  loop,
3427
- playOptions
3450
+ playOptions,
3451
+ apiBaseUrl,
3452
+ session
3428
3453
  }
3429
3454
  );
3430
3455
  } else {
@@ -3457,6 +3482,9 @@ var DeviceAssetSelector_default = DeviceAssetSelector;
3457
3482
 
3458
3483
  // src/components/pageRenderingEngine/nodes/ImageNode.tsx
3459
3484
  var import_jsx_runtime57 = require("react/jsx-runtime");
3485
+ var HlsPlayer2 = (0, import_dynamic2.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), {
3486
+ ssr: false
3487
+ });
3460
3488
  var getNestedValue = (obj, path) => {
3461
3489
  if (!obj || !path) return void 0;
3462
3490
  return path.split(".").reduce((current, key) => {
@@ -3546,7 +3574,7 @@ var ImageNode = (props) => {
3546
3574
  const renderMedia = () => {
3547
3575
  if (isHls) {
3548
3576
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3549
- HlsPlayer_default,
3577
+ HlsPlayer2,
3550
3578
  {
3551
3579
  assetUrl: imageUrl,
3552
3580
  posterUrl,
@@ -3554,7 +3582,9 @@ var ImageNode = (props) => {
3554
3582
  intrinsicHeight: props.node.intrinsicHeight,
3555
3583
  showControls: props.node.showControls === "true",
3556
3584
  loop: props.node.loop === "true",
3557
- playOptions: props.node.playOptions
3585
+ playOptions: props.node.playOptions,
3586
+ apiBaseUrl: props.apiBaseUrl,
3587
+ session: props.session
3558
3588
  }
3559
3589
  );
3560
3590
  } else {
@@ -3960,9 +3990,9 @@ var FormContainerNode_default = FormContainerNode;
3960
3990
  var import_react50 = __toESM(require("react"));
3961
3991
 
3962
3992
  // src/components/pageRenderingEngine/nodes/EmbedNode.tsx
3963
- var import_dynamic2 = __toESM(require("next/dynamic"));
3993
+ var import_dynamic3 = __toESM(require("next/dynamic"));
3964
3994
  var import_jsx_runtime63 = require("react/jsx-runtime");
3965
- var IframeClient2 = (0, import_dynamic2.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
3995
+ var IframeClient2 = (0, import_dynamic3.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
3966
3996
  ssr: false
3967
3997
  });
3968
3998
  var EmbedNode = (props) => {
package/dist/index.mjs CHANGED
@@ -1,3 +1,7 @@
1
+ import {
2
+ HlsPlayer_default
3
+ } from "./chunk-CVVLFQ4J.mjs";
4
+
1
5
  // src/components/pageRenderingEngine/nodes/WidgetRegistry.tsx
2
6
  var registry = {};
3
7
  function registerWidgets(widgets) {
@@ -2521,7 +2525,7 @@ var DataList = (props) => {
2521
2525
  var DataList_default = DataList;
2522
2526
 
2523
2527
  // src/components/pageRenderingEngine/PageBodyRenderer.tsx
2524
- import React48 from "react";
2528
+ import React47 from "react";
2525
2529
 
2526
2530
  // src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
2527
2531
  import React36 from "react";
@@ -2960,11 +2964,11 @@ var CodeNode = (props) => {
2960
2964
  return "";
2961
2965
  }).join("") ?? "";
2962
2966
  return /* @__PURE__ */ jsxs25("div", { className: "code-block", children: [
2963
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center relative text-gray-200 bg-gray-800 px-4 py-2.5 text-xs font-sans justify-between rounded-t-md", children: [
2967
+ /* @__PURE__ */ jsxs25("div", { className: "code-block-header flex items-center relative px-4 py-2.5 text-xs font-sans justify-between rounded-t-md", children: [
2964
2968
  /* @__PURE__ */ jsx52("span", { children: "Code Snippet" }),
2965
2969
  /* @__PURE__ */ jsx52(CopyButton, { text: textContent })
2966
2970
  ] }),
2967
- /* @__PURE__ */ jsx52("code", { className: "block bg-gray-900 text-gray-100 p-4 rounded-b-md text-sm whitespace-pre-wrap", children: props.node.children && props.node.children.map((node, index) => {
2971
+ /* @__PURE__ */ jsx52("code", { className: "code-block-body p-4 rounded-b-md text-sm whitespace-pre-wrap", children: props.node.children && props.node.children.map((node, index) => {
2968
2972
  const SelectedNode = NodeTypes2[node.type];
2969
2973
  return /* @__PURE__ */ jsx52(React41.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx52(
2970
2974
  SelectedNode,
@@ -2988,7 +2992,7 @@ var HorizontalRuleNode = () => {
2988
2992
  var HorizontalRuleNode_default = HorizontalRuleNode;
2989
2993
 
2990
2994
  // src/components/pageRenderingEngine/nodes/ImageNode.tsx
2991
- import React43 from "react";
2995
+ import React42 from "react";
2992
2996
 
2993
2997
  // src/components/utilities/AssetUtility.tsx
2994
2998
  var AssetUtility = class {
@@ -3000,139 +3004,22 @@ var AssetUtility = class {
3000
3004
  if (!apiBaseUrl) return url;
3001
3005
  return `${apiBaseUrl}/${url}`;
3002
3006
  }
3007
+ static getAssetUrl(apiBaseUrl) {
3008
+ let domainName = apiBaseUrl.replace("https://", "");
3009
+ return `https://cdn.g-assets.com/${domainName}`;
3010
+ }
3011
+ static getAssetFullPath(apiBaseUrl, relativePath) {
3012
+ let domainName = apiBaseUrl.replace("https://", "");
3013
+ return `https://cdn.g-assets.com/${domainName}/${relativePath}`;
3014
+ }
3003
3015
  };
3004
3016
  var AssetUtility_default = AssetUtility;
3005
3017
 
3006
- // src/components/HlsPlayer.tsx
3007
- import React42, { useRef as useRef3, useEffect as useEffect7, useState as useState8, useCallback as useCallback3 } from "react";
3008
- import Hls from "hls.js";
3009
- import { jsx as jsx54, jsxs as jsxs26 } from "react/jsx-runtime";
3010
- var HlsPlayer = React42.memo(
3011
- ({
3012
- assetUrl,
3013
- posterUrl,
3014
- intrinsicWidth,
3015
- intrinsicHeight,
3016
- showControls = true,
3017
- loop = false,
3018
- playOptions = "autoplay"
3019
- }) => {
3020
- const videoRef = useRef3(null);
3021
- const hlsRef = useRef3(null);
3022
- const [isPlaying, setIsPlaying] = useState8(playOptions === "autoplay");
3023
- const [isHovered, setIsHovered] = useState8(false);
3024
- const [isMobile, setIsMobile] = useState8(false);
3025
- const wasManuallyPausedRef = useRef3(false);
3026
- useEffect7(() => {
3027
- const checkMobile = () => {
3028
- const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
3029
- const isSmallScreen = window.innerWidth <= 768;
3030
- const ua = navigator.userAgent.toLowerCase();
3031
- const isMobileUA = /android|iphone|ipad|ipod/i.test(ua);
3032
- setIsMobile(hasTouch || isSmallScreen || isMobileUA);
3033
- };
3034
- checkMobile();
3035
- window.addEventListener("resize", checkMobile);
3036
- return () => window.removeEventListener("resize", checkMobile);
3037
- }, []);
3038
- useEffect7(() => {
3039
- const v = videoRef.current;
3040
- if (!v || !assetUrl) return;
3041
- if (hlsRef.current) {
3042
- hlsRef.current.destroy();
3043
- hlsRef.current = null;
3044
- }
3045
- if (Hls.isSupported()) {
3046
- const hls = new Hls();
3047
- hls.loadSource(assetUrl);
3048
- hls.attachMedia(v);
3049
- hls.on(Hls.Events.MANIFEST_PARSED, () => {
3050
- if (isPlaying && !wasManuallyPausedRef.current) {
3051
- v.play().catch(console.error);
3052
- }
3053
- });
3054
- hlsRef.current = hls;
3055
- } else if (v.canPlayType("application/vnd.apple.mpegurl")) {
3056
- v.src = assetUrl;
3057
- }
3058
- }, [assetUrl, isPlaying]);
3059
- const handlePlayPause = useCallback3(() => {
3060
- const v = videoRef.current;
3061
- if (!v) return;
3062
- if (v.paused) {
3063
- wasManuallyPausedRef.current = false;
3064
- v.play().then(() => setIsPlaying(true));
3065
- } else {
3066
- wasManuallyPausedRef.current = true;
3067
- v.pause();
3068
- setIsPlaying(false);
3069
- }
3070
- }, []);
3071
- const handleMouseEnter = useCallback3(() => {
3072
- if (isMobile) return;
3073
- setIsHovered(true);
3074
- if (playOptions === "playOnHover" && videoRef.current && !wasManuallyPausedRef.current) {
3075
- videoRef.current.play().then(() => setIsPlaying(true));
3076
- }
3077
- }, [playOptions, isMobile]);
3078
- const handleMouseLeave = useCallback3(() => {
3079
- if (isMobile) return;
3080
- setIsHovered(false);
3081
- if (playOptions === "playOnHover" && videoRef.current) {
3082
- videoRef.current.pause();
3083
- videoRef.current.currentTime = 0;
3084
- setIsPlaying(false);
3085
- }
3086
- }, [playOptions, isMobile]);
3087
- return /* @__PURE__ */ jsxs26(
3088
- "div",
3089
- {
3090
- className: "relative w-full aspect-video bg-black",
3091
- onMouseEnter: handleMouseEnter,
3092
- onMouseLeave: handleMouseLeave,
3093
- children: [
3094
- /* @__PURE__ */ jsx54(
3095
- "video",
3096
- {
3097
- ref: videoRef,
3098
- className: "w-full h-full object-contain",
3099
- poster: posterUrl,
3100
- controls: showControls && (isMobile || isPlaying),
3101
- muted: playOptions === "autoplay" || playOptions === "playOnHover",
3102
- autoPlay: playOptions === "autoplay",
3103
- loop,
3104
- playsInline: true,
3105
- onClick: !isMobile && !isPlaying ? handlePlayPause : void 0
3106
- }
3107
- ),
3108
- !isMobile && playOptions === "playOnHover" && posterUrl && /* @__PURE__ */ jsx54(
3109
- "img",
3110
- {
3111
- src: posterUrl,
3112
- width: intrinsicWidth,
3113
- height: intrinsicHeight,
3114
- alt: "poster",
3115
- className: `absolute inset-0 object-cover transition-opacity ${isHovered ? "opacity-0" : "opacity-100"}`
3116
- }
3117
- ),
3118
- !isMobile && !isPlaying && /* @__PURE__ */ jsx54(
3119
- "div",
3120
- {
3121
- className: "absolute inset-0 flex items-center justify-center cursor-pointer",
3122
- onClick: handlePlayPause,
3123
- children: "\u25B6"
3124
- }
3125
- )
3126
- ]
3127
- }
3128
- );
3129
- }
3130
- );
3131
- HlsPlayer.displayName = "HlsPlayer";
3132
- var HlsPlayer_default = HlsPlayer;
3018
+ // src/components/pageRenderingEngine/nodes/ImageNode.tsx
3019
+ import dynamic2 from "next/dynamic";
3133
3020
 
3134
3021
  // src/components/DeviceAssetSelector.tsx
3135
- import { jsx as jsx55 } from "react/jsx-runtime";
3022
+ import { jsx as jsx54 } from "react/jsx-runtime";
3136
3023
  var DeviceAssetSelector = ({
3137
3024
  assets,
3138
3025
  apiBaseUrl,
@@ -3207,7 +3094,7 @@ var DeviceAssetSelector = ({
3207
3094
  const formatClasses = FormatClass[nodeProps?.format || ""] || "";
3208
3095
  const renderMedia = () => {
3209
3096
  if (isHls) {
3210
- return /* @__PURE__ */ jsx55(
3097
+ return /* @__PURE__ */ jsx54(
3211
3098
  HlsPlayer_default,
3212
3099
  {
3213
3100
  assetUrl: resolvedAssetUrl,
@@ -3216,13 +3103,15 @@ var DeviceAssetSelector = ({
3216
3103
  intrinsicHeight,
3217
3104
  showControls,
3218
3105
  loop,
3219
- playOptions
3106
+ playOptions,
3107
+ apiBaseUrl,
3108
+ session
3220
3109
  }
3221
3110
  );
3222
3111
  } else {
3223
3112
  return (
3224
3113
  /* eslint-disable-next-line @next/next/no-img-element */
3225
- /* @__PURE__ */ jsx55(
3114
+ /* @__PURE__ */ jsx54(
3226
3115
  "img",
3227
3116
  {
3228
3117
  style: styles,
@@ -3238,17 +3127,20 @@ var DeviceAssetSelector = ({
3238
3127
  }
3239
3128
  };
3240
3129
  if (width) {
3241
- return /* @__PURE__ */ jsx55("div", { style: { width }, children: renderMedia() });
3130
+ return /* @__PURE__ */ jsx54("div", { style: { width }, children: renderMedia() });
3242
3131
  }
3243
3132
  if (nodeProps?.format) {
3244
- return /* @__PURE__ */ jsx55("div", { className: `flex ${formatClasses}`, children: renderMedia() });
3133
+ return /* @__PURE__ */ jsx54("div", { className: `flex ${formatClasses}`, children: renderMedia() });
3245
3134
  }
3246
3135
  return renderMedia();
3247
3136
  };
3248
3137
  var DeviceAssetSelector_default = DeviceAssetSelector;
3249
3138
 
3250
3139
  // src/components/pageRenderingEngine/nodes/ImageNode.tsx
3251
- import { Fragment as Fragment6, jsx as jsx56 } from "react/jsx-runtime";
3140
+ import { Fragment as Fragment6, jsx as jsx55 } from "react/jsx-runtime";
3141
+ var HlsPlayer = dynamic2(() => import("./HlsPlayer-FFEIK6FG.mjs"), {
3142
+ ssr: false
3143
+ });
3252
3144
  var getNestedValue = (obj, path) => {
3253
3145
  if (!obj || !path) return void 0;
3254
3146
  return path.split(".").reduce((current, key) => {
@@ -3288,7 +3180,7 @@ var ImageNode = (props) => {
3288
3180
  console.error("Error parsing assets in ImageNode:", error);
3289
3181
  }
3290
3182
  if (assets && assets.length > 0) {
3291
- return /* @__PURE__ */ jsx56(Fragment6, { children: /* @__PURE__ */ jsx56(
3183
+ return /* @__PURE__ */ jsx55(Fragment6, { children: /* @__PURE__ */ jsx55(
3292
3184
  DeviceAssetSelector_default,
3293
3185
  {
3294
3186
  device: props.device,
@@ -3337,8 +3229,8 @@ var ImageNode = (props) => {
3337
3229
  const isHls = imageUrl?.endsWith(".m3u8");
3338
3230
  const renderMedia = () => {
3339
3231
  if (isHls) {
3340
- return /* @__PURE__ */ jsx56(
3341
- HlsPlayer_default,
3232
+ return /* @__PURE__ */ jsx55(
3233
+ HlsPlayer,
3342
3234
  {
3343
3235
  assetUrl: imageUrl,
3344
3236
  posterUrl,
@@ -3346,11 +3238,13 @@ var ImageNode = (props) => {
3346
3238
  intrinsicHeight: props.node.intrinsicHeight,
3347
3239
  showControls: props.node.showControls === "true",
3348
3240
  loop: props.node.loop === "true",
3349
- playOptions: props.node.playOptions
3241
+ playOptions: props.node.playOptions,
3242
+ apiBaseUrl: props.apiBaseUrl,
3243
+ session: props.session
3350
3244
  }
3351
3245
  );
3352
3246
  } else {
3353
- return /* @__PURE__ */ jsx56(React43.Fragment, { children: /* @__PURE__ */ jsx56(
3247
+ return /* @__PURE__ */ jsx55(React42.Fragment, { children: /* @__PURE__ */ jsx55(
3354
3248
  "img",
3355
3249
  {
3356
3250
  style: styles,
@@ -3365,14 +3259,14 @@ var ImageNode = (props) => {
3365
3259
  }
3366
3260
  };
3367
3261
  if (props.node.width) {
3368
- return /* @__PURE__ */ jsx56("div", { className: `flex ${formatClasses}`, children: renderMedia() });
3262
+ return /* @__PURE__ */ jsx55("div", { className: `flex ${formatClasses}`, children: renderMedia() });
3369
3263
  }
3370
3264
  return renderMedia();
3371
3265
  };
3372
3266
  var ImageNode_default = ImageNode;
3373
3267
 
3374
3268
  // src/components/pageRenderingEngine/nodes/WidgetNode.tsx
3375
- import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs27 } from "react/jsx-runtime";
3269
+ import { Fragment as Fragment7, jsx as jsx56, jsxs as jsxs26 } from "react/jsx-runtime";
3376
3270
  var WidgetNode = (props) => {
3377
3271
  const getWidgetParameters = () => {
3378
3272
  const widgetInputParameters = {
@@ -3429,14 +3323,14 @@ var WidgetNode = (props) => {
3429
3323
  };
3430
3324
  const widgetCode = props.node?.widgetCode;
3431
3325
  if (!widgetCode) {
3432
- return /* @__PURE__ */ jsx57(Fragment7, { children: "Invalid widget" });
3326
+ return /* @__PURE__ */ jsx56(Fragment7, { children: "Invalid widget" });
3433
3327
  }
3434
3328
  const SelectedWidget = getWidget(widgetCode);
3435
3329
  if (!SelectedWidget) {
3436
3330
  if (process.env.NODE_ENV !== "production") {
3437
3331
  console.warn("Widget not found:", widgetCode);
3438
3332
  }
3439
- return /* @__PURE__ */ jsxs27(Fragment7, { children: [
3333
+ return /* @__PURE__ */ jsxs26(Fragment7, { children: [
3440
3334
  "Widget not found: ",
3441
3335
  widgetCode
3442
3336
  ] });
@@ -3444,7 +3338,7 @@ var WidgetNode = (props) => {
3444
3338
  const widgetParams = getWidgetParameters();
3445
3339
  return (
3446
3340
  // eslint-disable-next-line react-hooks/static-components
3447
- /* @__PURE__ */ jsx57(
3341
+ /* @__PURE__ */ jsx56(
3448
3342
  SelectedWidget,
3449
3343
  {
3450
3344
  params: widgetParams,
@@ -3460,12 +3354,12 @@ var WidgetNode = (props) => {
3460
3354
  var WidgetNode_default = WidgetNode;
3461
3355
 
3462
3356
  // src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
3463
- import React44, { useRef as useRef4, useReducer as useReducer2, useCallback as useCallback4, useEffect as useEffect8 } from "react";
3357
+ import React43, { useRef as useRef3, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect7 } from "react";
3464
3358
 
3465
3359
  // src/components/pageRenderingEngine/nodes/InputControlNode.tsx
3466
- import { jsx as jsx58 } from "react/jsx-runtime";
3360
+ import { jsx as jsx57 } from "react/jsx-runtime";
3467
3361
  var InputControlNode = (props) => {
3468
- return /* @__PURE__ */ jsx58("div", { children: /* @__PURE__ */ jsx58(
3362
+ return /* @__PURE__ */ jsx57("div", { children: /* @__PURE__ */ jsx57(
3469
3363
  InputControl_default,
3470
3364
  {
3471
3365
  name: props.node.name,
@@ -3699,22 +3593,22 @@ var ServiceClient = class {
3699
3593
  var ServiceClient_default = ServiceClient;
3700
3594
 
3701
3595
  // src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
3702
- import { jsx as jsx59, jsxs as jsxs28 } from "react/jsx-runtime";
3596
+ import { jsx as jsx58, jsxs as jsxs27 } from "react/jsx-runtime";
3703
3597
  var FormContainerNode = (props) => {
3704
3598
  const NodeTypes2 = {
3705
3599
  ["input-control"]: InputControlNode_default
3706
3600
  };
3707
3601
  const { node } = props;
3708
- const formRef = useRef4(null);
3602
+ const formRef = useRef3(null);
3709
3603
  const initialState = {
3710
3604
  inputValues: {},
3711
3605
  lastPropertyChanged: ""
3712
3606
  };
3713
3607
  const [formState, dispatch] = useReducer2(FormReducer_default, initialState);
3714
- const handleInputChange = useCallback4((updatedValues) => {
3608
+ const handleInputChange = useCallback3((updatedValues) => {
3715
3609
  dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
3716
3610
  }, [dispatch]);
3717
- useEffect8(() => {
3611
+ useEffect7(() => {
3718
3612
  const fetchInitialData = async () => {
3719
3613
  const client = new ServiceClient_default(props.apiBaseUrl, props.session);
3720
3614
  const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
@@ -3729,12 +3623,12 @@ var FormContainerNode = (props) => {
3729
3623
  };
3730
3624
  fetchInitialData();
3731
3625
  }, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
3732
- return /* @__PURE__ */ jsxs28("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
3626
+ return /* @__PURE__ */ jsxs27("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
3733
3627
  node.children && node.children.map((node2, index) => {
3734
3628
  {
3735
3629
  }
3736
3630
  const SelectedNode = NodeTypes2[node2.type];
3737
- return /* @__PURE__ */ jsx59(React44.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx59(
3631
+ return /* @__PURE__ */ jsx58(React43.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx58(
3738
3632
  InputControlNode_default,
3739
3633
  {
3740
3634
  value: formState.inputValues[node2.name],
@@ -3743,18 +3637,18 @@ var FormContainerNode = (props) => {
3743
3637
  }
3744
3638
  ) }, index);
3745
3639
  }),
3746
- node.children.length == 0 && /* @__PURE__ */ jsx59("div", { className: "py-0.5 lg:py-1.5" })
3640
+ node.children.length == 0 && /* @__PURE__ */ jsx58("div", { className: "py-0.5 lg:py-1.5" })
3747
3641
  ] });
3748
3642
  };
3749
3643
  var FormContainerNode_default = FormContainerNode;
3750
3644
 
3751
3645
  // src/components/pageRenderingEngine/nodes/DivContainer.tsx
3752
- import React47 from "react";
3646
+ import React46 from "react";
3753
3647
 
3754
3648
  // src/components/pageRenderingEngine/nodes/EmbedNode.tsx
3755
- import dynamic2 from "next/dynamic";
3756
- import { jsx as jsx60 } from "react/jsx-runtime";
3757
- var IframeClient = dynamic2(() => import("./IframeClient-J22NMEVY.mjs"), {
3649
+ import dynamic3 from "next/dynamic";
3650
+ import { jsx as jsx59 } from "react/jsx-runtime";
3651
+ var IframeClient = dynamic3(() => import("./IframeClient-J22NMEVY.mjs"), {
3758
3652
  ssr: false
3759
3653
  });
3760
3654
  var EmbedNode = (props) => {
@@ -3766,13 +3660,13 @@ var EmbedNode = (props) => {
3766
3660
  } else {
3767
3661
  src = props.node.embedSrc;
3768
3662
  }
3769
- return /* @__PURE__ */ jsx60("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx60(IframeClient, { src }) });
3663
+ return /* @__PURE__ */ jsx59("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx59(IframeClient, { src }) });
3770
3664
  };
3771
3665
  var EmbedNode_default = EmbedNode;
3772
3666
 
3773
3667
  // src/components/Slider.tsx
3774
- import React45, { useState as useState9, useEffect as useEffect9, Children, cloneElement } from "react";
3775
- import { Fragment as Fragment8, jsx as jsx61, jsxs as jsxs29 } from "react/jsx-runtime";
3668
+ import React44, { useState as useState8, useEffect as useEffect8, Children, cloneElement } from "react";
3669
+ import { Fragment as Fragment8, jsx as jsx60, jsxs as jsxs28 } from "react/jsx-runtime";
3776
3670
  var Slider = ({
3777
3671
  children,
3778
3672
  slidesToShow = 4,
@@ -3790,13 +3684,13 @@ var Slider = ({
3790
3684
  pillStyle = "cumulative",
3791
3685
  progressPosition = "bottom"
3792
3686
  }) => {
3793
- const [currentSlide, setCurrentSlide] = useState9(0);
3794
- const [transition, setTransition] = useState9(true);
3795
- const [slidesToShowState, setSlidesToShowState] = useState9(
3687
+ const [currentSlide, setCurrentSlide] = useState8(0);
3688
+ const [transition, setTransition] = useState8(true);
3689
+ const [slidesToShowState, setSlidesToShowState] = useState8(
3796
3690
  typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
3797
3691
  );
3798
- const [isPlaying, setIsPlaying] = useState9(autoplay);
3799
- useEffect9(() => {
3692
+ const [isPlaying, setIsPlaying] = useState8(autoplay);
3693
+ useEffect8(() => {
3800
3694
  if (typeof slidesToShow === "number") return;
3801
3695
  const handleResize = () => {
3802
3696
  if (window.innerWidth >= 1024) {
@@ -3811,7 +3705,7 @@ var Slider = ({
3811
3705
  window.addEventListener("resize", handleResize);
3812
3706
  return () => window.removeEventListener("resize", handleResize);
3813
3707
  }, [slidesToShow]);
3814
- useEffect9(() => {
3708
+ useEffect8(() => {
3815
3709
  if (!autoplay) return;
3816
3710
  const timer = setInterval(() => {
3817
3711
  if (isPlaying) {
@@ -3866,10 +3760,10 @@ var Slider = ({
3866
3760
  };
3867
3761
  const translateX = -currentSlide * (100 / slidesToShowState);
3868
3762
  const slides = Children.map(children, (child, index) => {
3869
- if (!React45.isValidElement(child)) return null;
3763
+ if (!React44.isValidElement(child)) return null;
3870
3764
  const childProps = child.props;
3871
3765
  const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
3872
- return /* @__PURE__ */ jsx61(
3766
+ return /* @__PURE__ */ jsx60(
3873
3767
  "div",
3874
3768
  {
3875
3769
  className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
@@ -3892,14 +3786,14 @@ var Slider = ({
3892
3786
  return "bottom-4";
3893
3787
  }
3894
3788
  };
3895
- return /* @__PURE__ */ jsxs29(
3789
+ return /* @__PURE__ */ jsxs28(
3896
3790
  "div",
3897
3791
  {
3898
3792
  className: `relative w-full overflow-hidden ${className}`,
3899
3793
  onMouseEnter: handleMouseEnter,
3900
3794
  onMouseLeave: handleMouseLeave,
3901
3795
  children: [
3902
- /* @__PURE__ */ jsx61(
3796
+ /* @__PURE__ */ jsx60(
3903
3797
  "div",
3904
3798
  {
3905
3799
  className: "flex h-full",
@@ -3910,18 +3804,18 @@ var Slider = ({
3910
3804
  children: slides
3911
3805
  }
3912
3806
  ),
3913
- show_arrows && /* @__PURE__ */ jsxs29(Fragment8, { children: [
3914
- /* @__PURE__ */ jsx61(
3807
+ show_arrows && /* @__PURE__ */ jsxs28(Fragment8, { children: [
3808
+ /* @__PURE__ */ jsx60(
3915
3809
  ArrowButton,
3916
3810
  {
3917
3811
  direction: "left",
3918
3812
  onClick: prevSlide,
3919
3813
  visible: infinite_scroll || currentSlide > 0,
3920
3814
  className: arrowClassName,
3921
- children: /* @__PURE__ */ jsx61("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx61("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
3815
+ children: /* @__PURE__ */ jsx60("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx60("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
3922
3816
  }
3923
3817
  ),
3924
- /* @__PURE__ */ jsxs29(
3818
+ /* @__PURE__ */ jsxs28(
3925
3819
  ArrowButton,
3926
3820
  {
3927
3821
  direction: "right",
@@ -3929,13 +3823,13 @@ var Slider = ({
3929
3823
  visible: infinite_scroll || currentSlide < maxSlide,
3930
3824
  className: arrowClassName,
3931
3825
  children: [
3932
- /* @__PURE__ */ jsx61("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx61("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
3826
+ /* @__PURE__ */ jsx60("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx60("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
3933
3827
  " "
3934
3828
  ]
3935
3829
  }
3936
3830
  )
3937
3831
  ] }),
3938
- show_dots && /* @__PURE__ */ jsx61("div", { className: `absolute left-1/2 -translate-x-1/2 flex justify-center space-x-1.5 ${getProgressPositionClass()}`, children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ jsx61(
3832
+ show_dots && /* @__PURE__ */ jsx60("div", { className: `absolute left-1/2 -translate-x-1/2 flex justify-center space-x-1.5 ${getProgressPositionClass()}`, children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ jsx60(
3939
3833
  ProgressPill,
3940
3834
  {
3941
3835
  active: index === currentSlide,
@@ -3961,7 +3855,7 @@ var ArrowButton = ({
3961
3855
  visible,
3962
3856
  children,
3963
3857
  className = ""
3964
- }) => /* @__PURE__ */ jsx61(
3858
+ }) => /* @__PURE__ */ jsx60(
3965
3859
  "button",
3966
3860
  {
3967
3861
  className: `
@@ -3987,13 +3881,13 @@ var ProgressPill = ({
3987
3881
  currentSlide,
3988
3882
  totalSlides
3989
3883
  }) => {
3990
- const [progress, setProgress] = useState9(0);
3991
- useEffect9(() => {
3884
+ const [progress, setProgress] = useState8(0);
3885
+ useEffect8(() => {
3992
3886
  if (active) {
3993
3887
  setProgress(0);
3994
3888
  }
3995
3889
  }, [active, index]);
3996
- useEffect9(() => {
3890
+ useEffect8(() => {
3997
3891
  if (!active || !isPlaying) {
3998
3892
  if (!active) {
3999
3893
  setProgress(0);
@@ -4048,7 +3942,7 @@ var ProgressPill = ({
4048
3942
  const renderProgressBar = () => {
4049
3943
  if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
4050
3944
  const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
4051
- return /* @__PURE__ */ jsx61(
3945
+ return /* @__PURE__ */ jsx60(
4052
3946
  "div",
4053
3947
  {
4054
3948
  className: `absolute top-0 left-0 h-full rounded-full ${style === "cumulative" && isFilled ? activeClassName || "bg-white" : activeClassName || "bg-white"} transition-all duration-50 ease-linear`,
@@ -4060,7 +3954,7 @@ var ProgressPill = ({
4060
3954
  };
4061
3955
  const renderCumulativeFill = () => {
4062
3956
  if (style === "cumulative" && isFilled && !isActive) {
4063
- return /* @__PURE__ */ jsx61(
3957
+ return /* @__PURE__ */ jsx60(
4064
3958
  "div",
4065
3959
  {
4066
3960
  className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
@@ -4070,7 +3964,7 @@ var ProgressPill = ({
4070
3964
  }
4071
3965
  return null;
4072
3966
  };
4073
- return /* @__PURE__ */ jsxs29(
3967
+ return /* @__PURE__ */ jsxs28(
4074
3968
  "button",
4075
3969
  {
4076
3970
  className: `${baseClasses} ${getStyleClasses()}`,
@@ -4246,10 +4140,10 @@ var PathUtility = class {
4246
4140
  var PathUtility_default = new PathUtility();
4247
4141
 
4248
4142
  // src/components/NoDataFound.tsx
4249
- import { jsx as jsx62, jsxs as jsxs30 } from "react/jsx-runtime";
4143
+ import { jsx as jsx61, jsxs as jsxs29 } from "react/jsx-runtime";
4250
4144
  var NoDataFound = () => {
4251
- return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
4252
- /* @__PURE__ */ jsx62("div", { className: "mb-5", children: /* @__PURE__ */ jsx62("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx62(
4145
+ return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
4146
+ /* @__PURE__ */ jsx61("div", { className: "mb-5", children: /* @__PURE__ */ jsx61("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx61(
4253
4147
  "svg",
4254
4148
  {
4255
4149
  className: "w-10 h-10",
@@ -4257,7 +4151,7 @@ var NoDataFound = () => {
4257
4151
  stroke: "currentColor",
4258
4152
  viewBox: "0 0 24 24",
4259
4153
  xmlns: "http://www.w3.org/2000/svg",
4260
- children: /* @__PURE__ */ jsx62(
4154
+ children: /* @__PURE__ */ jsx61(
4261
4155
  "path",
4262
4156
  {
4263
4157
  strokeLinecap: "round",
@@ -4268,15 +4162,15 @@ var NoDataFound = () => {
4268
4162
  )
4269
4163
  }
4270
4164
  ) }) }),
4271
- /* @__PURE__ */ jsx62("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
4272
- /* @__PURE__ */ jsx62("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
4165
+ /* @__PURE__ */ jsx61("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
4166
+ /* @__PURE__ */ jsx61("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
4273
4167
  ] });
4274
4168
  };
4275
4169
  var NoDataFound_default = NoDataFound;
4276
4170
 
4277
4171
  // src/components/Pagination.tsx
4278
4172
  import { useMemo } from "react";
4279
- import { jsx as jsx63, jsxs as jsxs31 } from "react/jsx-runtime";
4173
+ import { jsx as jsx62, jsxs as jsxs30 } from "react/jsx-runtime";
4280
4174
  var Pagination = (props) => {
4281
4175
  const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
4282
4176
  const builder = useMemo(() => {
@@ -4320,7 +4214,7 @@ var Pagination = (props) => {
4320
4214
  return range;
4321
4215
  };
4322
4216
  const paginationRange = getPaginationRange();
4323
- const PageButton = ({ page, children }) => /* @__PURE__ */ jsx63(
4217
+ const PageButton = ({ page, children }) => /* @__PURE__ */ jsx62(
4324
4218
  Hyperlink,
4325
4219
  {
4326
4220
  linkType: "Link" /* Link */,
@@ -4335,9 +4229,9 @@ var Pagination = (props) => {
4335
4229
  );
4336
4230
  const NavigationButton = ({ page, disabled, children }) => {
4337
4231
  if (disabled) {
4338
- return /* @__PURE__ */ jsx63("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
4232
+ return /* @__PURE__ */ jsx62("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
4339
4233
  }
4340
- return /* @__PURE__ */ jsx63(
4234
+ return /* @__PURE__ */ jsx62(
4341
4235
  Hyperlink,
4342
4236
  {
4343
4237
  className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border transition-colors duration-150",
@@ -4347,35 +4241,35 @@ var Pagination = (props) => {
4347
4241
  );
4348
4242
  };
4349
4243
  if (totalPages <= 1 && totalItems === 0) return null;
4350
- return /* @__PURE__ */ jsxs31("div", { className: "py-6 border-t bg-default", children: [
4351
- /* @__PURE__ */ jsxs31("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
4352
- /* @__PURE__ */ jsxs31("div", { className: "text-sm", children: [
4244
+ return /* @__PURE__ */ jsxs30("div", { className: "py-6 border-t bg-default", children: [
4245
+ /* @__PURE__ */ jsxs30("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
4246
+ /* @__PURE__ */ jsxs30("div", { className: "text-sm", children: [
4353
4247
  "Showing ",
4354
- /* @__PURE__ */ jsxs31("span", { className: "font-semibold", children: [
4248
+ /* @__PURE__ */ jsxs30("span", { className: "font-semibold", children: [
4355
4249
  startItem,
4356
4250
  "-",
4357
4251
  endItem
4358
4252
  ] }),
4359
4253
  " ",
4360
4254
  "out of ",
4361
- /* @__PURE__ */ jsx63("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
4255
+ /* @__PURE__ */ jsx62("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
4362
4256
  " results"
4363
4257
  ] }),
4364
- totalPages > 1 && /* @__PURE__ */ jsxs31("div", { className: "flex items-center space-x-1", children: [
4365
- /* @__PURE__ */ jsxs31(
4258
+ totalPages > 1 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-1", children: [
4259
+ /* @__PURE__ */ jsxs30(
4366
4260
  NavigationButton,
4367
4261
  {
4368
4262
  page: activePageNumber - 1,
4369
4263
  disabled: activePageNumber === 1,
4370
4264
  children: [
4371
- /* @__PURE__ */ jsx63("span", { children: /* @__PURE__ */ jsx63(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
4372
- /* @__PURE__ */ jsx63("span", { className: "text-sm", children: "Prev" })
4265
+ /* @__PURE__ */ jsx62("span", { children: /* @__PURE__ */ jsx62(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
4266
+ /* @__PURE__ */ jsx62("span", { className: "text-sm", children: "Prev" })
4373
4267
  ]
4374
4268
  }
4375
4269
  ),
4376
4270
  paginationRange.map((item, index) => {
4377
4271
  if (item === "...") {
4378
- return /* @__PURE__ */ jsx63(
4272
+ return /* @__PURE__ */ jsx62(
4379
4273
  "span",
4380
4274
  {
4381
4275
  className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
@@ -4385,23 +4279,23 @@ var Pagination = (props) => {
4385
4279
  );
4386
4280
  }
4387
4281
  const page = item;
4388
- return /* @__PURE__ */ jsx63(PageButton, { page, children: page }, page);
4282
+ return /* @__PURE__ */ jsx62(PageButton, { page, children: page }, page);
4389
4283
  }),
4390
- /* @__PURE__ */ jsxs31(
4284
+ /* @__PURE__ */ jsxs30(
4391
4285
  NavigationButton,
4392
4286
  {
4393
4287
  page: activePageNumber + 1,
4394
4288
  disabled: activePageNumber === totalPages,
4395
4289
  children: [
4396
- /* @__PURE__ */ jsx63("span", { className: "text-sm", children: "Next" }),
4397
- /* @__PURE__ */ jsx63("span", { children: /* @__PURE__ */ jsx63(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
4290
+ /* @__PURE__ */ jsx62("span", { className: "text-sm", children: "Next" }),
4291
+ /* @__PURE__ */ jsx62("span", { children: /* @__PURE__ */ jsx62(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
4398
4292
  ]
4399
4293
  }
4400
4294
  )
4401
4295
  ] }),
4402
- showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs31("div", { className: "flex items-center space-x-2", children: [
4403
- /* @__PURE__ */ jsx63("span", { className: "text-sm", children: "Go to:" }),
4404
- /* @__PURE__ */ jsx63("div", { className: "relative", children: /* @__PURE__ */ jsx63(
4296
+ showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-2", children: [
4297
+ /* @__PURE__ */ jsx62("span", { className: "text-sm", children: "Go to:" }),
4298
+ /* @__PURE__ */ jsx62("div", { className: "relative", children: /* @__PURE__ */ jsx62(
4405
4299
  "input",
4406
4300
  {
4407
4301
  type: "number",
@@ -4422,9 +4316,9 @@ var Pagination = (props) => {
4422
4316
  ) })
4423
4317
  ] })
4424
4318
  ] }),
4425
- showPageSizeSelector && /* @__PURE__ */ jsx63("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-center space-x-2", children: [
4426
- /* @__PURE__ */ jsx63("span", { className: "text-sm", children: "Show:" }),
4427
- /* @__PURE__ */ jsx63("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx63(
4319
+ showPageSizeSelector && /* @__PURE__ */ jsx62("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-center space-x-2", children: [
4320
+ /* @__PURE__ */ jsx62("span", { className: "text-sm", children: "Show:" }),
4321
+ /* @__PURE__ */ jsx62("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx62(
4428
4322
  Hyperlink,
4429
4323
  {
4430
4324
  className: `
@@ -4436,14 +4330,14 @@ var Pagination = (props) => {
4436
4330
  },
4437
4331
  size
4438
4332
  )) }),
4439
- /* @__PURE__ */ jsx63("span", { className: "text-sm", children: "per page" })
4333
+ /* @__PURE__ */ jsx62("span", { className: "text-sm", children: "per page" })
4440
4334
  ] }) })
4441
4335
  ] });
4442
4336
  };
4443
4337
  var Pagination_default = Pagination;
4444
4338
 
4445
4339
  // src/components/pageRenderingEngine/nodes/DivContainer.tsx
4446
- import { jsx as jsx64, jsxs as jsxs32 } from "react/jsx-runtime";
4340
+ import { jsx as jsx63, jsxs as jsxs31 } from "react/jsx-runtime";
4447
4341
  function toCamelCase(str) {
4448
4342
  return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
4449
4343
  }
@@ -4625,7 +4519,7 @@ var DivContainer = async (props) => {
4625
4519
  response = await serviceClient.get(endpoint);
4626
4520
  result = response?.result;
4627
4521
  if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
4628
- return /* @__PURE__ */ jsx64(NoDataFound_default, {});
4522
+ return /* @__PURE__ */ jsx63(NoDataFound_default, {});
4629
4523
  }
4630
4524
  if (dataBindingProperties.childCollectionName && props.dataitem) {
4631
4525
  childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
@@ -4637,7 +4531,7 @@ var DivContainer = async (props) => {
4637
4531
  }
4638
4532
  const SelectedNode = NodeTypes2[node.type];
4639
4533
  if (!SelectedNode) return null;
4640
- return /* @__PURE__ */ jsx64(React47.Fragment, { children: /* @__PURE__ */ jsx64(
4534
+ return /* @__PURE__ */ jsx63(React46.Fragment, { children: /* @__PURE__ */ jsx63(
4641
4535
  SelectedNode,
4642
4536
  {
4643
4537
  node,
@@ -4737,9 +4631,9 @@ var DivContainer = async (props) => {
4737
4631
  props.node.autoFormat && "auto-format",
4738
4632
  props.node.bgClass
4739
4633
  ].filter(Boolean).join(" ");
4740
- return /* @__PURE__ */ jsxs32(React47.Fragment, { children: [
4741
- /* @__PURE__ */ jsx64("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
4742
- /* @__PURE__ */ jsx64(React47.Fragment, { children: /* @__PURE__ */ jsx64(
4634
+ return /* @__PURE__ */ jsxs31(React46.Fragment, { children: [
4635
+ /* @__PURE__ */ jsx63("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
4636
+ /* @__PURE__ */ jsx63(React46.Fragment, { children: /* @__PURE__ */ jsx63(
4743
4637
  Wrapper,
4744
4638
  {
4745
4639
  id: guid,
@@ -4748,18 +4642,18 @@ var DivContainer = async (props) => {
4748
4642
  ...wrapperProps,
4749
4643
  children: dataToRender.map(
4750
4644
  (item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
4751
- (child, i) => /* @__PURE__ */ jsx64(React47.Fragment, { children: child }, i)
4645
+ (child, i) => /* @__PURE__ */ jsx63(React46.Fragment, { children: child }, i)
4752
4646
  ) : renderChildren(props.node.children, props, item, idx)
4753
4647
  )
4754
4648
  }
4755
4649
  ) }),
4756
- dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx64("div", { children: /* @__PURE__ */ jsx64(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
4650
+ dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx63("div", { children: /* @__PURE__ */ jsx63(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
4757
4651
  ] });
4758
4652
  };
4759
4653
  var DivContainer_default = DivContainer;
4760
4654
 
4761
4655
  // src/components/pageRenderingEngine/PageBodyRenderer.tsx
4762
- import { jsx as jsx65 } from "react/jsx-runtime";
4656
+ import { jsx as jsx64 } from "react/jsx-runtime";
4763
4657
  var NodeTypes = {
4764
4658
  ["paragraph"]: ParagraphNode_default,
4765
4659
  ["heading"]: HeadingNode_default,
@@ -4786,11 +4680,11 @@ var PageBodyRenderer = (props) => {
4786
4680
  if (pageBodyTree && pageBodyTree.root) {
4787
4681
  rootNode = pageBodyTree.root;
4788
4682
  }
4789
- return /* @__PURE__ */ jsx65(React48.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
4683
+ return /* @__PURE__ */ jsx64(React47.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
4790
4684
  {
4791
4685
  }
4792
4686
  const SelectedNode = NodeTypes[node.type];
4793
- return /* @__PURE__ */ jsx65(React48.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx65(React48.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx65(React48.Fragment, { children: /* @__PURE__ */ jsx65(
4687
+ return /* @__PURE__ */ jsx64(React47.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx64(React47.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx64(React47.Fragment, { children: /* @__PURE__ */ jsx64(
4794
4688
  SelectedNode,
4795
4689
  {
4796
4690
  node,
@@ -4805,7 +4699,7 @@ var PageBodyRenderer = (props) => {
4805
4699
  assetBaseUrl: props.assetBaseUrl,
4806
4700
  device: props.device
4807
4701
  }
4808
- ) }) : /* @__PURE__ */ jsx65(React48.Fragment, { children: /* @__PURE__ */ jsx65(
4702
+ ) }) : /* @__PURE__ */ jsx64(React47.Fragment, { children: /* @__PURE__ */ jsx64(
4809
4703
  SelectedNode,
4810
4704
  {
4811
4705
  node,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acoustte-digital-services/digitalstore-controls-dev",
3
- "version": "0.8.1-dev.20260325084305",
3
+ "version": "0.8.1-dev.20260325111153",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",