@builder.io/sdk-react-nextjs 0.7.1-0 → 0.7.1-2

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.
Files changed (35) hide show
  1. package/lib/browser/{USE_CLIENT_BUNDLE-9195e6a5.js → USE_CLIENT_BUNDLE-11d41596.js} +1 -1
  2. package/lib/browser/{USE_CLIENT_BUNDLE-7a3bf41a.mjs → USE_CLIENT_BUNDLE-48d9356f.mjs} +2 -2
  3. package/lib/{edge/USE_SERVER_BUNDLE-f184d7eb.mjs → browser/USE_SERVER_BUNDLE-3875256b.mjs} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-3f12faf4.js → browser/USE_SERVER_BUNDLE-568694d9.js} +1 -1
  5. package/lib/browser/bundle-05622db1.js +76 -0
  6. package/lib/browser/{bundle-7285a09d.mjs → bundle-242ae8b5.mjs} +522 -502
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +3 -3
  9. package/lib/edge/{USE_CLIENT_BUNDLE-4a0cfa69.mjs → USE_CLIENT_BUNDLE-6eb1ee54.mjs} +2 -2
  10. package/lib/edge/{USE_CLIENT_BUNDLE-3cca560e.js → USE_CLIENT_BUNDLE-bba76732.js} +1 -1
  11. package/lib/{node/USE_SERVER_BUNDLE-cd844269.js → edge/USE_SERVER_BUNDLE-305bf94a.js} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-22e86776.mjs → edge/USE_SERVER_BUNDLE-66d4b8c4.mjs} +1 -1
  13. package/lib/edge/bundle-1b9b93c7.js +96 -0
  14. package/lib/edge/{bundle-a5949d33.mjs → bundle-3d31ba5d.mjs} +1936 -1888
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +3 -3
  17. package/lib/node/USE_CLIENT_BUNDLE-8147b412.js +23 -0
  18. package/lib/node/USE_CLIENT_BUNDLE-e041d92c.mjs +657 -0
  19. package/lib/{browser/USE_SERVER_BUNDLE-e5c2279a.mjs → node/USE_SERVER_BUNDLE-1634816a.mjs} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-d7b13097.js → node/USE_SERVER_BUNDLE-8c1ae1f0.js} +1 -1
  21. package/lib/node/bundle-4203318d.js +116 -0
  22. package/lib/node/{bundle-0358b224.mjs → bundle-7ebcd79e.mjs} +783 -640
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +22 -23
  25. package/package.json +1 -2
  26. package/types/constants/sdk-version.d.ts +1 -1
  27. package/types/functions/evaluate/choose-eval.d.ts +6 -0
  28. package/types/functions/evaluate/evaluate.d.ts +1 -5
  29. package/types/functions/evaluate/helpers.d.ts +7 -1
  30. package/types/functions/get-content/types.d.ts +94 -3
  31. package/lib/browser/bundle-620ae296.js +0 -76
  32. package/lib/edge/bundle-a0f5cad2.js +0 -96
  33. package/lib/node/USE_CLIENT_BUNDLE-63c7fe77.js +0 -61
  34. package/lib/node/USE_CLIENT_BUNDLE-d9e90ed7.mjs +0 -747
  35. package/lib/node/bundle-630ffe6d.js +0 -76
@@ -0,0 +1,657 @@
1
+ "use client";
2
+ import { jsxs as w, Fragment as g, jsx as c } from "react/jsx-runtime";
3
+ import { g as T, a as N, i as E, b as R, c as G, d as P, e as W, _ as A, f as $, l as Q, h as D, j as X, k as Y, r as Z, s as p, m as ee, n as te, o as ne } from "./bundle-7ebcd79e.mjs";
4
+ import { useRef as j, useState as y, useEffect as x, createContext as ie, createElement as ae } from "react";
5
+ import { p as ce } from "./USE_SERVER_BUNDLE-1634816a.mjs";
6
+ import { useRouter as re } from "next/navigation";
7
+ function ge(e) {
8
+ return /* @__PURE__ */ w(g, { children: [
9
+ e.link ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
10
+ "a",
11
+ {
12
+ role: "button",
13
+ ...e.attributes,
14
+ href: e.link,
15
+ target: e.openLinkInNewTab ? "_blank" : void 0,
16
+ children: e.text
17
+ }
18
+ ) }) : /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
19
+ "button",
20
+ {
21
+ ...e.attributes,
22
+ style: e.attributes.style,
23
+ className: e.attributes.className + " button-35669e6c",
24
+ children: e.text
25
+ }
26
+ ) }),
27
+ /* @__PURE__ */ c("style", { children: `.button-35669e6c {
28
+ all: unset;
29
+ }` })
30
+ ] });
31
+ }
32
+ function he(e) {
33
+ return /* @__PURE__ */ c(
34
+ e.Wrapper,
35
+ {
36
+ ...e.wrapperProps,
37
+ attributes: {
38
+ ...T({
39
+ block: e.block,
40
+ context: e.context
41
+ }),
42
+ ...N({
43
+ block: e.block,
44
+ rootState: e.context.rootState,
45
+ rootSetState: e.context.rootSetState,
46
+ localState: e.context.localState,
47
+ context: e.context.context
48
+ })
49
+ },
50
+ children: e.children
51
+ }
52
+ );
53
+ }
54
+ function be(e) {
55
+ return /* @__PURE__ */ w(g, { children: [
56
+ " ",
57
+ e.hasChildren ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ w(
58
+ e.Wrapper,
59
+ {
60
+ ...T({
61
+ block: e.block,
62
+ context: e.context
63
+ }),
64
+ ...N({
65
+ block: e.block,
66
+ rootState: e.context.rootState,
67
+ rootSetState: e.context.rootSetState,
68
+ localState: e.context.localState,
69
+ context: e.context.context,
70
+ stripPrefix: !0
71
+ }),
72
+ children: [
73
+ " ",
74
+ e.children,
75
+ " "
76
+ ]
77
+ }
78
+ ) }) : /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
79
+ e.Wrapper,
80
+ {
81
+ ...T({
82
+ block: e.block,
83
+ context: e.context
84
+ }),
85
+ ...N({
86
+ block: e.block,
87
+ rootState: e.context.rootState,
88
+ rootSetState: e.context.rootSetState,
89
+ localState: e.context.localState,
90
+ context: e.context.context,
91
+ stripPrefix: !0
92
+ })
93
+ }
94
+ ) }),
95
+ " "
96
+ ] });
97
+ }
98
+ function fe(e) {
99
+ function i() {
100
+ var o;
101
+ return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
102
+ }
103
+ function s() {
104
+ var o, f;
105
+ E() && !((o = e.blocks) != null && o.length) && ((f = window.parent) == null || f.postMessage(
106
+ {
107
+ type: "builder.clickEmptyBlocks",
108
+ data: {
109
+ parentElementId: e.parent,
110
+ dataPath: e.path
111
+ }
112
+ },
113
+ "*"
114
+ ));
115
+ }
116
+ function b() {
117
+ var o, f;
118
+ E() && !((o = e.blocks) != null && o.length) && ((f = window.parent) == null || f.postMessage(
119
+ {
120
+ type: "builder.hoverEmptyBlocks",
121
+ data: {
122
+ parentElementId: e.parent,
123
+ dataPath: e.path
124
+ }
125
+ },
126
+ "*"
127
+ ));
128
+ }
129
+ return /* @__PURE__ */ w(g, { children: [
130
+ /* @__PURE__ */ c(
131
+ "div",
132
+ {
133
+ className: i() + " div-02c7a115",
134
+ "builder-path": e.path,
135
+ "builder-parent-id": e.parent,
136
+ style: e.styleProp,
137
+ onClick: (o) => s(),
138
+ onMouseEnter: (o) => b(),
139
+ onKeyPress: (o) => s(),
140
+ children: e.children
141
+ }
142
+ ),
143
+ /* @__PURE__ */ c("style", { children: `.div-02c7a115 {
144
+ display: flex;
145
+ flex-direction: column;
146
+ align-items: stretch;
147
+ }` })
148
+ ] });
149
+ }
150
+ function Se(e) {
151
+ return /* @__PURE__ */ c("span", { children: e.children });
152
+ }
153
+ function xe(e) {
154
+ var o, f, k, S;
155
+ function i() {
156
+ var h;
157
+ const l = e.image || e.src;
158
+ if (!l || // We can auto add srcset for cdn.builder.io and shopify
159
+ // images, otherwise you can supply this prop manually
160
+ !(l.match(/builder\.io/) || l.match(/cdn\.shopify\.com/)))
161
+ return e.srcset;
162
+ if (e.srcset && ((h = e.image) != null && h.includes("builder.io/api/v1/image"))) {
163
+ if (!e.srcset.includes(e.image.split("?")[0]))
164
+ return console.debug("Removed given srcset"), R(l);
165
+ } else if (e.image && !e.srcset)
166
+ return R(l);
167
+ return R(l);
168
+ }
169
+ function s() {
170
+ var m;
171
+ return (m = i == null ? void 0 : i()) != null && m.match(/builder\.io/) && !e.noWebp ? i().replace(/\?/g, "?format=webp&") : "";
172
+ }
173
+ function b() {
174
+ const m = {
175
+ position: "absolute",
176
+ height: "100%",
177
+ width: "100%",
178
+ left: "0px",
179
+ top: "0px"
180
+ };
181
+ return e.aspectRatio ? m : void 0;
182
+ }
183
+ return /* @__PURE__ */ w(g, { children: [
184
+ /* @__PURE__ */ w(g, { children: [
185
+ /* @__PURE__ */ w("picture", { children: [
186
+ s() ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c("source", { type: "image/webp", srcSet: s() }) }) : null,
187
+ /* @__PURE__ */ c(
188
+ "img",
189
+ {
190
+ loading: "lazy",
191
+ alt: e.altText,
192
+ role: e.altText ? "presentation" : void 0,
193
+ style: {
194
+ objectPosition: e.backgroundPosition || "center",
195
+ objectFit: e.backgroundSize || "cover",
196
+ ...b()
197
+ },
198
+ className: "builder-image" + (e.className ? " " + e.className : "") + " img-497e0136",
199
+ src: e.image,
200
+ srcSet: i(),
201
+ sizes: e.sizes
202
+ }
203
+ )
204
+ ] }),
205
+ e.aspectRatio && !((f = (o = e.builderBlock) == null ? void 0 : o.children) != null && f.length && e.fitContent) ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
206
+ "div",
207
+ {
208
+ className: "builder-image-sizer div-497e0136",
209
+ style: {
210
+ paddingTop: e.aspectRatio * 100 + "%"
211
+ }
212
+ }
213
+ ) }) : null,
214
+ (S = (k = e.builderBlock) == null ? void 0 : k.children) != null && S.length && e.fitContent ? /* @__PURE__ */ c(g, { children: e.children }) : null,
215
+ !e.fitContent && e.children ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c("div", { className: "div-497e0136-2", children: e.children }) }) : null
216
+ ] }),
217
+ /* @__PURE__ */ c("style", { children: `.img-497e0136 {
218
+ opacity: 1;
219
+ transition: opacity 0.2s ease-in-out;
220
+ }.div-497e0136 {
221
+ width: 100%;
222
+ pointer-events: none;
223
+ font-size: 0;
224
+ }.div-497e0136-2 {
225
+ display: flex;
226
+ flex-direction: column;
227
+ align-items: stretch;
228
+ position: absolute;
229
+ top: 0;
230
+ left: 0;
231
+ width: 100%;
232
+ height: 100%;
233
+ }` })
234
+ ] });
235
+ }
236
+ function ve(e) {
237
+ return /* @__PURE__ */ c(
238
+ "section",
239
+ {
240
+ ...e.attributes,
241
+ style: {
242
+ width: "100%",
243
+ alignSelf: "stretch",
244
+ flexGrow: 1,
245
+ boxSizing: "border-box",
246
+ maxWidth: e.maxWidth || 1200,
247
+ display: "flex",
248
+ flexDirection: "column",
249
+ alignItems: "stretch",
250
+ marginLeft: "auto",
251
+ marginRight: "auto"
252
+ },
253
+ children: e.children
254
+ }
255
+ );
256
+ }
257
+ function ye(e) {
258
+ var b;
259
+ function i() {
260
+ return {
261
+ ...e.autoPlay === !0 ? {
262
+ autoPlay: !0
263
+ } : {},
264
+ ...e.muted === !0 ? {
265
+ muted: !0
266
+ } : {},
267
+ ...e.controls === !0 ? {
268
+ controls: !0
269
+ } : {},
270
+ ...e.loop === !0 ? {
271
+ loop: !0
272
+ } : {},
273
+ ...e.playsInline === !0 ? {
274
+ playsInline: !0
275
+ } : {}
276
+ };
277
+ }
278
+ function s() {
279
+ return {
280
+ ...e.attributes,
281
+ ...i()
282
+ };
283
+ }
284
+ return /* @__PURE__ */ c(
285
+ "video",
286
+ {
287
+ ...s(),
288
+ preload: e.preload || "metadata",
289
+ style: {
290
+ width: "100%",
291
+ height: "100%",
292
+ ...(b = e.attributes) == null ? void 0 : b.style,
293
+ objectFit: e.fit,
294
+ objectPosition: e.position,
295
+ // Hack to get object fit to work as expected and
296
+ // not have the video overflow
297
+ borderRadius: 1
298
+ },
299
+ src: e.video || "no-src",
300
+ poster: e.posterImage
301
+ }
302
+ );
303
+ }
304
+ function ke(e) {
305
+ const i = j(null), [s, b] = y(() => []), [o, f] = y(() => []), [k, S] = y(() => !1);
306
+ function m() {
307
+ if (!i.current || !i.current.getElementsByTagName)
308
+ return;
309
+ const l = i.current.getElementsByTagName("script");
310
+ for (let h = 0; h < l.length; h++) {
311
+ const v = l[h];
312
+ if (v.src && !s.includes(v.src)) {
313
+ s.push(v.src);
314
+ const C = document.createElement("script");
315
+ C.async = !0, C.src = v.src, document.head.appendChild(C);
316
+ } else if (G(v) && !o.includes(v.innerText))
317
+ try {
318
+ o.push(v.innerText), new Function(v.innerText)();
319
+ } catch (C) {
320
+ console.warn("`Embed`: Error running script:", C);
321
+ }
322
+ }
323
+ }
324
+ return x(() => {
325
+ i.current && !k && (S(!0), m());
326
+ }, [i.current, k]), /* @__PURE__ */ c(
327
+ "div",
328
+ {
329
+ className: "builder-embed",
330
+ ref: i,
331
+ dangerouslySetInnerHTML: { __html: e.content }
332
+ }
333
+ );
334
+ }
335
+ function Ce(e) {
336
+ return /* @__PURE__ */ c(
337
+ "img",
338
+ {
339
+ style: {
340
+ objectFit: e.backgroundSize || "cover",
341
+ objectPosition: e.backgroundPosition || "center"
342
+ },
343
+ alt: e.altText,
344
+ src: e.imgSrc || e.image,
345
+ ...e.attributes
346
+ },
347
+ E() && e.imgSrc || "default-key"
348
+ );
349
+ }
350
+ function we(e) {
351
+ const i = j(null), [s, b] = y(() => []), [o, f] = y(() => []);
352
+ return x(() => {
353
+ var S;
354
+ if (!((S = i.current) != null && S.getElementsByTagName) || typeof window > "u")
355
+ return;
356
+ const k = i.current.getElementsByTagName("script");
357
+ for (let m = 0; m < k.length; m++) {
358
+ const l = k[m];
359
+ if (l.src) {
360
+ if (s.includes(l.src))
361
+ continue;
362
+ s.push(l.src);
363
+ const h = document.createElement("script");
364
+ h.async = !0, h.src = l.src, document.head.appendChild(h);
365
+ } else if (!l.type || [
366
+ "text/javascript",
367
+ "application/javascript",
368
+ "application/ecmascript"
369
+ ].includes(l.type)) {
370
+ if (o.includes(l.innerText))
371
+ continue;
372
+ try {
373
+ o.push(l.innerText), new Function(l.innerText)();
374
+ } catch (h) {
375
+ console.warn("`CustomCode`: Error running script:", h);
376
+ }
377
+ }
378
+ }
379
+ }, []), /* @__PURE__ */ c(
380
+ "div",
381
+ {
382
+ ref: i,
383
+ className: "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : ""),
384
+ dangerouslySetInnerHTML: { __html: e.code }
385
+ }
386
+ );
387
+ }
388
+ const oe = ie({
389
+ content: null,
390
+ context: {},
391
+ localState: void 0,
392
+ rootSetState() {
393
+ },
394
+ rootState: {},
395
+ apiKey: null,
396
+ apiVersion: void 0,
397
+ componentInfos: {},
398
+ inheritedStyles: {}
399
+ });
400
+ function Ee(e) {
401
+ var F, M, _, q, z;
402
+ const i = j(null), [s, b] = y(() => 0);
403
+ function o(t) {
404
+ var a, r, d, u, V;
405
+ const n = {
406
+ ...e.builderContextSignal.content,
407
+ ...t,
408
+ data: {
409
+ ...(a = e.builderContextSignal.content) == null ? void 0 : a.data,
410
+ ...t == null ? void 0 : t.data
411
+ },
412
+ meta: {
413
+ ...(r = e.builderContextSignal.content) == null ? void 0 : r.meta,
414
+ ...t == null ? void 0 : t.meta,
415
+ breakpoints: ((d = t == null ? void 0 : t.meta) == null ? void 0 : d.breakpoints) || ((V = (u = e.builderContextSignal.content) == null ? void 0 : u.meta) == null ? void 0 : V.breakpoints)
416
+ }
417
+ };
418
+ ce({
419
+ value: n,
420
+ key: n.id
421
+ }).then(() => {
422
+ J.refresh();
423
+ });
424
+ }
425
+ y(() => 0);
426
+ const [f, k] = y(
427
+ () => !1
428
+ );
429
+ function S(t) {
430
+ var a;
431
+ const { data: n } = t;
432
+ if (n)
433
+ switch (n.type) {
434
+ case "builder.configureSdk": {
435
+ const r = n.data, { breakpoints: d, contentId: u } = r;
436
+ if (!u || u !== ((a = e.builderContextSignal.content) == null ? void 0 : a.id))
437
+ return;
438
+ d && o({
439
+ meta: {
440
+ breakpoints: d
441
+ }
442
+ }), b(s + 1);
443
+ break;
444
+ }
445
+ case "builder.contentUpdate": {
446
+ const r = n.data, d = r.key || r.alias || r.entry || r.modelName, u = r.data;
447
+ d === e.model && (o(u), b(s + 1));
448
+ break;
449
+ }
450
+ }
451
+ }
452
+ function m() {
453
+ var n, a;
454
+ const t = (a = (n = e.builderContextSignal.content) == null ? void 0 : n.data) == null ? void 0 : a.jsCode;
455
+ t && D({
456
+ code: t,
457
+ context: e.context || {},
458
+ localState: void 0,
459
+ rootState: e.builderContextSignal.rootState,
460
+ rootSetState: e.builderContextSignal.rootSetState
461
+ });
462
+ }
463
+ const [l, h] = y(() => ({})), [v, C] = y(() => !1);
464
+ function U(t) {
465
+ var n, a;
466
+ if (e.builderContextSignal.content) {
467
+ const r = (n = e.builderContextSignal.content) == null ? void 0 : n.testVariationId, d = (a = e.builderContextSignal.content) == null ? void 0 : a.id;
468
+ A({
469
+ type: "click",
470
+ canTrack: W(e.canTrack),
471
+ contentId: d,
472
+ apiKey: e.apiKey,
473
+ variationId: r !== d ? r : void 0,
474
+ ...X(t),
475
+ unique: !v
476
+ });
477
+ }
478
+ v || C(!0);
479
+ }
480
+ function H(t) {
481
+ return t.replace(
482
+ /{{([^}]+)}}/g,
483
+ (n, a) => D({
484
+ code: a,
485
+ context: e.context || {},
486
+ localState: void 0,
487
+ rootState: e.builderContextSignal.rootState,
488
+ rootSetState: e.builderContextSignal.rootSetState
489
+ })
490
+ );
491
+ }
492
+ function O({ url: t, key: n }) {
493
+ ne(t).then((a) => a.json()).then((a) => {
494
+ var d, u;
495
+ const r = {
496
+ ...e.builderContextSignal.rootState,
497
+ [n]: a
498
+ };
499
+ (u = (d = e.builderContextSignal).rootSetState) == null || u.call(d, r), l[n] = !0;
500
+ }).catch((a) => {
501
+ console.error("error fetching dynamic data", t, a);
502
+ });
503
+ }
504
+ function L() {
505
+ var n, a;
506
+ const t = ((a = (n = e.builderContextSignal.content) == null ? void 0 : n.data) == null ? void 0 : a.httpRequests) ?? {};
507
+ Object.entries(t).forEach(([r, d]) => {
508
+ if (d && (!l[r] || E())) {
509
+ const u = H(d);
510
+ O({
511
+ url: u,
512
+ key: r
513
+ });
514
+ }
515
+ });
516
+ }
517
+ function I() {
518
+ E() && window.dispatchEvent(
519
+ new CustomEvent(
520
+ "builder:component:stateChange",
521
+ {
522
+ detail: {
523
+ state: Y(e.builderContextSignal.rootState),
524
+ ref: {
525
+ name: e.model
526
+ }
527
+ }
528
+ }
529
+ )
530
+ );
531
+ }
532
+ function B(t) {
533
+ b(s + 1), window.addEventListener("message", S), Z(), p({
534
+ ...e.locale ? {
535
+ locale: e.locale
536
+ } : {},
537
+ ...e.includeRefs ? {
538
+ includeRefs: e.includeRefs
539
+ } : {},
540
+ ...e.enrich ? {
541
+ enrich: e.enrich
542
+ } : {}
543
+ }), Object.values(
544
+ e.builderContextSignal.componentInfos
545
+ ).forEach((n) => {
546
+ var r;
547
+ const a = ee(n);
548
+ (r = window.parent) == null || r.postMessage(a, "*");
549
+ }), window.addEventListener(
550
+ "builder:component:stateChangeListenerActivated",
551
+ I
552
+ );
553
+ }
554
+ function K(t) {
555
+ const n = new URL(location.href).searchParams, a = n.get("builder.preview"), r = n.get(
556
+ `builder.preview.${a}`
557
+ ), d = n.get("apiKey") || n.get("builder.space");
558
+ a === e.model && d === e.apiKey && (!e.content || r === e.content.id) && te({
559
+ model: e.model,
560
+ apiKey: e.apiKey,
561
+ apiVersion: e.builderContextSignal.apiVersion
562
+ }).then((u) => {
563
+ u && o(u);
564
+ });
565
+ }
566
+ const J = re();
567
+ return x(() => {
568
+ var t;
569
+ return (t = i.current) == null || t.addEventListener(
570
+ "initeditingbldr",
571
+ B
572
+ ), () => {
573
+ var n;
574
+ return (n = i.current) == null ? void 0 : n.removeEventListener(
575
+ "initeditingbldr",
576
+ B
577
+ );
578
+ };
579
+ }, []), x(() => {
580
+ var t;
581
+ return (t = i.current) == null || t.addEventListener(
582
+ "initpreviewingbldr",
583
+ K
584
+ ), () => {
585
+ var n;
586
+ return (n = i.current) == null ? void 0 : n.removeEventListener(
587
+ "initpreviewingbldr",
588
+ K
589
+ );
590
+ };
591
+ }, []), x(() => {
592
+ var t, n;
593
+ if (P()) {
594
+ if (E() && i.current && i.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && W(e.canTrack)) {
595
+ const r = (t = e.builderContextSignal.content) == null ? void 0 : t.testVariationId, d = (n = e.builderContextSignal.content) == null ? void 0 : n.id, u = e.apiKey;
596
+ A({
597
+ type: "impression",
598
+ canTrack: !0,
599
+ contentId: d,
600
+ apiKey: u,
601
+ variationId: r !== d ? r : void 0
602
+ });
603
+ }
604
+ $() && i.current;
605
+ }
606
+ }, []), x(() => {
607
+ e.apiKey || Q.error(
608
+ "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
609
+ ), m(), L(), I();
610
+ }, []), x(() => {
611
+ }, [e.content]), x(() => {
612
+ P() && (window.removeEventListener("message", S), window.addEventListener("message", S));
613
+ }, [f]), x(() => {
614
+ m();
615
+ }, [
616
+ (M = (F = e.builderContextSignal.content) == null ? void 0 : F.data) == null ? void 0 : M.jsCode,
617
+ e.builderContextSignal.rootState
618
+ ]), x(() => {
619
+ L();
620
+ }, [(q = (_ = e.builderContextSignal.content) == null ? void 0 : _.data) == null ? void 0 : q.httpRequests]), x(() => {
621
+ I();
622
+ }, [e.builderContextSignal.rootState]), x(() => () => {
623
+ P() && (window.removeEventListener("message", S), window.removeEventListener(
624
+ "builder:component:stateChangeListenerActivated",
625
+ I
626
+ ));
627
+ }, []), /* @__PURE__ */ c(oe.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ ae(
628
+ "div",
629
+ {
630
+ key: s,
631
+ ref: i,
632
+ onClick: (t) => U(t),
633
+ "builder-content-id": (z = e.builderContextSignal.content) == null ? void 0 : z.id,
634
+ "builder-model": e.model,
635
+ ...e.showContent ? {} : {
636
+ hidden: !0,
637
+ "aria-hidden": !0
638
+ },
639
+ className: e.classNameProp
640
+ },
641
+ e.children
642
+ ) }) : null });
643
+ }
644
+ export {
645
+ be as B,
646
+ we as C,
647
+ ke as E,
648
+ Se as F,
649
+ he as I,
650
+ ve as S,
651
+ ye as V,
652
+ fe as a,
653
+ ge as b,
654
+ xe as c,
655
+ Ce as d,
656
+ Ee as e
657
+ };
@@ -1,5 +1,5 @@
1
1
  "use server";
2
- import { p as s } from "./bundle-7285a09d.mjs";
2
+ import { p as s } from "./bundle-7ebcd79e.mjs";
3
3
  async function n({
4
4
  key: t,
5
5
  value: r
@@ -1 +1 @@
1
- "use server";"use strict";const n=require("./bundle-620ae296.js");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
1
+ "use server";"use strict";const n=require("./bundle-4203318d.js");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;