@builder.io/sdk-react-nextjs 0.7.1-3 → 0.7.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 (304) hide show
  1. package/lib/browser/USE_CLIENT_BUNDLE-059d1502.cjs +23 -0
  2. package/lib/{node/USE_CLIENT_BUNDLE-3263fb05.mjs → browser/USE_CLIENT_BUNDLE-b256b942.js} +142 -142
  3. package/lib/{edge/USE_SERVER_BUNDLE-046e1bfb.mjs → browser/USE_SERVER_BUNDLE-1aa7d195.js} +1 -1
  4. package/lib/browser/USE_SERVER_BUNDLE-d96aeaff.cjs +1 -0
  5. package/lib/browser/{bundle-97bfd273.mjs → bundle-0a946b39.js} +953 -928
  6. package/lib/browser/bundle-3a5994f4.cjs +76 -0
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.d.cts +1 -0
  9. package/lib/browser/index.d.mts +1 -0
  10. package/lib/browser/index.mjs +3 -3
  11. package/lib/edge/USE_CLIENT_BUNDLE-210385b8.cjs +23 -0
  12. package/lib/{browser/USE_CLIENT_BUNDLE-a0cfd96e.mjs → edge/USE_CLIENT_BUNDLE-736c38f3.js} +142 -142
  13. package/lib/{node/USE_SERVER_BUNDLE-5a2dbc47.mjs → edge/USE_SERVER_BUNDLE-14516672.js} +1 -1
  14. package/lib/edge/USE_SERVER_BUNDLE-8c86a267.cjs +1 -0
  15. package/lib/edge/{bundle-4c987206.mjs → bundle-46eb4735.js} +1237 -1211
  16. package/lib/edge/{bundle-cb675da6.js → bundle-57428492.cjs} +30 -30
  17. package/lib/edge/index.cjs +1 -1
  18. package/lib/edge/index.d.cts +1 -0
  19. package/lib/edge/index.d.mts +1 -0
  20. package/lib/edge/index.mjs +3 -3
  21. package/lib/{edge/USE_CLIENT_BUNDLE-bcf2ccc8.mjs → node/USE_CLIENT_BUNDLE-2ae32ced.js} +142 -142
  22. package/lib/node/USE_CLIENT_BUNDLE-85a396bb.cjs +23 -0
  23. package/lib/{browser/USE_SERVER_BUNDLE-4b7a745a.mjs → node/USE_SERVER_BUNDLE-cd1f2a07.js} +1 -1
  24. package/lib/node/USE_SERVER_BUNDLE-e2ad5ce3.cjs +1 -0
  25. package/lib/node/bundle-3d88f873.cjs +116 -0
  26. package/lib/node/{bundle-e3f18037.mjs → bundle-d37c53b5.js} +794 -769
  27. package/lib/node/index.cjs +1 -1
  28. package/lib/node/index.d.cts +1 -0
  29. package/lib/node/index.d.mts +1 -0
  30. package/lib/node/index.mjs +3 -3
  31. package/package.json +8 -22
  32. package/types/{blocks → cjs/blocks}/button/button.d.ts +4 -3
  33. package/types/{blocks → cjs/blocks}/columns/columns.d.ts +2 -2
  34. package/types/{blocks → cjs/blocks}/custom-code/custom-code.d.ts +2 -2
  35. package/types/cjs/blocks/embed/embed.d.ts +6 -0
  36. package/types/{blocks → cjs/blocks}/fragment/fragment.d.ts +2 -2
  37. package/types/{blocks → cjs/blocks}/image/image.d.ts +2 -2
  38. package/types/{blocks → cjs/blocks}/img/img.d.ts +4 -3
  39. package/types/{blocks → cjs/blocks}/section/section.d.ts +4 -3
  40. package/types/{blocks → cjs/blocks}/symbol/symbol.d.ts +6 -4
  41. package/types/cjs/blocks/text/text.d.ts +6 -0
  42. package/types/{blocks → cjs/blocks}/video/video.d.ts +2 -2
  43. package/types/{components → cjs/components}/block/block.d.ts +2 -2
  44. package/types/{components → cjs/components}/block/components/block-styles.d.ts +2 -2
  45. package/types/{components → cjs/components}/block/components/block-wrapper.d.ts +6 -5
  46. package/types/cjs/components/block/components/component-ref/component-ref.d.ts +4 -0
  47. package/types/{components → cjs/components}/block/components/component-ref/component-ref.helpers.d.ts +1 -1
  48. package/types/{components → cjs/components}/block/components/interactive-element.d.ts +2 -2
  49. package/types/{components → cjs/components}/block/components/repeated-block.d.ts +2 -2
  50. package/types/{components → cjs/components}/blocks/blocks-wrapper.d.ts +2 -2
  51. package/types/{components → cjs/components}/blocks/blocks.d.ts +3 -3
  52. package/types/{components → cjs/components}/content/components/enable-editor.d.ts +2 -2
  53. package/types/{components → cjs/components}/content/components/styles.d.ts +2 -2
  54. package/types/cjs/components/content/content.d.ts +4 -0
  55. package/types/{components → cjs/components}/content-variants/content-variants.d.ts +2 -2
  56. package/types/cjs/components/inlined-script.d.ts +7 -0
  57. package/types/cjs/components/inlined-styles.d.ts +7 -0
  58. package/types/cjs/constants/sdk-version.d.ts +1 -0
  59. package/types/cjs/helpers/preview-lru-cache/get.d.ts +1 -0
  60. package/types/{helpers → cjs/helpers}/preview-lru-cache/set.d.ts +1 -1
  61. package/types/{helpers → cjs/helpers}/preview-lru-cache/types.d.ts +1 -1
  62. package/types/cjs/index-helpers/blocks-exports.d.ts +19 -0
  63. package/types/{server-index.d.ts → cjs/server-index.d.ts} +2 -2
  64. package/types/esm/blocks/button/button.d.ts +12 -0
  65. package/types/esm/blocks/button/component-info.d.ts +2 -0
  66. package/types/esm/blocks/columns/columns.d.ts +17 -0
  67. package/types/esm/blocks/columns/component-info.d.ts +2 -0
  68. package/types/esm/blocks/custom-code/component-info.d.ts +2 -0
  69. package/types/esm/blocks/custom-code/custom-code.d.ts +7 -0
  70. package/types/esm/blocks/embed/component-info.d.ts +2 -0
  71. package/types/esm/blocks/embed/embed.d.ts +6 -0
  72. package/types/esm/blocks/embed/helpers.d.ts +1 -0
  73. package/types/esm/blocks/fragment/component-info.d.ts +2 -0
  74. package/types/esm/blocks/fragment/fragment.d.ts +8 -0
  75. package/types/esm/blocks/helpers.d.ts +13 -0
  76. package/types/esm/blocks/image/component-info.d.ts +2 -0
  77. package/types/esm/blocks/image/image.d.ts +22 -0
  78. package/types/esm/blocks/image/image.helpers.d.ts +1 -0
  79. package/types/esm/blocks/img/component-info.d.ts +2 -0
  80. package/types/esm/blocks/img/img.d.ts +14 -0
  81. package/types/esm/blocks/section/component-info.d.ts +2 -0
  82. package/types/esm/blocks/section/section.d.ts +12 -0
  83. package/types/esm/blocks/symbol/component-info.d.ts +2 -0
  84. package/types/esm/blocks/symbol/symbol.d.ts +26 -0
  85. package/types/esm/blocks/symbol/symbol.helpers.d.ts +14 -0
  86. package/types/esm/blocks/text/component-info.d.ts +2 -0
  87. package/types/esm/blocks/text/text.d.ts +6 -0
  88. package/types/esm/blocks/video/component-info.d.ts +2 -0
  89. package/types/esm/blocks/video/video.d.ts +20 -0
  90. package/types/esm/components/block/block.d.ts +10 -0
  91. package/types/esm/components/block/block.helpers.d.ts +13 -0
  92. package/types/esm/components/block/components/block-styles.d.ts +9 -0
  93. package/types/esm/components/block/components/block-wrapper.d.ts +18 -0
  94. package/types/esm/components/block/components/component-ref/component-ref.d.ts +4 -0
  95. package/types/esm/components/block/components/component-ref/component-ref.helpers.d.ts +28 -0
  96. package/types/esm/components/block/components/interactive-element.d.ts +12 -0
  97. package/types/esm/components/block/components/repeated-block.d.ts +10 -0
  98. package/types/esm/components/block/types.d.ts +6 -0
  99. package/types/esm/components/blocks/blocks-wrapper.d.ts +11 -0
  100. package/types/esm/components/blocks/blocks.d.ts +9 -0
  101. package/types/esm/components/content/components/enable-editor.d.ts +10 -0
  102. package/types/esm/components/content/components/styles.d.ts +9 -0
  103. package/types/esm/components/content/components/styles.helpers.d.ts +15 -0
  104. package/types/esm/components/content/content.d.ts +4 -0
  105. package/types/esm/components/content/content.helpers.d.ts +7 -0
  106. package/types/esm/components/content/content.types.d.ts +24 -0
  107. package/types/esm/components/content/wrap-component-ref.d.ts +6 -0
  108. package/types/esm/components/content-variants/content-variants.d.ts +10 -0
  109. package/types/esm/components/content-variants/content-variants.types.d.ts +20 -0
  110. package/types/esm/components/content-variants/helpers.d.ts +41 -0
  111. package/types/esm/components/inlined-script.d.ts +7 -0
  112. package/types/esm/components/inlined-styles.d.ts +7 -0
  113. package/types/esm/constants/builder-registered-components.d.ts +6 -0
  114. package/types/esm/constants/device-sizes.d.ts +13 -0
  115. package/types/esm/constants/sdk-version.d.ts +1 -0
  116. package/types/esm/constants/target.d.ts +2 -0
  117. package/types/esm/context/builder.context.d.ts +3 -0
  118. package/types/esm/context/components.context.d.ts +3 -0
  119. package/types/esm/context/types.d.ts +35 -0
  120. package/types/esm/functions/camel-to-kebab-case.d.ts +1 -0
  121. package/types/esm/functions/deopt.d.ts +4 -0
  122. package/types/esm/functions/evaluate/browser-runtime/browser.d.ts +4 -0
  123. package/types/esm/functions/evaluate/browser-runtime/index.d.ts +1 -0
  124. package/types/esm/functions/evaluate/choose-eval.d.ts +6 -0
  125. package/types/esm/functions/evaluate/evaluate.d.ts +2 -0
  126. package/types/esm/functions/evaluate/helpers.d.ts +24 -0
  127. package/types/esm/functions/evaluate/index.d.ts +1 -0
  128. package/types/esm/functions/event-handler-name.d.ts +1 -0
  129. package/types/esm/functions/extract-text-styles.d.ts +4 -0
  130. package/types/esm/functions/fast-clone.d.ts +4 -0
  131. package/types/esm/functions/fetch-builder-props.d.ts +53 -0
  132. package/types/esm/functions/get-block-actions-handler.d.ts +8 -0
  133. package/types/esm/functions/get-block-actions.d.ts +10 -0
  134. package/types/esm/functions/get-block-component-options.d.ts +2 -0
  135. package/types/esm/functions/get-block-properties.d.ts +6 -0
  136. package/types/esm/functions/get-builder-search-params/index.d.ts +12 -0
  137. package/types/esm/functions/get-content/generate-content-url.d.ts +2 -0
  138. package/types/esm/functions/get-content/index.d.ts +28 -0
  139. package/types/esm/functions/get-content/types.d.ts +142 -0
  140. package/types/esm/functions/get-fetch.d.ts +1 -0
  141. package/types/esm/functions/get-global-this.d.ts +4 -0
  142. package/types/esm/functions/get-processed-block.d.ts +10 -0
  143. package/types/esm/functions/get-react-native-block-styles.d.ts +7 -0
  144. package/types/esm/functions/is-browser.d.ts +1 -0
  145. package/types/esm/functions/is-editing.d.ts +1 -0
  146. package/types/esm/functions/is-iframe.d.ts +1 -0
  147. package/types/esm/functions/is-previewing.d.ts +1 -0
  148. package/types/esm/functions/register-component.d.ts +15 -0
  149. package/types/esm/functions/register.d.ts +16 -0
  150. package/types/esm/functions/sanitize-react-native-block-styles.d.ts +3 -0
  151. package/types/esm/functions/set-editor-settings.d.ts +4 -0
  152. package/types/esm/functions/set.d.ts +7 -0
  153. package/types/esm/functions/track/helpers.d.ts +5 -0
  154. package/types/esm/functions/track/index.d.ts +51 -0
  155. package/types/esm/functions/track/interaction.d.ts +13 -0
  156. package/types/esm/functions/transform-block-properties.d.ts +1 -0
  157. package/types/esm/functions/transform-block.d.ts +2 -0
  158. package/types/esm/helpers/ab-tests.d.ts +9 -0
  159. package/types/esm/helpers/canTrack.d.ts +1 -0
  160. package/types/esm/helpers/cookie.d.ts +19 -0
  161. package/types/esm/helpers/css.d.ts +7 -0
  162. package/types/esm/helpers/flatten.d.ts +6 -0
  163. package/types/esm/helpers/localStorage.d.ts +9 -0
  164. package/types/esm/helpers/logger.d.ts +6 -0
  165. package/types/esm/helpers/nullable.d.ts +2 -0
  166. package/types/esm/helpers/preview-lru-cache/get.d.ts +1 -0
  167. package/types/esm/helpers/preview-lru-cache/helpers.d.ts +1 -0
  168. package/types/esm/helpers/preview-lru-cache/init.d.ts +6 -0
  169. package/types/esm/helpers/preview-lru-cache/set.d.ts +7 -0
  170. package/types/esm/helpers/preview-lru-cache/types.d.ts +12 -0
  171. package/types/esm/helpers/sessionId.d.ts +6 -0
  172. package/types/esm/helpers/url.d.ts +6 -0
  173. package/types/esm/helpers/uuid.d.ts +8 -0
  174. package/types/esm/helpers/visitorId.d.ts +6 -0
  175. package/types/esm/index-helpers/blocks-exports.d.ts +19 -0
  176. package/types/esm/index-helpers/top-of-file.d.ts +1 -0
  177. package/types/esm/index.d.ts +7 -0
  178. package/types/esm/scripts/init-editing.d.ts +6 -0
  179. package/types/esm/server-index.d.ts +15 -0
  180. package/types/esm/types/api-version.d.ts +2 -0
  181. package/types/esm/types/builder-block.d.ts +66 -0
  182. package/types/esm/types/builder-content.d.ts +44 -0
  183. package/types/esm/types/builder-props.d.ts +9 -0
  184. package/types/esm/types/can-track.d.ts +3 -0
  185. package/types/esm/types/components.d.ts +110 -0
  186. package/types/esm/types/deep-partial.d.ts +3 -0
  187. package/types/esm/types/element.d.ts +59 -0
  188. package/types/esm/types/enforced-partials.d.ts +21 -0
  189. package/types/esm/types/input.d.ts +121 -0
  190. package/types/esm/types/targets.d.ts +1 -0
  191. package/types/esm/types/typescript.d.ts +11 -0
  192. package/lib/browser/USE_CLIENT_BUNDLE-36991304.js +0 -23
  193. package/lib/browser/USE_SERVER_BUNDLE-2ca6fbdb.js +0 -1
  194. package/lib/browser/bundle-55af31a8.js +0 -76
  195. package/lib/edge/USE_CLIENT_BUNDLE-66349ab4.js +0 -23
  196. package/lib/edge/USE_SERVER_BUNDLE-02f64ca7.js +0 -1
  197. package/lib/node/USE_CLIENT_BUNDLE-9a315fd7.js +0 -23
  198. package/lib/node/USE_SERVER_BUNDLE-ddf14d3b.js +0 -1
  199. package/lib/node/bundle-b8de5bb9.js +0 -116
  200. package/types/blocks/embed/embed.d.ts +0 -6
  201. package/types/blocks/text/text.d.ts +0 -6
  202. package/types/components/block/components/component-ref/component-ref.d.ts +0 -4
  203. package/types/components/content/content.d.ts +0 -4
  204. package/types/components/inlined-script.d.ts +0 -7
  205. package/types/components/inlined-styles.d.ts +0 -7
  206. package/types/constants/sdk-version.d.ts +0 -1
  207. package/types/helpers/preview-lru-cache/get.d.ts +0 -1
  208. package/types/index-helpers/blocks-exports.d.ts +0 -19
  209. package/types/{blocks → cjs/blocks}/button/component-info.d.ts +0 -0
  210. package/types/{blocks → cjs/blocks}/columns/component-info.d.ts +0 -0
  211. package/types/{blocks → cjs/blocks}/custom-code/component-info.d.ts +0 -0
  212. package/types/{blocks → cjs/blocks}/embed/component-info.d.ts +0 -0
  213. package/types/{blocks → cjs/blocks}/embed/helpers.d.ts +0 -0
  214. package/types/{blocks → cjs/blocks}/fragment/component-info.d.ts +0 -0
  215. package/types/{blocks → cjs/blocks}/helpers.d.ts +0 -0
  216. package/types/{blocks → cjs/blocks}/image/component-info.d.ts +0 -0
  217. package/types/{blocks → cjs/blocks}/image/image.helpers.d.ts +0 -0
  218. package/types/{blocks → cjs/blocks}/img/component-info.d.ts +0 -0
  219. package/types/{blocks → cjs/blocks}/section/component-info.d.ts +0 -0
  220. package/types/{blocks → cjs/blocks}/symbol/component-info.d.ts +0 -0
  221. package/types/{blocks → cjs/blocks}/symbol/symbol.helpers.d.ts +0 -0
  222. package/types/{blocks → cjs/blocks}/text/component-info.d.ts +0 -0
  223. package/types/{blocks → cjs/blocks}/video/component-info.d.ts +0 -0
  224. package/types/{components → cjs/components}/block/block.helpers.d.ts +0 -0
  225. package/types/{components → cjs/components}/block/types.d.ts +0 -0
  226. package/types/{components → cjs/components}/content/components/styles.helpers.d.ts +0 -0
  227. package/types/{components → cjs/components}/content/content.helpers.d.ts +0 -0
  228. package/types/{components → cjs/components}/content/content.types.d.ts +0 -0
  229. package/types/{components → cjs/components}/content/wrap-component-ref.d.ts +0 -0
  230. package/types/{components → cjs/components}/content-variants/content-variants.types.d.ts +0 -0
  231. package/types/{components → cjs/components}/content-variants/helpers.d.ts +0 -0
  232. package/types/{constants → cjs/constants}/builder-registered-components.d.ts +0 -0
  233. package/types/{constants → cjs/constants}/device-sizes.d.ts +0 -0
  234. package/types/{constants → cjs/constants}/target.d.ts +0 -0
  235. package/types/{context → cjs/context}/builder.context.d.ts +0 -0
  236. package/types/{context → cjs/context}/components.context.d.ts +0 -0
  237. package/types/{context → cjs/context}/types.d.ts +1 -1
  238. package/types/{functions → cjs/functions}/camel-to-kebab-case.d.ts +0 -0
  239. package/types/{functions → cjs/functions}/deopt.d.ts +0 -0
  240. package/types/{functions → cjs/functions}/evaluate/browser-runtime/browser.d.ts +0 -0
  241. package/types/{functions → cjs/functions}/evaluate/browser-runtime/index.d.ts +0 -0
  242. package/types/{functions → cjs/functions}/evaluate/choose-eval.d.ts +0 -0
  243. package/types/{functions → cjs/functions}/evaluate/evaluate.d.ts +0 -0
  244. package/types/{functions → cjs/functions}/evaluate/helpers.d.ts +0 -0
  245. package/types/{functions → cjs/functions}/evaluate/index.d.ts +0 -0
  246. package/types/{functions → cjs/functions}/event-handler-name.d.ts +0 -0
  247. package/types/{functions → cjs/functions}/extract-text-styles.d.ts +0 -0
  248. package/types/{functions → cjs/functions}/fast-clone.d.ts +0 -0
  249. package/types/{functions → cjs/functions}/fetch-builder-props.d.ts +0 -0
  250. package/types/{functions → cjs/functions}/get-block-actions-handler.d.ts +0 -0
  251. package/types/{functions → cjs/functions}/get-block-actions.d.ts +0 -0
  252. package/types/{functions → cjs/functions}/get-block-component-options.d.ts +0 -0
  253. package/types/{functions → cjs/functions}/get-block-properties.d.ts +0 -0
  254. package/types/{functions → cjs/functions}/get-builder-search-params/index.d.ts +0 -0
  255. package/types/{functions → cjs/functions}/get-content/generate-content-url.d.ts +0 -0
  256. package/types/{functions → cjs/functions}/get-content/index.d.ts +0 -0
  257. package/types/{functions → cjs/functions}/get-content/types.d.ts +0 -0
  258. package/types/{functions → cjs/functions}/get-fetch.d.ts +0 -0
  259. package/types/{functions → cjs/functions}/get-global-this.d.ts +0 -0
  260. package/types/{functions → cjs/functions}/get-processed-block.d.ts +0 -0
  261. package/types/{functions → cjs/functions}/get-react-native-block-styles.d.ts +0 -0
  262. package/types/{functions → cjs/functions}/is-browser.d.ts +0 -0
  263. package/types/{functions → cjs/functions}/is-editing.d.ts +0 -0
  264. package/types/{functions → cjs/functions}/is-iframe.d.ts +0 -0
  265. package/types/{functions → cjs/functions}/is-previewing.d.ts +0 -0
  266. package/types/{functions → cjs/functions}/register-component.d.ts +0 -0
  267. package/types/{functions → cjs/functions}/register.d.ts +0 -0
  268. package/types/{functions → cjs/functions}/sanitize-react-native-block-styles.d.ts +0 -0
  269. package/types/{functions → cjs/functions}/set-editor-settings.d.ts +0 -0
  270. package/types/{functions → cjs/functions}/set.d.ts +0 -0
  271. package/types/{functions → cjs/functions}/track/helpers.d.ts +0 -0
  272. package/types/{functions → cjs/functions}/track/index.d.ts +0 -0
  273. package/types/{functions → cjs/functions}/track/interaction.d.ts +0 -0
  274. package/types/{functions → cjs/functions}/transform-block-properties.d.ts +0 -0
  275. package/types/{functions → cjs/functions}/transform-block.d.ts +0 -0
  276. package/types/{helpers → cjs/helpers}/ab-tests.d.ts +1 -1
  277. /package/types/{helpers → cjs/helpers}/canTrack.d.ts +0 -0
  278. /package/types/{helpers → cjs/helpers}/cookie.d.ts +0 -0
  279. /package/types/{helpers → cjs/helpers}/css.d.ts +0 -0
  280. /package/types/{helpers → cjs/helpers}/flatten.d.ts +0 -0
  281. /package/types/{helpers → cjs/helpers}/localStorage.d.ts +0 -0
  282. /package/types/{helpers → cjs/helpers}/logger.d.ts +0 -0
  283. /package/types/{helpers → cjs/helpers}/nullable.d.ts +0 -0
  284. /package/types/{helpers → cjs/helpers}/preview-lru-cache/helpers.d.ts +0 -0
  285. /package/types/{helpers → cjs/helpers}/preview-lru-cache/init.d.ts +0 -0
  286. /package/types/{helpers → cjs/helpers}/sessionId.d.ts +0 -0
  287. /package/types/{helpers → cjs/helpers}/url.d.ts +0 -0
  288. /package/types/{helpers → cjs/helpers}/uuid.d.ts +0 -0
  289. /package/types/{helpers → cjs/helpers}/visitorId.d.ts +0 -0
  290. /package/types/{index-helpers → cjs/index-helpers}/top-of-file.d.ts +0 -0
  291. /package/types/{index.d.ts → cjs/index.d.ts} +0 -0
  292. /package/types/{scripts → cjs/scripts}/init-editing.d.ts +0 -0
  293. /package/types/{types → cjs/types}/api-version.d.ts +0 -0
  294. /package/types/{types → cjs/types}/builder-block.d.ts +0 -0
  295. /package/types/{types → cjs/types}/builder-content.d.ts +0 -0
  296. /package/types/{types → cjs/types}/builder-props.d.ts +0 -0
  297. /package/types/{types → cjs/types}/can-track.d.ts +0 -0
  298. /package/types/{types → cjs/types}/components.d.ts +0 -0
  299. /package/types/{types → cjs/types}/deep-partial.d.ts +0 -0
  300. /package/types/{types → cjs/types}/element.d.ts +0 -0
  301. /package/types/{types → cjs/types}/enforced-partials.d.ts +0 -0
  302. /package/types/{types → cjs/types}/input.d.ts +0 -0
  303. /package/types/{types → cjs/types}/targets.d.ts +0 -0
  304. /package/types/{types → cjs/types}/typescript.d.ts +0 -0
@@ -1,73 +1,43 @@
1
- import { LRUCache as $e } from "lru-cache";
1
+ import { LRUCache as Pe } from "lru-cache";
2
2
  import { jsx as l, Fragment as x, jsxs as C } from "react/jsx-runtime";
3
- import { createElement as Pe } from "react";
4
- import { I as Be, B as J, a as Fe, b as Oe, C as Ne, E as We, F as Le, c as Ue, d as Me, S as _e, V as je, e as Ke } from "./USE_CLIENT_BUNDLE-a0cfd96e.mjs";
3
+ import { createElement as Ve } from "react";
4
+ import { I as $e, B as J, a as Oe, b as Fe, C as Ne, E as We, F as Le, c as Ue, d as Me, S as _e, V as je, e as Ke } from "./USE_CLIENT_BUNDLE-b256b942.js";
5
5
  import "next/navigation";
6
- const F = (e) => JSON.parse(JSON.stringify(e)), ue = {
7
- small: {
8
- min: 320,
9
- default: 321,
10
- max: 640
11
- },
12
- medium: {
13
- min: 641,
14
- default: 642,
15
- max: 991
16
- },
17
- large: {
18
- min: 990,
19
- default: 991,
20
- max: 1200
21
- }
22
- }, Y = (e, t = ue) => `@media (max-width: ${t[e].max}px)`, de = ({
23
- small: e,
24
- medium: t
25
- }) => {
26
- const n = F(ue);
27
- if (!e || !t)
28
- return n;
29
- const o = Math.floor(e / 2);
30
- n.small = {
31
- max: e,
32
- min: o,
33
- default: o + 1
34
- };
35
- const i = n.small.max + 1;
36
- n.medium = {
37
- max: t,
38
- min: i,
39
- default: i + 1
6
+ function He(e) {
7
+ var t;
8
+ return {
9
+ ...(t = e.component) == null ? void 0 : t.options,
10
+ ...e.options,
11
+ /**
12
+ * Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
13
+ */
14
+ builderBlock: e
40
15
  };
41
- const r = n.medium.max + 1;
42
- return n.large = {
43
- max: 2e3,
44
- // TODO: decide upper limit
45
- min: r,
46
- default: r + 1
47
- }, n;
48
- }, T = "rsc", V = "[Builder.io]: ", k = {
49
- log: (...e) => console.log(V, ...e),
50
- error: (...e) => console.error(V, ...e),
51
- warn: (...e) => console.warn(V, ...e),
52
- debug: (...e) => console.debug(V, ...e)
16
+ }
17
+ const B = "[Builder.io]: ", k = {
18
+ log: (...e) => console.log(B, ...e),
19
+ error: (...e) => console.error(B, ...e),
20
+ warn: (...e) => console.warn(B, ...e),
21
+ debug: (...e) => console.debug(B, ...e)
53
22
  };
54
23
  function v() {
55
24
  return typeof window < "u" && typeof document < "u";
56
25
  }
57
- function He() {
26
+ const T = "rsc";
27
+ function De() {
58
28
  return v() && window.self !== window.top;
59
29
  }
60
30
  function j() {
61
- return He() && window.location.search.indexOf("builder.frameEditing=") !== -1;
31
+ return De() && window.location.search.indexOf("builder.frameEditing=") !== -1;
62
32
  }
63
- const De = () => {
33
+ const ze = () => {
64
34
  if (v()) {
65
35
  const e = new URL(location.href);
66
36
  return e.pathname === "" && (e.pathname = "/"), e;
67
37
  } else
68
38
  return console.warn("Cannot get location for tracking in non-browser environment"), null;
69
- }, ze = () => typeof navigator == "object" && navigator.userAgent || "", me = () => {
70
- const e = ze(), t = {
39
+ }, qe = () => typeof navigator == "object" && navigator.userAgent || "", ue = () => {
40
+ const e = qe(), t = {
71
41
  Android() {
72
42
  return e.match(/Android/i);
73
43
  },
@@ -86,13 +56,13 @@ const De = () => {
86
56
  any() {
87
57
  return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || T === "reactNative";
88
58
  }
89
- }, n = e.match(/Tablet|iPad/i), o = De();
59
+ }, n = e.match(/Tablet|iPad/i), o = ze();
90
60
  return {
91
61
  urlPath: o == null ? void 0 : o.pathname,
92
62
  host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
93
63
  device: n ? "tablet" : t.any() ? "mobile" : "desktop"
94
64
  };
95
- }, qe = ({
65
+ }, Ge = ({
96
66
  builder: e,
97
67
  context: t,
98
68
  event: n,
@@ -104,14 +74,14 @@ const De = () => {
104
74
  builder: e,
105
75
  context: t,
106
76
  event: n
107
- }), Ge = () => ({
77
+ }), Je = () => ({
108
78
  isEditing: j(),
109
79
  isBrowser: v(),
110
80
  isServer: !v(),
111
- getUserAttributes: () => me()
112
- }), Je = (e, {
81
+ getUserAttributes: () => ue()
82
+ }), Ye = (e, {
113
83
  isExpression: t = !0
114
- }) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, X = ({
84
+ }) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, Y = ({
115
85
  code: e,
116
86
  builder: t,
117
87
  context: n,
@@ -120,15 +90,15 @@ const De = () => {
120
90
  rootSetState: r,
121
91
  rootState: a
122
92
  }) => {
123
- const c = qe({
93
+ const s = Ge({
124
94
  builder: t,
125
95
  context: n,
126
96
  event: o,
127
- state: Ye(a, i, r)
97
+ state: Xe(a, i, r)
128
98
  });
129
- return new Function(...c.map(([s]) => s), e)(...c.map(([, s]) => s));
99
+ return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
130
100
  };
131
- function Ye(e, t, n) {
101
+ function Xe(e, t, n) {
132
102
  if (e === t)
133
103
  throw new Error("rootState === localState");
134
104
  return new Proxy(e, {
@@ -140,7 +110,7 @@ function Ye(e, t, n) {
140
110
  }
141
111
  });
142
112
  }
143
- const Xe = (e) => (v(), X(e));
113
+ const Qe = (e) => (v(), Y(e));
144
114
  function K({
145
115
  code: e,
146
116
  context: t,
@@ -154,11 +124,11 @@ function K({
154
124
  k.warn("Skipping evaluation of empty code block.");
155
125
  return;
156
126
  }
157
- const c = {
158
- code: Je(e, {
127
+ const s = {
128
+ code: Ye(e, {
159
129
  isExpression: a
160
130
  }),
161
- builder: Ge(),
131
+ builder: Je(),
162
132
  context: t,
163
133
  event: r,
164
134
  rootSetState: i,
@@ -166,21 +136,21 @@ function K({
166
136
  localState: n
167
137
  };
168
138
  try {
169
- return Xe(c);
170
- } catch (s) {
171
- k.error("Failed code evaluation: " + s.message, {
139
+ return Qe(s);
140
+ } catch (c) {
141
+ k.error("Failed code evaluation: " + c.message, {
172
142
  code: e
173
143
  });
174
144
  return;
175
145
  }
176
146
  }
177
- const Qe = (e, t, n) => {
147
+ const O = (e) => JSON.parse(JSON.stringify(e)), Ze = (e, t, n) => {
178
148
  if (Object(e) !== e)
179
149
  return e;
180
150
  const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
181
151
  return o.slice(0, -1).reduce((i, r, a) => Object(i[r]) === i[r] ? i[r] : i[r] = Math.abs(Number(o[a + 1])) >> 0 === +o[a + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
182
152
  };
183
- const Ze = ({
153
+ const et = ({
184
154
  block: e,
185
155
  context: t,
186
156
  localState: n,
@@ -189,7 +159,7 @@ const Ze = ({
189
159
  }) => {
190
160
  if (!e.bindings)
191
161
  return e;
192
- const r = F(e), a = {
162
+ const r = O(e), a = {
193
163
  ...r,
194
164
  properties: {
195
165
  ...r.properties
@@ -198,19 +168,19 @@ const Ze = ({
198
168
  ...r.actions
199
169
  }
200
170
  };
201
- for (const c in e.bindings) {
202
- const s = e.bindings[c], d = K({
203
- code: s,
171
+ for (const s in e.bindings) {
172
+ const c = e.bindings[s], d = K({
173
+ code: c,
204
174
  localState: n,
205
175
  rootState: o,
206
176
  rootSetState: i,
207
177
  context: t
208
178
  });
209
- Qe(a, c, d);
179
+ Ze(a, s, d);
210
180
  }
211
181
  return a;
212
182
  };
213
- function B({
183
+ function $({
214
184
  block: e,
215
185
  context: t,
216
186
  shouldEvaluateBindings: n,
@@ -219,7 +189,7 @@ function B({
219
189
  rootSetState: r
220
190
  }) {
221
191
  const a = e;
222
- return n ? Ze({
192
+ return n ? et({
223
193
  block: a,
224
194
  localState: o,
225
195
  rootState: i,
@@ -227,90 +197,13 @@ function B({
227
197
  context: t
228
198
  }) : a;
229
199
  }
230
- const et = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), I = (e) => e != null, fe = (e) => Object.entries(e).map(([n, o]) => {
231
- if (typeof o == "string")
232
- return `${et(n)}: ${o};`;
233
- }).filter(I), tt = (e) => fe(e).join(`
234
- `), W = ({
235
- mediaQuery: e,
236
- className: t,
237
- styles: n
238
- }) => {
239
- const o = `.${t} {
240
- ${tt(n)}
241
- }`;
242
- return e ? `${e} {
243
- ${o}
244
- }` : o;
245
- };
246
- function O(e) {
247
- return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
248
- }
249
- function H(e) {
250
- const t = function() {
251
- const i = B({
252
- block: e.block,
253
- localState: e.context.localState,
254
- rootState: e.context.rootState,
255
- rootSetState: e.context.rootSetState,
256
- context: e.context.context,
257
- shouldEvaluateBindings: !0
258
- });
259
- return I(i.hide) ? !i.hide : I(i.show) ? i.show : !0;
260
- }, n = function() {
261
- var u;
262
- const i = B({
263
- block: e.block,
264
- localState: e.context.localState,
265
- rootState: e.context.rootState,
266
- rootSetState: e.context.rootSetState,
267
- context: e.context.context,
268
- shouldEvaluateBindings: !0
269
- }), r = i.responsiveStyles, a = e.context.content, c = de(
270
- ((u = a == null ? void 0 : a.meta) == null ? void 0 : u.breakpoints) || {}
271
- ), s = r == null ? void 0 : r.large, d = r == null ? void 0 : r.medium, f = r == null ? void 0 : r.small, p = i.id;
272
- if (!p)
273
- return "";
274
- const b = s ? W({
275
- className: p,
276
- styles: s
277
- }) : "", m = d ? W({
278
- className: p,
279
- styles: d,
280
- mediaQuery: Y(
281
- "medium",
282
- c
283
- )
284
- }) : "", h = f ? W({
285
- className: p,
286
- styles: f,
287
- mediaQuery: Y(
288
- "small",
289
- c
290
- )
291
- }) : "";
292
- return [b, m, h].join(" ");
293
- };
294
- return /* @__PURE__ */ l(x, { children: n() && t() ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
295
- }
296
- function nt(e) {
297
- var t;
298
- return {
299
- ...(t = e.component) == null ? void 0 : t.options,
300
- ...e.options,
301
- /**
302
- * Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
303
- */
304
- builderBlock: e
305
- };
306
- }
307
- const ot = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], L = (e) => typeof e == "string" && ot.includes(e.toLowerCase()), it = ({
200
+ const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], W = (e) => typeof e == "string" && tt.includes(e.toLowerCase()), nt = ({
308
201
  block: e,
309
202
  context: t,
310
203
  registeredComponents: n
311
204
  }) => {
312
205
  var r;
313
- const o = (r = B({
206
+ const o = (r = $({
314
207
  block: e,
315
208
  localState: t.localState,
316
209
  rootState: t.rootState,
@@ -326,7 +219,7 @@ const ot = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
326
219
  console.warn(`
327
220
  Could not find a registered component named "${o}".
328
221
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
329
- }, rt = ({
222
+ }, ot = ({
330
223
  block: e,
331
224
  context: t
332
225
  }) => {
@@ -346,35 +239,131 @@ const ot = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
346
239
  if (!Array.isArray(i))
347
240
  return;
348
241
  const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
349
- return i.map((s, d) => ({
242
+ return i.map((c, d) => ({
350
243
  context: {
351
244
  ...t,
352
245
  localState: {
353
246
  ...t.localState,
354
247
  $index: d,
355
- $item: s,
356
- [a]: s,
248
+ $item: c,
249
+ [a]: c,
357
250
  [`$${a}Index`]: d
358
251
  }
359
252
  },
360
253
  block: o
361
254
  }));
255
+ }, de = {
256
+ small: {
257
+ min: 320,
258
+ default: 321,
259
+ max: 640
260
+ },
261
+ medium: {
262
+ min: 641,
263
+ default: 642,
264
+ max: 991
265
+ },
266
+ large: {
267
+ min: 990,
268
+ default: 991,
269
+ max: 1200
270
+ }
271
+ }, X = (e, t = de) => `@media (max-width: ${t[e].max}px)`, me = ({
272
+ small: e,
273
+ medium: t
274
+ }) => {
275
+ const n = O(de);
276
+ if (!e || !t)
277
+ return n;
278
+ const o = Math.floor(e / 2);
279
+ n.small = {
280
+ max: e,
281
+ min: o,
282
+ default: o + 1
283
+ };
284
+ const i = n.small.max + 1;
285
+ n.medium = {
286
+ max: t,
287
+ min: i,
288
+ default: i + 1
289
+ };
290
+ const r = n.medium.max + 1;
291
+ return n.large = {
292
+ max: 2e3,
293
+ // TODO: decide upper limit
294
+ min: r,
295
+ default: r + 1
296
+ }, n;
297
+ }, it = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), I = (e) => e != null, fe = (e) => Object.entries(e).map(([n, o]) => {
298
+ if (typeof o == "string")
299
+ return `${it(n)}: ${o};`;
300
+ }).filter(I), rt = (e) => fe(e).join(`
301
+ `), L = ({
302
+ mediaQuery: e,
303
+ className: t,
304
+ styles: n
305
+ }) => {
306
+ const o = `.${t} {
307
+ ${rt(n)}
308
+ }`;
309
+ return e ? `${e} {
310
+ ${o}
311
+ }` : o;
362
312
  };
363
- function at(e) {
364
- const t = e.repeatContext;
365
- return /* @__PURE__ */ l(
366
- N,
367
- {
313
+ function F(e) {
314
+ return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
315
+ }
316
+ function H(e) {
317
+ const t = function() {
318
+ const i = $({
368
319
  block: e.block,
369
- context: t,
370
- registeredComponents: e.registeredComponents
371
- }
372
- );
320
+ localState: e.context.localState,
321
+ rootState: e.context.rootState,
322
+ rootSetState: e.context.rootSetState,
323
+ context: e.context.context,
324
+ shouldEvaluateBindings: !0
325
+ });
326
+ return I(i.hide) ? !i.hide : I(i.show) ? i.show : !0;
327
+ }, n = function() {
328
+ var u;
329
+ const i = $({
330
+ block: e.block,
331
+ localState: e.context.localState,
332
+ rootState: e.context.rootState,
333
+ rootSetState: e.context.rootSetState,
334
+ context: e.context.context,
335
+ shouldEvaluateBindings: !0
336
+ }), r = i.responsiveStyles, a = e.context.content, s = me(
337
+ ((u = a == null ? void 0 : a.meta) == null ? void 0 : u.breakpoints) || {}
338
+ ), c = r == null ? void 0 : r.large, d = r == null ? void 0 : r.medium, f = r == null ? void 0 : r.small, p = i.id;
339
+ if (!p)
340
+ return "";
341
+ const b = c ? L({
342
+ className: p,
343
+ styles: c
344
+ }) : "", m = d ? L({
345
+ className: p,
346
+ styles: d,
347
+ mediaQuery: X(
348
+ "medium",
349
+ s
350
+ )
351
+ }) : "", h = f ? L({
352
+ className: p,
353
+ styles: f,
354
+ mediaQuery: X(
355
+ "small",
356
+ s
357
+ )
358
+ }) : "";
359
+ return [b, m, h].join(" ");
360
+ };
361
+ return /* @__PURE__ */ l(x, { children: n() && t() ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(F, { styles: n() }) }) : null });
373
362
  }
374
- function st(e) {
363
+ function at(e) {
375
364
  return e.charAt(0).toUpperCase() + e.slice(1);
376
365
  }
377
- const ct = (e) => `on${st(e)}`, lt = (e, t) => (n) => K({
366
+ const st = (e) => `on${at(e)}`, ct = (e, t) => (n) => K({
378
367
  code: e,
379
368
  context: t.context,
380
369
  localState: t.localState,
@@ -389,7 +378,7 @@ function Mn(e) {
389
378
  if (!n.hasOwnProperty(o))
390
379
  continue;
391
380
  const i = n[o];
392
- let r = ct(o);
381
+ let r = st(o);
393
382
  if (e.stripPrefix)
394
383
  switch (T) {
395
384
  case "vue2":
@@ -400,31 +389,31 @@ function Mn(e) {
400
389
  r = r.replace("on:", "");
401
390
  break;
402
391
  }
403
- t[r] = lt(i, e);
392
+ t[r] = ct(i, e);
404
393
  }
405
394
  return t;
406
395
  }
407
- function ut(e) {
396
+ function lt(e) {
408
397
  return e.className = e.class, delete e.class, e;
409
398
  }
410
- const dt = (e) => ({
399
+ const ut = (e) => ({
411
400
  href: e.href
412
401
  });
413
- function mt({
402
+ function dt({
414
403
  block: e,
415
404
  context: t
416
405
  }) {
417
406
  var o;
418
407
  const n = {
419
- ...dt(e),
408
+ ...ut(e),
420
409
  ...e.properties,
421
410
  "builder-id": e.id,
422
- style: e.style ? ft(e.style) : void 0,
411
+ style: e.style ? mt(e.style) : void 0,
423
412
  class: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
424
413
  };
425
- return ut(n);
414
+ return lt(n);
426
415
  }
427
- function ft(e) {
416
+ function mt(e) {
428
417
  switch (T) {
429
418
  case "svelte":
430
419
  case "vue2":
@@ -438,7 +427,7 @@ function ft(e) {
438
427
  return e;
439
428
  }
440
429
  }
441
- const ht = ({
430
+ const ft = ({
442
431
  componentOptions: e,
443
432
  builderBlock: t,
444
433
  context: n,
@@ -458,7 +447,7 @@ const ht = ({
458
447
  * component itself directly. Otherwise, they are provided to the wrapper element.
459
448
  */
460
449
  ...i ? {
461
- attributes: mt({
450
+ attributes: dt({
462
451
  block: t,
463
452
  context: a
464
453
  })
@@ -466,11 +455,11 @@ const ht = ({
466
455
  };
467
456
  function Q(e) {
468
457
  var n, o;
469
- const t = e.isInteractive ? Be : e.componentRef;
458
+ const t = e.isInteractive ? $e : e.componentRef;
470
459
  return /* @__PURE__ */ l(x, { children: e.componentRef ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ C(
471
460
  t,
472
461
  {
473
- ...ht({
462
+ ...ft({
474
463
  componentOptions: e.componentOptions,
475
464
  builderBlock: e.builderBlock,
476
465
  context: e.context,
@@ -501,21 +490,32 @@ function Q(e) {
501
490
  }
502
491
  ) }) : null });
503
492
  }
493
+ function ht(e) {
494
+ const t = e.repeatContext;
495
+ return /* @__PURE__ */ l(
496
+ N,
497
+ {
498
+ block: e.block,
499
+ context: t,
500
+ registeredComponents: e.registeredComponents
501
+ }
502
+ );
503
+ }
504
504
  function N(e) {
505
505
  var d, f, p, b;
506
506
  const t = function() {
507
- return it({
507
+ return nt({
508
508
  block: e.block,
509
509
  context: e.context,
510
510
  registeredComponents: e.registeredComponents
511
511
  });
512
512
  }, n = function() {
513
- return rt({
513
+ return ot({
514
514
  block: e.block,
515
515
  context: e.context
516
516
  });
517
517
  }, o = function() {
518
- return n() ? e.block : B({
518
+ return n() ? e.block : $({
519
519
  block: e.block,
520
520
  localState: e.context.localState,
521
521
  rootState: e.context.rootState,
@@ -530,27 +530,39 @@ function N(e) {
530
530
  }, a = function() {
531
531
  var u;
532
532
  return !((u = t()) != null && u.component) && !n() ? o().children ?? [] : [];
533
- }, c = function() {
533
+ }, s = function() {
534
534
  var h, u, y, S, g;
535
535
  return {
536
536
  blockChildren: o().children ?? [],
537
537
  componentRef: (h = t()) == null ? void 0 : h.component,
538
538
  componentOptions: {
539
- ...nt(o()),
539
+ ...He(o()),
540
540
  builderContext: e.context,
541
541
  ...((u = t()) == null ? void 0 : u.name) === "Symbol" || ((y = t()) == null ? void 0 : y.name) === "Columns" ? {
542
542
  builderComponents: e.registeredComponents
543
543
  } : {}
544
544
  },
545
- context: s,
545
+ context: c,
546
546
  registeredComponents: e.registeredComponents,
547
547
  builderBlock: o(),
548
548
  includeBlockProps: ((S = t()) == null ? void 0 : S.noWrap) === !0,
549
549
  isInteractive: !((g = t()) != null && g.isRSC)
550
550
  };
551
- }, s = e.context;
552
- return /* @__PURE__ */ l(x, { children: r() ? /* @__PURE__ */ l(x, { children: (d = t()) != null && d.noWrap ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(Q, { ...c() }) }) : /* @__PURE__ */ C(x, { children: [
553
- L(i()) ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(
551
+ }, c = e.context;
552
+ return /* @__PURE__ */ l(x, { children: r() ? /* @__PURE__ */ l(x, { children: (d = t()) != null && d.noWrap ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(
553
+ Q,
554
+ {
555
+ componentRef: s().componentRef,
556
+ componentOptions: s().componentOptions,
557
+ blockChildren: s().blockChildren,
558
+ context: s().context,
559
+ registeredComponents: s().registeredComponents,
560
+ builderBlock: s().builderBlock,
561
+ includeBlockProps: s().includeBlockProps,
562
+ isInteractive: s().isInteractive
563
+ }
564
+ ) }) : /* @__PURE__ */ C(x, { children: [
565
+ W(i()) ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(
554
566
  J,
555
567
  {
556
568
  Wrapper: i(),
@@ -559,8 +571,8 @@ function N(e) {
559
571
  hasChildren: !1
560
572
  }
561
573
  ) }) : null,
562
- !L(i()) && n() ? /* @__PURE__ */ l(x, { children: (f = n()) == null ? void 0 : f.map((m, h) => /* @__PURE__ */ l(
563
- at,
574
+ !W(i()) && n() ? /* @__PURE__ */ l(x, { children: (f = n()) == null ? void 0 : f.map((m, h) => /* @__PURE__ */ l(
575
+ ht,
564
576
  {
565
577
  repeatContext: m.context,
566
578
  block: m.block,
@@ -568,7 +580,7 @@ function N(e) {
568
580
  },
569
581
  h
570
582
  )) }) : null,
571
- !L(i()) && !n() ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ C(
583
+ !W(i()) && !n() ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ C(
572
584
  J,
573
585
  {
574
586
  Wrapper: i(),
@@ -576,12 +588,24 @@ function N(e) {
576
588
  context: e.context,
577
589
  hasChildren: !0,
578
590
  children: [
579
- /* @__PURE__ */ l(Q, { ...c() }),
591
+ /* @__PURE__ */ l(
592
+ Q,
593
+ {
594
+ componentRef: s().componentRef,
595
+ componentOptions: s().componentOptions,
596
+ blockChildren: s().blockChildren,
597
+ context: s().context,
598
+ registeredComponents: s().registeredComponents,
599
+ builderBlock: s().builderBlock,
600
+ includeBlockProps: s().includeBlockProps,
601
+ isInteractive: s().isInteractive
602
+ }
603
+ ),
580
604
  (p = a()) == null ? void 0 : p.map((m) => /* @__PURE__ */ l(
581
605
  N,
582
606
  {
583
607
  block: m,
584
- context: s,
608
+ context: c,
585
609
  registeredComponents: e.registeredComponents
586
610
  },
587
611
  "block-" + m.id
@@ -590,7 +614,7 @@ function N(e) {
590
614
  H,
591
615
  {
592
616
  block: m,
593
- context: s
617
+ context: c
594
618
  },
595
619
  "block-style-" + m.id
596
620
  ))
@@ -602,7 +626,7 @@ function N(e) {
602
626
  function D(e) {
603
627
  var t, n;
604
628
  return /* @__PURE__ */ C(
605
- Fe,
629
+ Oe,
606
630
  {
607
631
  blocks: e.blocks,
608
632
  parent: e.parent,
@@ -643,16 +667,16 @@ function gt(e) {
643
667
  desktopStyle: y
644
668
  }) {
645
669
  return o === "tablet" ? u : y;
646
- }, c = function({
670
+ }, s = function({
647
671
  stackedStyle: u,
648
672
  desktopStyle: y
649
673
  }) {
650
674
  return o === "never" ? y : u;
651
- }, s = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", d = function() {
675
+ }, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", d = function() {
652
676
  return {
653
- "--flex-dir": s,
677
+ "--flex-dir": c,
654
678
  "--flex-dir-tablet": a({
655
- stackedStyle: s,
679
+ stackedStyle: c,
656
680
  desktopStyle: "row"
657
681
  })
658
682
  };
@@ -661,11 +685,11 @@ function gt(e) {
661
685
  return {
662
686
  width: S,
663
687
  ["marginLeft"]: g,
664
- "--column-width-mobile": c({
688
+ "--column-width-mobile": s({
665
689
  stackedStyle: A,
666
690
  desktopStyle: S
667
691
  }),
668
- "--column-margin-left-mobile": c({
692
+ "--column-margin-left-mobile": s({
669
693
  stackedStyle: R,
670
694
  desktopStyle: g
671
695
  }),
@@ -680,7 +704,7 @@ function gt(e) {
680
704
  };
681
705
  }, p = function(u) {
682
706
  var S, g;
683
- return de(
707
+ return me(
684
708
  ((g = (S = e.builderContext.content) == null ? void 0 : S.meta) == null ? void 0 : g.breakpoints) || {}
685
709
  )[u].max;
686
710
  }, b = function() {
@@ -714,14 +738,14 @@ function gt(e) {
714
738
  /* @__PURE__ */ C(
715
739
  "div",
716
740
  {
717
- className: `builder-columns ${e.builderBlock.id}-breakpoints div-666689ca`,
741
+ className: `builder-columns ${e.builderBlock.id}-breakpoints div-0d69fe26`,
718
742
  style: d(),
719
743
  children: [
720
- /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(O, { styles: b() }) }),
721
- (m = e.columns) == null ? void 0 : m.map((h, u) => /* @__PURE__ */ Pe(
744
+ /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(F, { styles: b() }) }),
745
+ (m = e.columns) == null ? void 0 : m.map((h, u) => /* @__PURE__ */ Ve(
722
746
  "div",
723
747
  {
724
- className: "builder-column div-666689ca-2",
748
+ className: "builder-column div-0d69fe26-2",
725
749
  style: f(u),
726
750
  key: u
727
751
  },
@@ -742,10 +766,10 @@ function gt(e) {
742
766
  ]
743
767
  }
744
768
  ),
745
- /* @__PURE__ */ l("style", { children: `.div-666689ca {
769
+ /* @__PURE__ */ l("style", { children: `.div-0d69fe26 {
746
770
  display: flex;
747
771
  line-height: normal;
748
- }.div-666689ca-2 {
772
+ }.div-0d69fe26-2 {
749
773
  display: flex;
750
774
  flex-direction: column;
751
775
  align-items: stretch;
@@ -782,98 +806,142 @@ function _n(e) {
782
806
  }
783
807
  return e.match(/cdn\.shopify\.com/) ? t.map((n) => [bt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
784
808
  }
785
- const $ = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
786
- ...t,
787
- testVariationId: t.id,
788
- id: e == null ? void 0 : e.id
789
- })), yt = ({
790
- canTrack: e,
791
- content: t
792
- }) => !(!($(t).length > 0) || !e || v());
793
- function xt(e, t, n) {
794
- var a;
795
- function o() {
796
- function c(h, u, y) {
797
- let S = "";
798
- if (y) {
799
- const g = /* @__PURE__ */ new Date();
800
- g.setTime(g.getTime() + y * 24 * 60 * 60 * 1e3), S = "; expires=" + g.toUTCString();
801
- }
802
- document.cookie = h + "=" + (u || "") + S + "; path=/; Secure; SameSite=None";
803
- }
804
- function s(h) {
805
- const u = h + "=", y = document.cookie.split(";");
806
- for (let S = 0; S < y.length; S++) {
807
- let g = y[S];
808
- for (; g.charAt(0) === " "; )
809
- g = g.substring(1, g.length);
810
- if (g.indexOf(u) === 0)
811
- return g.substring(u.length, g.length);
812
- }
813
- return null;
814
- }
815
- const d = `builder.tests.${e}`, f = s(d), p = t.map((h) => h.id).concat(e);
816
- if (f && p.includes(f))
817
- return f;
818
- let b = 0;
819
- const m = Math.random();
820
- for (let h = 0; h < t.length; h++) {
821
- const u = t[h], y = u.testRatio;
822
- if (b += y, m < b)
823
- return c(d, u.id), u.id;
824
- }
825
- return c(d, e), e;
809
+ const yt = (e) => {
810
+ if (e === "localhost" || e === "127.0.0.1")
811
+ return e;
812
+ const t = e.split(".");
813
+ return t.length > 2 ? t.slice(1).join(".") : e;
814
+ }, he = ({
815
+ name: e,
816
+ canTrack: t
817
+ }) => {
818
+ var n;
819
+ try {
820
+ return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
821
+ } catch (o) {
822
+ k.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
823
+ return;
826
824
  }
827
- const i = o(), r = (a = document.currentScript) == null ? void 0 : a.previousElementSibling;
828
- if (n) {
829
- r.remove();
830
- const c = document.currentScript;
831
- c == null || c.remove();
832
- } else {
833
- const c = t.concat({
834
- id: e
835
- }).filter((s) => s.id !== i).map((s) => `.variant-${s.id} { display: none; }
836
- `).join("");
837
- r.innerHTML = c;
838
- }
839
- }
840
- function St(e, t, n) {
841
- var s;
842
- if (!navigator.cookieEnabled)
843
- return;
844
- function o(d) {
845
- const f = d + "=", p = document.cookie.split(";");
846
- for (let b = 0; b < p.length; b++) {
847
- let m = p[b];
848
- for (; m.charAt(0) === " "; )
849
- m = m.substring(1, m.length);
850
- if (m.indexOf(f) === 0)
851
- return m.substring(f.length, m.length);
852
- }
853
- return null;
854
- }
855
- const i = `builder.tests.${t}`, r = o(i), a = (s = document.currentScript) == null ? void 0 : s.parentElement, c = e === t;
856
- if (r === e) {
857
- if (c)
825
+ }, ge = async (e) => he(e), xt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "), St = [["secure", ""], ["SameSite", "None"]], vt = ({
826
+ name: e,
827
+ value: t,
828
+ expires: n
829
+ }) => {
830
+ const i = (v() ? location.protocol === "https:" : !0) ? St : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", yt(window.location.hostname)], ...i];
831
+ return xt(a);
832
+ }, pe = async ({
833
+ name: e,
834
+ value: t,
835
+ expires: n,
836
+ canTrack: o
837
+ }) => {
838
+ try {
839
+ if (!o)
858
840
  return;
859
- a == null || a.removeAttribute("hidden"), a == null || a.removeAttribute("aria-hidden");
860
- } else {
861
- c && (n ? a == null || a.remove() : (a == null || a.setAttribute("hidden", "true"), a == null || a.setAttribute("aria-hidden", "true")));
862
- return;
841
+ const i = vt({
842
+ name: e,
843
+ value: t,
844
+ expires: n
845
+ });
846
+ document.cookie = i;
847
+ } catch (i) {
848
+ k.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
863
849
  }
864
- }
865
- const vt = (e) => e === "react" || e === "reactNative", he = vt(T), ge = "builderIoAbTest", pe = "builderIoRenderContent", kt = () => {
866
- const e = xt.toString().replace(/\s+/g, " "), t = St.toString().replace(/\s+/g, " ");
867
- return `
868
- window.${ge} = ${e}
869
- window.${pe} = ${t}
870
- `;
871
- }, wt = (e, t) => `
872
- window.${ge}("${t}",${JSON.stringify(e)}, ${he})`, Ct = ({
850
+ }, kt = "builder.tests", z = (e) => `${kt}.${e}`, wt = ({
851
+ contentId: e
852
+ }) => ge({
853
+ name: z(e),
854
+ canTrack: !0
855
+ }), Ct = ({
856
+ contentId: e
857
+ }) => he({
858
+ name: z(e),
859
+ canTrack: !0
860
+ }), It = ({
873
861
  contentId: e,
874
- variationId: t
875
- }) => `
876
- window.${pe}("${t}", "${e}", ${he})`, It = {
862
+ value: t
863
+ }) => pe({
864
+ name: z(e),
865
+ value: t,
866
+ canTrack: !0
867
+ }), be = (e) => I(e.id) && I(e.variations) && Object.keys(e.variations).length > 0, Tt = ({
868
+ id: e,
869
+ variations: t
870
+ }) => {
871
+ var i;
872
+ let n = 0;
873
+ const o = Math.random();
874
+ for (const r in t) {
875
+ const a = (i = t[r]) == null ? void 0 : i.testRatio;
876
+ if (n += a, o < n)
877
+ return r;
878
+ }
879
+ return e;
880
+ }, ye = (e) => {
881
+ const t = Tt(e);
882
+ return It({
883
+ contentId: e.id,
884
+ value: t
885
+ }).catch((n) => {
886
+ k.error("could not store A/B test variation: ", n);
887
+ }), t;
888
+ }, xe = ({
889
+ item: e,
890
+ testGroupId: t
891
+ }) => {
892
+ const n = e.variations[t];
893
+ return t === e.id || // handle edge-case where `testGroupId` points to non-existing variation
894
+ !n ? {
895
+ testVariationId: e.id,
896
+ testVariationName: "Default"
897
+ } : {
898
+ data: n.data,
899
+ testVariationId: n.id,
900
+ testVariationName: n.name || (n.id === e.id ? "Default" : "")
901
+ };
902
+ }, Rt = ({
903
+ item: e,
904
+ canTrack: t
905
+ }) => {
906
+ if (!t)
907
+ return e;
908
+ if (!e)
909
+ return;
910
+ if (!be(e))
911
+ return e;
912
+ const n = Ct({
913
+ contentId: e.id
914
+ }) || ye({
915
+ variations: e.variations,
916
+ id: e.id
917
+ }), o = xe({
918
+ item: e,
919
+ testGroupId: n
920
+ });
921
+ return {
922
+ ...e,
923
+ ...o
924
+ };
925
+ }, Et = async ({
926
+ item: e,
927
+ canTrack: t
928
+ }) => {
929
+ if (!t || !be(e))
930
+ return e;
931
+ const o = await wt({
932
+ contentId: e.id
933
+ }) || ye({
934
+ variations: e.variations,
935
+ id: e.id
936
+ }), i = xe({
937
+ item: e,
938
+ testGroupId: o
939
+ });
940
+ return {
941
+ ...e,
942
+ ...i
943
+ };
944
+ }, U = (e) => I(e) ? e : !0, At = {
877
945
  name: "Core:Button",
878
946
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
879
947
  defaultStyles: {
@@ -906,7 +974,7 @@ const vt = (e) => e === "react" || e === "reactNative", he = vt(T), ge = "builde
906
974
  }],
907
975
  static: !0,
908
976
  noWrap: !0
909
- }, Tt = {
977
+ }, Bt = {
910
978
  // TODO: ways to statically preprocess JSON for references, functions, etc
911
979
  name: "Columns",
912
980
  isRSC: !0,
@@ -1085,7 +1153,7 @@ const vt = (e) => e === "react" || e === "reactNative", he = vt(T), ge = "builde
1085
1153
  });
1086
1154
  }
1087
1155
  const n = e.get("columns");
1088
- Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((r) => !r.get("width")) || n.reduce((c, s) => c + s.get("width"), 0) !== 100) && t();
1156
+ Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((r) => !r.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
1089
1157
  }
1090
1158
  }, {
1091
1159
  name: "space",
@@ -1107,13 +1175,60 @@ const vt = (e) => e === "react" || e === "reactNative", he = vt(T), ge = "builde
1107
1175
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1108
1176
  advanced: !0
1109
1177
  }]
1110
- }, Rt = {
1178
+ }, Pt = {
1179
+ name: "Custom Code",
1180
+ static: !0,
1181
+ requiredPermissions: ["editCode"],
1182
+ inputs: [{
1183
+ name: "code",
1184
+ type: "html",
1185
+ required: !0,
1186
+ defaultValue: "<p>Hello there, I am custom HTML code!</p>",
1187
+ code: !0
1188
+ }, {
1189
+ name: "replaceNodes",
1190
+ type: "boolean",
1191
+ helperText: "Preserve server rendered dom nodes",
1192
+ advanced: !0
1193
+ }, {
1194
+ name: "scriptsClientOnly",
1195
+ type: "boolean",
1196
+ defaultValue: !1,
1197
+ helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1198
+ advanced: !0
1199
+ }]
1200
+ }, Vt = {
1201
+ name: "Embed",
1202
+ static: !0,
1203
+ inputs: [{
1204
+ name: "url",
1205
+ type: "url",
1206
+ required: !0,
1207
+ defaultValue: "",
1208
+ helperText: "e.g. enter a youtube url, google map, etc",
1209
+ onChange: (e) => {
1210
+ const t = e.get("url");
1211
+ if (t)
1212
+ return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((o) => o.json()).then((o) => {
1213
+ e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
1214
+ }).catch((o) => {
1215
+ e.set("content", "There was an error embedding this URL, please try again or another URL");
1216
+ });
1217
+ e.delete("content");
1218
+ }
1219
+ }, {
1220
+ name: "content",
1221
+ type: "html",
1222
+ defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1223
+ hideFromUI: !0
1224
+ }]
1225
+ }, $t = ["text/javascript", "application/javascript", "application/ecmascript"], jn = (e) => $t.includes(e.type), Ot = {
1111
1226
  name: "Fragment",
1112
1227
  static: !0,
1113
1228
  hidden: !0,
1114
1229
  canHaveChildren: !0,
1115
1230
  noWrap: !0
1116
- }, Et = {
1231
+ }, Ft = {
1117
1232
  name: "Image",
1118
1233
  static: !0,
1119
1234
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
@@ -1133,17 +1248,17 @@ const vt = (e) => e === "react" || e === "reactNative", he = vt(T), ge = "builde
1133
1248
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1134
1249
  onChange: (e) => {
1135
1250
  e.delete("srcset"), e.delete("noWebp");
1136
- function n(a, c = 6e4) {
1137
- return new Promise((s, d) => {
1251
+ function n(a, s = 6e4) {
1252
+ return new Promise((c, d) => {
1138
1253
  const f = document.createElement("img");
1139
1254
  let p = !1;
1140
1255
  f.onload = () => {
1141
- p = !0, s(f);
1256
+ p = !0, c(f);
1142
1257
  }, f.addEventListener("error", (b) => {
1143
1258
  console.warn("Image load failed", b.error), d(b.error);
1144
1259
  }), f.src = a, setTimeout(() => {
1145
1260
  p || d(new Error("Image load timed out"));
1146
- }, c);
1261
+ }, s);
1147
1262
  });
1148
1263
  }
1149
1264
  function o(a) {
@@ -1154,8 +1269,8 @@ const vt = (e) => e === "react" || e === "reactNative", he = vt(T), ge = "builde
1154
1269
  a.type.includes("svg") && e.set("noWebp", !0);
1155
1270
  }), i && (!r || r === 0.7041))
1156
1271
  return n(i).then((a) => {
1157
- const c = e.get("aspectRatio");
1158
- e.get("image") === i && (!c || c === 0.7041) && a.width && a.height && (e.set("aspectRatio", o(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
1272
+ const s = e.get("aspectRatio");
1273
+ e.get("image") === i && (!s || s === 0.7041) && a.width && a.height && (e.set("aspectRatio", o(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
1159
1274
  });
1160
1275
  }
1161
1276
  }, {
@@ -1213,7 +1328,21 @@ const vt = (e) => e === "react" || e === "reactNative", he = vt(T), ge = "builde
1213
1328
  advanced: !0,
1214
1329
  defaultValue: 0.7041
1215
1330
  }]
1216
- }, At = {
1331
+ }, Nt = {
1332
+ // friendlyName?
1333
+ name: "Raw:Img",
1334
+ hideFromInsertMenu: !0,
1335
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
1336
+ inputs: [{
1337
+ name: "image",
1338
+ bubble: !0,
1339
+ type: "file",
1340
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
1341
+ required: !0
1342
+ }],
1343
+ noWrap: !0,
1344
+ static: !0
1345
+ }, Wt = {
1217
1346
  name: "Core:Section",
1218
1347
  static: !0,
1219
1348
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1252,7 +1381,7 @@ const vt = (e) => e === "react" || e === "reactNative", he = vt(T), ge = "builde
1252
1381
  }
1253
1382
  }
1254
1383
  }]
1255
- }, Vt = {
1384
+ }, Lt = {
1256
1385
  name: "Symbol",
1257
1386
  noWrap: !0,
1258
1387
  static: !0,
@@ -1285,7 +1414,7 @@ const vt = (e) => e === "react" || e === "reactNative", he = vt(T), ge = "builde
1285
1414
  hideFromUI: !0,
1286
1415
  type: "boolean"
1287
1416
  }]
1288
- }, $t = {
1417
+ }, Ut = {
1289
1418
  name: "Text",
1290
1419
  static: !0,
1291
1420
  isRSC: !0,
@@ -1304,7 +1433,7 @@ const vt = (e) => e === "react" || e === "reactNative", he = vt(T), ge = "builde
1304
1433
  textAlign: "center"
1305
1434
  }
1306
1435
  };
1307
- function Pt(e) {
1436
+ function Mt(e) {
1308
1437
  var t;
1309
1438
  return /* @__PURE__ */ l(
1310
1439
  "div",
@@ -1317,7 +1446,7 @@ function Pt(e) {
1317
1446
  }
1318
1447
  );
1319
1448
  }
1320
- const Bt = {
1449
+ const _t = {
1321
1450
  name: "Video",
1322
1451
  canHaveChildren: !0,
1323
1452
  defaultStyles: {
@@ -1398,342 +1527,397 @@ const Bt = {
1398
1527
  defaultValue: !0,
1399
1528
  advanced: !0
1400
1529
  }]
1401
- }, Ft = {
1402
- name: "Embed",
1403
- static: !0,
1404
- inputs: [{
1405
- name: "url",
1406
- type: "url",
1407
- required: !0,
1408
- defaultValue: "",
1409
- helperText: "e.g. enter a youtube url, google map, etc",
1410
- onChange: (e) => {
1411
- const t = e.get("url");
1412
- if (t)
1413
- return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((o) => o.json()).then((o) => {
1414
- e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
1415
- }).catch((o) => {
1416
- e.set("content", "There was an error embedding this URL, please try again or another URL");
1417
- });
1418
- e.delete("content");
1419
- }
1420
- }, {
1421
- name: "content",
1422
- type: "html",
1423
- defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1424
- hideFromUI: !0
1425
- }]
1426
- }, Ot = ["text/javascript", "application/javascript", "application/ecmascript"], jn = (e) => Ot.includes(e.type), Nt = {
1427
- // friendlyName?
1428
- name: "Raw:Img",
1429
- hideFromInsertMenu: !0,
1430
- image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
1431
- inputs: [{
1432
- name: "image",
1433
- bubble: !0,
1434
- type: "file",
1435
- allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
1436
- required: !0
1437
- }],
1438
- noWrap: !0,
1439
- static: !0
1440
- }, Wt = {
1441
- name: "Custom Code",
1442
- static: !0,
1443
- requiredPermissions: ["editCode"],
1444
- inputs: [{
1445
- name: "code",
1446
- type: "html",
1447
- required: !0,
1448
- defaultValue: "<p>Hello there, I am custom HTML code!</p>",
1449
- code: !0
1450
- }, {
1451
- name: "replaceNodes",
1452
- type: "boolean",
1453
- helperText: "Preserve server rendered dom nodes",
1454
- advanced: !0
1455
- }, {
1456
- name: "scriptsClientOnly",
1457
- type: "boolean",
1458
- defaultValue: !1,
1459
- helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1460
- advanced: !0
1461
- }]
1462
1530
  }, ee = () => [{
1463
- component: Oe,
1464
- ...It
1531
+ component: Fe,
1532
+ ...At
1465
1533
  }, {
1466
1534
  component: gt,
1467
- ...Tt
1535
+ ...Bt
1468
1536
  }, {
1469
1537
  component: Ne,
1470
- ...Wt
1538
+ ...Pt
1471
1539
  }, {
1472
1540
  component: We,
1473
- ...Ft
1541
+ ...Vt
1474
1542
  }, {
1475
1543
  component: Le,
1476
- ...Rt
1544
+ ...Ot
1477
1545
  }, {
1478
1546
  component: Ue,
1479
- ...Et
1547
+ ...Ft
1480
1548
  }, {
1481
1549
  component: Me,
1482
1550
  ...Nt
1483
1551
  }, {
1484
1552
  component: _e,
1485
- ...At
1553
+ ...Wt
1486
1554
  }, {
1487
- component: Fn,
1488
- ...Vt
1555
+ component: On,
1556
+ ...Lt
1489
1557
  }, {
1490
- component: Pt,
1491
- ...$t
1558
+ component: Mt,
1559
+ ...Ut
1492
1560
  }, {
1493
1561
  component: je,
1494
- ...Bt
1562
+ ..._t
1495
1563
  }], te = [], Kn = (e) => ({
1496
1564
  type: "builder.registerComponent",
1497
- data: U(e)
1498
- }), Lt = (e) => {
1565
+ data: M(e)
1566
+ }), jt = (e) => {
1499
1567
  const t = e.toString().trim();
1500
1568
  return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
1501
- }, Ut = (e) => typeof e == "function" ? Lt(e) : F(e), U = ({
1569
+ }, Kt = (e) => typeof e == "function" ? jt(e) : O(e), M = ({
1502
1570
  inputs: e,
1503
1571
  ...t
1504
1572
  }) => ({
1505
- ...F(t),
1573
+ ...O(t),
1506
1574
  inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
1507
1575
  ...o,
1508
- [i]: Ut(r)
1576
+ [i]: Kt(r)
1509
1577
  }), {}))
1510
- }), Mt = (e) => {
1511
- var r;
1512
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((r = e == null ? void 0 : e.files) == null ? void 0 : r.regular);
1513
- let i = "";
1514
- if (o && t && n && (i += `
1515
- @font-face {
1516
- font-family: "${t}";
1517
- src: local("${n}"), url('${o}') format('woff2');
1518
- font-display: fallback;
1519
- font-weight: 400;
1578
+ }), P = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1579
+ ...t,
1580
+ testVariationId: t.id,
1581
+ id: e == null ? void 0 : e.id
1582
+ })), Ht = ({
1583
+ canTrack: e,
1584
+ content: t
1585
+ }) => !(!(P(t).length > 0) || !e || v());
1586
+ function Dt(e, t, n) {
1587
+ var a;
1588
+ function o() {
1589
+ function s(h, u, y) {
1590
+ let S = "";
1591
+ if (y) {
1592
+ const g = /* @__PURE__ */ new Date();
1593
+ g.setTime(g.getTime() + y * 24 * 60 * 60 * 1e3), S = "; expires=" + g.toUTCString();
1594
+ }
1595
+ document.cookie = h + "=" + (u || "") + S + "; path=/; Secure; SameSite=None";
1596
+ }
1597
+ function c(h) {
1598
+ const u = h + "=", y = document.cookie.split(";");
1599
+ for (let S = 0; S < y.length; S++) {
1600
+ let g = y[S];
1601
+ for (; g.charAt(0) === " "; )
1602
+ g = g.substring(1, g.length);
1603
+ if (g.indexOf(u) === 0)
1604
+ return g.substring(u.length, g.length);
1605
+ }
1606
+ return null;
1607
+ }
1608
+ const d = `builder.tests.${e}`, f = c(d), p = t.map((h) => h.id).concat(e);
1609
+ if (f && p.includes(f))
1610
+ return f;
1611
+ let b = 0;
1612
+ const m = Math.random();
1613
+ for (let h = 0; h < t.length; h++) {
1614
+ const u = t[h], y = u.testRatio;
1615
+ if (b += y, m < b)
1616
+ return s(d, u.id), u.id;
1617
+ }
1618
+ return s(d, e), e;
1619
+ }
1620
+ const i = o(), r = (a = document.currentScript) == null ? void 0 : a.previousElementSibling;
1621
+ if (n) {
1622
+ r.remove();
1623
+ const s = document.currentScript;
1624
+ s == null || s.remove();
1625
+ } else {
1626
+ const s = t.concat({
1627
+ id: e
1628
+ }).filter((c) => c.id !== i).map((c) => `.variant-${c.id} { display: none; }
1629
+ `).join("");
1630
+ r.innerHTML = s;
1631
+ }
1520
1632
  }
1521
- `.trim()), e.files)
1522
- for (const a in e.files) {
1523
- if (!(String(Number(a)) === a))
1524
- continue;
1525
- const s = e.files[a];
1526
- s && s !== o && (i += `
1527
- @font-face {
1528
- font-family: "${t}";
1529
- src: url('${s}') format('woff2');
1530
- font-display: fallback;
1531
- font-weight: ${a};
1633
+ function zt(e, t, n) {
1634
+ var c;
1635
+ if (!navigator.cookieEnabled)
1636
+ return;
1637
+ function o(d) {
1638
+ const f = d + "=", p = document.cookie.split(";");
1639
+ for (let b = 0; b < p.length; b++) {
1640
+ let m = p[b];
1641
+ for (; m.charAt(0) === " "; )
1642
+ m = m.substring(1, m.length);
1643
+ if (m.indexOf(f) === 0)
1644
+ return m.substring(f.length, m.length);
1645
+ }
1646
+ return null;
1647
+ }
1648
+ const i = `builder.tests.${t}`, r = o(i), a = (c = document.currentScript) == null ? void 0 : c.parentElement, s = e === t;
1649
+ if (r === e) {
1650
+ if (s)
1651
+ return;
1652
+ a == null || a.removeAttribute("hidden"), a == null || a.removeAttribute("aria-hidden");
1653
+ } else {
1654
+ s && (n ? a == null || a.remove() : (a == null || a.setAttribute("hidden", "true"), a == null || a.setAttribute("aria-hidden", "true")));
1655
+ return;
1656
+ }
1532
1657
  }
1533
- `.trim());
1658
+ const qt = (e) => e === "react" || e === "reactNative", Se = qt(T), ve = "builderIoAbTest", ke = "builderIoRenderContent", Gt = () => {
1659
+ const e = Dt.toString().replace(/\s+/g, " "), t = zt.toString().replace(/\s+/g, " ");
1660
+ return `
1661
+ window.${ve} = ${e}
1662
+ window.${ke} = ${t}
1663
+ `;
1664
+ }, Jt = (e, t) => `
1665
+ window.${ve}("${t}",${JSON.stringify(e)}, ${Se})`, Yt = ({
1666
+ contentId: e,
1667
+ variationId: t
1668
+ }) => `
1669
+ window.${ke}("${t}", "${e}", ${Se})`;
1670
+ function _(e) {
1671
+ return /* @__PURE__ */ l(
1672
+ "script",
1673
+ {
1674
+ dangerouslySetInnerHTML: { __html: e.scriptStr },
1675
+ id: e.id
1534
1676
  }
1535
- return i;
1536
- }, _t = ({
1537
- customFonts: e
1538
- }) => {
1539
- var t;
1540
- return ((t = e == null ? void 0 : e.map((n) => Mt(n))) == null ? void 0 : t.join(" ")) || "";
1541
- }, jt = ({
1542
- cssCode: e,
1543
- contentId: t
1544
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
1545
- function Kt(e) {
1546
- const t = `
1547
- ${jt({
1548
- cssCode: e.cssCode,
1549
- contentId: e.contentId
1550
- })}
1551
- ${_t({
1552
- customFonts: e.customFonts
1553
- })}
1554
-
1555
- .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
1556
- margin: 0;
1677
+ );
1557
1678
  }
1558
- .builder-text > p, .builder-text > .builder-paragraph {
1559
- color: inherit;
1560
- line-height: inherit;
1561
- letter-spacing: inherit;
1562
- font-weight: inherit;
1563
- font-size: inherit;
1564
- text-align: inherit;
1565
- font-family: inherit;
1679
+ const Xt = (e) => {
1680
+ const t = e.get("preview"), n = e.get("overrides." + t);
1681
+ return n || k.warn("No previewed ID found in search params."), n;
1682
+ };
1683
+ function Qt() {
1684
+ globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Pe({
1685
+ max: 500,
1686
+ // how long to live in ms
1687
+ ttl: 1e3 * 60 * 5
1688
+ }));
1566
1689
  }
1567
- `.trim();
1568
- return /* @__PURE__ */ l(O, { styles: t });
1690
+ function Zt(e) {
1691
+ Qt();
1692
+ const t = Xt(e);
1693
+ return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
1569
1694
  }
1570
- const Ht = ({
1571
- content: e,
1572
- data: t,
1573
- locale: n
1574
- }) => {
1575
- var r, a, c;
1576
- const o = {};
1577
- (a = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || a.forEach((s) => {
1578
- var d;
1579
- s.name && s.defaultValue !== void 0 && ((d = e == null ? void 0 : e.data) != null && d.state) && e.data.state[s.name] === void 0 && (o[s.name] = s.defaultValue);
1580
- });
1581
- const i = {
1582
- ...(c = e == null ? void 0 : e.data) == null ? void 0 : c.state,
1583
- ...t,
1584
- ...n ? {
1585
- locale: n
1586
- } : {}
1587
- };
1588
- return {
1589
- ...o,
1590
- ...i
1591
- };
1592
- }, Dt = ({
1593
- content: e,
1594
- data: t
1595
- }) => e ? {
1596
- ...e,
1597
- data: {
1598
- ...e == null ? void 0 : e.data,
1599
- ...t
1600
- },
1601
- meta: e == null ? void 0 : e.meta
1602
- } : void 0;
1603
- function zt() {
1695
+ function en() {
1604
1696
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
1605
1697
  }
1606
- function qt() {
1607
- const e = zt().fetch;
1698
+ function tn() {
1699
+ const e = en().fetch;
1608
1700
  if (typeof e > "u")
1609
1701
  throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
1610
1702
  For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
1611
1703
  return e;
1612
1704
  }
1613
- const Gt = qt(), Jt = (e) => {
1614
- if (e === "localhost" || e === "127.0.0.1")
1615
- return e;
1616
- const t = e.split(".");
1617
- return t.length > 2 ? t.slice(1).join(".") : e;
1618
- }, be = ({
1619
- name: e,
1620
- canTrack: t
1621
- }) => {
1622
- var n;
1623
- try {
1624
- return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
1625
- } catch (o) {
1626
- k.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
1627
- return;
1705
+ const nn = tn();
1706
+ function V(e, t = null, n = ".") {
1707
+ return Object.keys(e).reduce((o, i) => {
1708
+ const r = e[i], a = [t, i].filter(Boolean).join(n);
1709
+ return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
1710
+ ...o,
1711
+ ...V(r, a, n)
1712
+ } : {
1713
+ ...o,
1714
+ [a]: r
1715
+ };
1716
+ }, {});
1717
+ }
1718
+ const on = "v3", ne = "builder.", rn = "options.", an = (e) => {
1719
+ const t = {};
1720
+ return e.forEach((n, o) => {
1721
+ t[o] = n;
1722
+ }), t;
1723
+ }, we = (e) => {
1724
+ if (!e)
1725
+ return {};
1726
+ const t = Ce(e), n = {};
1727
+ return Object.keys(t).forEach((o) => {
1728
+ if (o.startsWith(ne)) {
1729
+ const i = o.replace(ne, "").replace(rn, "");
1730
+ n[i] = t[o];
1731
+ }
1732
+ }), n;
1733
+ }, sn = () => {
1734
+ if (!v())
1735
+ return {};
1736
+ const e = new URLSearchParams(window.location.search);
1737
+ return we(e);
1738
+ }, Ce = (e) => e instanceof URLSearchParams ? an(e) : e, oe = (e) => typeof e == "number" && !isNaN(e) && e >= 0, q = (e) => {
1739
+ let {
1740
+ noTraverse: t = !1
1741
+ } = e;
1742
+ const {
1743
+ limit: n = 30,
1744
+ userAttributes: o,
1745
+ query: i,
1746
+ model: r,
1747
+ apiKey: a,
1748
+ includeRefs: s = !0,
1749
+ enrich: c,
1750
+ locale: d,
1751
+ apiVersion: f = on,
1752
+ fields: p,
1753
+ omit: b,
1754
+ offset: m,
1755
+ cacheSeconds: h,
1756
+ staleCacheSeconds: u,
1757
+ sort: y,
1758
+ includeUnpublished: S
1759
+ } = e;
1760
+ if (!a)
1761
+ throw new Error("Missing API key");
1762
+ if (!["v2", "v3"].includes(f))
1763
+ throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);
1764
+ (e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
1765
+ const g = new URL(`https://cdn.builder.io/api/${f}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${d ? `&locale=${d}` : ""}${c ? `&enrich=${c}` : ""}`);
1766
+ if (g.searchParams.set("omit", b || "meta.componentsUsed"), p && g.searchParams.set("fields", p), Number.isFinite(m) && m > -1 && g.searchParams.set("offset", String(Math.floor(m))), typeof S == "boolean" && g.searchParams.set("includeUnpublished", String(S)), h && oe(h) && g.searchParams.set("cacheSeconds", String(h)), u && oe(u) && g.searchParams.set("staleCacheSeconds", String(u)), y) {
1767
+ const w = V({
1768
+ sort: y
1769
+ });
1770
+ for (const E in w)
1771
+ g.searchParams.set(E, JSON.stringify(w[E]));
1628
1772
  }
1629
- }, ye = async (e) => be(e), Yt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "), Xt = [["secure", ""], ["SameSite", "None"]], Qt = ({
1630
- name: e,
1631
- value: t,
1632
- expires: n
1633
- }) => {
1634
- const i = (v() ? location.protocol === "https:" : !0) ? Xt : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", Jt(window.location.hostname)], ...i];
1635
- return Yt(a);
1636
- }, xe = async ({
1637
- name: e,
1638
- value: t,
1639
- expires: n,
1640
- canTrack: o
1641
- }) => {
1642
- try {
1643
- if (!o)
1644
- return;
1645
- const i = Qt({
1646
- name: e,
1647
- value: t,
1648
- expires: n
1773
+ const A = {
1774
+ ...sn(),
1775
+ ...Ce(e.options || {})
1776
+ }, R = V(A);
1777
+ for (const w in R)
1778
+ g.searchParams.set(w, String(R[w]));
1779
+ if (o && g.searchParams.set("userAttributes", JSON.stringify(o)), i) {
1780
+ const w = V({
1781
+ query: i
1649
1782
  });
1650
- document.cookie = i;
1651
- } catch (i) {
1652
- k.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
1783
+ for (const E in w)
1784
+ g.searchParams.set(E, JSON.stringify(w[E]));
1653
1785
  }
1654
- };
1655
- function Zt() {
1656
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1657
- const t = Math.random() * 16 | 0;
1658
- return (e == "x" ? t : t & 3 | 8).toString(16);
1786
+ return g;
1787
+ }, cn = (e) => "results" in e;
1788
+ async function G(e) {
1789
+ const t = await Ie({
1790
+ ...e,
1791
+ limit: 1
1659
1792
  });
1793
+ return t && t.results[0] || null;
1660
1794
  }
1661
- function Se() {
1662
- return Zt().replace(/-/g, "");
1663
- }
1664
- const ve = "builderSessionId", en = async ({
1665
- canTrack: e
1666
- }) => {
1667
- if (!e)
1668
- return;
1669
- const t = await ye({
1670
- name: ve,
1671
- canTrack: e
1672
- });
1673
- if (I(t))
1674
- return t;
1675
- {
1676
- const n = tn();
1677
- return nn({
1678
- id: n,
1679
- canTrack: e
1680
- }), n;
1681
- }
1682
- }, tn = () => Se(), nn = ({
1795
+ const Hn = G, ln = async (e) => {
1796
+ const t = q(e);
1797
+ return await (await nn(t.href)).json();
1798
+ }, un = async (e, t, n = q(e)) => {
1799
+ const o = U(e.canTrack);
1800
+ if (n.search.includes("preview=")) {
1801
+ const r = [];
1802
+ for (const a of t.results) {
1803
+ const s = Zt(n.searchParams);
1804
+ r.push(s || a);
1805
+ }
1806
+ t.results = r;
1807
+ }
1808
+ if (!o || !(v() || T === "reactNative"))
1809
+ return t;
1810
+ try {
1811
+ const r = [];
1812
+ for (const a of t.results)
1813
+ r.push(await Et({
1814
+ item: a,
1815
+ canTrack: o
1816
+ }));
1817
+ t.results = r;
1818
+ } catch (r) {
1819
+ k.error("Could not process A/B tests. ", r);
1820
+ }
1821
+ return t;
1822
+ };
1823
+ async function Ie(e) {
1824
+ try {
1825
+ const t = q(e), n = await ln(e);
1826
+ return cn(n) ? un(e, n) : (k.error("Error fetching data. ", {
1827
+ url: t,
1828
+ content: n,
1829
+ options: e
1830
+ }), null);
1831
+ } catch (t) {
1832
+ return k.error("Error fetching data. ", t), null;
1833
+ }
1834
+ }
1835
+ const Dn = Ie;
1836
+ function zn() {
1837
+ return !v() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
1838
+ }
1839
+ function dn() {
1840
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1841
+ const t = Math.random() * 16 | 0;
1842
+ return (e == "x" ? t : t & 3 | 8).toString(16);
1843
+ });
1844
+ }
1845
+ function Te() {
1846
+ return dn().replace(/-/g, "");
1847
+ }
1848
+ const Re = "builderSessionId", mn = async ({
1849
+ canTrack: e
1850
+ }) => {
1851
+ if (!e)
1852
+ return;
1853
+ const t = await ge({
1854
+ name: Re,
1855
+ canTrack: e
1856
+ });
1857
+ if (I(t))
1858
+ return t;
1859
+ {
1860
+ const n = fn();
1861
+ return hn({
1862
+ id: n,
1863
+ canTrack: e
1864
+ }), n;
1865
+ }
1866
+ }, fn = () => Te(), hn = ({
1683
1867
  id: e,
1684
1868
  canTrack: t
1685
- }) => xe({
1686
- name: ve,
1869
+ }) => pe({
1870
+ name: Re,
1687
1871
  value: e,
1688
1872
  canTrack: t
1689
- }), ke = () => v() && typeof localStorage < "u" ? localStorage : void 0, on = ({
1873
+ }), Ee = () => v() && typeof localStorage < "u" ? localStorage : void 0, gn = ({
1690
1874
  key: e,
1691
1875
  canTrack: t
1692
1876
  }) => {
1693
1877
  var n;
1694
1878
  try {
1695
- return t ? (n = ke()) == null ? void 0 : n.getItem(e) : void 0;
1879
+ return t ? (n = Ee()) == null ? void 0 : n.getItem(e) : void 0;
1696
1880
  } catch (o) {
1697
1881
  console.debug("[LocalStorage] GET error: ", o);
1698
1882
  return;
1699
1883
  }
1700
- }, rn = ({
1884
+ }, pn = ({
1701
1885
  key: e,
1702
1886
  canTrack: t,
1703
1887
  value: n
1704
1888
  }) => {
1705
1889
  var o;
1706
1890
  try {
1707
- t && ((o = ke()) == null || o.setItem(e, n));
1891
+ t && ((o = Ee()) == null || o.setItem(e, n));
1708
1892
  } catch (i) {
1709
1893
  console.debug("[LocalStorage] SET error: ", i);
1710
1894
  }
1711
- }, we = "builderVisitorId", an = ({
1895
+ }, Ae = "builderVisitorId", bn = ({
1712
1896
  canTrack: e
1713
1897
  }) => {
1714
1898
  if (!e)
1715
1899
  return;
1716
- const t = on({
1717
- key: we,
1900
+ const t = gn({
1901
+ key: Ae,
1718
1902
  canTrack: e
1719
1903
  });
1720
1904
  if (I(t))
1721
1905
  return t;
1722
1906
  {
1723
- const n = sn();
1724
- return cn({
1907
+ const n = yn();
1908
+ return xn({
1725
1909
  id: n,
1726
1910
  canTrack: e
1727
1911
  }), n;
1728
1912
  }
1729
- }, sn = () => Se(), cn = ({
1913
+ }, yn = () => Te(), xn = ({
1730
1914
  id: e,
1731
1915
  canTrack: t
1732
- }) => rn({
1733
- key: we,
1916
+ }) => pn({
1917
+ key: Ae,
1734
1918
  value: e,
1735
1919
  canTrack: t
1736
- }), ln = async ({
1920
+ }), Sn = async ({
1737
1921
  canTrack: e
1738
1922
  }) => {
1739
1923
  if (!e)
@@ -1741,16 +1925,16 @@ const ve = "builderSessionId", en = async ({
1741
1925
  visitorId: void 0,
1742
1926
  sessionId: void 0
1743
1927
  };
1744
- const t = await en({
1928
+ const t = await mn({
1745
1929
  canTrack: e
1746
- }), n = an({
1930
+ }), n = bn({
1747
1931
  canTrack: e
1748
1932
  });
1749
1933
  return {
1750
1934
  sessionId: t,
1751
1935
  visitorId: n
1752
1936
  };
1753
- }, un = async ({
1937
+ }, vn = async ({
1754
1938
  type: e,
1755
1939
  canTrack: t,
1756
1940
  apiKey: n,
@@ -1764,14 +1948,14 @@ const ve = "builderSessionId", en = async ({
1764
1948
  url: location.href,
1765
1949
  ...o
1766
1950
  },
1767
- ...await ln({
1951
+ ...await Sn({
1768
1952
  canTrack: t
1769
1953
  }),
1770
- userAttributes: me(),
1954
+ userAttributes: ue(),
1771
1955
  ownerId: n
1772
1956
  }
1773
1957
  });
1774
- async function dn(e) {
1958
+ async function kn(e) {
1775
1959
  if (!e.apiKey) {
1776
1960
  k.error("Missing API key for track call. Please provide your API key.");
1777
1961
  return;
@@ -1780,7 +1964,7 @@ async function dn(e) {
1780
1964
  return fetch("https://cdn.builder.io/api/v1/track", {
1781
1965
  method: "POST",
1782
1966
  body: JSON.stringify({
1783
- events: [await un(e)]
1967
+ events: [await vn(e)]
1784
1968
  }),
1785
1969
  headers: {
1786
1970
  "content-type": "application/json"
@@ -1790,13 +1974,56 @@ async function dn(e) {
1790
1974
  console.error("Failed to track: ", t);
1791
1975
  });
1792
1976
  }
1793
- const Hn = (e) => dn({
1977
+ const qn = (e) => kn({
1794
1978
  ...e,
1795
1979
  canTrack: !0
1796
- }), mn = "0.7.1-3", ne = {};
1797
- function fn(e, t) {
1798
- let n = ne[e];
1799
- if (n || (n = ne[e] = []), n.push(t), v()) {
1980
+ });
1981
+ function ie(e) {
1982
+ return Math.round(e * 1e3) / 1e3;
1983
+ }
1984
+ const wn = (e, t, n = !0) => {
1985
+ if (!(e instanceof HTMLElement))
1986
+ return null;
1987
+ let o = n ? e : e.parentElement;
1988
+ do {
1989
+ if (!o)
1990
+ return null;
1991
+ if (t(o))
1992
+ return o;
1993
+ } while (o = o.parentElement);
1994
+ return null;
1995
+ }, Cn = (e) => wn(e, (t) => {
1996
+ const n = t.getAttribute("builder-id") || t.id;
1997
+ return (n == null ? void 0 : n.indexOf("builder-")) === 0;
1998
+ }), re = ({
1999
+ event: e,
2000
+ target: t
2001
+ }) => {
2002
+ const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ie(o / n.width), a = ie(i / n.height);
2003
+ return {
2004
+ x: r,
2005
+ y: a
2006
+ };
2007
+ }, Gn = (e) => {
2008
+ const t = e.target, n = t && Cn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2009
+ return {
2010
+ targetBuilderElement: o || void 0,
2011
+ metadata: {
2012
+ targetOffset: t ? re({
2013
+ event: e,
2014
+ target: t
2015
+ }) : void 0,
2016
+ builderTargetOffset: n ? re({
2017
+ event: e,
2018
+ target: n
2019
+ }) : void 0,
2020
+ builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2021
+ }
2022
+ };
2023
+ }, In = "0.7.1", ae = {};
2024
+ function Tn(e, t) {
2025
+ let n = ae[e];
2026
+ if (n || (n = ae[e] = []), n.push(t), v()) {
1800
2027
  const o = {
1801
2028
  type: "builder.register",
1802
2029
  data: {
@@ -1811,8 +2038,8 @@ function fn(e, t) {
1811
2038
  }
1812
2039
  }
1813
2040
  }
1814
- const Dn = () => {
1815
- fn("insertMenu", {
2041
+ const Jn = () => {
2042
+ Tn("insertMenu", {
1816
2043
  name: "_default",
1817
2044
  default: !0,
1818
2045
  items: [{
@@ -1834,14 +2061,14 @@ const Dn = () => {
1834
2061
  }]
1835
2062
  });
1836
2063
  };
1837
- let oe = !1;
1838
- const zn = (e = {}) => {
2064
+ let se = !1;
2065
+ const Yn = (e = {}) => {
1839
2066
  var t, n;
1840
- oe || (oe = !0, v() && ((t = window.parent) == null || t.postMessage({
2067
+ se || (se = !0, v() && ((t = window.parent) == null || t.postMessage({
1841
2068
  type: "builder.sdkInfo",
1842
2069
  data: {
1843
2070
  target: T,
1844
- version: mn,
2071
+ version: In,
1845
2072
  supportsPatchUpdates: !1,
1846
2073
  // Supports builder-model="..." attribute which is needed to
1847
2074
  // scope our '+ add block' button styling
@@ -1860,17 +2087,17 @@ const zn = (e = {}) => {
1860
2087
  if (o != null && o.type)
1861
2088
  switch (o.type) {
1862
2089
  case "builder.evaluate": {
1863
- const a = o.data.text, c = o.data.arguments || [], s = o.data.id, d = new Function(a);
2090
+ const a = o.data.text, s = o.data.arguments || [], c = o.data.id, d = new Function(a);
1864
2091
  let f, p = null;
1865
2092
  try {
1866
- f = d.apply(null, c);
2093
+ f = d.apply(null, s);
1867
2094
  } catch (b) {
1868
2095
  p = b;
1869
2096
  }
1870
2097
  p ? (i = window.parent) == null || i.postMessage({
1871
2098
  type: "builder.evaluateError",
1872
2099
  data: {
1873
- id: s,
2100
+ id: c,
1874
2101
  error: p.message
1875
2102
  }
1876
2103
  }, "*") : f && typeof f.then == "function" ? f.then((b) => {
@@ -1878,7 +2105,7 @@ const zn = (e = {}) => {
1878
2105
  (m = window.parent) == null || m.postMessage({
1879
2106
  type: "builder.evaluateResult",
1880
2107
  data: {
1881
- id: s,
2108
+ id: c,
1882
2109
  result: b
1883
2110
  }
1884
2111
  }, "*");
@@ -1886,311 +2113,109 @@ const zn = (e = {}) => {
1886
2113
  type: "builder.evaluateResult",
1887
2114
  data: {
1888
2115
  result: f,
1889
- id: s
2116
+ id: c
1890
2117
  }
1891
2118
  }, "*");
1892
2119
  break;
1893
2120
  }
1894
2121
  }
1895
2122
  })));
1896
- };
1897
- function ie(e) {
1898
- return Math.round(e * 1e3) / 1e3;
2123
+ }, Rn = (e) => {
2124
+ var r;
2125
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((r = e == null ? void 0 : e.files) == null ? void 0 : r.regular);
2126
+ let i = "";
2127
+ if (o && t && n && (i += `
2128
+ @font-face {
2129
+ font-family: "${t}";
2130
+ src: local("${n}"), url('${o}') format('woff2');
2131
+ font-display: fallback;
2132
+ font-weight: 400;
1899
2133
  }
1900
- const hn = (e, t, n = !0) => {
1901
- if (!(e instanceof HTMLElement))
1902
- return null;
1903
- let o = n ? e : e.parentElement;
1904
- do {
1905
- if (!o)
1906
- return null;
1907
- if (t(o))
1908
- return o;
1909
- } while (o = o.parentElement);
1910
- return null;
1911
- }, gn = (e) => hn(e, (t) => {
1912
- const n = t.getAttribute("builder-id") || t.id;
1913
- return (n == null ? void 0 : n.indexOf("builder-")) === 0;
1914
- }), re = ({
1915
- event: e,
1916
- target: t
1917
- }) => {
1918
- const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ie(o / n.width), a = ie(i / n.height);
1919
- return {
1920
- x: r,
1921
- y: a
1922
- };
1923
- }, qn = (e) => {
1924
- const t = e.target, n = t && gn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1925
- return {
1926
- targetBuilderElement: o || void 0,
1927
- metadata: {
1928
- targetOffset: t ? re({
1929
- event: e,
1930
- target: t
1931
- }) : void 0,
1932
- builderTargetOffset: n ? re({
1933
- event: e,
1934
- target: n
1935
- }) : void 0,
1936
- builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2134
+ `.trim()), e.files)
2135
+ for (const a in e.files) {
2136
+ if (!(String(Number(a)) === a))
2137
+ continue;
2138
+ const c = e.files[a];
2139
+ c && c !== o && (i += `
2140
+ @font-face {
2141
+ font-family: "${t}";
2142
+ src: url('${c}') format('woff2');
2143
+ font-display: fallback;
2144
+ font-weight: ${a};
2145
+ }
2146
+ `.trim());
1937
2147
  }
1938
- };
1939
- }, pn = "builder.tests", z = (e) => `${pn}.${e}`, bn = ({
1940
- contentId: e
1941
- }) => ye({
1942
- name: z(e),
1943
- canTrack: !0
1944
- }), yn = ({
1945
- contentId: e
1946
- }) => be({
1947
- name: z(e),
1948
- canTrack: !0
1949
- }), xn = ({
1950
- contentId: e,
1951
- value: t
1952
- }) => xe({
1953
- name: z(e),
1954
- value: t,
1955
- canTrack: !0
1956
- }), Ce = (e) => I(e.id) && I(e.variations) && Object.keys(e.variations).length > 0, Sn = ({
1957
- id: e,
1958
- variations: t
1959
- }) => {
1960
- var i;
1961
- let n = 0;
1962
- const o = Math.random();
1963
- for (const r in t) {
1964
- const a = (i = t[r]) == null ? void 0 : i.testRatio;
1965
- if (n += a, o < n)
1966
- return r;
1967
- }
1968
- return e;
1969
- }, Ie = (e) => {
1970
- const t = Sn(e);
1971
- return xn({
1972
- contentId: e.id,
1973
- value: t
1974
- }).catch((n) => {
1975
- k.error("could not store A/B test variation: ", n);
1976
- }), t;
1977
- }, Te = ({
1978
- item: e,
1979
- testGroupId: t
2148
+ return i;
2149
+ }, En = ({
2150
+ customFonts: e
1980
2151
  }) => {
1981
- const n = e.variations[t];
1982
- return t === e.id || // handle edge-case where `testGroupId` points to non-existing variation
1983
- !n ? {
1984
- testVariationId: e.id,
1985
- testVariationName: "Default"
1986
- } : {
1987
- data: n.data,
1988
- testVariationId: n.id,
1989
- testVariationName: n.name || (n.id === e.id ? "Default" : "")
1990
- };
1991
- }, vn = ({
1992
- item: e,
1993
- canTrack: t
2152
+ var t;
2153
+ return ((t = e == null ? void 0 : e.map((n) => Rn(n))) == null ? void 0 : t.join(" ")) || "";
2154
+ }, An = ({
2155
+ cssCode: e,
2156
+ contentId: t
2157
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
2158
+ function Bn(e) {
2159
+ const t = `
2160
+ ${An({
2161
+ cssCode: e.cssCode,
2162
+ contentId: e.contentId
2163
+ })}
2164
+ ${En({
2165
+ customFonts: e.customFonts
2166
+ })}
2167
+
2168
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
2169
+ margin: 0;
2170
+ }
2171
+ .builder-text > p, .builder-text > .builder-paragraph {
2172
+ color: inherit;
2173
+ line-height: inherit;
2174
+ letter-spacing: inherit;
2175
+ font-weight: inherit;
2176
+ font-size: inherit;
2177
+ text-align: inherit;
2178
+ font-family: inherit;
2179
+ }
2180
+ `.trim();
2181
+ return /* @__PURE__ */ l(F, { styles: t });
2182
+ }
2183
+ const Pn = ({
2184
+ content: e,
2185
+ data: t,
2186
+ locale: n
1994
2187
  }) => {
1995
- if (!t)
1996
- return e;
1997
- if (!e)
1998
- return;
1999
- if (!Ce(e))
2000
- return e;
2001
- const n = yn({
2002
- contentId: e.id
2003
- }) || Ie({
2004
- variations: e.variations,
2005
- id: e.id
2006
- }), o = Te({
2007
- item: e,
2008
- testGroupId: n
2188
+ var r, a, s;
2189
+ const o = {};
2190
+ (a = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || a.forEach((c) => {
2191
+ var d;
2192
+ c.name && c.defaultValue !== void 0 && ((d = e == null ? void 0 : e.data) != null && d.state) && e.data.state[c.name] === void 0 && (o[c.name] = c.defaultValue);
2009
2193
  });
2010
- return {
2011
- ...e,
2012
- ...o
2194
+ const i = {
2195
+ ...(s = e == null ? void 0 : e.data) == null ? void 0 : s.state,
2196
+ ...t,
2197
+ ...n ? {
2198
+ locale: n
2199
+ } : {}
2013
2200
  };
2014
- }, kn = async ({
2015
- item: e,
2016
- canTrack: t
2017
- }) => {
2018
- if (!t || !Ce(e))
2019
- return e;
2020
- const o = await bn({
2021
- contentId: e.id
2022
- }) || Ie({
2023
- variations: e.variations,
2024
- id: e.id
2025
- }), i = Te({
2026
- item: e,
2027
- testGroupId: o
2028
- });
2029
2201
  return {
2030
- ...e,
2202
+ ...o,
2031
2203
  ...i
2032
2204
  };
2033
- }, M = (e) => I(e) ? e : !0, wn = (e) => {
2034
- const t = e.get("preview"), n = e.get("overrides." + t);
2035
- return n || k.warn("No previewed ID found in search params."), n;
2036
- };
2037
- function Cn() {
2038
- globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new $e({
2039
- max: 500,
2040
- // how long to live in ms
2041
- ttl: 1e3 * 60 * 5
2042
- }));
2043
- }
2044
- function In(e) {
2045
- Cn();
2046
- const t = wn(e);
2047
- return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
2048
- }
2049
- function P(e, t = null, n = ".") {
2050
- return Object.keys(e).reduce((o, i) => {
2051
- const r = e[i], a = [t, i].filter(Boolean).join(n);
2052
- return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
2053
- ...o,
2054
- ...P(r, a, n)
2055
- } : {
2056
- ...o,
2057
- [a]: r
2058
- };
2059
- }, {});
2060
- }
2061
- const ae = "builder.", Tn = "options.", Rn = (e) => {
2062
- const t = {};
2063
- return e.forEach((n, o) => {
2064
- t[o] = n;
2065
- }), t;
2066
- }, Re = (e) => {
2067
- if (!e)
2068
- return {};
2069
- const t = Ee(e), n = {};
2070
- return Object.keys(t).forEach((o) => {
2071
- if (o.startsWith(ae)) {
2072
- const i = o.replace(ae, "").replace(Tn, "");
2073
- n[i] = t[o];
2074
- }
2075
- }), n;
2076
- }, En = () => {
2077
- if (!v())
2078
- return {};
2079
- const e = new URLSearchParams(window.location.search);
2080
- return Re(e);
2081
- }, Ee = (e) => e instanceof URLSearchParams ? Rn(e) : e, An = "v3", se = (e) => typeof e == "number" && !isNaN(e) && e >= 0, q = (e) => {
2082
- let {
2083
- noTraverse: t = !1
2084
- } = e;
2085
- const {
2086
- limit: n = 30,
2087
- userAttributes: o,
2088
- query: i,
2089
- model: r,
2090
- apiKey: a,
2091
- includeRefs: c = !0,
2092
- enrich: s,
2093
- locale: d,
2094
- apiVersion: f = An,
2095
- fields: p,
2096
- omit: b,
2097
- offset: m,
2098
- cacheSeconds: h,
2099
- staleCacheSeconds: u,
2100
- sort: y,
2101
- includeUnpublished: S
2102
- } = e;
2103
- if (!a)
2104
- throw new Error("Missing API key");
2105
- if (!["v2", "v3"].includes(f))
2106
- throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);
2107
- (e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
2108
- const g = new URL(`https://cdn.builder.io/api/${f}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${c}${d ? `&locale=${d}` : ""}${s ? `&enrich=${s}` : ""}`);
2109
- if (g.searchParams.set("omit", b || "meta.componentsUsed"), p && g.searchParams.set("fields", p), Number.isFinite(m) && m > -1 && g.searchParams.set("offset", String(Math.floor(m))), typeof S == "boolean" && g.searchParams.set("includeUnpublished", String(S)), h && se(h) && g.searchParams.set("cacheSeconds", String(h)), u && se(u) && g.searchParams.set("staleCacheSeconds", String(u)), y) {
2110
- const w = P({
2111
- sort: y
2112
- });
2113
- for (const E in w)
2114
- g.searchParams.set(E, JSON.stringify(w[E]));
2115
- }
2116
- const A = {
2117
- ...En(),
2118
- ...Ee(e.options || {})
2119
- }, R = P(A);
2120
- for (const w in R)
2121
- g.searchParams.set(w, String(R[w]));
2122
- if (o && g.searchParams.set("userAttributes", JSON.stringify(o)), i) {
2123
- const w = P({
2124
- query: i
2125
- });
2126
- for (const E in w)
2127
- g.searchParams.set(E, JSON.stringify(w[E]));
2128
- }
2129
- return g;
2130
- }, Vn = (e) => "results" in e;
2131
- async function G(e) {
2132
- const t = await Ae({
2133
- ...e,
2134
- limit: 1
2135
- });
2136
- return t && t.results[0] || null;
2137
- }
2138
- const Gn = G, $n = async (e) => {
2139
- const t = q(e);
2140
- return await (await Gt(t.href)).json();
2141
- }, Pn = async (e, t, n = q(e)) => {
2142
- const o = M(e.canTrack);
2143
- if (n.search.includes("preview=")) {
2144
- const r = [];
2145
- for (const a of t.results) {
2146
- const c = In(n.searchParams);
2147
- r.push(c || a);
2148
- }
2149
- t.results = r;
2150
- }
2151
- if (!o || !(v() || T === "reactNative"))
2152
- return t;
2153
- try {
2154
- const r = [];
2155
- for (const a of t.results)
2156
- r.push(await kn({
2157
- item: a,
2158
- canTrack: o
2159
- }));
2160
- t.results = r;
2161
- } catch (r) {
2162
- k.error("Could not process A/B tests. ", r);
2163
- }
2164
- return t;
2165
- };
2166
- async function Ae(e) {
2167
- try {
2168
- const t = q(e), n = await $n(e);
2169
- return Vn(n) ? Pn(e, n) : (k.error("Error fetching data. ", {
2170
- url: t,
2171
- content: n,
2172
- options: e
2173
- }), null);
2174
- } catch (t) {
2175
- return k.error("Error fetching data. ", t), null;
2176
- }
2177
- }
2178
- const Jn = Ae;
2179
- function Yn() {
2180
- return !v() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
2181
- }
2182
- function _(e) {
2183
- return /* @__PURE__ */ l(
2184
- "script",
2185
- {
2186
- dangerouslySetInnerHTML: { __html: e.scriptStr },
2187
- id: e.id
2188
- }
2189
- );
2190
- }
2205
+ }, Vn = ({
2206
+ content: e,
2207
+ data: t
2208
+ }) => e ? {
2209
+ ...e,
2210
+ data: {
2211
+ ...e == null ? void 0 : e.data,
2212
+ ...t
2213
+ },
2214
+ meta: e == null ? void 0 : e.meta
2215
+ } : void 0;
2191
2216
  function ce(e) {
2192
- var i, r, a, c, s, d, f, p, b;
2193
- const t = Ct({
2217
+ var i, r, a, s, c, d, f, p, b;
2218
+ const t = Yt({
2194
2219
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2195
2220
  variationId: (i = e.content) == null ? void 0 : i.testVariationId,
2196
2221
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
@@ -2209,17 +2234,17 @@ function ce(e) {
2209
2234
  ...m,
2210
2235
  [u.name]: {
2211
2236
  component: h,
2212
- ...U(u)
2237
+ ...M(u)
2213
2238
  }
2214
2239
  }),
2215
2240
  {}
2216
2241
  ), o = {
2217
- content: Dt({
2242
+ content: Vn({
2218
2243
  content: e.content,
2219
2244
  data: e.data
2220
2245
  }),
2221
2246
  localState: void 0,
2222
- rootState: Ht({
2247
+ rootState: Pn({
2223
2248
  content: e.content,
2224
2249
  data: e.data,
2225
2250
  locale: e.locale
@@ -2240,7 +2265,7 @@ function ce(e) {
2240
2265
  ].reduce(
2241
2266
  (m, { component: h, ...u }) => ({
2242
2267
  ...m,
2243
- [u.name]: U(u)
2268
+ [u.name]: M(u)
2244
2269
  }),
2245
2270
  {}
2246
2271
  ),
@@ -2263,10 +2288,10 @@ function ce(e) {
2263
2288
  children: [
2264
2289
  e.isSsrAbTest ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(_, { scriptStr: t }) }) : null,
2265
2290
  /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(
2266
- Kt,
2291
+ Bn,
2267
2292
  {
2268
2293
  contentId: (a = o.content) == null ? void 0 : a.id,
2269
- cssCode: (s = (c = o.content) == null ? void 0 : c.data) == null ? void 0 : s.cssCode,
2294
+ cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
2270
2295
  customFonts: (f = (d = o.content) == null ? void 0 : d.data) == null ? void 0 : f.customFonts
2271
2296
  }
2272
2297
  ) }),
@@ -2282,47 +2307,47 @@ function ce(e) {
2282
2307
  }
2283
2308
  );
2284
2309
  }
2285
- function Ve(e) {
2286
- var r, a, c;
2287
- const t = yt({
2288
- canTrack: M(e.canTrack),
2310
+ function Be(e) {
2311
+ var r, a, s;
2312
+ const t = Ht({
2313
+ canTrack: U(e.canTrack),
2289
2314
  content: e.content
2290
2315
  }), n = function() {
2291
2316
  var d;
2292
- return wt(
2293
- $(e.content).map((f) => ({
2317
+ return Jt(
2318
+ P(e.content).map((f) => ({
2294
2319
  id: f.testVariationId,
2295
2320
  testRatio: f.testRatio
2296
2321
  })),
2297
2322
  ((d = e.content) == null ? void 0 : d.id) || ""
2298
2323
  );
2299
2324
  }, o = function() {
2300
- return $(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
2325
+ return P(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
2301
2326
  }, i = function() {
2302
2327
  var d;
2303
2328
  return t ? {
2304
2329
  ...e.content,
2305
2330
  testVariationId: (d = e.content) == null ? void 0 : d.id
2306
- } : vn({
2331
+ } : Rt({
2307
2332
  item: e.content,
2308
- canTrack: M(e.canTrack)
2333
+ canTrack: U(e.canTrack)
2309
2334
  });
2310
2335
  };
2311
2336
  return /* @__PURE__ */ C(x, { children: [
2312
- !e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(_, { scriptStr: kt() }) }) : null,
2337
+ !e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(_, { scriptStr: Gt() }) }) : null,
2313
2338
  t ? /* @__PURE__ */ C(x, { children: [
2314
2339
  /* @__PURE__ */ l(
2315
- O,
2340
+ F,
2316
2341
  {
2317
2342
  id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
2318
2343
  styles: o()
2319
2344
  }
2320
2345
  ),
2321
2346
  /* @__PURE__ */ l(_, { scriptStr: n() }),
2322
- (a = $(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
2347
+ (a = P(e.content)) == null ? void 0 : a.map((c) => /* @__PURE__ */ l(
2323
2348
  ce,
2324
2349
  {
2325
- content: s,
2350
+ content: c,
2326
2351
  showContent: !1,
2327
2352
  classNameProp: void 0,
2328
2353
  model: e.model,
@@ -2337,14 +2362,14 @@ function Ve(e) {
2337
2362
  enrich: e.enrich,
2338
2363
  isSsrAbTest: t
2339
2364
  },
2340
- s.testVariationId
2365
+ c.testVariationId
2341
2366
  ))
2342
2367
  ] }) : null,
2343
2368
  /* @__PURE__ */ l(
2344
2369
  ce,
2345
2370
  {
2346
2371
  content: i(),
2347
- classNameProp: `variant-${(c = e.content) == null ? void 0 : c.id}`,
2372
+ classNameProp: `variant-${(s = e.content) == null ? void 0 : s.id}`,
2348
2373
  showContent: !0,
2349
2374
  model: e.model,
2350
2375
  data: e.data,
@@ -2361,7 +2386,7 @@ function Ve(e) {
2361
2386
  )
2362
2387
  ] });
2363
2388
  }
2364
- const Bn = async ({
2389
+ const $n = async ({
2365
2390
  builderContextValue: e,
2366
2391
  symbol: t
2367
2392
  }) => {
@@ -2380,22 +2405,22 @@ const Bn = async ({
2380
2405
  k.error("Could not fetch symbol content: ", n);
2381
2406
  });
2382
2407
  };
2383
- async function Fn(e) {
2408
+ async function On(e) {
2384
2409
  var o, i, r, a;
2385
2410
  const t = function() {
2386
- var s, d;
2411
+ var c, d;
2387
2412
  return [
2388
2413
  e.attributes.className,
2389
2414
  "builder-symbol",
2390
- (s = e.symbol) != null && s.inline ? "builder-inline-symbol" : void 0,
2415
+ (c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
2391
2416
  (d = e.symbol) != null && d.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2392
2417
  ].filter(Boolean).join(" ");
2393
- }, n = ((o = e.symbol) == null ? void 0 : o.content) || await Bn({
2418
+ }, n = ((o = e.symbol) == null ? void 0 : o.content) || await $n({
2394
2419
  symbol: e.symbol,
2395
2420
  builderContextValue: e.builderContext
2396
2421
  });
2397
2422
  return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
2398
- Ve,
2423
+ Be,
2399
2424
  {
2400
2425
  __isNestedRender: !0,
2401
2426
  apiVersion: e.builderContext.apiVersion,
@@ -2412,7 +2437,7 @@ async function Fn(e) {
2412
2437
  }
2413
2438
  ) });
2414
2439
  }
2415
- const Xn = D, Qn = Ve, le = {};
2440
+ const Xn = D, Qn = Be, le = {};
2416
2441
  function Zn(e) {
2417
2442
  if (v()) {
2418
2443
  Object.assign(le, e);
@@ -2435,7 +2460,7 @@ const eo = async (e) => {
2435
2460
  urlPath: t
2436
2461
  } : {}
2437
2462
  },
2438
- options: Re(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
2463
+ options: we(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
2439
2464
  };
2440
2465
  return {
2441
2466
  apiKey: n.apiKey,
@@ -2444,39 +2469,39 @@ const eo = async (e) => {
2444
2469
  };
2445
2470
  };
2446
2471
  export {
2447
- Re as A,
2472
+ we as A,
2448
2473
  D as B,
2449
- Ve as C,
2450
- Hn as D,
2474
+ Be as C,
2475
+ qn as D,
2451
2476
  eo as E,
2452
2477
  Xn as R,
2453
- Fn as S,
2454
- Pt as T,
2455
- dn as _,
2478
+ On as S,
2479
+ Mt as T,
2480
+ kn as _,
2456
2481
  Mn as a,
2457
2482
  _n as b,
2458
2483
  jn as c,
2459
2484
  v as d,
2460
- M as e,
2461
- Yn as f,
2462
- mt as g,
2485
+ U as e,
2486
+ zn as f,
2487
+ dt as g,
2463
2488
  K as h,
2464
2489
  j as i,
2465
- qn as j,
2466
- F as k,
2490
+ Gn as j,
2491
+ O as k,
2467
2492
  k as l,
2468
2493
  Kn as m,
2469
2494
  G as n,
2470
- Gt as o,
2471
- Cn as p,
2495
+ nn as o,
2496
+ Qt as p,
2472
2497
  Qn as q,
2473
- Dn as r,
2474
- zn as s,
2498
+ Jn as r,
2499
+ Yn as s,
2475
2500
  gt as t,
2476
- fn as u,
2501
+ Tn as u,
2477
2502
  Zn as v,
2478
- Ae as w,
2479
- Jn as x,
2480
- Gn as y,
2481
- Pn as z
2503
+ un as w,
2504
+ Ie as x,
2505
+ Dn as y,
2506
+ Hn as z
2482
2507
  };