@builder.io/sdk-react-nextjs 0.14.15 → 0.14.17

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 (32) hide show
  1. package/lib/{node/USE_CLIENT_BUNDLE-85565442.cjs → browser/USE_CLIENT_BUNDLE-f11159f6.cjs} +3 -3
  2. package/lib/browser/{USE_CLIENT_BUNDLE-619fca6f.js → USE_CLIENT_BUNDLE-f685a480.js} +15 -15
  3. package/lib/{edge/USE_SERVER_BUNDLE-b436e323.cjs → browser/USE_SERVER_BUNDLE-1ee4e92a.cjs} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-54c1fcea.js → browser/USE_SERVER_BUNDLE-fbe70d66.js} +1 -1
  5. package/lib/browser/{bundle-62dcf48b.js → bundle-974bbd75.js} +555 -540
  6. package/lib/browser/bundle-e5f3c905.cjs +169 -0
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +3 -3
  9. package/lib/{browser/USE_CLIENT_BUNDLE-d44f1d9a.cjs → edge/USE_CLIENT_BUNDLE-22f09854.cjs} +3 -3
  10. package/lib/{node/USE_CLIENT_BUNDLE-c0730eab.js → edge/USE_CLIENT_BUNDLE-bf35f13e.js} +15 -15
  11. package/lib/{node/USE_SERVER_BUNDLE-81427dab.cjs → edge/USE_SERVER_BUNDLE-4035cf43.cjs} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-558179bb.js → edge/USE_SERVER_BUNDLE-6b33cfd7.js} +1 -1
  13. package/lib/edge/{bundle-67ad9183.js → bundle-0e4ba4de.js} +1027 -1012
  14. package/lib/edge/{bundle-fbc6c22e.cjs → bundle-15a88622.cjs} +29 -29
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +3 -3
  17. package/lib/{edge/USE_CLIENT_BUNDLE-84dff6eb.js → node/USE_CLIENT_BUNDLE-8dadab11.js} +15 -15
  18. package/lib/{edge/USE_CLIENT_BUNDLE-97b90370.cjs → node/USE_CLIENT_BUNDLE-e62d9c72.cjs} +3 -3
  19. package/lib/{browser/USE_SERVER_BUNDLE-b4db53a9.js → node/USE_SERVER_BUNDLE-d7d118c1.js} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-72579b21.cjs → node/USE_SERVER_BUNDLE-d847a064.cjs} +1 -1
  21. package/lib/node/{bundle-3fe2b5da.cjs → bundle-39fe7680.cjs} +9 -9
  22. package/lib/node/{bundle-5f638f04.js → bundle-a8217ddb.js} +170 -155
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +3 -3
  25. package/package.json +1 -1
  26. package/types/cjs/components/block/animator.d.ts +1 -1
  27. package/types/cjs/constants/sdk-version.d.ts +1 -1
  28. package/types/cjs/functions/is-previewing.d.ts +1 -1
  29. package/types/esm/components/block/animator.d.ts +1 -1
  30. package/types/esm/constants/sdk-version.d.ts +1 -1
  31. package/types/esm/functions/is-previewing.d.ts +1 -1
  32. package/lib/browser/bundle-df3df109.cjs +0 -169
@@ -1,6 +1,6 @@
1
1
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
2
  import "react";
3
- import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer, C as CustomCode, E as Embed, b as ImgComponent, V as Video, c as Button, F as FragmentComponent, d as Image, S as SectionComponent, e as EnableEditor } from "./USE_CLIENT_BUNDLE-c0730eab.js";
3
+ import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer, C as CustomCode, E as Embed, b as ImgComponent, V as Video, c as Button, F as FragmentComponent, d as Image, S as SectionComponent, e as EnableEditor } from "./USE_CLIENT_BUNDLE-8dadab11.js";
4
4
  import { LRUCache } from "lru-cache";
5
5
  import "next/navigation";
6
6
  const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), isEmptyElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.has(e.toLowerCase()), TARGET = "rsc", getClassPropName = () => {
@@ -46,7 +46,8 @@ function isIframe() {
46
46
  return isBrowser() && window.self !== window.top;
47
47
  }
48
48
  function isEditing(e) {
49
- return isIframe() && getSearchString(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
49
+ return isIframe() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
50
+ getSearchString(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
50
51
  }
51
52
  const getLocation = () => {
52
53
  if (isBrowser()) {
@@ -243,29 +244,29 @@ const getIvm = () => {
243
244
  context: n,
244
245
  event: o,
245
246
  state: c
246
- }), g = getIsolateContext(), l = g.global;
247
- l.setSync("global", l.derefInto()), l.setSync("log", function(...m) {
247
+ }), g = getIsolateContext(), d = g.global;
248
+ d.setSync("global", d.derefInto()), d.setSync("log", function(...m) {
248
249
  console.log(...m);
249
- }), l.setSync(BUILDER_SET_STATE_NAME, function(m, d) {
250
- set(a, m, d), i == null || i(a);
251
- }), u.forEach(([m, d]) => {
252
- const b = typeof d == "object" ? new s.Reference(
250
+ }), d.setSync(BUILDER_SET_STATE_NAME, function(m, l) {
251
+ set(a, m, l), i == null || i(a);
252
+ }), u.forEach(([m, l]) => {
253
+ const b = typeof l == "object" ? new s.Reference(
253
254
  // workaround: methods with default values for arguments is not being cloned over
254
255
  m === "builder" ? {
255
- ...d,
256
- getUserAttributes: () => d.getUserAttributes()
257
- } : d
256
+ ...l,
257
+ getUserAttributes: () => l.getUserAttributes()
258
+ } : l
258
259
  ) : null;
259
- l.setSync(getSyncValName(m), b);
260
- }), l.setSync(INJECTED_IVM_GLOBAL, s);
260
+ d.setSync(getSyncValName(m), b);
261
+ }), d.setSync(INJECTED_IVM_GLOBAL, s);
261
262
  const f = processCode({
262
263
  code: e,
263
264
  args: u
264
- }), p = g.evalSync(f);
265
+ }), h = g.evalSync(f);
265
266
  try {
266
- return JSON.parse(p);
267
+ return JSON.parse(h);
267
268
  } catch {
268
- return p;
269
+ return h;
269
270
  }
270
271
  }, checkIsDefined = (e) => e != null;
271
272
  function isNodeRuntime() {
@@ -278,7 +279,7 @@ const shouldForceBrowserRuntimeInNode = () => {
278
279
  return !1;
279
280
  const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
280
281
  return e && t && !n ? (logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
281
- }, chooseBrowserOrServerEval = (e) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(e) : runInNode(e), _EvalCache = class v {
282
+ }, chooseBrowserOrServerEval = (e) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(e) : runInNode(e), _EvalCache = class k {
282
283
  static getCacheKey(t) {
283
284
  return JSON.stringify({
284
285
  ...t,
@@ -288,10 +289,10 @@ const shouldForceBrowserRuntimeInNode = () => {
288
289
  });
289
290
  }
290
291
  static getCachedValue(t) {
291
- return v.cache.get(t);
292
+ return k.cache.get(t);
292
293
  }
293
294
  static setCachedValue(t, n) {
294
- v.cache.size > 20 && v.cache.delete(v.cache.keys().next().value), v.cache.set(t, {
295
+ k.cache.size > 20 && k.cache.delete(k.cache.keys().next().value), k.cache.set(t, {
295
296
  value: n
296
297
  });
297
298
  }
@@ -309,10 +310,8 @@ function evaluate({
309
310
  isExpression: a = !0,
310
311
  enableCache: s
311
312
  }) {
312
- if (e === "") {
313
- logger.warn("Skipping evaluation of empty code block.");
313
+ if (e === "")
314
314
  return;
315
- }
316
315
  const c = {
317
316
  code: parseCode(e, {
318
317
  isExpression: a
@@ -544,6 +543,47 @@ function InlinedStyles(e) {
544
543
  }
545
544
  );
546
545
  }
546
+ function assign(e, ...t) {
547
+ const n = Object(e);
548
+ for (let o = 1; o < arguments.length; o++) {
549
+ const r = arguments[o];
550
+ if (r != null)
551
+ for (const i in r)
552
+ Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
553
+ }
554
+ return n;
555
+ }
556
+ const camelCaseToKebabCase = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
557
+ function warnElementNotPresent(e) {
558
+ console.warn(`Cannot animate element: element with ID ${e} not found!`);
559
+ }
560
+ function augmentAnimation(e, t) {
561
+ const n = getAllStylesUsed(e), o = getComputedStyle(t), r = e.steps[0].styles, i = e.steps[e.steps.length - 1].styles, a = [r, i];
562
+ for (const s of a)
563
+ for (const c of n)
564
+ c in s || (s[c] = o[c]);
565
+ }
566
+ function getAllStylesUsed(e) {
567
+ const t = [];
568
+ for (const n of e.steps)
569
+ for (const o in n.styles)
570
+ t.indexOf(o) === -1 && t.push(o);
571
+ return t;
572
+ }
573
+ function triggerAnimation(e) {
574
+ const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
575
+ if (!t.length) {
576
+ warnElementNotPresent(e.elementId || e.id || "");
577
+ return;
578
+ }
579
+ Array.from(t).forEach((n) => {
580
+ augmentAnimation(e, n), n.style.transition = "none", n.style.transitionDelay = "0", assign(n.style, e.steps[0].styles), setTimeout(() => {
581
+ n.style.transition = `all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), assign(n.style, e.steps[1].styles), setTimeout(() => {
582
+ n.style.transition = "", n.style.transitionDelay = "";
583
+ }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
584
+ });
585
+ });
586
+ }
547
587
  function BlockStyles(e) {
548
588
  const t = function() {
549
589
  const r = getProcessedBlock({
@@ -556,7 +596,7 @@ function BlockStyles(e) {
556
596
  });
557
597
  return checkIsDefined(r.hide) ? !r.hide : checkIsDefined(r.show) ? r.show : !0;
558
598
  }, n = function() {
559
- var d;
599
+ var p, S, C;
560
600
  const r = getProcessedBlock({
561
601
  block: e.block,
562
602
  localState: e.context.localState,
@@ -565,29 +605,48 @@ function BlockStyles(e) {
565
605
  context: e.context.context,
566
606
  shouldEvaluateBindings: !0
567
607
  }), i = r.responsiveStyles, a = e.context.content, s = getSizesForBreakpoints(
568
- ((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
569
- ), c = i == null ? void 0 : i.large, u = i == null ? void 0 : i.medium, g = i == null ? void 0 : i.small, l = r.id;
570
- if (!l)
608
+ ((p = a == null ? void 0 : a.meta) == null ? void 0 : p.breakpoints) || {}
609
+ ), c = i == null ? void 0 : i.large, u = i == null ? void 0 : i.medium, g = i == null ? void 0 : i.small, d = r.id;
610
+ if (!d)
571
611
  return "";
572
612
  const f = c ? createCssClass({
573
- className: l,
613
+ className: d,
574
614
  styles: c
575
- }) : "", p = u ? createCssClass({
576
- className: l,
615
+ }) : "", h = u ? createCssClass({
616
+ className: d,
577
617
  styles: u,
578
618
  mediaQuery: getMaxWidthQueryForSize(
579
619
  "medium",
580
620
  s
581
621
  )
582
622
  }) : "", m = g ? createCssClass({
583
- className: l,
623
+ className: d,
584
624
  styles: g,
585
625
  mediaQuery: getMaxWidthQueryForSize(
586
626
  "small",
587
627
  s
588
628
  )
589
- }) : "";
590
- return [f, p, m].join(" ");
629
+ }) : "", l = r.animations && r.animations.find((y) => y.trigger === "hover");
630
+ let b = "";
631
+ if (l) {
632
+ const y = ((C = (S = l.steps) == null ? void 0 : S[1]) == null ? void 0 : C.styles) || {};
633
+ b = createCssClass({
634
+ className: `${d}:hover`,
635
+ styles: {
636
+ ...y,
637
+ transition: `all ${l.duration}s ${camelCaseToKebabCase(
638
+ l.easing
639
+ )}`,
640
+ transitionDelay: l.delay ? `${l.delay}s` : "0s"
641
+ }
642
+ }) || "";
643
+ }
644
+ return [
645
+ f,
646
+ h,
647
+ m,
648
+ b
649
+ ].join(" ");
591
650
  };
592
651
  return /* @__PURE__ */ jsx(Fragment, { children: n() && t() ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { id: "builderio-block", styles: n() }) }) : null });
593
652
  }
@@ -748,29 +807,29 @@ function Block(e) {
748
807
  shouldEvaluateBindings: !0
749
808
  });
750
809
  }, r = function() {
751
- var p;
752
- return e.block.tagName === "a" || ((p = o().properties) == null ? void 0 : p.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
810
+ var h;
811
+ return e.block.tagName === "a" || ((h = o().properties) == null ? void 0 : h.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
753
812
  }, i = function() {
754
- var m, d;
813
+ var m, l;
755
814
  if ((m = e.block.repeat) != null && m.collection)
756
- return !!((d = n()) != null && d.length);
815
+ return !!((l = n()) != null && l.length);
757
816
  const f = "hide" in o() ? o().hide : !1;
758
817
  return ("show" in o() ? o().show : !0) && !f;
759
818
  }, a = function() {
760
- var p;
761
- return !((p = t()) != null && p.component) && !n() ? o().children ?? [] : [];
819
+ var h;
820
+ return !((h = t()) != null && h.component) && !n() ? o().children ?? [] : [];
762
821
  }, s = function() {
763
- var f, p, m, d, b, h, S, k, y, C;
822
+ var f, h, m, l, b, p, S, C, y, v;
764
823
  return {
765
824
  blockChildren: o().children ?? [],
766
825
  componentRef: (f = t()) == null ? void 0 : f.component,
767
826
  componentOptions: {
768
827
  ...getBlockComponentOptions(o()),
769
828
  builderContext: e.context,
770
- ...((p = t()) == null ? void 0 : p.name) === "Core:Button" || ((m = t()) == null ? void 0 : m.name) === "Symbol" || ((d = t()) == null ? void 0 : d.name) === "Columns" || ((b = t()) == null ? void 0 : b.name) === "Form:Form" ? {
829
+ ...((h = t()) == null ? void 0 : h.name) === "Core:Button" || ((m = t()) == null ? void 0 : m.name) === "Symbol" || ((l = t()) == null ? void 0 : l.name) === "Columns" || ((b = t()) == null ? void 0 : b.name) === "Form:Form" ? {
771
830
  builderLinkComponent: e.linkComponent
772
831
  } : {},
773
- ...((h = t()) == null ? void 0 : h.name) === "Symbol" || ((S = t()) == null ? void 0 : S.name) === "Columns" || ((k = t()) == null ? void 0 : k.name) === "Form:Form" ? {
832
+ ...((p = t()) == null ? void 0 : p.name) === "Symbol" || ((S = t()) == null ? void 0 : S.name) === "Columns" || ((C = t()) == null ? void 0 : C.name) === "Form:Form" ? {
774
833
  builderComponents: e.registeredComponents
775
834
  } : {}
776
835
  },
@@ -779,7 +838,7 @@ function Block(e) {
779
838
  registeredComponents: e.registeredComponents,
780
839
  builderBlock: o(),
781
840
  includeBlockProps: ((y = t()) == null ? void 0 : y.noWrap) === !0,
782
- isInteractive: !((C = t()) != null && C.isRSC)
841
+ isInteractive: !((v = t()) != null && v.isRSC)
783
842
  };
784
843
  };
785
844
  return /* @__PURE__ */ jsx(Fragment, { children: i() ? /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -797,11 +856,11 @@ function Block(e) {
797
856
  includeBlockProps: s().includeBlockProps,
798
857
  isInteractive: s().isInteractive
799
858
  }
800
- ) }) : /* @__PURE__ */ jsx(Fragment, { children: n() ? /* @__PURE__ */ jsx(Fragment, { children: (g = n()) == null ? void 0 : g.map((l, f) => /* @__PURE__ */ jsx(
859
+ ) }) : /* @__PURE__ */ jsx(Fragment, { children: n() ? /* @__PURE__ */ jsx(Fragment, { children: (g = n()) == null ? void 0 : g.map((d, f) => /* @__PURE__ */ jsx(
801
860
  RepeatedBlock,
802
861
  {
803
- repeatContext: l.context,
804
- block: l.block,
862
+ repeatContext: d.context,
863
+ block: d.block,
805
864
  registeredComponents: e.registeredComponents,
806
865
  linkComponent: e.linkComponent
807
866
  },
@@ -828,15 +887,15 @@ function Block(e) {
828
887
  isInteractive: s().isInteractive
829
888
  }
830
889
  ),
831
- (u = a()) == null ? void 0 : u.map((l) => /* @__PURE__ */ jsx(
890
+ (u = a()) == null ? void 0 : u.map((d) => /* @__PURE__ */ jsx(
832
891
  Block,
833
892
  {
834
- block: l,
893
+ block: d,
835
894
  registeredComponents: e.registeredComponents,
836
895
  linkComponent: e.linkComponent,
837
896
  context: e.context
838
897
  },
839
- l.id
898
+ d.id
840
899
  ))
841
900
  ]
842
901
  }
@@ -868,23 +927,23 @@ function Blocks(e) {
868
927
  );
869
928
  }
870
929
  function Columns(e) {
871
- var p;
872
- const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", r = function(d) {
930
+ var h;
931
+ const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", r = function(l) {
873
932
  var b;
874
- return ((b = n[d]) == null ? void 0 : b.width) || 100 / n.length;
875
- }, i = function(d) {
933
+ return ((b = n[l]) == null ? void 0 : b.width) || 100 / n.length;
934
+ }, i = function(l) {
876
935
  const b = t * (n.length - 1) / n.length;
877
- return `calc(${r(d)}% - ${b}px)`;
936
+ return `calc(${r(l)}% - ${b}px)`;
878
937
  }, a = function({
879
- stackedStyle: d,
938
+ stackedStyle: l,
880
939
  desktopStyle: b
881
940
  }) {
882
- return o === "tablet" ? d : b;
941
+ return o === "tablet" ? l : b;
883
942
  }, s = function({
884
- stackedStyle: d,
943
+ stackedStyle: l,
885
944
  desktopStyle: b
886
945
  }) {
887
- return o === "never" ? b : d;
946
+ return o === "never" ? b : l;
888
947
  }, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", u = function() {
889
948
  return {
890
949
  "--flex-dir": c,
@@ -893,41 +952,41 @@ function Columns(e) {
893
952
  desktopStyle: "row"
894
953
  })
895
954
  };
896
- }, g = function(d) {
897
- const b = d === 0 ? 0 : t, h = i(d), S = `${b}px`, k = "100%", y = 0;
955
+ }, g = function(l) {
956
+ const b = l === 0 ? 0 : t, p = i(l), S = `${b}px`, C = "100%", y = 0;
898
957
  return {
899
958
  ...{
900
959
  display: "flex",
901
960
  flexDirection: "column",
902
961
  alignItems: "stretch"
903
962
  },
904
- width: h,
963
+ width: p,
905
964
  ["marginLeft"]: S,
906
965
  "--column-width-mobile": s({
907
- stackedStyle: k,
908
- desktopStyle: h
966
+ stackedStyle: C,
967
+ desktopStyle: p
909
968
  }),
910
969
  "--column-margin-left-mobile": s({
911
970
  stackedStyle: y,
912
971
  desktopStyle: S
913
972
  }),
914
973
  "--column-width-tablet": a({
915
- stackedStyle: k,
916
- desktopStyle: h
974
+ stackedStyle: C,
975
+ desktopStyle: p
917
976
  }),
918
977
  "--column-margin-left-tablet": a({
919
978
  stackedStyle: y,
920
979
  desktopStyle: S
921
980
  })
922
981
  };
923
- }, l = function(d) {
924
- var h, S;
982
+ }, d = function(l) {
983
+ var p, S;
925
984
  return getSizesForBreakpoints(
926
- ((S = (h = e.builderContext.content) == null ? void 0 : h.meta) == null ? void 0 : S.breakpoints) || {}
927
- )[d].max;
985
+ ((S = (p = e.builderContext.content) == null ? void 0 : p.meta) == null ? void 0 : S.breakpoints) || {}
986
+ )[l].max;
928
987
  }, f = function() {
929
988
  return `
930
- @media (max-width: ${l("medium")}px) {
989
+ @media (max-width: ${d("medium")}px) {
931
990
  .${e.builderBlock.id}-breakpoints {
932
991
  flex-direction: var(--flex-dir-tablet);
933
992
  align-items: stretch;
@@ -939,7 +998,7 @@ function Columns(e) {
939
998
  }
940
999
  }
941
1000
 
942
- @media (max-width: ${l("small")}px) {
1001
+ @media (max-width: ${d("small")}px) {
943
1002
  .${e.builderBlock.id}-breakpoints {
944
1003
  flex-direction: var(--flex-dir);
945
1004
  align-items: stretch;
@@ -960,7 +1019,7 @@ function Columns(e) {
960
1019
  style: u(),
961
1020
  children: [
962
1021
  /* @__PURE__ */ jsx(InlinedStyles, { id: "builderio-columns", styles: f() }),
963
- (p = e.columns) == null ? void 0 : p.map((m, d) => /* @__PURE__ */ jsx(
1022
+ (h = e.columns) == null ? void 0 : h.map((m, l) => /* @__PURE__ */ jsx(
964
1023
  DynamicRenderer,
965
1024
  {
966
1025
  TagName: m.link ? e.builderLinkComponent || "a" : "div",
@@ -970,12 +1029,12 @@ function Columns(e) {
970
1029
  href: m.link
971
1030
  } : {},
972
1031
  [getClassPropName()]: "builder-column",
973
- style: mapStyleObjToStrIfNeeded(g(d))
1032
+ style: mapStyleObjToStrIfNeeded(g(l))
974
1033
  },
975
1034
  children: /* @__PURE__ */ jsx(
976
1035
  Blocks,
977
1036
  {
978
- path: `component.options.columns.${d}.blocks`,
1037
+ path: `component.options.columns.${l}.blocks`,
979
1038
  parent: e.builderBlock.id,
980
1039
  styleProp: {
981
1040
  flexGrow: "1"
@@ -987,7 +1046,7 @@ function Columns(e) {
987
1046
  }
988
1047
  )
989
1048
  },
990
- d
1049
+ l
991
1050
  ))
992
1051
  ]
993
1052
  }
@@ -1426,13 +1485,13 @@ const getTopLevelDomain = (e) => {
1426
1485
  function n(a, s = 6e4) {
1427
1486
  return new Promise((c, u) => {
1428
1487
  const g = document.createElement("img");
1429
- let l = !1;
1488
+ let d = !1;
1430
1489
  g.onload = () => {
1431
- l = !0, c(g);
1490
+ d = !0, c(g);
1432
1491
  }, g.addEventListener("error", (f) => {
1433
1492
  console.warn("Image load failed", f.error), u(f.error);
1434
1493
  }), g.src = a, setTimeout(() => {
1435
- l || u(new Error("Image load timed out"));
1494
+ d || u(new Error("Image load timed out"));
1436
1495
  }, s);
1437
1496
  });
1438
1497
  }
@@ -2021,38 +2080,38 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
2021
2080
  apiVersion: c = DEFAULT_API_VERSION,
2022
2081
  fields: u,
2023
2082
  omit: g,
2024
- offset: l,
2083
+ offset: d,
2025
2084
  cacheSeconds: f,
2026
- staleCacheSeconds: p,
2085
+ staleCacheSeconds: h,
2027
2086
  sort: m,
2028
- includeUnpublished: d
2087
+ includeUnpublished: l
2029
2088
  } = e;
2030
2089
  if (!i)
2031
2090
  throw new Error("Missing API key");
2032
2091
  if (!["v3"].includes(c))
2033
2092
  throw new Error(`Invalid apiVersion: expected 'v3', received '${c}'`);
2034
- const b = t !== 1, h = new URL(`https://cdn.builder.io/api/${c}/content/${r}`);
2035
- if (h.searchParams.set("apiKey", i), h.searchParams.set("limit", String(t)), h.searchParams.set("noTraverse", String(b)), h.searchParams.set("includeRefs", String(!0)), s && h.searchParams.set("locale", s), a && h.searchParams.set("enrich", String(a)), h.searchParams.set("omit", g || "meta.componentsUsed"), u && h.searchParams.set("fields", u), Number.isFinite(l) && l > -1 && h.searchParams.set("offset", String(Math.floor(l))), typeof d == "boolean" && h.searchParams.set("includeUnpublished", String(d)), f && isPositiveNumber(f) && h.searchParams.set("cacheSeconds", String(f)), p && isPositiveNumber(p) && h.searchParams.set("staleCacheSeconds", String(p)), m) {
2093
+ const b = t !== 1, p = new URL(`https://cdn.builder.io/api/${c}/content/${r}`);
2094
+ if (p.searchParams.set("apiKey", i), p.searchParams.set("limit", String(t)), p.searchParams.set("noTraverse", String(b)), p.searchParams.set("includeRefs", String(!0)), s && p.searchParams.set("locale", s), a && p.searchParams.set("enrich", String(a)), p.searchParams.set("omit", g || "meta.componentsUsed"), u && p.searchParams.set("fields", u), Number.isFinite(d) && d > -1 && p.searchParams.set("offset", String(Math.floor(d))), typeof l == "boolean" && p.searchParams.set("includeUnpublished", String(l)), f && isPositiveNumber(f) && p.searchParams.set("cacheSeconds", String(f)), h && isPositiveNumber(h) && p.searchParams.set("staleCacheSeconds", String(h)), m) {
2036
2095
  const y = flatten({
2037
2096
  sort: m
2038
2097
  });
2039
- for (const C in y)
2040
- h.searchParams.set(C, JSON.stringify(y[C]));
2098
+ for (const v in y)
2099
+ p.searchParams.set(v, JSON.stringify(y[v]));
2041
2100
  }
2042
2101
  const S = {
2043
2102
  ...getBuilderSearchParamsFromWindow(),
2044
2103
  ...normalizeSearchParams(e.options || {})
2045
- }, k = flatten(S);
2046
- for (const y in k)
2047
- h.searchParams.set(y, String(k[y]));
2048
- if (n && h.searchParams.set("userAttributes", JSON.stringify(n)), o) {
2104
+ }, C = flatten(S);
2105
+ for (const y in C)
2106
+ p.searchParams.set(y, String(C[y]));
2107
+ if (n && p.searchParams.set("userAttributes", JSON.stringify(n)), o) {
2049
2108
  const y = flatten({
2050
2109
  query: o
2051
2110
  });
2052
- for (const C in y)
2053
- h.searchParams.set(C, JSON.stringify(y[C]));
2111
+ for (const v in y)
2112
+ p.searchParams.set(v, JSON.stringify(y[v]));
2054
2113
  }
2055
- return h;
2114
+ return p;
2056
2115
  }, checkContentHasResults = (e) => "results" in e;
2057
2116
  async function fetchOneEntry(e) {
2058
2117
  const t = await fetchEntries({
@@ -2102,10 +2161,8 @@ async function fetchEntries(e) {
2102
2161
  }
2103
2162
  }
2104
2163
  function isPreviewing(e) {
2105
- if (!isBrowser())
2106
- return !1;
2107
- const t = getSearchString(e || window.location.search);
2108
- return isEditing(t) ? !1 : t.indexOf("builder.preview=") !== -1;
2164
+ const t = e || (isBrowser() ? window.location.search : void 0);
2165
+ return t ? getSearchString(t).indexOf("builder.preview=") !== -1 : !1;
2109
2166
  }
2110
2167
  function uuidv4() {
2111
2168
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
@@ -2296,7 +2353,7 @@ function isFromTrustedHost(e, t) {
2296
2353
  const n = new URL(t.origin), o = n.hostname;
2297
2354
  return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
2298
2355
  }
2299
- const SDK_VERSION = "0.14.15", registry = {};
2356
+ const SDK_VERSION = "0.14.17", registry = {};
2300
2357
  function register(e, t) {
2301
2358
  let n = registry[e];
2302
2359
  if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
@@ -2367,11 +2424,11 @@ const setupBrowserForEditing = (e = {}) => {
2367
2424
  switch (r.type) {
2368
2425
  case "builder.evaluate": {
2369
2426
  const s = r.data.text, c = r.data.arguments || [], u = r.data.id, g = new Function(s);
2370
- let l, f = null;
2427
+ let d, f = null;
2371
2428
  try {
2372
- l = g.apply(null, c);
2373
- } catch (p) {
2374
- f = p;
2429
+ d = g.apply(null, c);
2430
+ } catch (h) {
2431
+ f = h;
2375
2432
  }
2376
2433
  f ? (i = window.parent) == null || i.postMessage({
2377
2434
  type: "builder.evaluateError",
@@ -2379,19 +2436,19 @@ const setupBrowserForEditing = (e = {}) => {
2379
2436
  id: u,
2380
2437
  error: f.message
2381
2438
  }
2382
- }, "*") : l && typeof l.then == "function" ? l.then((p) => {
2439
+ }, "*") : d && typeof d.then == "function" ? d.then((h) => {
2383
2440
  var m;
2384
2441
  (m = window.parent) == null || m.postMessage({
2385
2442
  type: "builder.evaluateResult",
2386
2443
  data: {
2387
2444
  id: u,
2388
- result: p
2445
+ result: h
2389
2446
  }
2390
2447
  }, "*");
2391
2448
  }).catch(console.error) : (a = window.parent) == null || a.postMessage({
2392
2449
  type: "builder.evaluateResult",
2393
2450
  data: {
2394
- result: l,
2451
+ result: d,
2395
2452
  id: u
2396
2453
  }
2397
2454
  }, "*");
@@ -2444,49 +2501,7 @@ const setupBrowserForEditing = (e = {}) => {
2444
2501
  return window.addEventListener("message", o), () => {
2445
2502
  window.removeEventListener("message", o);
2446
2503
  };
2447
- };
2448
- function assign(e, ...t) {
2449
- const n = Object(e);
2450
- for (let o = 1; o < arguments.length; o++) {
2451
- const r = arguments[o];
2452
- if (r != null)
2453
- for (const i in r)
2454
- Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
2455
- }
2456
- return n;
2457
- }
2458
- const camelCaseToKebabCase = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
2459
- function warnElementNotPresent(e) {
2460
- console.warn(`Cannot animate element: element with ID ${e} not found!`);
2461
- }
2462
- function augmentAnimation(e, t) {
2463
- const n = getAllStylesUsed(e), o = getComputedStyle(t), r = e.steps[0].styles, i = e.steps[e.steps.length - 1].styles, a = [r, i];
2464
- for (const s of a)
2465
- for (const c of n)
2466
- c in s || (s[c] = o[c]);
2467
- }
2468
- function getAllStylesUsed(e) {
2469
- const t = [];
2470
- for (const n of e.steps)
2471
- for (const o in n.styles)
2472
- t.indexOf(o) === -1 && t.push(o);
2473
- return t;
2474
- }
2475
- function triggerAnimation(e) {
2476
- const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
2477
- if (!t.length) {
2478
- warnElementNotPresent(e.elementId || e.id || "");
2479
- return;
2480
- }
2481
- Array.from(t).forEach((n) => {
2482
- augmentAnimation(e, n), n.style.transition = "none", n.style.transitionDelay = "0", assign(n.style, e.steps[0].styles), setTimeout(() => {
2483
- n.style.transition = `all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), assign(n.style, e.steps[1].styles), setTimeout(() => {
2484
- n.style.transition = "", n.style.transitionDelay = "";
2485
- }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
2486
- });
2487
- });
2488
- }
2489
- const getCssFromFont = (e) => {
2504
+ }, getCssFromFont = (e) => {
2490
2505
  var i;
2491
2506
  const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((i = e == null ? void 0 : e.files) == null ? void 0 : i.regular);
2492
2507
  let r = "";
@@ -2580,7 +2595,7 @@ const getRootStateInitialValue = ({
2580
2595
  meta: e == null ? void 0 : e.meta
2581
2596
  } : void 0;
2582
2597
  function ContentComponent(e) {
2583
- var r, i, a, s, c, u, g, l, f;
2598
+ var r, i, a, s, c, u, g, d, f;
2584
2599
  const t = getUpdateVariantVisibilityScript({
2585
2600
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2586
2601
  variationId: (r = e.content) == null ? void 0 : r.testVariationId,
@@ -2590,11 +2605,11 @@ function ContentComponent(e) {
2590
2605
  ...getDefaultRegisteredComponents(),
2591
2606
  ...e.customComponents || []
2592
2607
  ].reduce(
2593
- (p, { component: m, ...d }) => ({
2594
- ...p,
2595
- [d.name]: {
2608
+ (h, { component: m, ...l }) => ({
2609
+ ...h,
2610
+ [l.name]: {
2596
2611
  component: m,
2597
- ...serializeComponentInfo(d)
2612
+ ...serializeComponentInfo(l)
2598
2613
  }
2599
2614
  }),
2600
2615
  {}
@@ -2617,9 +2632,9 @@ function ContentComponent(e) {
2617
2632
  ...getDefaultRegisteredComponents(),
2618
2633
  ...e.customComponents || []
2619
2634
  ].reduce(
2620
- (p, { component: m, ...d }) => ({
2621
- ...p,
2622
- [d.name]: serializeComponentInfo(d)
2635
+ (h, { component: m, ...l }) => ({
2636
+ ...h,
2637
+ [l.name]: serializeComponentInfo(l)
2623
2638
  }),
2624
2639
  {}
2625
2640
  ),
@@ -2664,7 +2679,7 @@ function ContentComponent(e) {
2664
2679
  /* @__PURE__ */ jsx(
2665
2680
  Blocks,
2666
2681
  {
2667
- blocks: (f = (l = o.content) == null ? void 0 : l.data) == null ? void 0 : f.blocks,
2682
+ blocks: (f = (d = o.content) == null ? void 0 : d.data) == null ? void 0 : f.blocks,
2668
2683
  context: o,
2669
2684
  registeredComponents: n,
2670
2685
  linkComponent: e.linkComponent
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./USE_CLIENT_BUNDLE-85565442.cjs"),e=require("./bundle-3fe2b5da.cjs");require("react/jsx-runtime");require("react");require("./USE_SERVER_BUNDLE-81427dab.cjs");require("next/navigation");require("lru-cache");exports.BuilderContext=t.builderContext;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./USE_CLIENT_BUNDLE-e62d9c72.cjs"),e=require("./bundle-39fe7680.cjs");require("react/jsx-runtime");require("react");require("./USE_SERVER_BUNDLE-d847a064.cjs");require("next/navigation");require("lru-cache");exports.BuilderContext=t.builderContext;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
@@ -1,8 +1,8 @@
1
- import { f as n, c as m, F as c, d as p, S as g, V as d } from "./USE_CLIENT_BUNDLE-c0730eab.js";
2
- import { B as l, C as f, w as B, S as C, T as E, F as S, q as x, E as h, G as b, u as y, z as F, c as P, j as T, x as k, y as w, D as R, A as V } from "./bundle-5f638f04.js";
1
+ import { f as n, c as m, F as c, d as p, S as g, V as d } from "./USE_CLIENT_BUNDLE-8dadab11.js";
2
+ import { B as l, C as f, w as B, S as C, T as E, F as S, q as x, E as h, G as b, u as y, z as F, c as P, j as T, x as k, y as w, D as R, A as V } from "./bundle-a8217ddb.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
- import "./USE_SERVER_BUNDLE-558179bb.js";
5
+ import "./USE_SERVER_BUNDLE-d7d118c1.js";
6
6
  import "next/navigation";
7
7
  import "lru-cache";
8
8
  export {