@builder.io/sdk-react-nextjs 0.5.9 → 0.6.1

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