@builder.io/sdk-qwik 0.0.12 → 0.0.13

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 (143) hide show
  1. package/.yarn/cache/@builder.io-qwik-npm-0.0.103-bdc7786a46-98363e9103.zip +0 -0
  2. package/.yarn/cache/@gar-promisify-npm-1.1.3-ac1a325862-4059f790e2.zip +0 -0
  3. package/.yarn/cache/@npmcli-fs-npm-2.1.2-08d434e77b-405074965e.zip +0 -0
  4. package/.yarn/cache/@npmcli-move-file-npm-2.0.1-b593d8f741-52dc02259d.zip +0 -0
  5. package/.yarn/cache/@tootallnate-once-npm-2.0.0-e36cf4f140-ad87447820.zip +0 -0
  6. package/.yarn/cache/@types-node-npm-18.7.6-c1eafa3d9a-5122988c32.zip +0 -0
  7. package/.yarn/cache/abbrev-npm-1.1.1-3659247eab-a4a97ec07d.zip +0 -0
  8. package/.yarn/cache/agent-base-npm-6.0.2-428f325a93-f52b6872cc.zip +0 -0
  9. package/.yarn/cache/agentkeepalive-npm-4.2.1-b86a9fb343-39cb49ed8c.zip +0 -0
  10. package/.yarn/cache/aggregate-error-npm-3.1.0-415a406f4e-1101a33f21.zip +0 -0
  11. package/.yarn/cache/ansi-regex-npm-5.0.1-c963a48615-2aa4bb54ca.zip +0 -0
  12. package/.yarn/cache/aproba-npm-2.0.0-8716bcfde6-5615cadcfb.zip +0 -0
  13. package/.yarn/cache/are-we-there-yet-npm-3.0.1-3395b1512f-52590c2486.zip +0 -0
  14. package/.yarn/cache/balanced-match-npm-1.0.2-a53c126459-9706c088a2.zip +0 -0
  15. package/.yarn/cache/brace-expansion-npm-1.1.11-fb95eb05ad-faf34a7bb0.zip +0 -0
  16. package/.yarn/cache/brace-expansion-npm-2.0.1-17aa2616f9-a61e7cd2e8.zip +0 -0
  17. package/.yarn/cache/cacache-npm-16.1.2-0d36d1aaf1-defe1d6f55.zip +0 -0
  18. package/.yarn/cache/chownr-npm-2.0.0-638f1c9c61-c57cf9dd07.zip +0 -0
  19. package/.yarn/cache/clean-stack-npm-2.2.0-a8ce435a5c-2ac8cd2b2f.zip +0 -0
  20. package/.yarn/cache/color-support-npm-1.1.3-3be5c53455-9b73568176.zip +0 -0
  21. package/.yarn/cache/concat-map-npm-0.0.1-85a921b7ee-902a9f5d89.zip +0 -0
  22. package/.yarn/cache/console-control-strings-npm-1.1.0-e3160e5275-8755d76787.zip +0 -0
  23. package/.yarn/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zip +0 -0
  24. package/.yarn/cache/delegates-npm-1.0.0-9b1942d75f-a51744d9b5.zip +0 -0
  25. package/.yarn/cache/depd-npm-1.1.2-b0c8414da7-6b406620d2.zip +0 -0
  26. package/.yarn/cache/emoji-regex-npm-8.0.0-213764015c-d4c5c39d5a.zip +0 -0
  27. package/.yarn/cache/encoding-npm-0.1.13-82a1837d30-bb98632f8f.zip +0 -0
  28. package/.yarn/cache/env-paths-npm-2.2.1-7c7577428c-65b5df55a8.zip +0 -0
  29. package/.yarn/cache/err-code-npm-2.0.3-082e0ff9a7-8b7b1be20d.zip +0 -0
  30. package/.yarn/cache/esbuild-darwin-arm64-npm-0.14.54-ec53803fa6-8.zip +0 -0
  31. package/.yarn/cache/esbuild-npm-0.14.54-b3dcd8a41e-49e360b118.zip +0 -0
  32. package/.yarn/cache/fs-minipass-npm-2.1.0-501ef87306-1b8d128dae.zip +0 -0
  33. package/.yarn/cache/fs.realpath-npm-1.0.0-c8f05d8126-99ddea01a7.zip +0 -0
  34. package/.yarn/cache/fsevents-npm-2.3.2-a881d6ac9f-97ade64e75.zip +0 -0
  35. package/.yarn/cache/fsevents-patch-3340e2eb10-8.zip +0 -0
  36. package/.yarn/cache/function-bind-npm-1.1.1-b56b322ae9-b32fbaebb3.zip +0 -0
  37. package/.yarn/cache/gauge-npm-4.0.4-8f878385e9-788b6bfe52.zip +0 -0
  38. package/.yarn/cache/glob-npm-7.2.3-2d866d17a5-29452e97b3.zip +0 -0
  39. package/.yarn/cache/glob-npm-8.0.3-750f909025-50bcdea19d.zip +0 -0
  40. package/.yarn/cache/graceful-fs-npm-4.2.10-79c70989ca-3f109d70ae.zip +0 -0
  41. package/.yarn/cache/has-npm-1.0.3-b7f00631c1-b9ad53d53b.zip +0 -0
  42. package/.yarn/cache/has-unicode-npm-2.0.1-893adb4747-1eab07a743.zip +0 -0
  43. package/.yarn/cache/http-cache-semantics-npm-4.1.0-860520a31f-974de94a81.zip +0 -0
  44. package/.yarn/cache/http-proxy-agent-npm-5.0.0-7f1f121b83-e2ee1ff165.zip +0 -0
  45. package/.yarn/cache/https-proxy-agent-npm-5.0.1-42d65f358e-571fccdf38.zip +0 -0
  46. package/.yarn/cache/humanize-ms-npm-1.2.1-e942bd7329-9c7a74a282.zip +0 -0
  47. package/.yarn/cache/iconv-lite-npm-0.6.3-24b8aae27e-3f60d47a5c.zip +0 -0
  48. package/.yarn/cache/imurmurhash-npm-0.1.4-610c5068a0-7cae75c8cd.zip +0 -0
  49. package/.yarn/cache/indent-string-npm-4.0.0-7b717435b2-824cfb9929.zip +0 -0
  50. package/.yarn/cache/infer-owner-npm-1.0.4-685ac3d2af-181e732764.zip +0 -0
  51. package/.yarn/cache/inflight-npm-1.0.6-ccedb4b908-f4f76aa072.zip +0 -0
  52. package/.yarn/cache/inherits-npm-2.0.4-c66b3957a0-4a48a73384.zip +0 -0
  53. package/.yarn/cache/ip-npm-2.0.0-204facb3cc-cfcfac6b87.zip +0 -0
  54. package/.yarn/cache/is-core-module-npm-2.10.0-6dff9310aa-0f3f77811f.zip +0 -0
  55. package/.yarn/cache/is-fullwidth-code-point-npm-3.0.0-1ecf4ebee5-44a30c2945.zip +0 -0
  56. package/.yarn/cache/is-lambda-npm-1.0.1-7ab55bc8a8-93a32f0194.zip +0 -0
  57. package/.yarn/cache/isexe-npm-2.0.0-b58870bd2e-26bf6c5480.zip +0 -0
  58. package/.yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-f97f499f89.zip +0 -0
  59. package/.yarn/cache/lru-cache-npm-7.14.0-354cf654ec-efdd329f2c.zip +0 -0
  60. package/.yarn/cache/make-fetch-happen-npm-10.2.1-f1cc7cd2df-2332eb9a8e.zip +0 -0
  61. package/.yarn/cache/minimatch-npm-3.1.2-9405269906-c154e56640.zip +0 -0
  62. package/.yarn/cache/minimatch-npm-5.1.0-34f6240621-15ce53d31a.zip +0 -0
  63. package/.yarn/cache/minipass-collect-npm-1.0.2-3b4676eab5-14df761028.zip +0 -0
  64. package/.yarn/cache/minipass-fetch-npm-2.1.1-c4a8efdb09-1aae0c2240.zip +0 -0
  65. package/.yarn/cache/minipass-flush-npm-1.0.5-efe79d9826-56269a0b22.zip +0 -0
  66. package/.yarn/cache/minipass-npm-3.3.5-a555b091e7-f89f02bcaa.zip +0 -0
  67. package/.yarn/cache/minipass-pipeline-npm-1.2.4-5924cb077f-b14240dac0.zip +0 -0
  68. package/.yarn/cache/minipass-sized-npm-1.0.3-306d86f432-79076749fc.zip +0 -0
  69. package/.yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-f1fdeac0b0.zip +0 -0
  70. package/.yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-a96865108c.zip +0 -0
  71. package/.yarn/cache/ms-npm-2.1.2-ec0c1512ff-673cdb2c31.zip +0 -0
  72. package/.yarn/cache/ms-npm-2.1.3-81ff3cfac1-aa92de6080.zip +0 -0
  73. package/.yarn/cache/nanoid-npm-3.3.4-3d250377d6-2fddd6dee9.zip +0 -0
  74. package/.yarn/cache/negotiator-npm-0.6.3-9d50e36171-b8ffeb1e26.zip +0 -0
  75. package/.yarn/cache/node-gyp-npm-9.1.0-2091059b31-1437fa4a87.zip +0 -0
  76. package/.yarn/cache/nopt-npm-5.0.0-304b40fbfe-d35fdec187.zip +0 -0
  77. package/.yarn/cache/npmlog-npm-6.0.2-e0e69455c7-ae238cd264.zip +0 -0
  78. package/.yarn/cache/once-npm-1.4.0-ccf03ef07a-cd0a885013.zip +0 -0
  79. package/.yarn/cache/p-map-npm-4.0.0-4677ae07c7-cb0ab21ec0.zip +0 -0
  80. package/.yarn/cache/path-is-absolute-npm-1.0.1-31bc695ffd-060840f92c.zip +0 -0
  81. package/.yarn/cache/path-parse-npm-1.0.7-09564527b7-49abf3d811.zip +0 -0
  82. package/.yarn/cache/picocolors-npm-1.0.0-d81e0b1927-a2e8092dd8.zip +0 -0
  83. package/.yarn/cache/postcss-npm-8.4.16-7367383579-10eee25efd.zip +0 -0
  84. package/.yarn/cache/promise-inflight-npm-1.0.1-5bb925afac-2274948309.zip +0 -0
  85. package/.yarn/cache/promise-retry-npm-2.0.1-871f0b01b7-f96a3f6d90.zip +0 -0
  86. package/.yarn/cache/readable-stream-npm-3.6.0-23a4a5eb56-d4ea81502d.zip +0 -0
  87. package/.yarn/cache/resolve-npm-1.22.1-3980488690-07af5fc1e8.zip +0 -0
  88. package/.yarn/cache/resolve-patch-46f9469d0d-5656f4d0be.zip +0 -0
  89. package/.yarn/cache/retry-npm-0.12.0-72ac7fb4cc-623bd7d2e5.zip +0 -0
  90. package/.yarn/cache/rimraf-npm-3.0.2-2cb7dac69a-87f4164e39.zip +0 -0
  91. package/.yarn/cache/rollup-npm-2.78.0-09284f4c78-01b5a7ae08.zip +0 -0
  92. package/.yarn/cache/safe-buffer-npm-5.2.1-3481c8aa9b-b99c4b41fd.zip +0 -0
  93. package/.yarn/cache/safer-buffer-npm-2.1.2-8d5c0b705e-cab8f25ae6.zip +0 -0
  94. package/.yarn/cache/semver-npm-7.3.7-3bfe704194-2fa3e87756.zip +0 -0
  95. package/.yarn/cache/set-blocking-npm-2.0.0-49e2cffa24-6e65a05f7c.zip +0 -0
  96. package/.yarn/cache/signal-exit-npm-3.0.7-bd270458a3-a2f098f247.zip +0 -0
  97. package/.yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-b5167a7142.zip +0 -0
  98. package/.yarn/cache/socks-npm-2.7.0-cc1cb019db-0b5d94e2b3.zip +0 -0
  99. package/.yarn/cache/socks-proxy-agent-npm-7.0.0-7aacf32ea0-7205543701.zip +0 -0
  100. package/.yarn/cache/source-map-js-npm-1.0.2-ee4f9f9b30-c049a7fc4d.zip +0 -0
  101. package/.yarn/cache/ssri-npm-9.0.1-33ce27f4f8-fb58f5e46b.zip +0 -0
  102. package/.yarn/cache/string-width-npm-4.2.3-2c27177bae-e52c10dc3f.zip +0 -0
  103. package/.yarn/cache/string_decoder-npm-1.3.0-2422117fd0-8417646695.zip +0 -0
  104. package/.yarn/cache/strip-ansi-npm-6.0.1-caddc7cb40-f3cd25890a.zip +0 -0
  105. package/.yarn/cache/supports-preserve-symlinks-flag-npm-1.0.0-f17c4d0028-53b1e247e6.zip +0 -0
  106. package/.yarn/cache/tar-npm-6.1.11-e6ac3cba9c-a04c07bb9e.zip +0 -0
  107. package/.yarn/cache/typescript-npm-4.7.4-65aa6ffb42-5750181b1c.zip +0 -0
  108. package/.yarn/cache/typescript-patch-ae154b3216-96d3030cb0.zip +0 -0
  109. package/.yarn/cache/unique-filename-npm-1.1.1-c885c5095b-cf4998c922.zip +0 -0
  110. package/.yarn/cache/unique-slug-npm-2.0.2-f6ba1ddeb7-5b6876a645.zip +0 -0
  111. package/.yarn/cache/util-deprecate-npm-1.0.2-e3fe1a219c-474acf1146.zip +0 -0
  112. package/.yarn/cache/vite-npm-3.0.2-a17ab24a12-10aebec0df.zip +0 -0
  113. package/.yarn/cache/which-npm-2.0.2-320ddf72f7-1a5c563d3c.zip +0 -0
  114. package/.yarn/cache/wide-align-npm-1.1.5-889d77e592-d5fc37cd56.zip +0 -0
  115. package/.yarn/cache/wrappy-npm-1.0.2-916de4d4b3-159da4805f.zip +0 -0
  116. package/.yarn/cache/yallist-npm-4.0.0-b493d9e907-343617202a.zip +0 -0
  117. package/.yarn/install-state.gz +0 -0
  118. package/README.md +7 -3
  119. package/lib/index.qwik.cjs +421 -186
  120. package/lib/index.qwik.mjs +421 -186
  121. package/package.json +4 -3
  122. package/src/blocks/button/button.jsx +7 -2
  123. package/src/blocks/columns/columns.jsx +7 -3
  124. package/src/blocks/form/builder-blocks.jsx +1 -1
  125. package/src/blocks/symbol/symbol.jsx +1 -3
  126. package/src/components/render-block/block-styles.jsx +1 -1
  127. package/src/components/render-block/render-block.jsx +2 -3
  128. package/src/components/render-block/render-repeated-block.jsx +4 -1
  129. package/src/components/render-content/render-content.jsx +14 -5
  130. package/src/components/render-inlined-styles.jsx +4 -3
  131. package/src/functions/get-processed-block.js +10 -6
  132. package/src/functions/get-processed-block.test.js +1 -1
  133. package/src/functions/track.js +71 -2
  134. package/src/helpers/cookie.js +59 -0
  135. package/src/helpers/localStorage.js +34 -0
  136. package/src/helpers/nullable.js +4 -0
  137. package/src/helpers/sessionId.js +26 -0
  138. package/src/helpers/time.js +5 -0
  139. package/src/helpers/url.js +10 -0
  140. package/src/helpers/url.test.js +15 -0
  141. package/src/helpers/uuid.js +13 -0
  142. package/src/helpers/visitorId.js +33 -0
  143. package/src/types/can-track.js +0 -0
@@ -173,36 +173,36 @@ const set = (obj, _path, value) => {
173
173
  function transformBlock(block) {
174
174
  return block;
175
175
  }
176
- var __defProp$7 = Object.defineProperty;
177
- var __defProps$5 = Object.defineProperties;
178
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
179
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
180
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
181
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
182
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, {
176
+ var __defProp$8 = Object.defineProperty;
177
+ var __defProps$6 = Object.defineProperties;
178
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
179
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
180
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
181
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
182
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, {
183
183
  enumerable: true,
184
184
  configurable: true,
185
185
  writable: true,
186
186
  value
187
187
  }) : obj[key] = value;
188
- var __spreadValues$7 = (a, b) => {
188
+ var __spreadValues$8 = (a, b) => {
189
189
  for (var prop in b || (b = {}))
190
- if (__hasOwnProp$7.call(b, prop))
191
- __defNormalProp$7(a, prop, b[prop]);
192
- if (__getOwnPropSymbols$7) {
193
- for (var prop of __getOwnPropSymbols$7(b))
194
- if (__propIsEnum$7.call(b, prop))
195
- __defNormalProp$7(a, prop, b[prop]);
190
+ if (__hasOwnProp$8.call(b, prop))
191
+ __defNormalProp$8(a, prop, b[prop]);
192
+ if (__getOwnPropSymbols$8) {
193
+ for (var prop of __getOwnPropSymbols$8(b))
194
+ if (__propIsEnum$8.call(b, prop))
195
+ __defNormalProp$8(a, prop, b[prop]);
196
196
  }
197
197
  return a;
198
198
  };
199
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
199
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
200
200
  const evaluateBindings = ({ block, context, state }) => {
201
201
  if (!block.bindings)
202
202
  return block;
203
- const copied = __spreadProps$5(__spreadValues$7({}, block), {
204
- properties: __spreadValues$7({}, block.properties),
205
- actions: __spreadValues$7({}, block.actions)
203
+ const copied = __spreadProps$6(__spreadValues$8({}, block), {
204
+ properties: __spreadValues$8({}, block.properties),
205
+ actions: __spreadValues$8({}, block.actions)
206
206
  });
207
207
  for (const binding in block.bindings) {
208
208
  const expression = block.bindings[binding];
@@ -215,17 +215,16 @@ const evaluateBindings = ({ block, context, state }) => {
215
215
  }
216
216
  return copied;
217
217
  };
218
- function getProcessedBlock(options) {
219
- const { state, context } = options;
220
- const block = transformBlock(options.block);
221
- if (evaluateBindings)
218
+ function getProcessedBlock({ block, context, shouldEvaluateBindings, state }) {
219
+ const transformedBlock = transformBlock(block);
220
+ if (shouldEvaluateBindings)
222
221
  return evaluateBindings({
223
- block,
222
+ block: transformedBlock,
224
223
  state,
225
224
  context
226
225
  });
227
226
  else
228
- return block;
227
+ return transformedBlock;
229
228
  }
230
229
  const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
231
230
  const convertStyleMaptoCSS = (style) => {
@@ -235,21 +234,25 @@ const convertStyleMaptoCSS = (style) => {
235
234
  });
236
235
  return cssProps.join("\n");
237
236
  };
238
- const RenderInlinedStyles = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
237
+ const tagName$1 = function tagName(props, state) {
238
+ return "style";
239
+ };
240
+ const RenderInlinedStyles = (props) => {
239
241
  const state = {};
242
+ state.tagName = tagName$1();
240
243
  return /* @__PURE__ */ jsx(Fragment$1, {
241
244
  children: /* @__PURE__ */ jsx(state.tagName, {
242
245
  children: props.styles
243
246
  })
244
247
  });
245
- }, "RenderInlinedStyles_component_0sD5UmyM3Rg"));
248
+ };
246
249
  const RenderInlinedStyles$1 = RenderInlinedStyles;
247
250
  const useBlock$1 = function useBlock(props, state) {
248
251
  return getProcessedBlock({
249
252
  block: props.block,
250
253
  state: props.context.state,
251
254
  context: props.context.context,
252
- evaluateBindings: true
255
+ shouldEvaluateBindings: true
253
256
  });
254
257
  };
255
258
  const css = function css2(props, state) {
@@ -296,6 +299,36 @@ function getBlockActions(options) {
296
299
  }
297
300
  return obj;
298
301
  }
302
+ var __defProp$7 = Object.defineProperty;
303
+ var __defProps$5 = Object.defineProperties;
304
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
305
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
306
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
307
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
308
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, {
309
+ enumerable: true,
310
+ configurable: true,
311
+ writable: true,
312
+ value
313
+ }) : obj[key] = value;
314
+ var __spreadValues$7 = (a, b) => {
315
+ for (var prop in b || (b = {}))
316
+ if (__hasOwnProp$7.call(b, prop))
317
+ __defNormalProp$7(a, prop, b[prop]);
318
+ if (__getOwnPropSymbols$7) {
319
+ for (var prop of __getOwnPropSymbols$7(b))
320
+ if (__propIsEnum$7.call(b, prop))
321
+ __defNormalProp$7(a, prop, b[prop]);
322
+ }
323
+ return a;
324
+ };
325
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
326
+ function getBlockComponentOptions(block) {
327
+ var _a;
328
+ return __spreadProps$5(__spreadValues$7(__spreadValues$7({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
329
+ builderBlock: block
330
+ });
331
+ }
299
332
  var __defProp$6 = Object.defineProperty;
300
333
  var __defProps$4 = Object.defineProperties;
301
334
  var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
@@ -320,39 +353,9 @@ var __spreadValues$6 = (a, b) => {
320
353
  return a;
321
354
  };
322
355
  var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
323
- function getBlockComponentOptions(block) {
324
- var _a;
325
- return __spreadProps$4(__spreadValues$6(__spreadValues$6({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
326
- builderBlock: block
327
- });
328
- }
329
- var __defProp$5 = Object.defineProperty;
330
- var __defProps$3 = Object.defineProperties;
331
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
332
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
333
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
334
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
335
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
336
- enumerable: true,
337
- configurable: true,
338
- writable: true,
339
- value
340
- }) : obj[key] = value;
341
- var __spreadValues$5 = (a, b) => {
342
- for (var prop in b || (b = {}))
343
- if (__hasOwnProp$5.call(b, prop))
344
- __defNormalProp$5(a, prop, b[prop]);
345
- if (__getOwnPropSymbols$5) {
346
- for (var prop of __getOwnPropSymbols$5(b))
347
- if (__propIsEnum$5.call(b, prop))
348
- __defNormalProp$5(a, prop, b[prop]);
349
- }
350
- return a;
351
- };
352
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
353
356
  function getBlockProperties(block) {
354
357
  var _a;
355
- return __spreadProps$3(__spreadValues$5({}, block.properties), {
358
+ return __spreadProps$4(__spreadValues$6({}, block.properties), {
356
359
  "builder-id": block.id,
357
360
  class: [
358
361
  block.id,
@@ -367,30 +370,30 @@ const convertStyleObject = (obj) => {
367
370
  };
368
371
  const sanitizeBlockStyles = (_styles) => {
369
372
  };
370
- var __defProp$4 = Object.defineProperty;
371
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
372
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
373
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
374
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {
373
+ var __defProp$5 = Object.defineProperty;
374
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
375
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
376
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
377
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
375
378
  enumerable: true,
376
379
  configurable: true,
377
380
  writable: true,
378
381
  value
379
382
  }) : obj[key] = value;
380
- var __spreadValues$4 = (a, b) => {
383
+ var __spreadValues$5 = (a, b) => {
381
384
  for (var prop in b || (b = {}))
382
- if (__hasOwnProp$4.call(b, prop))
383
- __defNormalProp$4(a, prop, b[prop]);
384
- if (__getOwnPropSymbols$4) {
385
- for (var prop of __getOwnPropSymbols$4(b))
386
- if (__propIsEnum$4.call(b, prop))
387
- __defNormalProp$4(a, prop, b[prop]);
385
+ if (__hasOwnProp$5.call(b, prop))
386
+ __defNormalProp$5(a, prop, b[prop]);
387
+ if (__getOwnPropSymbols$5) {
388
+ for (var prop of __getOwnPropSymbols$5(b))
389
+ if (__propIsEnum$5.call(b, prop))
390
+ __defNormalProp$5(a, prop, b[prop]);
388
391
  }
389
392
  return a;
390
393
  };
391
394
  function getBlockStyles(block) {
392
395
  var _a, _b, _c, _d, _e;
393
- const styles = __spreadValues$4(__spreadValues$4({}, convertStyleObject((_a = block.responsiveStyles) == null ? void 0 : _a.large)), block.styles);
396
+ const styles = __spreadValues$5(__spreadValues$5({}, convertStyleObject((_a = block.responsiveStyles) == null ? void 0 : _a.large)), block.styles);
394
397
  if ((_b = block.responsiveStyles) == null ? void 0 : _b.medium)
395
398
  styles[getMaxWidthQueryForSize("medium")] = convertStyleObject((_c = block.responsiveStyles) == null ? void 0 : _c.medium);
396
399
  if ((_d = block.responsiveStyles) == null ? void 0 : _d.small)
@@ -418,8 +421,8 @@ const EMPTY_HTML_ELEMENTS = [
418
421
  "track",
419
422
  "wbr"
420
423
  ];
421
- const isEmptyHtmlElement = (tagName3) => {
422
- return typeof tagName3 === "string" && EMPTY_HTML_ELEMENTS.includes(tagName3.toLowerCase());
424
+ const isEmptyHtmlElement = (tagName4) => {
425
+ return typeof tagName4 === "string" && EMPTY_HTML_ELEMENTS.includes(tagName4.toLowerCase());
423
426
  };
424
427
  const RenderComponent = (props) => {
425
428
  return /* @__PURE__ */ jsx(Fragment$1, {
@@ -463,7 +466,7 @@ const RenderRepeatedBlock = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
463
466
  }));
464
467
  return /* @__PURE__ */ jsx(RenderBlock$1, {
465
468
  block: props.block,
466
- context: props.context
469
+ context: props.repeatContext
467
470
  });
468
471
  }, "RenderRepeatedBlock_component_fV0PdmPN990"));
469
472
  const RenderRepeatedBlock$1 = RenderRepeatedBlock;
@@ -472,7 +475,7 @@ const component = function component2(props, state) {
472
475
  block: props.block,
473
476
  state: props.context.state,
474
477
  context: props.context.context,
475
- evaluateBindings: false
478
+ shouldEvaluateBindings: false
476
479
  }).component?.name;
477
480
  if (!componentName)
478
481
  return null;
@@ -495,7 +498,7 @@ const componentInfo$a = function componentInfo(props, state) {
495
498
  const componentRef = function componentRef2(props, state) {
496
499
  return component(props)?.component;
497
500
  };
498
- const tagName = function tagName2(props, state) {
501
+ const tagName2 = function tagName3(props, state) {
499
502
  return getBlockTag(useBlock2(props));
500
503
  };
501
504
  const useBlock2 = function useBlock3(props, state) {
@@ -503,7 +506,7 @@ const useBlock2 = function useBlock3(props, state) {
503
506
  block: props.block,
504
507
  state: props.context.state,
505
508
  context: props.context.context,
506
- evaluateBindings: true
509
+ shouldEvaluateBindings: true
507
510
  });
508
511
  };
509
512
  const attributes = function attributes2(props, state) {
@@ -573,16 +576,15 @@ const repeatItemData = function repeatItemData2(props, state) {
573
576
  };
574
577
  const RenderBlock = (props) => {
575
578
  const state = {};
576
- state.tagName = tagName(props);
579
+ state.tagName = tagName2(props);
577
580
  return /* @__PURE__ */ jsx(Fragment$1, {
578
- children: shouldWrap(props) ? !isEmptyHtmlElement(tagName(props)) ? /* @__PURE__ */ jsxs(state.tagName, {
581
+ children: shouldWrap(props) ? !isEmptyHtmlElement(tagName2(props)) ? /* @__PURE__ */ jsxs(state.tagName, {
579
582
  ...attributes(props),
580
583
  children: [
581
584
  repeatItemData(props) ? (repeatItemData(props) || []).map((data, index) => {
582
585
  return /* @__PURE__ */ jsx(RenderRepeatedBlock$1, {
583
586
  repeatContext: data.context,
584
- block: data.block,
585
- context: props.context
587
+ block: data.block
586
588
  }, index);
587
589
  }) : null,
588
590
  !repeatItemData(props) ? /* @__PURE__ */ jsx(RenderComponent$1, {
@@ -634,7 +636,7 @@ const onMouseEnter = function onMouseEnter2(props, state, builderContext) {
634
636
  }, "*");
635
637
  };
636
638
  const RenderBlocks = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
637
- useStylesScopedQrl(inlinedQrl(STYLES$2, "RenderBlocks_component_useStylesScoped_QNti2s7juQc"));
639
+ useStylesScopedQrl(inlinedQrl(STYLES$3, "RenderBlocks_component_useStylesScoped_QNti2s7juQc"));
638
640
  const builderContext = useContext(stdin_default);
639
641
  const state = {};
640
642
  return /* @__PURE__ */ jsxs("div", {
@@ -677,7 +679,7 @@ const RenderBlocks = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
677
679
  });
678
680
  }, "RenderBlocks_component_SXGwmVyEM0s"));
679
681
  const RenderBlocks$1 = RenderBlocks;
680
- const STYLES$2 = `.div-RenderBlocks {
682
+ const STYLES$3 = `.div-RenderBlocks {
681
683
  display: flex;
682
684
  flex-direction: column;
683
685
  align-items: stretch; }`;
@@ -719,7 +721,7 @@ const columnCssVars = function columnCssVars2(props, state) {
719
721
  };
720
722
  };
721
723
  const Columns = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
722
- useStylesScopedQrl(inlinedQrl(STYLES$1, "Columns_component_useStylesScoped_704fWXyHORo"));
724
+ useStylesScopedQrl(inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_704fWXyHORo"));
723
725
  const state = {};
724
726
  return /* @__PURE__ */ jsx("div", {
725
727
  class: "builder-columns div-Columns",
@@ -733,20 +735,22 @@ const Columns = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
733
735
  ...columnCssVars(props, state)
734
736
  },
735
737
  children: /* @__PURE__ */ jsx(RenderBlocks$1, {
736
- blocks: column.blocks
738
+ blocks: column.blocks,
739
+ path: `component.options.columns.${index}.blocks`,
740
+ parent: props.builderBlock.id
737
741
  })
738
742
  }, index);
739
743
  })
740
744
  });
741
745
  }, "Columns_component_0PeVQGTMczc"));
742
746
  const Columns$1 = Columns;
743
- const STYLES$1 = `.div-Columns {
747
+ const STYLES$2 = `.div-Columns {
744
748
  display: flex;
745
749
  align-items: stretch;
746
- line-height: normal; }@media (max-width: 999px) { .div-Columns {
750
+ line-height: normal; }@media (max-width: 991px) { .div-Columns {
747
751
  flex-direction: var(--flex-dir-tablet); } }@media (max-width: 639px) { .div-Columns {
748
752
  flex-direction: var(--flex-dir); } }.div-Columns-2 {
749
- flex-grow: 1; }@media (max-width: 999px) { .div-Columns-2 {
753
+ flex-grow: 1; }@media (max-width: 991px) { .div-Columns-2 {
750
754
  width: var(--column-width-tablet) !important;
751
755
  margin-left: var(--column-margin-left-tablet) !important; } }@media (max-width: 639px) { .div-Columns-2 {
752
756
  width: var(--column-width) !important;
@@ -826,7 +830,7 @@ const webpSrcSet = function webpSrcSet2(props, state) {
826
830
  return "";
827
831
  };
828
832
  const Image = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
829
- useStylesScopedQrl(inlinedQrl(STYLES, "Image_component_useStylesScoped_gRbO7w7SeZA"));
833
+ useStylesScopedQrl(inlinedQrl(STYLES$1, "Image_component_useStylesScoped_gRbO7w7SeZA"));
830
834
  return /* @__PURE__ */ jsxs("div", {
831
835
  class: "div-Image",
832
836
  children: [
@@ -869,7 +873,7 @@ const Image = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
869
873
  });
870
874
  }, "Image_component_y3S3Zox9wEo"));
871
875
  const Image$1 = Image;
872
- const STYLES = `.div-Image {
876
+ const STYLES$1 = `.div-Image {
873
877
  position: relative; }.img-Image {
874
878
  opacity: 1;
875
879
  transition: opacity 0.2s ease-in-out;
@@ -932,6 +936,7 @@ const Video = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
932
936
  }, "Video_component_O5sPuWlrTvk"));
933
937
  const Video$1 = Video;
934
938
  const Button = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
939
+ useStylesScopedQrl(inlinedQrl(STYLES, "Button_component_useStylesScoped_vN61mfeURXY"));
935
940
  return /* @__PURE__ */ jsx(Fragment$2, {
936
941
  children: props.link ? /* @__PURE__ */ jsx("a", {
937
942
  role: "button",
@@ -939,13 +944,16 @@ const Button = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
939
944
  href: props.link,
940
945
  target: props.openLinkInNewTab ? "_blank" : void 0,
941
946
  children: props.text
942
- }) : /* @__PURE__ */ jsx("span", {
947
+ }) : /* @__PURE__ */ jsx("button", {
948
+ class: "button-Button",
943
949
  ...props.attributes,
944
950
  children: props.text
945
951
  })
946
952
  });
947
953
  }, "Button_component_FtjCELjtKF4"));
948
954
  const Button$1 = Button;
955
+ const STYLES = `.button-Button {
956
+ all: unset; }`;
949
957
  const componentInfo$9 = {
950
958
  name: "Core:Button",
951
959
  builtIn: true,
@@ -1745,83 +1753,83 @@ const componentInfo2 = {
1745
1753
  noWrap: true,
1746
1754
  static: true
1747
1755
  };
1748
- var __defProp$3 = Object.defineProperty;
1749
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1750
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
1751
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
1752
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, {
1756
+ var __defProp$4 = Object.defineProperty;
1757
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1758
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1759
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1760
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {
1753
1761
  enumerable: true,
1754
1762
  configurable: true,
1755
1763
  writable: true,
1756
1764
  value
1757
1765
  }) : obj[key] = value;
1758
- var __spreadValues$3 = (a, b) => {
1766
+ var __spreadValues$4 = (a, b) => {
1759
1767
  for (var prop in b || (b = {}))
1760
- if (__hasOwnProp$3.call(b, prop))
1761
- __defNormalProp$3(a, prop, b[prop]);
1762
- if (__getOwnPropSymbols$3) {
1763
- for (var prop of __getOwnPropSymbols$3(b))
1764
- if (__propIsEnum$3.call(b, prop))
1765
- __defNormalProp$3(a, prop, b[prop]);
1768
+ if (__hasOwnProp$4.call(b, prop))
1769
+ __defNormalProp$4(a, prop, b[prop]);
1770
+ if (__getOwnPropSymbols$4) {
1771
+ for (var prop of __getOwnPropSymbols$4(b))
1772
+ if (__propIsEnum$4.call(b, prop))
1773
+ __defNormalProp$4(a, prop, b[prop]);
1766
1774
  }
1767
1775
  return a;
1768
1776
  };
1769
1777
  const getDefaultRegisteredComponents = () => [
1770
- __spreadValues$3({
1778
+ __spreadValues$4({
1771
1779
  component: Columns$1
1772
1780
  }, componentInfo$8),
1773
- __spreadValues$3({
1781
+ __spreadValues$4({
1774
1782
  component: Image$1
1775
1783
  }, componentInfo$6),
1776
- __spreadValues$3({
1784
+ __spreadValues$4({
1777
1785
  component: Img
1778
1786
  }, componentInfo2),
1779
- __spreadValues$3({
1787
+ __spreadValues$4({
1780
1788
  component: Text$1
1781
1789
  }, componentInfo$3),
1782
- __spreadValues$3({
1790
+ __spreadValues$4({
1783
1791
  component: Video$1
1784
1792
  }, componentInfo$2),
1785
- __spreadValues$3({
1793
+ __spreadValues$4({
1786
1794
  component: Symbol$2
1787
1795
  }, componentInfo$4),
1788
- __spreadValues$3({
1796
+ __spreadValues$4({
1789
1797
  component: Button$1
1790
1798
  }, componentInfo$9),
1791
- __spreadValues$3({
1799
+ __spreadValues$4({
1792
1800
  component: Section
1793
1801
  }, componentInfo$5),
1794
- __spreadValues$3({
1802
+ __spreadValues$4({
1795
1803
  component: Fragment
1796
1804
  }, componentInfo$7),
1797
- __spreadValues$3({
1805
+ __spreadValues$4({
1798
1806
  component: embed
1799
1807
  }, componentInfo$1)
1800
1808
  ];
1801
- var __defProp$2 = Object.defineProperty;
1802
- var __defProps$2 = Object.defineProperties;
1803
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
1804
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
1805
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
1806
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
1807
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
1809
+ var __defProp$3 = Object.defineProperty;
1810
+ var __defProps$3 = Object.defineProperties;
1811
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1812
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1813
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
1814
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
1815
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, {
1808
1816
  enumerable: true,
1809
1817
  configurable: true,
1810
1818
  writable: true,
1811
1819
  value
1812
1820
  }) : obj[key] = value;
1813
- var __spreadValues$2 = (a, b) => {
1821
+ var __spreadValues$3 = (a, b) => {
1814
1822
  for (var prop in b || (b = {}))
1815
- if (__hasOwnProp$2.call(b, prop))
1816
- __defNormalProp$2(a, prop, b[prop]);
1817
- if (__getOwnPropSymbols$2) {
1818
- for (var prop of __getOwnPropSymbols$2(b))
1819
- if (__propIsEnum$2.call(b, prop))
1820
- __defNormalProp$2(a, prop, b[prop]);
1823
+ if (__hasOwnProp$3.call(b, prop))
1824
+ __defNormalProp$3(a, prop, b[prop]);
1825
+ if (__getOwnPropSymbols$3) {
1826
+ for (var prop of __getOwnPropSymbols$3(b))
1827
+ if (__propIsEnum$3.call(b, prop))
1828
+ __defNormalProp$3(a, prop, b[prop]);
1821
1829
  }
1822
1830
  return a;
1823
1831
  };
1824
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
1832
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1825
1833
  function flatten(object, path = null, separator = ".") {
1826
1834
  return Object.keys(object).reduce((acc, key) => {
1827
1835
  const value = object[key];
@@ -1834,7 +1842,7 @@ function flatten(object, path = null, separator = ".") {
1834
1842
  value !== null,
1835
1843
  !(Array.isArray(value) && value.length === 0)
1836
1844
  ].every(Boolean);
1837
- return isObject ? __spreadValues$2(__spreadValues$2({}, acc), flatten(value, newPath, separator)) : __spreadProps$2(__spreadValues$2({}, acc), {
1845
+ return isObject ? __spreadValues$3(__spreadValues$3({}, acc), flatten(value, newPath, separator)) : __spreadProps$3(__spreadValues$3({}, acc), {
1838
1846
  [newPath]: value
1839
1847
  });
1840
1848
  }, {});
@@ -1939,30 +1947,30 @@ const handleABTesting = (item, testGroups) => {
1939
1947
  }
1940
1948
  }
1941
1949
  };
1942
- var __defProp$1 = Object.defineProperty;
1943
- var __defProps$1 = Object.defineProperties;
1944
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
1945
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
1946
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
1947
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
1948
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
1950
+ var __defProp$2 = Object.defineProperty;
1951
+ var __defProps$2 = Object.defineProperties;
1952
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
1953
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
1954
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
1955
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
1956
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
1949
1957
  enumerable: true,
1950
1958
  configurable: true,
1951
1959
  writable: true,
1952
1960
  value
1953
1961
  }) : obj[key] = value;
1954
- var __spreadValues$1 = (a, b) => {
1962
+ var __spreadValues$2 = (a, b) => {
1955
1963
  for (var prop in b || (b = {}))
1956
- if (__hasOwnProp$1.call(b, prop))
1957
- __defNormalProp$1(a, prop, b[prop]);
1958
- if (__getOwnPropSymbols$1) {
1959
- for (var prop of __getOwnPropSymbols$1(b))
1960
- if (__propIsEnum$1.call(b, prop))
1961
- __defNormalProp$1(a, prop, b[prop]);
1964
+ if (__hasOwnProp$2.call(b, prop))
1965
+ __defNormalProp$2(a, prop, b[prop]);
1966
+ if (__getOwnPropSymbols$2) {
1967
+ for (var prop of __getOwnPropSymbols$2(b))
1968
+ if (__propIsEnum$2.call(b, prop))
1969
+ __defNormalProp$2(a, prop, b[prop]);
1962
1970
  }
1963
1971
  return a;
1964
1972
  };
1965
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1973
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
1966
1974
  var __async = (__this, __arguments, generator) => {
1967
1975
  return new Promise((resolve, reject) => {
1968
1976
  var fulfilled = (value) => {
@@ -1986,7 +1994,7 @@ var __async = (__this, __arguments, generator) => {
1986
1994
  const fetch$ = getFetch();
1987
1995
  function getContent(options) {
1988
1996
  return __async(this, null, function* () {
1989
- return (yield getAllContent(__spreadProps$1(__spreadValues$1({}, options), {
1997
+ return (yield getAllContent(__spreadProps$2(__spreadValues$2({}, options), {
1990
1998
  limit: 1
1991
1999
  }))).results[0] || null;
1992
2000
  });
@@ -1994,7 +2002,7 @@ function getContent(options) {
1994
2002
  const generateContentUrl = (options) => {
1995
2003
  const { limit = 1, userAttributes, query, noTraverse = false, model, apiKey } = options;
1996
2004
  const url = new URL(`https://cdn.builder.io/api/v2/content/${model}?apiKey=${apiKey}&limit=${limit}&noTraverse=${noTraverse}`);
1997
- const queryOptions = __spreadValues$1(__spreadValues$1({}, getBuilderSearchParamsFromWindow()), normalizeSearchParams(options.options || {}));
2005
+ const queryOptions = __spreadValues$2(__spreadValues$2({}, getBuilderSearchParamsFromWindow()), normalizeSearchParams(options.options || {}));
1998
2006
  const flattened = flatten(queryOptions);
1999
2007
  for (const key in flattened)
2000
2008
  url.searchParams.set(key, String(flattened[key]));
@@ -2027,52 +2035,52 @@ function isPreviewing() {
2027
2035
  return false;
2028
2036
  return Boolean(location.search.indexOf("builder.preview=") !== -1);
2029
2037
  }
2030
- var __defProp = Object.defineProperty;
2031
- var __defProps = Object.defineProperties;
2032
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2033
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2034
- var __hasOwnProp = Object.prototype.hasOwnProperty;
2035
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
2036
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
2038
+ var __defProp$1 = Object.defineProperty;
2039
+ var __defProps$1 = Object.defineProperties;
2040
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
2041
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
2042
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
2043
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
2044
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
2037
2045
  enumerable: true,
2038
2046
  configurable: true,
2039
2047
  writable: true,
2040
2048
  value
2041
2049
  }) : obj[key] = value;
2042
- var __spreadValues = (a, b) => {
2050
+ var __spreadValues$1 = (a, b) => {
2043
2051
  for (var prop in b || (b = {}))
2044
- if (__hasOwnProp.call(b, prop))
2045
- __defNormalProp(a, prop, b[prop]);
2046
- if (__getOwnPropSymbols) {
2047
- for (var prop of __getOwnPropSymbols(b))
2048
- if (__propIsEnum.call(b, prop))
2049
- __defNormalProp(a, prop, b[prop]);
2052
+ if (__hasOwnProp$1.call(b, prop))
2053
+ __defNormalProp$1(a, prop, b[prop]);
2054
+ if (__getOwnPropSymbols$1) {
2055
+ for (var prop of __getOwnPropSymbols$1(b))
2056
+ if (__propIsEnum$1.call(b, prop))
2057
+ __defNormalProp$1(a, prop, b[prop]);
2050
2058
  }
2051
2059
  return a;
2052
2060
  };
2053
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
2054
- var __objRest = (source, exclude) => {
2061
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
2062
+ var __objRest$1 = (source, exclude) => {
2055
2063
  var target = {};
2056
2064
  for (var prop in source)
2057
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
2065
+ if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
2058
2066
  target[prop] = source[prop];
2059
- if (source != null && __getOwnPropSymbols) {
2060
- for (var prop of __getOwnPropSymbols(source))
2061
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
2067
+ if (source != null && __getOwnPropSymbols$1) {
2068
+ for (var prop of __getOwnPropSymbols$1(source))
2069
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
2062
2070
  target[prop] = source[prop];
2063
2071
  }
2064
2072
  return target;
2065
2073
  };
2066
2074
  const components = [];
2067
2075
  function registerComponent(component3, info) {
2068
- components.push(__spreadValues({
2076
+ components.push(__spreadValues$1({
2069
2077
  component: component3
2070
2078
  }, info));
2071
2079
  console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK.");
2072
2080
  return component3;
2073
2081
  }
2074
2082
  const createRegisterComponentMessage = (_a) => {
2075
- var info = __objRest(_a, [
2083
+ var info = __objRest$1(_a, [
2076
2084
  "component"
2077
2085
  ]);
2078
2086
  return {
@@ -2088,16 +2096,239 @@ const serializeFn = (fnValue) => {
2088
2096
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
2089
2097
  };
2090
2098
  const prepareComponentInfoToSend = (_c) => {
2091
- var { inputs } = _c, info = __objRest(_c, [
2099
+ var { inputs } = _c, info = __objRest$1(_c, [
2092
2100
  "inputs"
2093
2101
  ]);
2094
- return __spreadProps(__spreadValues({}, fastClone(info)), {
2095
- inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps(__spreadValues({}, acc), {
2102
+ return __spreadProps$1(__spreadValues$1({}, fastClone(info)), {
2103
+ inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps$1(__spreadValues$1({}, acc), {
2096
2104
  [key]: serializeValue(value)
2097
2105
  }), {}))
2098
2106
  });
2099
2107
  };
2100
- function track(event, properties) {
2108
+ const getTopLevelDomain = (host) => {
2109
+ const parts = host.split(".");
2110
+ if (parts.length > 2)
2111
+ return parts.slice(1).join(".");
2112
+ return host;
2113
+ };
2114
+ const getCookie = ({ name, canTrack }) => {
2115
+ var _a;
2116
+ try {
2117
+ if (!canTrack)
2118
+ return void 0;
2119
+ return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
2120
+ } catch (err) {
2121
+ console.debug("[COOKIE] GET error: ", err);
2122
+ }
2123
+ };
2124
+ const stringifyCookie = (cookie) => cookie.map(([key, value]) => value ? `${key}=${value}` : key).join("; ");
2125
+ const SECURE_CONFIG = [
2126
+ [
2127
+ "secure",
2128
+ ""
2129
+ ],
2130
+ [
2131
+ "SameSite",
2132
+ "None"
2133
+ ]
2134
+ ];
2135
+ const createCookieString = ({ name, value, expires }) => {
2136
+ const secure = isBrowser() ? location.protocol === "https:" : true;
2137
+ const secureObj = secure ? SECURE_CONFIG : [
2138
+ []
2139
+ ];
2140
+ const expiresObj = expires ? [
2141
+ [
2142
+ "expires",
2143
+ expires.toUTCString()
2144
+ ]
2145
+ ] : [
2146
+ []
2147
+ ];
2148
+ const cookieValue = [
2149
+ [
2150
+ name,
2151
+ value
2152
+ ],
2153
+ ...expiresObj,
2154
+ [
2155
+ "path",
2156
+ "/"
2157
+ ],
2158
+ [
2159
+ "domain",
2160
+ getTopLevelDomain(window.location.hostname)
2161
+ ],
2162
+ ...secureObj
2163
+ ];
2164
+ const cookie = stringifyCookie(cookieValue);
2165
+ return cookie;
2166
+ };
2167
+ const setCookie = ({ name, value, expires, canTrack }) => {
2168
+ try {
2169
+ if (!canTrack)
2170
+ return void 0;
2171
+ const cookie = createCookieString({
2172
+ name,
2173
+ value,
2174
+ expires
2175
+ });
2176
+ document.cookie = cookie;
2177
+ } catch (err) {
2178
+ console.warn("[COOKIE] SET error: ", err);
2179
+ }
2180
+ };
2181
+ const checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
2182
+ function uuidv4() {
2183
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
2184
+ const r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8;
2185
+ return v.toString(16);
2186
+ });
2187
+ }
2188
+ function uuid() {
2189
+ return uuidv4().replace(/-/g, "");
2190
+ }
2191
+ const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
2192
+ const getSessionId = ({ canTrack }) => {
2193
+ if (!canTrack)
2194
+ return void 0;
2195
+ const sessionId = getCookie({
2196
+ name: SESSION_LOCAL_STORAGE_KEY,
2197
+ canTrack
2198
+ });
2199
+ if (checkIsDefined(sessionId))
2200
+ return sessionId;
2201
+ else {
2202
+ const newSessionId = createSessionId();
2203
+ setSessionId({
2204
+ id: newSessionId,
2205
+ canTrack
2206
+ });
2207
+ }
2208
+ };
2209
+ const createSessionId = () => uuid();
2210
+ const setSessionId = ({ id, canTrack }) => setCookie({
2211
+ name: SESSION_LOCAL_STORAGE_KEY,
2212
+ value: id,
2213
+ canTrack
2214
+ });
2215
+ const getLocalStorage = () => isBrowser() && typeof localStorage !== "undefined" ? localStorage : void 0;
2216
+ const getLocalStorageItem = ({ key, canTrack }) => {
2217
+ var _a;
2218
+ try {
2219
+ if (canTrack)
2220
+ return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
2221
+ return void 0;
2222
+ } catch (err) {
2223
+ console.debug("[LocalStorage] GET error: ", err);
2224
+ }
2225
+ };
2226
+ const setLocalStorageItem = ({ key, canTrack, value }) => {
2227
+ var _a;
2228
+ try {
2229
+ if (canTrack)
2230
+ (_a = getLocalStorage()) == null || _a.setItem(key, value);
2231
+ } catch (err) {
2232
+ console.debug("[LocalStorage] SET error: ", err);
2233
+ }
2234
+ };
2235
+ const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
2236
+ const getVisitorId = ({ canTrack }) => {
2237
+ if (!canTrack)
2238
+ return void 0;
2239
+ const visitorId = getLocalStorageItem({
2240
+ key: VISITOR_LOCAL_STORAGE_KEY,
2241
+ canTrack
2242
+ });
2243
+ if (checkIsDefined(visitorId))
2244
+ return visitorId;
2245
+ else {
2246
+ const newVisitorId = createVisitorId();
2247
+ setVisitorId({
2248
+ id: newVisitorId,
2249
+ canTrack
2250
+ });
2251
+ }
2252
+ };
2253
+ const createVisitorId = () => uuid();
2254
+ const setVisitorId = ({ id, canTrack }) => setLocalStorageItem({
2255
+ key: VISITOR_LOCAL_STORAGE_KEY,
2256
+ value: id,
2257
+ canTrack
2258
+ });
2259
+ var __defProp = Object.defineProperty;
2260
+ var __defProps = Object.defineProperties;
2261
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2262
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2263
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
2264
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
2265
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
2266
+ enumerable: true,
2267
+ configurable: true,
2268
+ writable: true,
2269
+ value
2270
+ }) : obj[key] = value;
2271
+ var __spreadValues = (a, b) => {
2272
+ for (var prop in b || (b = {}))
2273
+ if (__hasOwnProp.call(b, prop))
2274
+ __defNormalProp(a, prop, b[prop]);
2275
+ if (__getOwnPropSymbols) {
2276
+ for (var prop of __getOwnPropSymbols(b))
2277
+ if (__propIsEnum.call(b, prop))
2278
+ __defNormalProp(a, prop, b[prop]);
2279
+ }
2280
+ return a;
2281
+ };
2282
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
2283
+ var __objRest = (source, exclude) => {
2284
+ var target = {};
2285
+ for (var prop in source)
2286
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
2287
+ target[prop] = source[prop];
2288
+ if (source != null && __getOwnPropSymbols) {
2289
+ for (var prop of __getOwnPropSymbols(source))
2290
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
2291
+ target[prop] = source[prop];
2292
+ }
2293
+ return target;
2294
+ };
2295
+ const getTrackingEventData = ({ canTrack }) => {
2296
+ if (!canTrack)
2297
+ return {
2298
+ visitorId: void 0,
2299
+ sessionId: void 0
2300
+ };
2301
+ const sessionId = getSessionId({
2302
+ canTrack
2303
+ });
2304
+ const visitorId = getVisitorId({
2305
+ canTrack
2306
+ });
2307
+ return {
2308
+ sessionId,
2309
+ visitorId
2310
+ };
2311
+ };
2312
+ const createEvent = (_a) => {
2313
+ var { type: eventType, canTrack, orgId, contentId } = _a, properties = __objRest(_a, [
2314
+ "type",
2315
+ "canTrack",
2316
+ "orgId",
2317
+ "contentId"
2318
+ ]);
2319
+ return {
2320
+ type: eventType,
2321
+ data: __spreadProps(__spreadValues(__spreadValues({}, properties), getTrackingEventData({
2322
+ canTrack
2323
+ })), {
2324
+ ownerId: orgId,
2325
+ contentId
2326
+ })
2327
+ };
2328
+ };
2329
+ function track(eventProps) {
2330
+ if (!eventProps.canTrack)
2331
+ return;
2101
2332
  if (isEditing())
2102
2333
  return;
2103
2334
  if (!(isBrowser() || TARGET === "reactNative"))
@@ -2106,10 +2337,7 @@ function track(event, properties) {
2106
2337
  method: "POST",
2107
2338
  body: JSON.stringify({
2108
2339
  events: [
2109
- {
2110
- type: event,
2111
- data: properties
2112
- }
2340
+ createEvent(eventProps)
2113
2341
  ]
2114
2342
  }),
2115
2343
  headers: {
@@ -2179,6 +2407,9 @@ const useContent = function useContent2(props, state, elementRef) {
2179
2407
  };
2180
2408
  return mergedContent;
2181
2409
  };
2410
+ const canTrackToUse = function canTrackToUse2(props, state, elementRef) {
2411
+ return props.canTrack || true;
2412
+ };
2182
2413
  const contentState = function contentState2(props, state, elementRef) {
2183
2414
  return {
2184
2415
  ...props.content?.data?.state,
@@ -2228,9 +2459,12 @@ const httpReqsData = function httpReqsData2(props, state, elementRef) {
2228
2459
  return {};
2229
2460
  };
2230
2461
  const onClick2 = function onClick3(props, state, elementRef, _event) {
2231
- if (useContent(props, state) && props.canTrack !== false)
2232
- track("click", {
2233
- contentId: useContent(props, state).id
2462
+ if (useContent(props, state))
2463
+ track({
2464
+ type: "click",
2465
+ canTrack: canTrackToUse(props),
2466
+ contentId: useContent(props, state).id,
2467
+ orgId: props.apiKey
2234
2468
  });
2235
2469
  };
2236
2470
  const evalExpression = function evalExpression2(props, state, elementRef, expression) {
@@ -2308,7 +2542,7 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
2308
2542
  const [elementRef2, props2, state2] = useLexicalScope();
2309
2543
  if (isBrowser()) {
2310
2544
  if (isEditing()) {
2311
- state2.forceReRenderCount++;
2545
+ state2.forceReRenderCount = state2.forceReRenderCount + 1;
2312
2546
  _useMutableProps(elementRef2.current, true);
2313
2547
  registerInsertMenu();
2314
2548
  setupBrowserForEditing();
@@ -2319,9 +2553,12 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
2319
2553
  window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
2320
2554
  window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
2321
2555
  }
2322
- if (useContent(props2, state2) && props2.canTrack !== false)
2323
- track("impression", {
2324
- contentId: useContent(props2, state2).id
2556
+ if (useContent(props2, state2))
2557
+ track({
2558
+ type: "impression",
2559
+ canTrack: canTrackToUse(props2),
2560
+ contentId: useContent(props2, state2).id,
2561
+ orgId: props2.apiKey
2325
2562
  });
2326
2563
  if (isPreviewing()) {
2327
2564
  const searchParams = new URL(location.href).searchParams;
@@ -2424,9 +2661,7 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
2424
2661
  ]));
2425
2662
  useWatchQrl(inlinedQrl(({ track: track2 }) => {
2426
2663
  const [builderContext2, props2, state2] = useLexicalScope();
2427
- props2.symbol && track2(props2.symbol, "content");
2428
- props2.symbol && track2(props2.symbol, "model");
2429
- props2.symbol && track2(props2.symbol, "entry");
2664
+ props2 && track2(props2, "symbol");
2430
2665
  state2 && track2(state2, "content");
2431
2666
  const symbolToUse = props2.symbol;
2432
2667
  if (symbolToUse && !symbolToUse.content && !state2.content && symbolToUse.model)